DataSeries functions are mostly used for switching between data series in scripts that support multiple data series, such as the Trading Strategy and Multi-Symbol Trading Strategy scripts.


Sections


Functions

Function Details


Functions


Name

Description

double DataSeriesBarSize()

Gets the current bar size being used.

C_BarSource DataSeriesBarSource()

Gets the current bar source being used (the underlying bars used to built the bar type).

C_BarType DataSeriesBarType()

Gets the current bar type being used.

int DataSeriesCount()

Gets the number of data series available to the script.

DataSeriesSwitch(int)

Switches to a specified data series so that all Data functions start using it. In addition, once a data series is selected any new indicators, patterns, signals or drawings that the script creates will be based on that series and will continue to be based on it even if there is another switch to a different series.


Function Details


double DataSeriesBarSize()

Gets the current bar size being used.


Returns


The current bar size being used.


Scripts


TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, TradingStrategy


C_BarSource DataSeriesBarSource()

Gets the current bar source being used (the underlying bars used to built the bar type).


Returns


The current bar source being used (the underlying bars used to built the bar type). (View Options)


Scripts


TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, TradingStrategy


C_BarType DataSeriesBarType()

Gets the current bar type being used.


Returns


The current bar type being used. (View Options)


Scripts


TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, TradingStrategy


int DataSeriesCount()

Gets the number of data series available to the script.


Returns


The number of data series available to the script.


Scripts


TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, TradingStrategy


DataSeriesSwitch(int dataSeries)

Switches to a specified data series so that all Data functions start using it. In addition, once a data series is selected any new indicators, patterns, signals or drawings that the script creates will be based on that series and will continue to be based on it even if there is another switch to a different series.


Parameters


Type

Identifier

Description

int

dataSeries

The data series number according to the Desktop Strategy Wizard - Data Series Settings: 0 for the main data series, 1 for the second data series, 2 for the next one, etc.


Scripts


TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, TradingStrategy