MJT
05-16-2007, 05:13 AM
Other posts here explain how to plot an indicator with changing color using a threshold ( Plots[0].Min / Plots.[1].Max ). I want to color my indicator depending on whether it is above or below current price, and resetting the threshold to current price means the color change point moves for historical bars.
Using a simple-
if (myIndicator > Close[0])
MyIndicatorAbove.Set(myIndicator);
else
MyIndicatorBelow.Set(myIndicator);
will work using Plot Style of Dot, but if I use Line then I get a gap at each color change.
I think I need to force the new color plot to start from the end of the previous bar, rather than the current bar onwards. I also think I have seen a solution here before, but can't find it now (maybe that was a dream!!).
Is there a simple solution to this, so that I can use a Line rather than a Dot to plot my indicator?
Using a simple-
if (myIndicator > Close[0])
MyIndicatorAbove.Set(myIndicator);
else
MyIndicatorBelow.Set(myIndicator);
will work using Plot Style of Dot, but if I use Line then I get a gap at each color change.
I think I need to force the new color plot to start from the end of the previous bar, rather than the current bar onwards. I also think I have seen a solution here before, but can't find it now (maybe that was a dream!!).
Is there a simple solution to this, so that I can use a Line rather than a Dot to plot my indicator?