I initialize 3 plots like this:
Add(new Plot(Color.FromKnownColor(KnownColor.Yellow), PlotStyle.Line, "LongMA"));
Add(new Plot(Color.FromKnownColor(KnownColor.Lime), PlotStyle.Line, "ShortMAUp"));
Add(new Plot(Color.FromKnownColor(KnownColor.Red), PlotStyle.Line, "ShortMADown"));
Then I have the following code in OnBarUpdate():
if (EMA(shortMAPeriod)[0] >= EMA(longMAPeriod)[0])
ShortMAUp.Set(EMA(shortMAPeriod)[0]);
else
ShortMADown.Set(EMA(shortMAPeriod)[0]);
Whenever I plot this, it works fine except that for a few pixels right around the crossover point, nothing is plotted (i.e. I just get blank space).
This also happens on osciallator plots where I am checking the slope and wanting to plot a different color depending on whether it is going up/down... whenever the slope changes to be near zero, the same effect occurs where nothing is plotted.
Am I missing something or is this a bug?
Comment