Indicators are not calculated on the last Bar of an EoD Historical Data Series. Firing onBarUpdate() ends on Bars.Count - 2
I searched the Forum for solutions, found similar questions (like this), but all these seems (also) related to Intraday Data.
I learned, that a Bar close is only fired when a new Bar (or Tick) will start - even on historical Data. But historical Bars are 'as is'. They don't grow or change like started and unfinished Realtime Bars.
I also learned, that State.Historical data processes OnBarUpdate() only on the close of each historical bar even if this property is set to OnEachTick or OnPriceChange.
But what's on session pauses like evenings or weekends (to preparing Trades for the next Session)? Indicators shoud also include the last available Bar (Bars.Count -1)
I tried -1 as barsBack, sessionIterator.GetNextSession(Time[0]) and Update(), played with Trading Hours and EndDate as ChartSeries Parameters - all without success.
So please help: how do I get calculated the last Bar (Bars.Count - 1) on historical EoD Data?
Best Regards
t
Comment