Chart functions are mostly used for accessing strategy charts, changing their settings and adding elements to them. For performance reasons these functions should only be called once from the OnInitialize function, as calling them repeatedly can be quite slow.


Sections


Functions

Function Details


Functions


Name

Description

ChartDataBoxHideAllFields(int, int)

Hides all the data box fields of a specified chart panel.

ChartDataBoxSetColors(int, int, C_Color, C_Color)

Sets the colors of the data box of a specified chart panel.

ChartDataBoxSetColorsRGB(int, int, int[], int[])

Sets the colors of the data box of a specified chart panel.

ChartDataBoxSetDateFormat(int, int, string)

Sets the format of the date in the data box of a specified chart panel.

ChartDataBoxSetFieldColors(int, int, C_Color, C_Color, C_Color)

Sets the colors of the data box fields of a specified chart panel.

ChartDataBoxSetFieldColorsRGB(int, int, int[], int[], int[])

Sets the colors of the data box fields of a specified chart panel.

ChartDataBoxSetFont(int, int, string, int)

Sets the font family and the font size of the data box of a specified chart panel.

ChartDataBoxSetSeparator(int, int, C_Color, C_DashStyle, int)

Sets the separator pen of the data box of a specified chart panel.

ChartDataBoxSetSeparatorRGB(int, int, int[], C_DashStyle, int)

Sets the separator pen of the data box of a specified chart panel.

ChartDataBoxSetTimeFormat(int, int, string)

Sets the format of the time in the data box of a specified chart panel.

ChartDataBoxShowField(int, int, C_DataBoxField, bool)

Shows or hides a field in the data box of a specified chart panel.

int ChartDataSeriesPlot(int, int, int, C_ChartType, C_BarType, double, C_BarSource)

Plots a specified data series on the chart.

int ChartDataSeriesPlotCustom(int, int, int, C_ChartType, string, double, C_BarSource)

Plots a specified data series on the chart.

int ChartDataSeriesPlotDefault(int, int, int, C_ChartType, C_BarType, double, C_BarSource)

Updates the default data series on the chart, if this function isn't called the default data series will be plotted based on the Desktop data series settings.

ChartDataSeriesSetAskPen(int, int, C_Color, C_DashStyle, int)

Sets the pen that marks the latest ask price of the underlying symbol of a specified data series.

ChartDataSeriesSetAskPenRGB(int, int, int[], C_DashStyle, int)

Sets the pen that marks the latest ask price of the underlying symbol of a specified data series.

ChartDataSeriesSetBarWidth(int, int, int)

Sets the maximum width of the bars of a specified data series.

ChartDataSeriesSetBidPen(int, int, C_Color, C_DashStyle, int)

Sets the pen that marks the latest bid price of the underlying symbol of a specified data series.

ChartDataSeriesSetBidPenRGB(int, int, int[], C_DashStyle, int)

Sets the pen that marks the latest bid price of the underlying symbol of a specified data series.

ChartDataSeriesSetBuyOrderPen(int, int, C_Color, C_DashStyle, int)

Sets the pen that marks the pending buy orders of the underlying symbol of a specified data series.

ChartDataSeriesSetBuyOrderPenRGB(int, int, int[], C_DashStyle, int)

Sets the pen that marks the pending buy orders of the underlying symbol of a specified data series.

ChartDataSeriesSetChartPanel(int, int, int)

Sets the chart panel on which to display the specified data series.

ChartDataSeriesSetChartType(int, int, C_ChartType)

Sets the chart type, which is the visual style of a specified data series.

ChartDataSeriesSetCoverOrderPen(int, int, C_Color, C_DashStyle, int)

Sets the pen that marks the pending cover orders of the underlying symbol of a specified data series.

ChartDataSeriesSetCoverOrderPenRGB(int, int, int[], C_DashStyle, int)

Sets the pen that marks the pending cover orders of the underlying symbol of a specified data series.

ChartDataSeriesSetDownBarColors(int, int, C_Color, C_Color, C_DashStyle, int, C_Color, C_DashStyle, int)

Sets the colors of 'down bars' of a specified data series.

ChartDataSeriesSetDownBarColorsRGB(int, int, int[], int[], C_DashStyle, int, int[], C_DashStyle, int)

Sets the colors of 'down bars' of a specified data series.

ChartDataSeriesSetLastPen(int, int, C_Color, C_DashStyle, int)

Sets the pen that marks the last trade price of the underlying symbol of a specified data series.

ChartDataSeriesSetLastPenRGB(int, int, int[], C_DashStyle, int)

Sets the pen that marks the last trade price of the underlying symbol of a specified data series.

ChartDataSeriesSetLongPositionPen(int, int, C_Color, C_DashStyle, int)

Sets the pen that marks the open long positions of the underlying symbol of a specified data series (based on the position's weighted average entry price).

ChartDataSeriesSetLongPositionPenRGB(int, int, int[], C_DashStyle, int)

Sets the pen that marks the open long positions of the underlying symbol of a specified data series (based on the position's weighted average entry price).

ChartDataSeriesSetNeutralBarColors(int, int, C_Color, C_Color, C_DashStyle, int, C_Color, C_DashStyle, int)

Sets the colors of 'neutral bars' of a specified data series.

ChartDataSeriesSetNeutralBarColorsRGB(int, int, int[], int[], C_DashStyle, int, int[], C_DashStyle, int)

Sets the colors of 'neutral bars' of a specified data series.

ChartDataSeriesSetSellOrderPen(int, int, C_Color, C_DashStyle, int)

Sets the pen that marks the pending sell orders of the underlying symbol of a specified data series.

ChartDataSeriesSetSellOrderPenRGB(int, int, int[], C_DashStyle, int)

Sets the pen that marks the pending sell orders of the underlying symbol of a specified data series.

ChartDataSeriesSetSessionBreakPen(int, int, C_Color, C_DashStyle, int)

Sets the pen that marks the end of a session of the underlying symbol of a specified data series.

ChartDataSeriesSetSessionBreakPenRGB(int, int, int[], C_DashStyle, int)

Sets the pen that marks the end of a session of the underlying symbol of a specified data series.

ChartDataSeriesSetShortOrderPen(int, int, C_Color, C_DashStyle, int)

Sets the pen that marks the pending short orders of the underlying symbol of a specified data series.

ChartDataSeriesSetShortOrderPenRGB(int, int, int[], C_DashStyle, int)

Sets the pen that marks the pending short orders of the underlying symbol of a specified data series.

ChartDataSeriesSetShortPositionPen(int, int, C_Color, C_DashStyle, int)

Sets the pen that marks the open short positions of the underlying symbol of a specified data series (based on the position's weighted average entry price).

ChartDataSeriesSetShortPositionPenRGB(int, int, int[], C_DashStyle, int)

Sets the pen that marks the open short positions of the underlying symbol of a specified data series (based on the position's weighted average entry price).

ChartDataSeriesSetUpBarColors(int, int, C_Color, C_Color, C_DashStyle, int, C_Color, C_DashStyle, int)

Sets the colors of 'up bars' of a specified data series.

ChartDataSeriesSetUpBarColorsRGB(int, int, int[], int[], C_DashStyle, int, int[], C_DashStyle, int)

Sets the colors of 'up bars' of a specified data series.

ChartDataSeriesSetYAxisType(int, int, C_YAxis)

Sets the Y axis type of a specified data series.

ChartDataSeriesShowMarker(int, int, bool)

Shows or hides the Y axis marker of a specified data series.

int ChartDrawingPlot(int, Drawing, string, int, int)

Plots a specified drawing on the chart.

ChartDrawingRemoveAll(int)

Removes all of the drawings from the chart.

ChartDrawingSetChartPanel(int, int, int)

Sets the chart panel on which to display a specified drawing.

ChartDrawingSetLabel(int, int, string)

Sets the label of a specified drawing.

ChartDrawingSetPenByIndex(int, int, int, C_Color, C_DashStyle, int)

Sets the pen of a specified drawing.

ChartDrawingSetPenByIndexRGB(int, int, int, int[], C_DashStyle, int)

Sets the pen of a specified drawing.

ChartDrawingSetPenByName(int, int, string, C_Color, C_DashStyle, int)

Sets the pen of a specified drawing.

ChartDrawingSetPenByNameRGB(int, int, string, int[], C_DashStyle, int)

Sets the pen of a specified drawing.

int ChartIndicatorPlot(int, Indicator, string, int, int)

Plots a specified indicator on the chart.

ChartIndicatorRemoveAll(int)

Removes all of the indicators from the chart.

ChartIndicatorSetChartPanel(int, int, int)

Sets the chart panel on which to display a specified indicator.

ChartIndicatorSetDisplacement(int, int, int)

Sets the displacement of a specific indicator. (E.g. displacement of 5 will match the current bar with the indicator value that was calculated 5 bars ago.)

ChartIndicatorSetLabel(int, int, string)

Sets the label of a specified indicator.

ChartIndicatorSetPenByIndex(int, int, int, C_Color, C_DashStyle, int)

Sets the pen of a specified indicator.

ChartIndicatorSetPenByIndexRGB(int, int, int, int[], C_DashStyle, int)

Sets the pen of a specified indicator.

ChartIndicatorSetPenByName(int, int, string, C_Color, C_DashStyle, int)

Sets the pen of a specified indicator.

ChartIndicatorSetPenByNameRGB(int, int, string, int[], C_DashStyle, int)

Sets the pen of a specified indicator.

ChartIndicatorSetPlotStyle(int, int, C_PlotStyle)

Sets the plot style of a specified indicator.

ChartIndicatorSetYAxisType(int, int, C_YAxis)

Sets the Y axis type of a specified indicator.

ChartIndicatorShowDataBox(int, int, bool)

Shows or hides the a specified indicator in the data box.

ChartIndicatorShowMarker(int, int, bool)

Shows or hides the Y axis marker of a specified indicator.

ChartPanelSetBackground(int, int, C_Color)

Sets the background colors of a specified chart panel.

ChartPanelSetBackgroundRGB(int, int, int[])

Sets the background colors of a specified chart panel.

ChartPanelSetColorZone(int, int, int, double, double, C_Color, C_Color, C_DashStyle, int)

Sets/modify a color zone in a specified chart panel. The color zone will be automatically shown on the chart panel (see the ChartPanelShowColorZone function to hide it).

ChartPanelSetColorZoneRGB(int, int, int, double, double, int[], int[], C_DashStyle, int)

Sets/modify a color zone in a specified chart panel. The color zone will be automatically shown on the chart panel (see the ChartPanelShowColorZone function to hide it).

ChartPanelSetCrosshairPens(int, int, C_Color, C_DashStyle, int)

Sets the crosshair pens of a specified chart panel.

ChartPanelSetCrosshairPensRGB(int, int, int[], C_DashStyle, int)

Sets the crosshair pens of a specified chart panel.

ChartPanelSetFont(int, int, string, int)

Sets the font family and the font size of a specified chart panel. (See the ChartPanelSetForeground function to set the foreground color of a chart panel.)

ChartPanelSetForeground(int, int, C_Color)

Sets the foreground color of a specified chart panel.

ChartPanelSetForegroundRGB(int, int, int[])

Sets the foreground color of a specified chart panel.

ChartPanelSetGridPens(int, int, C_Color, C_DashStyle, int)

Sets the grid pens of a specified chart panel.

ChartPanelSetGridPensRGB(int, int, int[], C_DashStyle, int)

Sets the grid pens of a specified chart panel.

ChartPanelShowColorZone(int, int, int, bool)

Enables or disables a specified color zone.

int ChartPatternPlot(int, Pattern, string, int, int)

Plots a specified pattern on the chart.

ChartPatternRemoveAll(int)

Removes all of the patterns from the chart.

ChartPatternSetChartPanel(int, int, int)

Sets the chart panel on which to display a specified pattern.

ChartPatternSetLabel(int, int, string)

Sets the label of a specified pattern.

ChartPatternSetPenByIndex(int, int, int, C_Color, C_DashStyle, int)

Sets the pen of a specified pattern.

ChartPatternSetPenByIndexRGB(int, int, int, int[], C_DashStyle, int)

Sets the pen of a specified pattern.

ChartPatternSetPenByName(int, int, string, C_Color, C_DashStyle, int)

Sets the pen of a specified pattern.

ChartPatternSetPenByNameRGB(int, int, string, int[], C_DashStyle, int)

Sets the pen of a specified pattern.

ChartSetPeriods(int, int)

Sets the number of periods on the X axis of a specified chart.

ChartSetProperties(int, C_ChartProperties, bool)

Sets the properties of a specified chart.

int ChartSignalPlot(int, Signal, string, int, int)

Plots a specified signal on the chart.

ChartSignalRemoveAll(int)

Removes all of the signals from the chart.

ChartSignalSetChartPanel(int, int, int)

Sets the chart panel on which to display a specified signal.

ChartSignalSetLabel(int, int, string)

Sets the label of a specified signal.

ChartSignalSetPenByIndex(int, int, int, C_Color, C_DashStyle, int)

Sets the pen of a specified signal.

ChartSignalSetPenByIndexRGB(int, int, int, int[], C_DashStyle, int)

Sets the pen of a specified signal.

ChartSignalSetPenByName(int, int, string, C_Color, C_DashStyle, int)

Sets the pen of a specified signal.

ChartSignalSetPenByNameRGB(int, int, string, int[], C_DashStyle, int)

Sets the pen of a specified signal.

ChartSignalShow(int, int, bool)

Shows or hides a specified signal.

ChartXAxisSetColors(int, C_Color, C_Color)

Sets the colors of the X axis of a specified chart.

ChartXAxisSetColorsRGB(int, int[], int[])

Sets the colors of the X axis of a specified chart.

ChartXAxisSetDateFormat(int, string)

Sets the format of the date on the X axis of a specified chart.

ChartXAxisSetFont(int, string, int)

Sets the font family and the font size of the X axis of a specified chart.

ChartXAxisSetMarkerColors(int, C_Colo, C_Color)

Sets the colors of the X axis marker of a specified chart.

ChartXAxisSetMarkerColorsRGB(int, int[], int[])

Sets the colors of the X axis marker of a specified chart.

ChartXAxisSetPen(int, C_Color, C_DashStyle, int)

Sets the pen of the X axis line of a specified chart.

ChartXAxisSetPenRGB(int, int[], C_DashStyle, int)

Sets the pen of the X axis line of a specified chart.

ChartXAxisSetRightMargin(int, int)

Sets the right margin of the X axis of a specified chart.

ChartXAxisSetTimeFormat(int, string)

Sets the format of the time on the X axis of a specified chart.

ChartYAxisSetBottomMargin(int, int, bool, double, bool)

Sets the bottom margin of the Y axis of a specified chart panel.

ChartYAxisSetColors(int, int, C_Color, C_Color, bool)

Sets the colors of the Y axis of a specified chart panel.

ChartYAxisSetColorsRGB(int, int, int[], int[], bool)

Sets the colors of the Y axis of a specified chart panel.

ChartYAxisSetDecimalRound(int, int, int, bool)

Sets the number of decimal places on the Y axis of a specified chart panel.

ChartYAxisSetFont(int, int, string, int, bool)

Sets the font family and the font size of the Y axis of a specified chart panel.

ChartYAxisSetLinearScale(int, int, bool)

Sets the Y axis of a specified chart panel to linear scale.

ChartYAxisSetLogScale(int, int, bool)

Sets the Y axis of a specified chart panel to log scale.

ChartYAxisSetMajorUnit(int, int, bool, double, bool)

Sets the major unit of the Y axis of a specified chart panel.

ChartYAxisSetMarkerColors(int, int, C_Color, C_Color, bool)

Sets the colors of the Y axis marker of a specified chart panel.

ChartYAxisSetMarkerColorsRGB(int, int, int[], int[], bool)

Sets the colors of the Y axis marker of a specified chart panel.

ChartYAxisSetMaxValue(int, int, bool, double, bool)

Sets the maximum Y value to display on a specified chart panel.

ChartYAxisSetMinValue(int, int, bool, double, bool)

Sets the minimum Y value to display on a specified chart panel.

ChartYAxisSetPen(int, int, C_Color, C_DashStyle, int, bool)

Sets the pen of the Y axis line of a specified chart panel.

ChartYAxisSetPenRGB(int, int, int[], C_DashStyle, int, bool)

Sets the pen of the Y axis line of a specified chart panel.

ChartYAxisSetPercentScale(int, int, bool)

Sets the Y axis of a specified chart panel to percent scale.

ChartYAxisSetTopMargin(int, int, bool, double, bool)

Sets the top margin of the Y axis of a specified chart panel.

ChartYAxisSetWidth(int, int, int, bool)

Sets the width of the Y axis of a specified chart panel.

ChartZIndexSetValue(int, int, int)

Sets the Z-index of a specified element on the chart. An element with greater Z-index shows on the chart in front of another element with lower Z-index.


Function Details


ChartDataBoxHideAllFields(int chartSymbolIndex, int chartPanelIndex)

Hides all the data box fields of a specified chart panel.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

chartPanelIndex

The index of the chart panel (1 is the first panel)


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartDataBoxSetColors(int chartSymbolIndex, int chartPanelIndex, C_Color backgroundColor, C_Color foregroundColor)

Sets the colors of the data box of a specified chart panel.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

chartPanelIndex

The index of the chart panel (1 is the first panel)

C_Color

backgroundColor

The color of the background (View Options)

C_Color

foregroundColor

The color of the foreground (View Options)


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartDataBoxSetColorsRGB(int chartSymbolIndex, int chartPanelIndex, int[] backgroundColor, int[] foregroundColor)

Sets the colors of the data box of a specified chart panel.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

chartPanelIndex

The index of the chart panel (1 is the first panel)

int[]

backgroundColor

The RGB+Alpha color of the background (R, G, B, Alpha)

int[]

foregroundColor

The RGB+Alpha color of the foreground (R, G, B, Alpha)


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartDataBoxSetDateFormat(int chartSymbolIndex, int chartPanelIndex, string dateFormat)

Sets the format of the date in the data box of a specified chart panel.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

chartPanelIndex

The index of the chart panel (1 is the first panel)

string

dateFormat

The date format (based on C# date format)


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartDataBoxSetFieldColors(int chartSymbolIndex, int chartPanelIndex, C_Color positiveChangeColor, C_Color negativeChangeColor, C_Color unchangedColor)

Sets the colors of the data box fields of a specified chart panel.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

chartPanelIndex

The index of the chart panel (1 is the first panel)

C_Color

positiveChangeColor

The color of a field with a positive change (View Options)

C_Color

negativeChangeColor

The color of a field with a negative change (View Options)

C_Color

unchangedColor

The color of an unchanged field (View Options)


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartDataBoxSetFieldColorsRGB(int chartSymbolIndex, int chartPanelIndex, int[] positiveChangeColor, int[] negativeChangeColor, int[] unchangedColor)

Sets the colors of the data box fields of a specified chart panel.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

chartPanelIndex

The index of the chart panel (1 is the first panel)

int[]

positiveChangeColor

The RGB+Alpha color of a field with a positive change (R, G, B, Alpha)

int[]

negativeChangeColor

The RGB+Alpha color of a field with a negative change (R, G, B, Alpha)

int[]

unchangedColor

The RGB+Alpha color of a field with no change (R, G, B, Alpha)


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartDataBoxSetFont(int chartSymbolIndex, int chartPanelIndex, string fontFamily, int fontSize)

Sets the font family and the font size of the data box of a specified chart panel.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

chartPanelIndex

The index of the chart panel (1 is the first panel)

string

fontFamily

The name of the font family

int

fontSize

The font size


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartDataBoxSetSeparator(int chartSymbolIndex, int chartPanelIndex, C_Color separatorColor, C_DashStyle separatorStyle, int separatorThickness)

Sets the separator pen of the data box of a specified chart panel.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

chartPanelIndex

The index of the chart panel (1 is the first panel)

C_Color

separatorColor

The color of the data box separator (View Options)

C_DashStyle

separatorStyle

The style of the data box separator (View Options)

int

separatorThickness

The thickness (in pixels) of the data box separator


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartDataBoxSetSeparatorRGB(int chartSymbolIndex, int chartPanelIndex, int[] separatorColor, C_DashStyle separatorStyle, int separatorThickness)

Sets the separator pen of the data box of a specified chart panel.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

chartPanelIndex

The index of the chart panel (1 is the first panel)

int[]

separatorColor

The RGB+Alpha color of the data box separator (R, G, B, Alpha)

C_DashStyle

separatorStyle

The style of the data box separator (View Options)

int

separatorThickness

The thickness (in pixels) of the data box separator


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartDataBoxSetTimeFormat(int chartSymbolIndex, int chartPanelIndex, string timeFormat)

Sets the format of the time in the data box of a specified chart panel.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

chartPanelIndex

The index of the chart panel (1 is the first panel)

string

timeFormat

The time format (based on C# time format)


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartDataBoxShowField(int chartSymbolIndex, int chartPanelIndex, C_DataBoxField dataBoxField, bool isVisibleField)

Shows or hides a field in the data box of a specified chart panel.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

chartPanelIndex

The index of the chart panel (1 is the first panel)

C_DataBoxField

dataBoxField

The data box field (View Options)

bool

isVisibleField

True to show field in the data box, false to hide it


Scripts


MultiSymbolTradingStrategy, TradingStrategy


int ChartDataSeriesPlot(int chartSymbolIndex, int symbolIndex, int chartPanelIndex, C_ChartType chartType, C_BarType barType, double barSize, C_BarSource barSource)

Plots a specified data series on the chart.


Returns


The item ID of the plotted data series.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

symbolIndex

The index of the symbol on which the data series is based

int

chartPanelIndex

The index of the chart panel on which to plot the data series (1 is the first panel)

C_ChartType

chartType

The visual style of the data series (View Options)

C_BarType

barType

The bar type of the data series (View Options)

double

barSize

The bar size of the data series

C_BarSource

barSource

The bar source of the data series (View Options)


Scripts


MultiSymbolTradingStrategy, TradingStrategy


int ChartDataSeriesPlotCustom(int chartSymbolIndex, int symbolIndex, int chartPanelIndex, C_ChartType chartType, string barTypeID, double barSize, C_BarSource barSource)

Plots a specified data series on the chart.


Returns


The item ID of the plotted data series.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

symbolIndex

The index of the symbol on which the data series is based

int

chartPanelIndex

The index of the chart panel on which to plot the data series (1 is the first panel)

C_ChartType

chartType

The visual style of the data series (View Options)

string

barTypeID

The ID of the data series custom bar type (make sure your custom bar types have unique IDs)

double

barSize

The bar size of the data series

C_BarSource

barSource

The bar source of the data series (View Options)


Scripts


MultiSymbolTradingStrategy, TradingStrategy


int ChartDataSeriesPlotDefault(int chartSymbolIndex, int symbolIndex, int chartPanelIndex, C_ChartType chartType, C_BarType barType, double barSize, C_BarSource barSource)

Updates the default data series on the chart, if this function isn't called the default data series will be plotted based on the Desktop data series settings.


Returns


The item ID of the default data series.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

symbolIndex

The index of the symbol on which the data series is based

int

chartPanelIndex

The index of the chart panel on which to plot the data series (1 is the first panel)

C_ChartType

chartType

The visual style of the data series (View Options)

C_BarType

barType

The bar type of the data series (View Options)

double

barSize

The bar size of the data series

C_BarSource

barSource

The bar source of the data series (View Options)


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartDataSeriesSetAskPen(int chartSymbolIndex, int dataSeriesID, C_Color penColor, C_DashStyle penStyle, int penThickness)

Sets the pen that marks the latest ask price of the underlying symbol of a specified data series.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

dataSeriesID

The item ID of the data series as returned from ChartDataSeriesPlot

C_Color

penColor

The color of the line (View Options)

C_DashStyle

penStyle

The dash style of the line (View Options)

int

penThickness

The thickness (in pixels) of the line


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartDataSeriesSetAskPenRGB(int chartSymbolIndex, int dataSeriesID, int[] penColor, C_DashStyle penStyle, int penThickness)

Sets the pen that marks the latest ask price of the underlying symbol of a specified data series.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

dataSeriesID

The item ID of the data series as returned from ChartDataSeriesPlot

int[]

penColor

The RGB+Alpha color of the line (R, G, B, Alpha)

C_DashStyle

penStyle

The dash style of the line (View Options)

int

penThickness

The thickness (in pixels) of the line


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartDataSeriesSetBarWidth(int chartSymbolIndex, int dataSeriesID, int barWidth)

Sets the maximum width of the bars of a specified data series.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

dataSeriesID

The item ID of the data series as returned from ChartDataSeriesPlot

int

barWidth

The width (in pixels) of the data bars


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartDataSeriesSetBidPen(int chartSymbolIndex, int dataSeriesID, C_Color penColor, C_DashStyle penStyle, int penThickness)

Sets the pen that marks the latest bid price of the underlying symbol of a specified data series.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

dataSeriesID

The item ID of the data series as returned from ChartDataSeriesPlot

C_Color

penColor

The color of the line (View Options)

C_DashStyle

penStyle

The dash style of the line (View Options)

int

penThickness

The thickness (in pixels) of the line


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartDataSeriesSetBidPenRGB(int chartSymbolIndex, int dataSeriesID, int[] penColor, C_DashStyle penStyle, int penThickness)

Sets the pen that marks the latest bid price of the underlying symbol of a specified data series.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

dataSeriesID

The item ID of the data series as returned from ChartDataSeriesPlot

int[]

penColor

The RGB+Alpha color of the line (R, G, B, Alpha)

C_DashStyle

penStyle

The dash style of the line (View Options)

int

penThickness

The thickness (in pixels) of the line


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartDataSeriesSetBuyOrderPen(int chartSymbolIndex, int dataSeriesID, C_Color penColor, C_DashStyle penStyle, int penThickness)

Sets the pen that marks the pending buy orders of the underlying symbol of a specified data series.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

dataSeriesID

The item ID of the data series as returned from ChartDataSeriesPlot

C_Color

penColor

The color of the line (View Options)

C_DashStyle

penStyle

The dash style of the line (View Options)

int

penThickness

The thickness (in pixels) of the line


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartDataSeriesSetBuyOrderPenRGB(int chartSymbolIndex, int dataSeriesID, int[] penColor, C_DashStyle penStyle, int penThickness)

Sets the pen that marks the pending buy orders of the underlying symbol of a specified data series.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

dataSeriesID

The item ID of the data series as returned from ChartDataSeriesPlot

int[]

penColor

The RGB+Alpha color of the line (R, G, B, Alpha)

C_DashStyle

penStyle

The dash style of the line (View Options)

int

penThickness

The thickness (in pixels) of the line


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartDataSeriesSetChartPanel(int chartSymbolIndex, int dataSeriesID, int chartPanelIndex)

Sets the chart panel on which to display the specified data series.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

dataSeriesID

The item ID of the data series as returned from ChartDataSeriesPlot

int

chartPanelIndex

The index of the chart panel (1 is the first panel)


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartDataSeriesSetChartType(int chartSymbolIndex, int dataSeriesID, C_ChartType chartType)

Sets the chart type, which is the visual style of a specified data series.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

dataSeriesID

The item ID of the data series as returned from ChartDataSeriesPlot

C_ChartType

chartType

The chart type (View Options)


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartDataSeriesSetCoverOrderPen(int chartSymbolIndex, int dataSeriesID, C_Color penColor, C_DashStyle penStyle, int penThickness)

Sets the pen that marks the pending cover orders of the underlying symbol of a specified data series.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

dataSeriesID

The item ID of the data series as returned from ChartDataSeriesPlot

C_Color

penColor

The color of the line (View Options)

C_DashStyle

penStyle

The dash style of the line (View Options)

int

penThickness

The thickness (in pixels) of the line


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartDataSeriesSetCoverOrderPenRGB(int chartSymbolIndex, int dataSeriesID, int[] penColor, C_DashStyle penStyle, int penThickness)

Sets the pen that marks the pending cover orders of the underlying symbol of a specified data series.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

dataSeriesID

The item ID of the data series as returned from ChartDataSeriesPlot

int[]

penColor

The RGB+Alpha color of the line (R, G, B, Alpha)

C_DashStyle

penStyle

The dash style of the line (View Options)

int

penThickness

The thickness (in pixels) of the line



Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartDataSeriesSetDownBarColors(int chartSymbolIndex, int dataSeriesID, C_Color fillColor, C_Color borderColor, C_DashStyle borderStyle, int borderThickness, C_Color wickPenColor, C_DashStyle wickPenStyle, int wickPenThickness)

Sets the colors of 'down bars' of a specified data series.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

dataSeriesID

The item ID of the data series as returned from ChartDataSeriesPlot

C_Color

fillColor

The fill color of the bar (View Options)

C_Color

borderColor

The color of the bar's border (View Options)

C_DashStyle

borderStyle

The dash style of the bar's border (View Options)

int

borderThickness

The thickness (in pixels) of the bar's border

C_Color

wickPenColor

The color of the wick pen (View Options)

C_DashStyle

wickPenStyle

The dash style of the wick pen (View Options)

int

wickPenThickness

The thickness (in pixels) of the wick pen


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartDataSeriesSetDownBarColorsRGB(int chartSymbolIndex, int dataSeriesID, int[] fillColor, int[] borderColor, C_DashStyle borderStyle, int borderThickness, int[] wickPenColor, C_DashStyle wickPenStyle, int wickPenThickness)

Sets the colors of 'down bars' of a specified data series.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

dataSeriesID

The item ID of the data series as returned from ChartDataSeriesPlot

int[]

fillColor

The RGB+Alpha fill color of the bar (R, G, B, Alpha)

int[]

borderColor

The RGB+Alpha color of the bar's border (R, G, B, Alpha)

C_DashStyle

borderStyle

The dash style of the bar's border (View Options)

int

borderThickness

The thickness (in pixels) of the bar's border

int[]

wickPenColor

The RGB+Alpha color of the wick pen (R, G, B, Alpha)

C_DashStyle

wickPenStyle

The dash style of the wick pen (View Options)

int

wickPenThickness

The thickness (in pixels) of the wick pen


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartDataSeriesSetLastPen(int chartSymbolIndex, int dataSeriesID, C_Color penColor, C_DashStyle penStyle, int penThickness)

Sets the pen that marks the last trade price of the underlying symbol of a specified data series.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

dataSeriesID

The item ID of the data series as returned from ChartDataSeriesPlot

C_Color

penColor

The color of the line (View Options)

C_DashStyle

penStyle

The dash style of the line (View Options)

int

penThickness

The thickness (in pixels) of the line


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartDataSeriesSetLastPenRGB(int chartSymbolIndex, int dataSeriesID, int[] penColor, C_DashStyle penStyle, int penThickness)

Sets the pen that marks the last trade price of the underlying symbol of a specified data series.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

dataSeriesID

The item ID of the data series as returned from ChartDataSeriesPlot

int[]

penColor

The RGB+Alpha color of the line (R, G, B, Alpha)

C_DashStyle

penStyle

The dash style of the line (View Options)

int

penThickness

The thickness (in pixels) of the line


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartDataSeriesSetLongPositionPen(int chartSymbolIndex, int dataSeriesID, C_Color penColor, C_DashStyle penStyle, int penThickness)

Sets the pen that marks the open long positions of the underlying symbol of a specified data series (based on the position's weighted average entry price).


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

dataSeriesID

The item ID of the data series as returned from ChartDataSeriesPlot

C_Color

penColor

The color of the line (View Options)

C_DashStyle

penStyle

The dash style of the line (View Options)

int

penThickness

The thickness (in pixels) of the line


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartDataSeriesSetLongPositionPenRGB(int chartSymbolIndex, int dataSeriesID, int[] penColor, C_DashStyle penStyle, int penThickness)

Sets the pen that marks the open long positions of the underlying symbol of a specified data series (based on the position's weighted average entry price).


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

dataSeriesID

The item ID of the data series as returned from ChartDataSeriesPlot

int[]

penColor

The RGB+Alpha color of the line (R, G, B, Alpha)

C_DashStyle

penStyle

The dash style of the line (View Options)

int

penThickness

The thickness (in pixels) of the line


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartDataSeriesSetNeutralBarColors(int chartSymbolIndex, int dataSeriesID, C_Color fillColor, C_Color borderColor, C_DashStyle borderStyle, int borderThickness, C_Color wickPenColor, C_DashStyle wickPenStyle, int wickPenThickness)

Sets the colors of 'neutral bars' of a specified data series.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

dataSeriesID

The item ID of the data series as returned from ChartDataSeriesPlot

C_Color

fillColor

The fill color of the bar (View Options)

C_Color

borderColor

The color of the bar's border (View Options)

C_DashStyle

borderStyle

The dash style of the bar's border (View Options)

int

borderThickness

The thickness (in pixels) of the bar's border

C_Color

wickPenColor

The color of the wick pen (View Options)

C_DashStyle

wickPenStyle

The dash style of the wick pen (View Options)

int

wickPenThickness

The thickness (in pixels) of the wick pen


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartDataSeriesSetNeutralBarColorsRGB(int chartSymbolIndex, int dataSeriesID, int[] fillColor, int[] borderColor, C_DashStyle borderStyle, int borderThickness, int[] wickPenColor, C_DashStyle wickPenStyle, int wickPenThickness)

Sets the colors of 'neutral bars' of a specified data series.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

dataSeriesID

The item ID of the data series as returned from ChartDataSeriesPlot

int[]

fillColor

The RGB+Alpha fill color of the bar (R, G, B, Alpha)

int[]

borderColor

The RGB+Alpha color of the bar's border (R, G, B, Alpha)

C_DashStyle

borderStyle

The dash style of the bar's border (View Options)

int

borderThickness

The thickness (in pixels) of the bar's border

int[]

wickPenColor

The RGB+Alpha color of the wick pen (R, G, B, Alpha)

C_DashStyle

wickPenStyle

The dash style of the wick pen (View Options)

int

wickPenThickness

The thickness (in pixels) of the wick pen


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartDataSeriesSetSellOrderPen(int chartSymbolIndex, int dataSeriesID, C_Color penColor, C_DashStyle penStyle, int penThickness)

Sets the pen that marks the pending sell orders of the underlying symbol of a specified data series.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

dataSeriesID

The item ID of the data series as returned from ChartDataSeriesPlot

C_Color

penColor

The color of the line (View Options)

C_DashStyle

penStyle

The dash style of the line (View Options)

int

penThickness

The thickness (in pixels) of the line


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartDataSeriesSetSellOrderPenRGB(int chartSymbolIndex, int dataSeriesID, int[] penColor, C_DashStyle penStyle, int penThickness)

Sets the pen that marks the pending sell orders of the underlying symbol of a specified data series.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

dataSeriesID

The item ID of the data series as returned from ChartDataSeriesPlot

int[]

penColor

The RGB+Alpha color of the line (R, G, B, Alpha)

C_DashStyle

penStyle

The dash style of the line (View Options)

int

penThickness

The thickness (in pixels) of the line


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartDataSeriesSetSessionBreakPen(int chartSymbolIndex, int dataSeriesID, C_Color penColor, C_DashStyle penStyle, int penThickness)

Sets the pen that marks the end of a session of the underlying symbol of a specified data series.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

dataSeriesID

The item ID of the data series as returned from ChartDataSeriesPlot

C_Color

penColor

The color of the line (View Options)

C_DashStyle

penStyle

The dash style of the line (View Options)

int

penThickness

The thickness (in pixels) of the line


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartDataSeriesSetSessionBreakPenRGB(int chartSymbolIndex, int dataSeriesID, int[] penColor, C_DashStyle penStyle, int penThickness)

Sets the pen that marks the end of a session of the underlying symbol of a specified data series.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

dataSeriesID

The item ID of the data series as returned from ChartDataSeriesPlot

int[]

penColor

The RGB+Alpha color of the line (R, G, B, Alpha)

C_DashStyle

penStyle

The dash style of the line (View Options)

int

penThickness

The thickness (in pixels) of the line


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartDataSeriesSetShortOrderPen(int chartSymbolIndex, int dataSeriesID, C_Color penColor, C_DashStyle penStyle, int penThickness)

Sets the pen that marks the pending short orders of the underlying symbol of a specified data series.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

dataSeriesID

The item ID of the data series as returned from ChartDataSeriesPlot

C_Color

penColor

The color of the line (View Options)

C_DashStyle

penStyle

The dash style of the line (View Options)

int

penThickness

The thickness (in pixels) of the line


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartDataSeriesSetShortOrderPenRGB(int chartSymbolIndex, int dataSeriesID, int[] penColor, C_DashStyle penStyle, int penThickness)

Sets the pen that marks the pending short orders of the underlying symbol of a specified data series.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

dataSeriesID

The item ID of the data series as returned from ChartDataSeriesPlot

int[]

penColor

The RGB+Alpha color of the line (R, G, B, Alpha)

C_DashStyle

penStyle

The dash style of the line (View Options)

int

penThickness

The thickness (in pixels) of the line


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartDataSeriesSetShortPositionPen(int chartSymbolIndex, int dataSeriesID, C_Color penColor, C_DashStyle penStyle, int penThickness)

Sets the pen that marks the open short positions of the underlying symbol of a specified data series (based on the position's weighted average entry price).


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

dataSeriesID

The item ID of the data series as returned from ChartDataSeriesPlot

C_Color

penColor

The color of the line (View Options)

C_DashStyle

penStyle

The dash style of the line (View Options)

int

penThickness

The thickness (in pixels) of the line


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartDataSeriesSetShortPositionPenRGB(int chartSymbolIndex, int dataSeriesID, int[] penColor, C_DashStyle penStyle, int penThickness)

Sets the pen that marks the open short positions of the underlying symbol of a specified data series (based on the position's weighted average entry price).


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

dataSeriesID

The item ID of the data series as returned from ChartDataSeriesPlot

int[]

penColor

The RGB+Alpha color of the line (R, G, B, Alpha)

C_DashStyle

penStyle

The dash style of the line (View Options)

int

penThickness

The thickness (in pixels) of the line


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartDataSeriesSetUpBarColors(int chartSymbolIndex, int dataSeriesID, C_Color fillColor, C_Color borderColor, C_DashStyle borderStyle, int borderThickness, C_Color wickPenColor, C_DashStyle wickPenStyle, int wickPenThickness)

Sets the colors of 'up bars' of a specified data series.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

dataSeriesID

The item ID of the data series as returned from ChartDataSeriesPlot

C_Color

fillColor

The fill color of the bar (View Options)

C_Color

borderColor

The color of the bar's border (View Options)

C_DashStyle

borderStyle

The dash style of the bar's border (View Options)

int

borderThickness

The thickness (in pixels) of the bar's border

C_Color

wickPenColor

The color of the wick pen (View Options)

C_DashStyle

wickPenStyle

The dash style of the wick pen (View Options)

int

wickPenThickness

The thickness (in pixels) of the wick pen


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartDataSeriesSetUpBarColorsRGB(int chartSymbolIndex, int dataSeriesID, int[] fillColor, int[] borderColor, C_DashStyle borderStyle, int borderThickness, int[] wickPenColor, C_DashStyle wickPenStyle, int wickPenThickness)

Sets the colors of 'up bars' of a specified data series.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

dataSeriesID

The item ID of the data series as returned from ChartDataSeriesPlot

int[]

fillColor

The RGB+Alpha fill color of the bar (R, G, B, Alpha)

int[]

borderColor

The RGB+Alpha color of the bar's border (R, G, B, Alpha)

C_DashStyle

borderStyle

The dash style of the bar's border (View Options)

int

borderThickness

The thickness (in pixels) of the bar's border

int[]

wickPenColor

The RGB+Alpha color of the wick pen (R, G, B, Alpha)

C_DashStyle

wickPenStyle

The dash style of the wick pen (View Options)

int

wickPenThickness

The thickness (in pixels) of the wick pen


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartDataSeriesSetYAxisType(int chartSymbolIndex, int dataSeriesID, C_YAxis yAxisType)

Sets the Y axis type of a specified data series.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

dataSeriesID

The item ID of the data series as returned from ChartDataSeriesPlot

C_YAxis

yAxisType

The Y axis type (View Options)


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartDataSeriesShowMarker(int chartSymbolIndex, int dataSeriesID, bool isVisibleMarker)

Shows or hides the Y axis marker of a specified data series.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

dataSeriesID

The item ID of the data series as returned from ChartDataSeriesPlot

bool

isVisibleMarker

True to show marker, false to hide it


Scripts


MultiSymbolTradingStrategy, TradingStrategy


int ChartDrawingPlot(int chartSymbolIndex, Drawing drawing, string label, int dataSeriesID, int chartPanelIndex)

Plots a specified drawing on the chart.


Returns


The item ID of the plotted drawing.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

Drawing

drawing

The drawing to be plotted on the chart

string

label

The drawing's label to be shown on the chart data box

int

dataSeriesID

The ID of the data series that the drawing plot should be based on as returned from ChartDataSeriesPlot. This data series must be on the same chart as the drawing but may be on a different chart panel. -1 for the default data series

int

chartPanelIndex

The index of the chart panel on which to plot the drawing (1 is the first panel)


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartDrawingRemoveAll(int chartSymbolIndex)

Removes all of the drawings from the chart.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartDrawingSetChartPanel(int chartSymbolIndex, int drawingID, int chartPanelIndex)

Sets the chart panel on which to display a specified drawing.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

drawingID

The item ID of the drawing as returned from ChartDrawingPlot

int

chartPanelIndex

The index of the chart panel (1 is the first panel)


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartDrawingSetLabel(int chartSymbolIndex, int drawingID, string label)

Sets the label of a specified drawing.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

drawingID

The item ID of the drawing as returned from ChartDrawingPlot

string

label

The label of the drawing


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartDrawingSetPenByIndex(int chartSymbolIndex, int drawingID, int penIndex, C_Color penColor, C_DashStyle penStyle, int penThickness)

Sets the pen of a specified drawing.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

drawingID

The item ID of the drawing as returned from ChartDrawingPlot

int

penIndex

The index of the registered pen

C_Color

penColor

The color of the drawing (View Options)

C_DashStyle

penStyle

The dash style of the drawing line (View Options)

int

penThickness

The thickness (in pixels) of the drawing line


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartDrawingSetPenByIndexRGB(int chartSymbolIndex, int drawingID, int penIndex, int[] penColor, C_DashStyle penStyle, int penThickness)

Sets the pen of a specified drawing.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

drawingID

The item ID of the drawing as returned from ChartDrawingPlot

int

penIndex

The index of the registered pen

int[]

penColor

The RGB+Alpha color of the drawing (R, G, B, Alpha)

C_DashStyle

penStyle

The dash style of the drawing line (View Options)

int

penThickness

The thickness (in pixels) of the drawing line


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartDrawingSetPenByName(int chartSymbolIndex, int drawingID, string penName, C_Color penColor, C_DashStyle penStyle, int penThickness)

Sets the pen of a specified drawing.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

drawingID

The item ID of the drawing as returned from ChartDrawingPlot

string

penName

The name of the pen (as it was registered with the DrawingRegisterPen function)

C_Color

penColor

The color of the drawing (View Options)

C_DashStyle

penStyle

The dash style of the drawing line (View Options)

int

penThickness

The thickness (in pixels) of the drawing line


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartDrawingSetPenByNameRGB(int chartSymbolIndex, int drawingID, string penName, int[] penColor, C_DashStyle penStyle, int penThickness)

Sets the pen of a specified drawing.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

drawingID

The item ID of the drawing as returned from ChartDrawingPlot

string

penName

The name of the pen (as it was registered with the DrawingRegisterPen function)

int[]

penColor

The RGB+Alpha color of the drawing (R, G, B, Alpha)

C_DashStyle

penStyle

The dash style of the drawing line (View Options)

int

penThickness

The thickness (in pixels) of the drawing line


Scripts


MultiSymbolTradingStrategy, TradingStrategy


int ChartIndicatorPlot(int chartSymbolIndex, Indicator indicator, string label, int dataSeriesID, int chartPanelIndex)

Plots a specified indicator on the chart.


Returns


The item ID of the plotted indicator.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

Indicator

indicator

The indicator to be plotted on the chart

string

label

The indicator's label to be shown on the chart data box

int

dataSeriesID

The ID of the data series that the indicator plot should be based on as returned from the ChartDataSeriesPlot. This data series must be on the same chart as the indicator but may be on a different chart panel. -1 for the default data series.

int

chartPanelIndex

The index of the chart panel on which to plot the indicator (1 is the first panel)


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartIndicatorRemoveAll(int chartSymbolIndex)

Removes all of the indicators from the chart.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartIndicatorSetChartPanel(int chartSymbolIndex, int indicatorID, int chartPanelIndex)

Sets the chart panel on which to display a specified indicator.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

indicatorID

The item ID of the indicator as returned from ChartIndicatorPlot

int

chartPanelIndex

The index of the chart panel (1 is the first panel)


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartIndicatorSetDisplacement(int chartSymbolIndex, int indicatorID, int displacement)

Sets the displacement of a specific indicator. (E.g. displacement of 5 will match the current bar with the indicator value that was calculated 5 bars ago.)


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

indicatorID

The item ID of the indicator as returned from ChartIndicatorPlot

int

displacement

The displacement value


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartIndicatorSetLabel(int chartSymbolIndex, int indicatorID, string label)

Sets the label of a specified indicator.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

indicatorID

The item ID of the indicator as returned from ChartIndicatorPlot

string

label

The label of the indicator


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartIndicatorSetPenByIndex(int chartSymbolIndex, int indicatorID, int penIndex, C_Color penColor, C_DashStyle penStyle, int penThickness)

Sets the pen of a specified indicator.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

indicatorID

The item ID of the indicator as returned from ChartIndicatorPlot

int

penIndex

The index of the registered pen

C_Color

penColor

The color of the indicator (View Options)

C_DashStyle

penStyle

The dash style of the indicator (View Options)

int

penThickness

The thickness (in pixels) of the indicator


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartIndicatorSetPenByIndexRGB(int chartSymbolIndex, int indicatorID, int penIndex, int[] penColor, C_DashStyle penStyle, int penThickness)

Sets the pen of a specified indicator.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol


int

indicatorID

The item ID of the indicator as returned from ChartIndicatorPlot

int

penIndex

The index of the registered pen

int[]

penColor

The RGB+Alpha color of the indicator (R, G, B, Alpha)

C_DashStyle

penStyle

The dash style of the indicator (View Options)

int

penThickness

The thickness (in pixels) of the indicator


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartIndicatorSetPenByName(int chartSymbolIndex, int indicatorID, string penName, C_Color penColor, C_DashStyle penStyle, int penThickness)

Sets the pen of a specified indicator.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

indicatorID

The item ID of the indicator as returned from ChartIndicatorPlot

string

penName

The name of the pen (as it was registered with the IndicatorRegisterPen function)

C_Color

penColor

The color of the indicator (View Options)

C_DashStyle

penStyle

The dash style of the indicator (View Options)

int

penThickness

The thickness (in pixels) of the indicator


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartIndicatorSetPenByNameRGB(int chartSymbolIndex, int indicatorID, string penName, int[] penColor, C_DashStyle penStyle, int penThickness)

Sets the pen of a specified indicator.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

indicatorID

The item ID of the indicator as returned from ChartIndicatorPlot

string

penName

The name of the pen (as it was registered with the IndicatorRegisterPen function)

int[]

penColor

The RGB+Alpha color of the indicator (R, G, B, Alpha)

C_DashStyle

penStyle

The dash style of the indicator (View Options)

int

penThickness

The thickness (in pixels) of the indicator


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartIndicatorSetPlotStyle(int chartSymbolIndex, int indicatorID, C_PlotStyle plotStyle)

Sets the plot style of a specified indicator.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

indicatorID

The item ID of the indicator as returned from ChartIndicatorPlot

C_PlotStyle

plotStyle

The plot style of the indicator (View Options)


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartIndicatorSetYAxisType(int chartSymbolIndex, int indicatorID, C_YAxis yAxisType)

Sets the Y axis type of a specified indicator.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

indicatorID

The item ID of the indicator as returned from ChartIndicatorPlot

C_YAxis

yAxisType

The Y axis type (View Options)


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartIndicatorShowDataBox(int chartSymbolIndex, int indicatorID, bool isVisibleDataBox)

Shows or hides the a specified indicator in the data box.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

indicatorID

The item ID of the indicator as returned from ChartIndicatorPlot

bool

isVisibleDataBox

True to show data box, false to hide it


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartIndicatorShowMarker(int chartSymbolIndex, int indicatorID, bool isVisibleMarker)

Shows or hides the Y axis marker of a specified indicator.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

indicatorID

The item ID of the indicator as returned from ChartIndicatorPlot

bool

isVisibleMarker

True to show marker, false to hide it


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartPanelSetBackground(int chartSymbolIndex, int chartPanelIndex, C_Color color)

Sets the background colors of a specified chart panel.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

chartPanelIndex

The index of the chart panel (1 is the first panel)

C_Color

color

The background color (View Options)


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartPanelSetBackgroundRGB(int chartSymbolIndex, int chartPanelIndex, int[] color)

Sets the background colors of a specified chart panel.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

chartPanelIndex

The index of the chart panel (1 is the first panel)

int[]

color

The RGB+Alpha background color (R, G, B, Alpha)


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartPanelSetColorZone(int chartSymbolIndex, int chartPanelIndex, int colorZoneIndex, double bottomPrice, double topPrice, C_Color backgroundColor, C_Color strokeColor, C_DashStyle strokeStyle, int strokeThickness)

Sets/modify a color zone in a specified chart panel. The color zone will be automatically shown on the chart panel (see the ChartPanelShowColorZone function to hide it).


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

chartPanelIndex

The index of the chart panel (1 is the first panel)

int

colorZoneIndex

The index of the color zone (0 - 3)

double

bottomPrice

The price that outlines the bottom of the color zone

double

topPrice

The price that outlines the top of the color zone

C_Color

backgroundColor

The background color (View Options)

C_Color

strokeColor

The color of the stroke that outlines the color zone (View Options)

C_DashStyle

strokeStyle

The style of the stroke that outlines the color zone (View Options)

int

strokeThickness

The thickness (in pixels) of the stroke that outlines the color zone


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartPanelSetColorZoneRGB(int chartSymbolIndex, int chartPanelIndex, int colorZoneIndex, double bottomPrice, double topPrice, int[] backgroundColor, int[] strokeColor, C_DashStyle strokeStyle, int strokeThickness)

Sets/modify a color zone in a specified chart panel. The color zone will be automatically shown on the chart panel (see the ChartPanelShowColorZone function to hide it).


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

chartPanelIndex

The index of the chart panel (1 is the first panel)

int

colorZoneIndex

The index of the color zone (0 - 3)

double

bottomPrice

The price that outlines the bottom of the color zone

double

topPrice

The price that outlines the top of the color zone

int[]

backgroundColor

The RGB+Alpha background color (R, G, B, Alpha)

int[]

strokeColor

The RGB+Alpha color of the stroke that outlines the color zone (R, G, B, Alpha)

C_DashStyle

strokeStyle

The style of the stroke that outlines the color zone (View Options)

int

strokeThickness

The thickness (in pixels) of the stroke that outlines the color zone


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartPanelSetCrosshairPens(int chartSymbolIndex, int chartPanelIndex, C_Color crosshairColor, C_DashStyle crosshairStyle, int crosshairThickness)

Sets the crosshair pens of a specified chart panel.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

chartPanelIndex

The index of the chart panel (1 is the first panel)

C_Color

crosshairColor

The color of the crosshair line (vertical line) (View Options)

C_DashStyle

crosshairStyle

The dash style of the crosshair line (vertical line) (View Options)

int

crosshairThickness

The thickness (in pixels) of the crosshair line (vertical line)


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartPanelSetCrosshairPensRGB(int chartSymbolIndex, int chartPanelIndex, int[] crosshairColor, C_DashStyle crosshairStyle, int crosshairThickness)

Sets the crosshair pens of a specified chart panel.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

chartPanelIndex

The index of the chart panel (1 is the first panel)

int[]

crosshairColor

The RGB+Alpha color (R, G, B, Alpha) of the crosshair line (vertical line)

C_DashStyle

crosshairStyle

The dash style of the crosshair line (vertical line) (View Options)

int

crosshairThickness

The thickness (in pixels) of the crosshair line (vertical line)


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartPanelSetFont(int chartSymbolIndex, int chartPanelIndex, string fontFamily, int fontSize)

Sets the font family and the font size of a specified chart panel. (See the ChartPanelSetForeground function to set the foreground color of a chart panel.)


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

chartPanelIndex

The index of the chart panel (1 is the first panel)

string

fontFamily

The name of the font family

int

fontSize

The font size


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartPanelSetForeground(int chartSymbolIndex, int chartPanelIndex, C_Color foregroundColor)

Sets the foreground color of a specified chart panel.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

chartPanelIndex

The index of the chart panel (1 is the first panel)

C_Color

foregroundColor

The foreground color (View Options)


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartPanelSetForegroundRGB(int chartSymbolIndex, int chartPanelIndex, int[] foregroundColor)

Sets the foreground color of a specified chart panel.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

chartPanelIndex

The index of the chart panel (1 is the first panel)

int[]

foregroundColor

The RGB+Alpha foreground color (R, G, B, Alpha)


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartPanelSetGridPens(int chartSymbolIndex, int chartPanelIndex, C_Color gridLinesColor, C_DashStyle gridLinesStyle, int gridLinesThickness)

Sets the grid pens of a specified chart panel.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

chartPanelIndex

The index of the chart panel (1 is the first panel)

C_Color

gridLinesColor

The color of the grid lines (vertical lines) (View Options)

C_DashStyle

gridLinesStyle

The dash style of the grid lines (vertical lines) (View Options)

int

gridLinesThickness

The thickness (in pixels) of the grid lines (vertical lines)


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartPanelSetGridPensRGB(int chartSymbolIndex, int chartPanelIndex, int[] gridLinesColor, C_DashStyle gridLinesStyle, int gridLinesThickness)

Sets the grid pens of a specified chart panel.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

chartPanelIndex

The index of the chart panel (1 is the first panel)

int[]

gridLinesColor

The RGB+Alpha color (R, G, B, Alpha) of the grid lines (vertical lines)

C_DashStyle

gridLinesStyle

The dash style of the grid lines (vertical lines) (View Options)

int

gridLinesThickness

The thickness (in pixels) of the grid lines (vertical lines)


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartPanelShowColorZone(int chartSymbolIndex, int chartPanelIndex, int colorZoneIndex, bool isEnabledColorZone)

Enables or disables a specified color zone.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

chartPanelIndex

The index of the chart panel (1 is the first panel)

int

colorZoneIndex

The index of the color zone

bool

isEnabledColorZone

True to enable the color zone, false to disable it


Scripts


MultiSymbolTradingStrategy, TradingStrategy


int ChartPatternPlot(int chartSymbolIndex, Pattern pattern, string label, int dataSeriesID, int chartPanelIndex)

Plots a specified pattern on the chart.


Returns


The item ID of the plotted pattern.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

Pattern

pattern

The pattern to be plotted on the chart

string

label

The pattern's label to be shown on the chart data box

int

dataSeriesID

The ID of the data series that the pattern plot should be based on as returned from the ChartDataSeriesPlot. This data series must be on the same chart as the pattern but may be on a different chart panel. -1 for the default data series.

int

chartPanelIndex

The index of the chart panel on which to plot the pattern (1 is the first panel)


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartPatternRemoveAll(int chartSymbolIndex)

Removes all of the patterns from the chart.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartPatternSetChartPanel(int chartSymbolIndex, int patternID, int chartPanelIndex)

Sets the chart panel on which to display a specified pattern.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

patternID

The item ID of the pattern as returned from ChartPatternPlot

int

chartPanelIndex

The index of the chart panel (1 is the first panel)


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartPatternSetLabel(int chartSymbolIndex, int patternID, string label)

Sets the label of a specified pattern.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

patternID

The item ID of the pattern as returned from ChartPatternPlot

string

label

The label of the pattern


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartPatternSetPenByIndex(int chartSymbolIndex, int patternID, int penIndex, C_Color penColor, C_DashStyle penStyle, int penThickness)

Sets the pen of a specified pattern.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

patternID

The item ID of the pattern as returned from ChartPatternPlot

int

penIndex

The index of the registered pen (This param is reserved for future use. Currently there is only one pattern pen: "0")

C_Color

penColor

The color of the pattern mark (View Options)

C_DashStyle

penStyle

The dash style of the pattern mark (View Options)

int

penThickness

The thickness (in pixels) of the pattern mark


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartPatternSetPenByIndexRGB(int chartSymbolIndex, int patternID, int penIndex, int[] penColor, C_DashStyle penStyle, int penThickness)

Sets the pen of a specified pattern.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

patternID

The item ID of the pattern as returned from ChartPatternPlot

int

penIndex

The index of the registered pen (This param is reserved for future use. Currently there is only one pattern pen: "0")

int[]

penColor

The RGB+Alpha color of the pattern mark (R, G, B, Alpha)

C_DashStyle

penStyle

The dash style of the pattern mark (View Options)

int

penThickness

The thickness (in pixels) of the pattern mark


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartPatternSetPenByName(int chartSymbolIndex, int patternID, string penName, C_Color penColor, C_DashStyle penStyle, int penThickness)

Sets the pen of a specified pattern.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

patternID

The item ID of the pattern as returned from ChartPatternPlot

string

penName

The name of the pen (This param is reserved for future use. Currently there is only one pattern pen: "pen")

C_Color

penColor

The color of the pattern mark (View Options)

C_DashStyle

penStyle

The dash style of the pattern mark (View Options)

int

penThickness

The thickness (in pixels) of the pattern mark


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartPatternSetPenByNameRGB(int chartSymbolIndex, int patternID, string penName, int[] penColor, C_DashStyle penStyle, int penThickness)

Sets the pen of a specified pattern.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

patternID

The item ID of the pattern as returned from ChartPatternPlot

string

penName

The name of the pen (This param is reserved for future use. Currently there is only one pattern pen: "pen")

int[]

penColor

The RGB+Alpha color of the pattern mark (R, G, B, Alpha)

C_DashStyle

penStyle

The dash style of the pattern mark (View Options)

int

penThickness

The thickness (in pixels) of the pattern mark


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartSetPeriods(int chartSymbolIndex, int numberOfPeriods)

Sets the number of periods on the X axis of a specified chart.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

numberOfPeriods

Number of periods to display


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartSetProperties(int chartSymbolIndex, C_ChartProperties propertyToSet, bool boolValue)

Sets the properties of a specified chart.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

C_ChartProperties

propertyToSet

The property to set (View Options)

bool

boolValue

The bool value for the property


Scripts


MultiSymbolTradingStrategy, TradingStrategy


int ChartSignalPlot(int chartSymbolIndex, Signal signal, string label, int dataSeriesID, int chartPanelIndex)

Plots a specified signal on the chart.


Returns


The item ID of the plotted signal.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

Signal

signal

The signal to be plotted on the chart

string

label

The signal's label to be shown on the chart data box

int

dataSeriesID

The ID of the data series that the signal plot should be based on as returned from the ChartDataSeriesPlot. This data series must be on the same chart as the signal but may be on a different chart panel. -1 for the default data series.

int

chartPanelIndex

The index of the chart panel on which to plot the signal (1 is the first panel)



Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartSignalRemoveAll(int chartSymbolIndex)

Removes all of the signals from the chart.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartSignalSetChartPanel(int chartSymbolIndex, int signalID, int chartPanelIndex)

Sets the chart panel on which to display a specified signal.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

signalID

The item ID of the signal as returned from ChartSignalPlot

int

chartPanelIndex

The index of the chart panel (1 is the first panel)


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartSignalSetLabel(int chartSymbolIndex, int signalID, string label)

Sets the label of a specified signal.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

signalID

The item ID of the signal as returned from ChartSignalPlot

string

label

The label of the signal


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartSignalSetPenByIndex(int chartSymbolIndex, int signalID, int penIndex, C_Color penColor, C_DashStyle penStyle, int penThickness)

Sets the pen of a specified signal.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

signalID

The item ID of the signal as returned from ChartSignalPlot

int

penIndex

The index of the pen (buy pen: 0 / sell pen: 1)

C_Color

penColor

The color of the signal (View Options)

C_DashStyle

penStyle

The dash style of the signal (View Options)

int

penThickness

The thickness (in pixels) of the signal


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartSignalSetPenByIndexRGB(int chartSymbolIndex, int signalID, int penIndex, int[] penColor, C_DashStyle penStyle, int penThickness)

Sets the pen of a specified signal.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

signalID

The item ID of the signal as returned from ChartSignalPlot

int

penIndex

The index of the pen (buy pen: 0 / sell pen: 1)

int[]

penColor

The RGB+Alpha color of the signal (R, G, B, Alpha)

C_DashStyle

penStyle

The dash style of the signal (View Options)

int

penThickness

The thickness (in pixels) of the signal


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartSignalSetPenByName(int chartSymbolIndex, int signalID, string penName, C_Color penColor, C_DashStyle penStyle, int penThickness)

Sets the pen of a specified signal.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

signalID

The item ID of the signal as returned from ChartSignalPlot

string

penName

The name of the pen ("Buy" or "Sell")

C_Color

penColor

The color of the signal (View Options)

C_DashStyle

penStyle

The dash style of the signal (View Options)

int

penThickness

The thickness (in pixels) of the signal


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartSignalSetPenByNameRGB(int chartSymbolIndex, int signalID, string penName, int[] penColor, C_DashStyle penStyle, int penThickness)

Sets the pen of a specified signal.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

signalID

The item ID of the signal as returned from ChartSignalPlot

string

penName

The name of the pen ("Buy" or "Sell")

int[]

penColor

The RGB+Alpha color of the signal (R, G, B, Alpha)

C_DashStyle

penStyle

The dash style of the signal (View Options)

int

penThickness

The thickness (in pixels) of the signal


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartSignalShow(int chartSymbolIndex, int signalID, bool isVisibleSignal)

Shows or hides a specified signal.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

signalID

The item ID of the signal as returned from ChartSignalPlot

bool

isVisibleSignal

True (default) to show the signal, false to hide it


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartXAxisSetColors(int chartSymbolIndex, C_Color backgroundColor, C_Color foregroundColor)

Sets the colors of the X axis of a specified chart.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

C_Color

backgroundColor

The color of the background (View Options)

C_Color

foregroundColor

The color of the foreground (View Options)


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartXAxisSetColorsRGB(int chartSymbolIndex, int[] backgroundColor, int[] foregroundColor)

Sets the colors of the X axis of a specified chart.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int[]

backgroundColor

The RGB+Alpha color of the background (R, G, B, Alpha)

int[]

foregroundColor

The RGB+Alpha color of the foreground (R, G, B, Alpha)


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartXAxisSetDateFormat(int chartSymbolIndex, string dateFormat)

Sets the format of the date on the X axis of a specified chart.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

string

dateFormat

The date format (based on C# date format)


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartXAxisSetFont(int chartSymbolIndex, string fontFamily, int fontSize)

Sets the font family and the font size of the X axis of a specified chart.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

string

fontFamily

The name of the font family

int

fontSize

The font size


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartXAxisSetMarkerColors(int chartSymbolIndex, C_Color backgroundColor, C_Color foregroundColor)

Sets the colors of the X axis marker of a specified chart.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

C_Color

backgroundColor

The color of the background (View Options)

C_Color

foregroundColor

The color of the foreground (View Options)


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartXAxisSetMarkerColorsRGB(int chartSymbolIndex, int[] backgroundColor, int[] foregroundColor)

Sets the colors of the X axis marker of a specified chart.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int[]

backgroundColor

The RGB+Alpha color of the background (R, G, B, Alpha)

int[]

foregroundColor

The RGB+Alpha color of the foreground (R, G, B, Alpha)


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartXAxisSetPen(int chartSymbolIndex, C_Color axisPenColor, C_DashStyle axisPenStyle, int axisPenThickness)

Sets the pen of the X axis line of a specified chart.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

C_Color

axisPenColor

The color of the axis line (View Options)

C_DashStyle

axisPenStyle

The dash style of the axis line (View Options)

int

axisPenThickness

The thickness (in pixels) of the axis line


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartXAxisSetPenRGB(int chartSymbolIndex, int[] axisPenColor, C_DashStyle axisPenStyle, int axisPenThickness)

Sets the pen of the X axis line of a specified chart.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int[]

axisPenColor

The RGB+Alpha color of the axis line (R, G, B, Alpha)

C_DashStyle

axisPenStyle

The dash style of the axis line (View Options)

int

axisPenThickness

The thickness (in pixels) of the axis line


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartXAxisSetRightMargin(int chartSymbolIndex, int rightMargin)

Sets the right margin of the X axis of a specified chart.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

rightMargin

The right margin (in pixels)


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartXAxisSetTimeFormat(int chartSymbolIndex, string timeFormat)

Sets the format of the time on the X axis of a specified chart.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

string

timeFormat

The time format (based on C# time format)


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartYAxisSetBottomMargin(int chartSymbolIndex, int chartPanelIndex, bool isPercentValue, double bottomMarginValue, bool isLeftAxis)

Sets the bottom margin of the Y axis of a specified chart panel.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

chartPanelIndex

The index of the chart panel (1 is the first panel)

bool

isPercentValue

True for percentage margin, false for fixed units margin

double

bottomMarginValue

The bottom margin value

bool

isLeftAxis

True for setting the left Y axis, false (default) for setting the right Y axis


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartYAxisSetColors(int chartSymbolIndex, int chartPanelIndex, C_Color backgroundColor, C_Color foregroundColor, bool isLeftAxis)

Sets the colors of the Y axis of a specified chart panel.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

chartPanelIndex

The index of the chart panel (1 is the first panel)

C_Color

backgroundColor

The color of the background (View Options)

C_Color

foregroundColor

The color of the foreground (View Options)

bool

isLeftAxis

True for setting the left Y axis, false (default) for setting the right Y axis


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartYAxisSetColorsRGB(int chartSymbolIndex, int chartPanelIndex, int[] backgroundColor, int[] foregroundColor, bool isLeftAxis)

Sets the colors of the Y axis of a specified chart panel.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

chartPanelIndex

The index of the chart panel (1 is the first panel)

int[]

backgroundColor

The RGB+Alpha color of the background (R, G, B, Alpha)

int[]

foregroundColor

The RGB+Alpha color of the foreground (R, G, B, Alpha)

bool

isLeftAxis

True for setting the left Y axis, false (default) for setting the right Y axis


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartYAxisSetDecimalRound(int chartSymbolIndex, int chartPanelIndex, int decimalPlaces, bool isLeftAxis)

Sets the number of decimal places on the Y axis of a specified chart panel.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

chartPanelIndex

The index of the chart panel (1 is the first panel)

int

decimalPlaces

The number of decimal places

bool

isLeftAxis

True for setting the left Y axis, false (default) for setting the right Y axis


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartYAxisSetFont(int chartSymbolIndex, int chartPanelIndex, string fontFamily, int fontSize, bool isLeftAxis)

Sets the font family and the font size of the Y axis of a specified chart panel.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

chartPanelIndex

The index of the chart panel (1 is the first panel)

string

fontFamily

The name of the font family

int

fontSize

The font size

bool

isLeftAxis

True for setting the left Y axis, false (default) for setting the right Y axis


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartYAxisSetLinearScale(int chartSymbolIndex, int chartPanelIndex, bool isLeftAxis)

Sets the Y axis of a specified chart panel to linear scale.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

chartPanelIndex

The index of the chart panel (1 is the first panel)

bool

isLeftAxis

True for setting the left Y axis, false (default) for setting the right Y axis


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartYAxisSetLogScale(int chartSymbolIndex, int chartPanelIndex, bool isLeftAxis)

Sets the Y axis of a specified chart panel to log scale.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

chartPanelIndex

The index of the chart panel (1 is the first panel)

bool

isLeftAxis

True for setting the left Y axis, false (default) for setting the right Y axis


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartYAxisSetMajorUnit(int chartSymbolIndex, int chartPanelIndex, bool isAuto, double majorUnit, bool isLeftAxis)

Sets the major unit of the Y axis of a specified chart panel.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

chartPanelIndex

The index of the chart panel (1 is the first panel)

bool

isAuto

True for auto major unit, false otherwise

double

majorUnit

Major unit value (this value is disregarded if isAuto is true)

bool

isLeftAxis

True for setting the left Y axis, false (default) for setting the right Y axis


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartYAxisSetMarkerColors(int chartSymbolIndex, int chartPanelIndex, C_Color backgroundColor, C_Color foregroundColor, bool isLeftAxis)

Sets the colors of the Y axis marker of a specified chart panel.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

chartPanelIndex

The index of the chart panel (1 is the first panel)

C_Color

backgroundColor

The color of the background (View Options)

C_Color

foregroundColor

The color of the foreground (View Options)

bool

isLeftAxis

True for setting the left Y axis, false (default) for setting the right Y axis


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartYAxisSetMarkerColorsRGB(int chartSymbolIndex, int chartPanelIndex, int[] backgroundColor, int[] foregroundColor, bool isLeftAxis)

Sets the colors of the Y axis marker of a specified chart panel.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

chartPanelIndex

The index of the chart panel (1 is the first panel)

int[]

backgroundColor

The RGB+Alpha color of the background (R, G, B, Alpha)

int[]

foregroundColor

The RGB+Alpha color of the foreground (R, G, B, Alpha)

bool

isLeftAxis

True for setting the left Y axis, false (default) for setting the right Y axis


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartYAxisSetMaxValue(int chartSymbolIndex, int chartPanelIndex, bool isAuto, double maxValue, bool isLeftAxis)

Sets the maximum Y value to display on a specified chart panel.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

chartPanelIndex

The index of the chart panel (1 is the first panel)

bool

isAuto

True for auto-scale max Y value, false otherwise

double

maxValue

Maximum Y value (this value is disregarded if isAuto is true)

bool

isLeftAxis

True for setting the left Y axis, false (default) for setting the right Y axis


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartYAxisSetMinValue(int chartSymbolIndex, int chartPanelIndex, bool isAuto, double minValue, bool isLeftAxis)

Sets the minimum Y value to display on a specified chart panel.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

chartPanelIndex

The index of the chart panel (1 is the first panel)

bool

isAuto

True for auto-scale min Y value, false otherwise

double

minValue

Minimum Y value (this value is disregarded if isAuto is true)

bool

isLeftAxis

True for setting the left Y axis, false (default) for setting the right Y axis


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartYAxisSetPen(int chartSymbolIndex, int chartPanelIndex, C_Color axisPenColor, C_DashStyle axisPenStyle, int axisPenThickness, bool isLeftAxis)

Sets the pen of the Y axis line of a specified chart panel.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

chartPanelIndex

The index of the chart panel (1 is the first panel)

C_Color

axisPenColor

The color of the axis line (View Options)

C_DashStyle

axisPenStyle

The dash style of the axis line (View Options)

int

axisPenThickness

The thickness (in pixels) of the axis line

bool

isLeftAxis

True for setting the left Y axis, false (default) for setting the right Y axis


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartYAxisSetPenRGB(int chartSymbolIndex, int chartPanelIndex, int[] axisPenColor, C_DashStyle axisPenStyle, int axisPenThickness, bool isLeftAxis)

Sets the pen of the Y axis line of a specified chart panel.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

chartPanelIndex

The index of the chart panel (1 is the first panel)

int[]

axisPenColor

The RGB+Alpha color of the axis line (R, G, B, Alpha)

C_DashStyle

axisPenStyle

The dash style of the axis line (View Options)

int

axisPenThickness

The thickness (in pixels) of the axis line

bool

isLeftAxis

True for setting the left Y axis, false (default) for setting the right Y axis


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartYAxisSetPercentScale(int chartSymbolIndex, int chartPanelIndex, bool isLeftAxis)

Sets the Y axis of a specified chart panel to percent scale.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

chartPanelIndex

The index of the chart panel (1 is the first panel)

bool

isLeftAxis

True for setting the left Y axis, false (default) for setting the right Y axis


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartYAxisSetTopMargin(int chartSymbolIndex, int chartPanelIndex, bool isPercentValue, double topMarginValue, bool isLeftAxis)

Sets the top margin of the Y axis of a specified chart panel.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

chartPanelIndex

The index of the chart panel (1 is the first panel)

bool

isPercentValue

True for percentage margin, false for fixed units margin

double

topMarginValue

The top margin value

bool

isLeftAxis

True for setting the left Y axis, false (default) for setting the right Y axis


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartYAxisSetWidth(int chartSymbolIndex, int chartPanelIndex, int axisWidth, bool isLeftAxis)

Sets the width of the Y axis of a specified chart panel.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

chartPanelIndex

The index of the chart panel (1 is the first panel)

int

axisWidth

The width (in pixels) of the Y axis

bool

isLeftAxis

True for setting the left Y axis, false (default) for setting the right Y axis


Scripts


MultiSymbolTradingStrategy, TradingStrategy


ChartZIndexSetValue(int chartSymbolIndex, int itemID, int zIndexValue)

Sets the Z-index of a specified element on the chart. An element with greater Z-index shows on the chart in front of another element with lower Z-index.


Parameters


Type

Identifier

Description

int

chartSymbolIndex

The index that represents the chart, which is the index of its main underlying symbol

int

itemID

The item ID of the element on the chart

int

zIndexValue

The Z-index to assign to the element on the chart


Scripts


MultiSymbolTradingStrategy, TradingStrategy