setPlotType()
Previous Top Next
setPlotType( plotType [, index] )
This function sets the plot type for a series value that is being returned to the chart for plotting.
Parameters
Plot Types
Previous Top Next
setPlotType( plotType [, index] )
This function sets the plot type for a series value that is being returned to the chart for plotting.
Parameters
plotType |
see Plot Types below |
index |
optional. an integer identifying the return index from main() |
Plot Types
PLOTTYPE_LINE | plot a line |
PLOTTYPE_CIRCLE | plot a line of circles ( NEW in 7.9 ) |
PLOTTYPE_DOT | plot a dotted line |
PLOTTYPE_SQUARE | plot a line of squares ( NEW in 7.9 ) |
PLOTTYPE_SQUAREWAVE | plot a stairstep line |
PLOTTYPE_HISTOGRAM | plot a histogram |
PLOTTYPE_FLATLINES | plot a line that does not connect values |
PLOTTYPE_INSTANTCOLORLINE | plot a line that responds to color changes on the signal bar |
Usage
function preMain() { setPriceStudy(true); setStudyTitle("Example Script"); setCursorLabelName("EMA", 0); setDefaultBarFgColor( Color.blue, 0 ); setShowTitleParameters( false ); //set the plot type to a stair step setPlotType( PLOTTYPE_SQUAREWAVE, 0 ); //force this script to only update on each new bar setComputeOnClose(); }