I`m creating multi-instrument strategy. For reading quotes (Ask,Bid) from Instruments I`m using at first
if (State == State.Configure)
{
AddDataSeries(BarsPeriodType.Minute, 60);
AddDataSeries(BarsPeriodType.Day, 1);
}
And after, in OnBarUpdate() I`m using
if(BarsInProgress == 0) //for Main Instrument
{
double current_price_Instrument_Main = GetCurrentAsk(0);
}
if(BarsInProgress == 1) //for Second Instrument
{
double current_price_Instrument_Second = GetCurrentAsk(1);
}
In Chart, I`m using Data series with Future for CL(Oil) and M6E
P.S. if I will use "instrument name" inside AddDataSeries - I will have correct quotes from second Instrument. But its not a good idea for futures (rollovers and ets)
I don`t understand what is a problem.
Can somebody help me solve this problem?


Comment