I am developing an Indicator, and need to use the CurrentBid and CurrentAsk of each tick I proccess in OnBarUpdate.
I have two doubts about how "current" are CurrentBid and CurrentAsk:
1) When a new tick arrives (it was produced in a context with a Bid and an Ask) this tick will produce a MarketData event and, after that, a BarUpdate event.
I process that tick in OnBarUpdate. Let's suppose that in the time elapsed since it arrived in OnMarketData, a new Bid or Ask is received. Then, when I use CurrentBid or CurrentAsk (in OnBarUpdate), what values do they have, the old Bid and Ask, valid when the tick arrived, or the new Bid and Ask currently valid, which arrived after the tick?
2) When OnBarUpdate receives the first tick in real time. Do CurrentBid and CurrentAsk have proper values (the actual Bid and Ask) or they are initialized with some default values until a Bid and an Ask arrive as MarketData events?
Thank you very much in advance for any help.
Comment