So I replace
if (Value[0] >= 0)
BarColor = Color.Blue;
else
BarColor = Color.Red;
with the following coding:
if (Value[0] >= 0 && Value[1] < 0)
{DrawDot("tag"+CurrentBar, true, Time[0], Low[0], Color.Lime);}
else if (Value[0] <= 0 && Value[1] > 0)
{DrawDot("tag"+CurrentBar, true, Time[0], High[0], Color.Red);}
else
{RemoveDrawObject("tag"+CurrentBar);}
It does not draw the dots and the plot of MACD is not displayed.
What went wrong? Could someone help?
Thank you.

Comment