When I using Bars.BarUpdateTime with BarMagnifier=1 min in backtesting mode all is working, but in real time it returns LastBarTime. Is it occur because BarUpdateTime only for backtesting mode or I do something wrong? How I can discover current tick time in bar? Should I use Bars.StatusLine.Time on every CalcBar() or exist another way?
Thanks.
Time of tick. [SOLVED]
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Time of tick. [SOLVED]
Hello zysmn,
The description of BarUpdateTime says:
Read-only property. Returns time of the last update of the current bar if Bar Magnifier mode is on. If Bar Magnifier mode is off, returns the time of the current bar (as the Time property).
Bar Magnifier works for historical data only. It means BarUpdateTime works only in backtesting.
That is possible to get the current time in realtime using DateTime.Now
The description of BarUpdateTime says:
Read-only property. Returns time of the last update of the current bar if Bar Magnifier mode is on. If Bar Magnifier mode is off, returns the time of the current bar (as the Time property).
Bar Magnifier works for historical data only. It means BarUpdateTime works only in backtesting.
That is possible to get the current time in realtime using DateTime.Now