I wrote a code for and indicator and strategy.
Both calculated the same data and are running onBarClose =true.
Then i Print() a var value with the same result in both but curiously the strategy print the var value of 2 bars ago, and indicator print the value of last bar (1 bar ago).
Its normal? I think the both values should be the same.
The var value prints as it:
..
....
Mi var (indicator): 1,23
Mi var (strategy): 0,78
---new bar close---
Mi var (indicator): 2,16
Mi var (strategy): 1,23
---new bar close---
Mi var (indicator): 3,45
Mi var (strategy): 2,16
---new bar close---
Mi var (indicator): 4,91
...


Comment