SetChartType

SetChartType ( double chart type );

Description

Sets a desirable non-Monkey chart type directly from the script. Note that you can also set the chart type along with its color settings within the Chart Settings window, for more information on that, see the Appearance Settings article.

Input parameters

Parameter Default value Description
chart type - Defines chart type to be set: Area, Bar, Candle, Candle Trend, Heikin Ashi, or Line. This parameter accepts ChartType constants as value.

Example

plot price = close;
SetChartType(ChartType.AREA);

This code sets the Area chart type and outlines it with the Close price plot.