I have 1 indicator ("Pattern") which uses another indicator ("Pivots"). "Pivots" doesn't set CalculateOnBarClose.
When CalculateBarOnClose is set to True for "Pattern", "Pivots".OnBarUpdate() is executed as soon as "Pattern".OnBarUpdate() uses "Pivots". Good & expected.
Now, I manually set CalculateBarOnClose to false for "Pattern" in the Indicator window. To my surprise, "Pivots".OnBarUpdate() is now executed AFTER "Pattern".OnBarUpdate() completes (which makes Pattern.OnBarUpdate() actually see the prior-bar value of "Pivots"). I did print the CalculateBarOnClose value in "Pivots", it says it is false (which I expected). How can this happen, and more importantly how can I make sure that "Pivots".OnBarUptade() is executed as soon as "Pattern".OnBarUpdate() makes use of "Pivots" ?
Note: I also tried to force CalculateOnBarClose=false in "Pivots".Initialize(), that doesn't change the processing order
Thanks in advance,
Dominique
Comment