Difference between revisions of "PlotPaintBar"
Jump to navigation
Jump to search
m (Reverted edits by 176.8.90.7 (talk) to last revision by JoshM) |
|||
Line 4: | Line 4: | ||
PlotPaintBar plot can be superimposed on top of one or more bars of a bar chart, effectively "painting" the bars. | PlotPaintBar plot can be superimposed on top of one or more bars of a bar chart, effectively "painting" the bars. | ||
− | + | == Usage == | |
+ | <syntaxhighlight>PlotPaintBar (BarHigh, BarLow, BarOpen, BarClose <,"PlotName"<,PlotColor <,Default <,LineWidth >>>>)</syntaxhighlight> | ||
− | + | Parameters inside the angled brackets are optional. | |
+ | == Parameters == | ||
+ | |||
+ | :'''BarHigh''', '''BarLow''', '''BarOpen''', '''BarClose''' - numerical expressions specifying the High, Low, Open, & Close prices for the bars to be plotted; at least two of these parameters are required. | ||
+ | |||
+ | :'''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 [[LegacyColorValue|legacy color value]], by one of 17 [[:Category:Colors|base color words]], or by the word '''Default''' to specify the color chosen by the user. In order for PlotColor to be used, the '''PlotName''' parameter must also be used. | ||
+ | |||
+ | :'''Default''' - an optional parameter reserved for future use; should be specified as '''Default;''' use of this parameter is required in order for '''LineWidth''' to 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 '''Default''' parameters must also be used. | ||
+ | |||
== Notes == | == Notes == | ||
<syntaxhighlight>PlotPaintBar(BarHigh,BarLow,BarOpen,BarClose);</syntaxhighlight> | <syntaxhighlight>PlotPaintBar(BarHigh,BarLow,BarOpen,BarClose);</syntaxhighlight> |
Revision as of 12:38, 13 February 2012
Plots the specified numerical expressions in the form of a bar chart. Plot name, color, and plot line width can be specified by using the optional parameters.
PlotPaintBar plot can be superimposed on top of one or more bars of a bar chart, effectively "painting" the bars.
Contents
Usage
PlotPaintBar (BarHigh, BarLow, BarOpen, BarClose <,"PlotName"<,PlotColor <,Default <,LineWidth >>>>)
Parameters inside the angled brackets are optional.
Parameters
- BarHigh, BarLow, BarOpen, BarClose - numerical expressions specifying the High, Low, Open, & Close prices for the bars to be plotted; at least two of these parameters are required.
- 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, the PlotName parameter must also be used.
- Default - an optional parameter reserved for future use; should be specified as Default; use of this parameter is required in order for LineWidth to 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 Default parameters must also be used.
Notes
PlotPaintBar(BarHigh,BarLow,BarOpen,BarClose);
is the equivalent of:
Plot1(BarHigh);
Plot2(BarLow);
Plot3(BarOpen);
Plot4(BarClose);
In order for the PlotPaintBar plot to be displayed in the form of a bar chart, the plot type for each Plot must be set, in the Style section of the General tab of the Format Indicator window, to Bar High, Bar Low, Left Tick, and Right Tick, respectively.
Example
Paint red these bars of an OHLC chart for which the Open price is less then the Open price of the previous bar:
If Open<Open[1] Then
PlotPaintBar(High, Low, Open, Close, "", Red);