I managed to do this with this code at the start of OnBarUpdate:
if (CurrentBar == 0) { Bars.CurrentBar = Bars.Count - 1; indicator.Update(); Bars.CurrentBar = 0; }
However, when using the Strategy Analyzer, it doesn't work. The indicators are not fully calculated at the start of OnBarUpdate.
How do I manage to have the indicators fully calculated when CurrentBar == 0?
Comment