PDA

View Full Version : Multi Color Plot Question


TraderGuy
11-11-2007, 08:42 PM
I have coded a SMA with three plots, Rising, Falling, and Neutral. I believe I have followed the example for multi color plots found in the reference section of the forum. It seems that the coloration of the plot does not work when there is a single bar change in direction (and color). In my example both Rising and Falling are plotted on the same bar. I have attached a chart image along with the code that represents the indicator. Am I missing something here or is this expected behavior? You will see the falling plot as dots and the rising plot as a line, there are places where both are displayed at the same time. Is there something I can do to correct this?

Thanks,
Guy

NinjaTrader_Ray
11-12-2007, 06:56 AM
I suspect this is since there is a bar where lines need to be connected and you will get this overlapping. I don't believe there is anything that can be done.

NinjaTrader_Josh
11-12-2007, 04:39 PM
If you do not wish for overlapping and don't care for disjoint lines you can try removing these lines of code.
RisingTrend.Set(1, SMA(Period)[1]);
FallingTrend.Set(1, SMA(Period)[1]);
NeutralTrend.Set(1, SMA(Period)[1]);