protected override void OnBarUpdate()
{
// Condition set 1
if ((EMA(25)[4] + Value) <= EMA(25)[0])
Plot0.Set(Close[0]);
// Condition set 2
if ((EMA(25)[4] - Value) >= EMA(25)[0])
Plot1.Set(Close[0]);
}
Plot0 and Plot1 are:
{
Add(new Plot(Color.FromKnownColor(KnownColor.Lime), PlotStyle.TriangleUp, "Plot0"));
Add(new Plot(Color.FromKnownColor(KnownColor.Red), PlotStyle.TriangleDown, "Plot1"));
Overlay = false;
}
Any help solving my problem would be appreciated!
Comment