Indicators | Plot Oscillators with Different Shades of Colors

Modified on 2009/04/15 09:58 by Eugene — Categorized as: Knowledge Base

Request



"It would be nice to have different shades of colors in the Indicator Overbought/Oversold areas.
(e.g. light red = -100 < CCI < -200; dark red CCI < -200)"

Solution



This workaround by Robert Sucher shows how to do the shades of colors by plotting more than once. The key is to make sure that you plot the lighter colors first:


protected override void Execute()
{ 			
	DataSeries CCI_LT = CCI.Series( Bars, 55 );
	ChartPane paneCCI_LT = CreatePane( 40, false, true);
	PlotSeriesOscillator( paneCCI_LT, CCI_LT, 100, -100, Color.FromArgb( 50, Color.Blue ), 
		Color.FromArgb( 50, Color.Red ), Color.FromArgb( 80, Color.Black ), LineStyle.Solid, 2);			
	PlotSeriesOscillator( paneCCI_LT, CCI_LT, 200, -200, Color.FromArgb( 70, Color.Blue ), 
		Color.FromArgb( 70, Color.Red ), Color.FromArgb( 80, Color.Black ), LineStyle.Solid, 2);
}

Different shades of colors

Different shades of colors