I do not understand why the indicator do not color in red the bars when the value of double mmValue is smaller than the value of double mmValueLast.
For some reason the indicator shows all the bars in blue.
Thanks in advance
protected override void OnBarUpdate()
{
if (CurrentBar<trendPeriods)
{
return;
}
double mmValue=WMA(Close,trendPeriods)[0];
double mmValueLast=WMA(Close,trendPeriods)[1];
PlotTrendMA.Set(1);
if (mmValue>mmValueLast)
{
Plots[0].Pen.Color=Color.Blue;
}
else
{
Plots[0].Pen.Color=Color.Red;
}
Comment