I am testing this EMA on CL - 6 Range bars.
can't imagine this be a Ninja bug. Any insight would be greatly appreciated.
This is the indicator code:
protected override void Initialize()
{
Add(new Plot(Color.FromKnownColor(KnownColor.Gold), PlotStyle.Line, "Plot0"));
Add(new Plot(Color.FromKnownColor(KnownColor.Black), PlotStyle.Line, "Plot1"));
Overlay = true;
}
protected override void OnBarUpdate()
{
if (CurrentBar<13)return;
double tValue = EMA(Close, 13)[0] - EMA(Close, 13)[3];
if (tValue > 0.025 || tValue < -0.025)
Plot0.Set(EMA(Close,13)[0]);
else
Plot1.Set(EMA(Close,13)[0]);
}
Comment