Thanks for your reply.
I very much disagree with this statement, "all Indicators in NT8 to still work correct and use the Bar Close values", all indicators will work correctly in all calculation modes, what changes depends on what information you need and when. The Vortex indicator is quite capable of running in any of the modes.
By default, most indicators are set to Calculate.OnBarClose as this represents the least impact on CPU use. The values they provide when using OnBarClose will not change as they do not reference the currently forming bar. In that mode [0] represents the "just closed" bar and the values are static, [1] would be the bar before that, etc..
When an indicator uses Calculate.OnPriceChange or Calculate.OnEachTick, the calculations are done including the currently forming bar and the index of [0] now points to that currently forming bar. [1] points to the just-closed bar, [2] to the bar before that, etc. etc. Please note when using these modes, when your script is applied to say 5 days of historical data, each historical bar is processed as Calculate.OnBarClose and all indicators would also be calculated based on that. It is only when you get to the right edge that these modes would apply. (Exception would be if used TickReplay).
Correct, if you have coded based on Calculate.OnBarClose and now want to use Calculate.OnPriceChange, or Calculate.OnEachTick, you would have to readjust your thinking and likely your code to pull the values of interest at the right time. Using IsfirstTickOfBar is a once per bar event that you can use when you want to process things once per bar while taking advantage of the order modes to access the current price data and the indicators current values (of real time data).
Comment