SetPlotColor (Reserved Word)

image\trumpet2.gif Disclaimer

This reserved word is used to change the color of a particular plot in a price chart or grid.

SetPlotColor(Number, Color);

Number is a number from 1 to 99 representing the number of the plot to modify. Color is the EasyLanguage color to be used for the plot .

Example

The following EasyLanguage statements change the color of the plot to Blue when the RSI Indicator is over 75, and Green when it is under 25.  

Plot1(RSI(Close, 9), "RSI") ;
If Plot1
> 75 Then
  SetPlotColor(1, Blue);
If Plot1
< 25 Then
  SetPlotColor(1, Green);

Notice that the initial Plot1 statement resets the plot color to the indicator's default color setting each time the EasyLanguage code is run on each bar.  This means that the indicator plots the default color unless the RSI value is greater than 75 or less than 25.