Fo example:
I use the 5-minute timeframe.
The time now is 15:35:00
The previous tick was on 15:34:58
The next tick will come on 15:35:20
I want to get the close price of bar [15:35] right now (on 15:35:00), but the next tick still did not come, so the OnBarUpdate() method still did not start (it will start only on 15:35:20 and I will get Close[0]).
May be there is a method in NinjaScript wich is called whenever a bar is closed ?
P.S.
I need it for real-time export of data into the external program. The external program starts to analyse data by timer every 5 minutes (the timer starts at 15:35:10, 15:40:10, 15:45:10, ...). But sometimes (when the next tick does not come for a long time) in the moment when timer starts I still do not have data for analysis.
Comment