I am trying to get historical bid ask tick data for each bar i.e 5mins. bars, without using tick replay, by adding the following line
AddDataSeries(Instrument.MasterInstrument.Name, BarsPeriodType.Tick, 1, MarketDataType.Ask);
AddDataSeries(Instrument.MasterInstrument.Name, BarsPeriodType.Tick, 1, MarketDataType.Bid);
How do I access the bid ask tick prices that make up each primary bar in OnBarUpdate().
I tried using the code below to print the tick prices, but it prints the same number of lines and prices for each primary Currentbar index
if (BarsInProgress == 0 ){
for(int i =0; i < BarsArray[0].TickCount; i++){
Print(String.Format("Current Bar {0} Curr {1} ASK {2} Bid {3}",CurrentBar, BarsArray[0].TickCount, BarsArray[1].GetAsk(i), BarsArray[2].GetBid(i)));
}
}
thanks in advance

Comment