I would like to know the logic for processing multiple isntruments. Here is an example copied from online guide. It says when OnBarUpdate is processing the primary instrument, then do calculations on primary isntrument 0, and second instrument BarsArray[1], plus third isntrument BarsArray[2]. I am not certain what is actually processed. Because the condition is "if (BarsInProgress == 0)", I would assume BarsArray[2] is not availble when this condition is true. How BarsArray[2] can be accessed? Can you shed some light?
protected override void OnBarUpdate()
{
if (BarsInProgress == 0)
{
if (CCI(20)[0] > 200 && CCI(BarsArray[1], 20)[0] > 200
&& CCI(BarsArray[2], 20)[0] > 200)
{
// Do something
} }
}

Comment