I'm using the following strategy code on a ES 12-09 (Zen-Fire) chart, and get the following output:
CurrentBar: 37
**NT** Error on calling 'OnBarUpdate' method for strategy 'TestDSStrategy/307ee535ba044c06b4ae971d5128ceac': Index was outside the bounds of the array.
When I comment out the "Add("TF 12-09", ..." line, I get no error with the following output:
CurrentBar: 20
testDS[0]: 1104.5
CurrentBar: 21
testDS[0]: 1104.75
...
Note: I am using all the default Strategy settings when attaching to the chart of ES 12-09.
Thanks
{
public class TestDSStrategy : Strategy
{
#region Variables
#endregion
private DataSeries testDS;
protected override void Initialize()
{
Add("TF 12-09", BarsPeriod.Id, BarsPeriod.Value, BarsPeriod.MarketDataType);
testDS = new DataSeries(this);
Enabled = true;
CalculateOnBarClose = false;
}
protected override void OnBarUpdate()
{
if ( BarsInProgress != 0 ) return;
testDS.Set(Closes[0][0]);
Print("CurrentBar: " + CurrentBar);
Print("testDS[0]: " + testDS[0]);
}
#region Properties
#endregion
}
}

Comment