Changes

Jump to navigation Jump to search

Plot

3,506 bytes added, 13:03, 23 January 2012
Created page with "Plots the specified numerical or string expression on a chart, up to 999 different plots can be used simultaneously. Numerical: Plot offset, name, color, and plot line width ..."
Plots the specified numerical or string expression on a chart, up to 999 different plots can be used simultaneously.
Numerical: Plot offset, name, color, and plot line width can be specified by using the optional parameters.

String: Ability to show a user-defined text message on the status line of the chart or in the scanner.

==== Usage ====
Numerical: <syntaxhighlight>PlotN<[Offset]>(Expression <,"PlotName"<,PlotColor <,Scanner Cell Background Color <,LineWidth >>>>)</syntaxhighlight>

Text: [[PlotN("String")]]

Parameters inside the angled brackets are optional

==== Parameters ====
[[N]] - a number used to identify the plot; plot numbers can range from 1 to 999

[[Offset]] - an optional parameter; a numerical expression specifying the plot offset, in bars; a positive value will displace the plot to the left along the time axis, and a negative value will displace the plot to the right along the time axis

[[Expression]] - the numerical expression to be plotted

[[PlotName]] - an optional parameter; assigns a name to the plot

[[PlotColor]] - an optional parameter; specifies the plot color
Plot color can be specified by a numerical expression representing an RGB color number or a legacy color value, by one of 17 base color words, or by the word [[Default]] to specify the color chosen by the user. In order for [[PlotColor]] to be used, [[PlotName]] parameter must also be used.

[[Scanner Cell Background Color]] - an optional parameter; sets the background color of the scanner cell if this plot is applied to a scanner; use the word [[Default]] to specify the color chosen by the user. In order for [[Scanner Cell]] [[Background Color]] to be used, [[PlotName]] and [[PlotColor]] parameters must also be used.

[[LineWidth]] - an optional parameter; specifies the plot line width, ranging from 1 to 14
Plot line width can be specified as a numerical expression or by the word [[Default]] to specify the line width chosen by the user. In order for [[LineWidth]] to be used, [[PlotName,]] [[PlotColor,]] and [[Scanner Cell Background Color]] parameters must also be used.

[[String]] - text to be displayed

==== Example ====
Plot the closing price using the default plot color and line width:

<syntaxhighlight>Plot1(Close);</syntaxhighlight>

Plot the closing price using the default plot color and line width, and name the plot "Close":

<syntaxhighlight>Plot1(Close,"Close",Default,Default,Default);</syntaxhighlight>

Plot the closing price, offset back by 3 bars, using the plot color of blue, using cell background color of green if this plot is applied to a scanner, line width of 3, and name the plot "Close 3 bars later":

<syntaxhighlight>Plot1[3](Close,"Close 3 bars later",Blue,Green,3);</syntaxhighlight>

Plot the closing price, offset forward by 3 bars, using the RGB color 2138336 (Orange), and name the plot "Close 3 bars ago":

<syntaxhighlight>Plot1[-3](Close,"Close 3 bars ago",2138336);</syntaxhighlight>

Plot the closing price using the legacy color value of 4 (Green) and name the plot "Close":

<syntaxhighlight>[LegacyColorValue=True];
Plot1(Close,"Close",4);</syntaxhighlight>

Show the text "Attention!" on the status bar of the chart or in the scanner.
<syntaxhighlight>Plot1("Attention!");</syntaxhighlight>

Show the text "Attention!" on the status bar of the chart or in the scanner if the close price is greater than 100.
<syntaxhighlight>If close > 100 then Plot1("Attention!");</syntaxhighlight>


[[Category:Plotting]]
Anonymous user

Navigation menu