I am having troubles understanding the behavior of my script.
After working on a 4 secondary series MTF strategy it started to stop working due to the index value wich is out of range.
The MTF strategy has been backtested numerous times without such issue, with no recent excessive back in time request in the calculation.
I checked the help guide about CurrentBars and BarsRequiredToTrade, and i hope our example now will help clarify some of it.
I tried to elevate the default number of BarsRequiredToTrade in the if (State == State.SetDefaults) section. no result
I also found the sentence that causes the out of range index issue and isolated it.
The main curiosity here is that : this exact same sentence is used in a bool wich has been backtested and works fine, still now... in the same strategy...
I am providing attached what, from the code, seemed related to this issue.
Would anyone care to tell us what I am missing about CurrentBars ?
Comment