When Running a Backtest in Strategy Analyzer it appears that the "Min. Bars required" parameter is not passed correctly to indicatiors displayed in a Strategy. Reguardless of its Min Bars value the Indicators remain set to 20.
Steps to Reproduce.
1. I added 2 lines in the Initialize() method
Add(SMA(sMAFast));
SMA(sMAFast).Plots[0].Pen.Color = Color.Green;
SMA(sMAFast).Plots[0].Pen.Width = 2;
SMA(sMAFast).Plots[0].Pen.DashStyle = DashStyle.Dash;
Add(SMA(sMASlow));
SMA(sMASlow).Plots[0].Pen.Color = Color.Black;
SMA(sMASlow).Plots[0].Pen.Width = 3;
I set the Periods to 1 & 2 respectively. So they should draw immediately.
2. All added lines start to be visible on the 21st Bar in the Chart Tab.
If I change the Strategy's "Min. Bars required" parameter. The starting position of the added lines remains the same.
I tried setting "Min. Bars required" = 1 & also to 100. The Strategy does correctly start trading on the bar required. But the Visual Indicators all seem to remain at 20.
Is this a bug or is this by design?
Comment