What considerations are required when restructuring an Indicator from Calculate.OnEachTick to Calculate.OnPriceChange?
Where the Indicator:
- DataSeries type = Minute (i.e. bar type is not set up to remove the last bar on a chart) (NinjaTrader 8),
- does not deal with volume or tick counting (NinjaTrader 8), and
- has references to the most recently completed bar (i.e. Bar[1]).
I am attempting to improve the performance, as per NT8 performance tips (NinjaTrader 8). Noting, "When set to Calculate OnPriceChange, the OnBarUpdate() method is ONLY called when the price has changed which does not necessarily occur the end of the close of the bar" (NinjaTrader 8).
As I understand the above links, under OnPriceChange, OnBarUpdate is only called where price has changed.
The attached Indicator and video (https://www.screencast.com/t/YYb5U68OKO) shows my understanding is wrong.
It appears as though the Indicator OnPriceChange is behaving as I'd expect from OnEachTick.
Any insight is apprecaited.
Thanks
Shannon
However, under Playback, it appearsSo,
Comment