I read NT guide carefully but I got argument value error at Add(WMA(8)) and I couldn't figure out what I am missing. Can you shed light on this? I just want to see the values from WMA in 3 timeframes on the 5 min chart.
Thanks,
-traderjh
#region Using declarations
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Xml.Serialization;
using NinjaTrader.Cbi;
using NinjaTrader.Data;
using NinjaTrader.Gui.Chart;
#endregion
namespace NinjaTrader.Indicator
{
[Description("Show WMA")]
public class ShowWMA : Indicator
{
#region Variables
#endregion
protected override void Initialize()
{
Overlay = false;
Enabled = true;
CalculateOnBarClose = false;
Add(PeriodType.Minute, 30);
Add(PeriodType.Minute, 60);
Add(WMA(8));
}
protected override void OnBarUpdate()
{
DrawTextFixed("wma",
"WMA0: " + WMA(BarsArray[0],8)[0] +
"\nWMA1: " + WMA(BarsArray[1],8)[1] +
"\nWMA2: " + WMA(BarsArray[2],8)[2]
,TextPosition.TopLeft,Color.Yellow,new Font("Arial", 12),Color.Black,Color.Black,10);
}
#region Properties
#endregion
}
}


Comment