for example, I would like to show 5 minutes data Series SMA(5) when I load the 30 minutes chart.
So follow the guide: https://ninjatrader.com/support/help...erence_wip.htm
I used "AddDataSeries("ES 06-20", Data.BarsPeriodType.Minute, 5, Data.MarketDataType.Last);", but I am not sure how to use it. It seems that "secondarySeries = new Series<double>(SMA(BarsArray[0], 50)); " didn't work.
My code example below, Please help me fix it. thanks
************************************************** ********************************
public class ChanBiNT5M : Indicator
{
private Series<double> secondarySeries;
protected override void OnStateChange()
{
if (State == State.SetDefaults)
{
.....................
}
else if (State == State.Configure)
{
AddDataSeries("ES 06-20", Data.BarsPeriodType.Minute, 5, Data.MarketDataType.Last);
}
}
protected override void OnBarUpdate()
{
//Add your custom indicator logic here.
secondarySeries = new Series<double>(SMA(BarsArray[0], 50));
}
}
}

Comment