Load data based on = Bars
Bars to load = 500
I then added an indicator to the first chart and a strategy to the second chart.
Both indicator and strategy are merely adding two Bars objects (each).
The indicator-loaded chart held all three Bars objects with 500 bars each, as expected, but for some reason, the strategy-loaded chart held three Bars objects with different numbers of bars for each Bars object.
Also, at the strategy-based chart, the evaluation of OnBarUpdate() was arbitrary and did not occur at a certain order between all Bars objects and a lot of bars from the added Bars objects were not evaluated by it.
Attached are two scripts, "A01" is an indicator and "A02" is a strategy.
Please help me understand why wasn't the number of bars equal between Bars objects when using strategy and how to fix it and also how to avoid the situation where bars from added Bars objects are not being evaluated.
Thank you very much for your time guys.
Comment