I am using multiple instruments AAPL and AXP. I have the following statement under State.Configure:
AddDataSeries("AXP", Data.BarsPeriodType.Day, 1, Data.MarketDataType.Last);
I have the following statement under OnBarUpdate():
DonchianLow = DonchianChannel(5.Lower[1];
if (Close[0]<DonchianLow)
{placeorder()};
I launch a Strategy with instrument AAPL. DonchianLow then calculates the correct value for AAPL but incorrectly gives the same value when calculating DonchianLow for AXP - even though BarsInProgress = 1.
The Strategy then compares Close[0] for AXP to DonchianLow for AAPL and places an order.
Why is DonchianLow not calculated for the instrument BarsInProgress=1 (AXP) but is instead calculated for the instrument BarsInProgress=0 (AAPL)?
Comment