How can this be overcome?
Code: Select all
Var: CloseColor(white);
If close < close[1] then CloseColor = red else CloseColor = green;
plot1(close,"close",CloseColor);
Code: Select all
Var: CloseColor(white);
If close < close[1] then CloseColor = red else CloseColor = green;
plot1(close,"close",CloseColor);
Easy fix. You have to add this line:When plotting a line with different colors, the color begins on the bar in which a condition is met and follows through to the next bar in which the condition may not be met. This gives a misleading visual appearance. The code and attachment illustrate this.
How can this be overcome?
Code: Select all
Var: CloseColor(white);
If close < close[1] then CloseColor = red else CloseColor = green;
plot1(close,"close",CloseColor);
Code: Select all
SetPlotColor[1](1, CloseColor);