Plot (Reserved Word)
Returns the numeric value of a specified plot for use in calculations or conditional expressions.
This form of plot is not used to plot a value in a chart or grid. It simply returns the value of a previous plot. See Plot1-99 for the plot statement.
Plot(PlotName);
Where PlotName is a string expression containing the plot name.
Remarks
Once you have plotted a value using a PlotN statement, you can reference the value of the plot by using the reserved word Plot in an assignment statement or conditional expression. The reserved word Plot must be followed by a string expression containing the plot name enclosed in parentheses (e.g., Plot("MyPlotName").
Example
In the indicator example below, the reserved word Plot1 is used to plot the slow moving average and Plot2 is used to plot the fast moving average for the Close. The alert condition triggers when the fast plot value crosses over the slow plot value without requiring any variables to be declared.
Plot1(Average(Close,18),"slow");
Plot2(Average(Close,9),"fast");
If Plot("fast") crosses over Plot("slow") then Alert("Cross Over") ;
or, alternatively, the last line could be as follow (note that the plot numbers are used to identify the plots):
If Plot2 crosses over Plot1 then Alert("Cross Over") ;