public int period = 1;
...
protected override void Initialize() {
Add( PeriodType.Minute, period );
CalculateOnBarClose = true;
}
.....
protected override void OnBarUpdate() {
if( 1 == BarsInProgress ) {
// check indicator signal and place a trade here
}
}
When I look at the Chart output of strategy analyzer, trades at each period are displayed on it correctly, and Graphs tab shows different account value evolution, Trades shows different data, too. However, the top Optimizer section shows testing results for all time frames to be the same (net profit, # trades, etc.)! The only thing that's different between the lines is the value of the Period parameter that I vary. Is this an NT bug or I did something wrong?..
By the way I'm curious if not erasing added data series creates a memory leak while the optimizer is running. Does the strategy class gets destroyed and re-initialized clean every time strategy strats off with a different parameter set?

Comment