This may be simple, but I cannot find the answer...
I have a strategy that relies on several indicators. Some of them need a large number of bars (about 4000) at minimum to function. When I load the strategy in a chart or I run it directly from the strategies tab, I have a Days to load field that allows me to ensure that there is enough data to calculate my indicators.
However, in back testing, there is no such field. There is a field called Min. bars required, which implies the same thing but does not seem to work the same way. Regardless of what I put in the field, it seems that the strategy analyzer does not load bars for days that are not covered by the time period.
So if for instance my indicator needs 2 weeks of 1min data and I set the backtest period to just a few days, then my indicator never gets a CurrentBar value that is high enough for it... and the strategy appears not to work (the indicator in this case will always return zero, which the strategy does not like and so does not enter). If I increase the Min. bars required to 4000, I get the exact same result (including the indicator getting the exact same CurrentBar value as it does when I leave the field in the default 20. If I extend the period to be something like 2.5 weeks, then the backtest actually produces correct results for the last 2 days of the period (anything before that does not have a high enough value of CurrentBar)
So how do I setup a back test such that every day that is specified in the backtest period will get enough bars for the indicators to calculate correctly?
Comment