Data
Data functions are used for reading bar values from the underlying data series.
•Use the DataSeriesSwitch function to switch between multiple data series
•Use the SymbolSwitch function to switch between multiple underlying symbols (Only available for Multi-Symbol Trading Strategies).
Sections
Name |
Description |
Gets the ask price of a specified tick of the underlying symbol. |
|
Gets the ask date/time of a specified tick of the underlying symbol. |
|
Gets the ask size of a specified tick of the underlying symbol. |
|
Gets the average price of a specified bar of the underlying symbol (Open + High + Low + Close) / 4. |
|
Gets the bid price of a specified tick of the underlying symbol. |
|
Gets the bid date/time of a specified tick of the underlying symbol. |
|
Gets the bid size of a specified tick of the underlying symbol. |
|
Gets the closing price of a specified bar of the underlying symbol. |
|
Gets the end date/time of a specified bar of the underlying symbol. |
|
double DataFundamental(C_FundamentalsReportType, int, C_FundamentalType) |
Gets a specified fundamental value for the underlying symbol from a specified financial report. |
Gets the number of financial reports of a specified type that are available for the underlying symbol. |
|
Gets the highest price of a specified bar of the underlying symbol. |
|
Determines whether a specified bar of the underlying symbol is completely built. |
|
Determines whether a specified bar of the underlying symbol is missing. |
|
Gets the lowest price of a specified bar of the underlying symbol. |
|
Gets the open price of the next bar of the underlying symbol. This function should not be used during live trading, as the value does not exist. |
|
Gets the opening price of a specified bar of the underlying symbol. |
|
Gets the open interest of a specified bar of the underlying symbol. |
|
Gets the price range of a specified bar of the underlying symbol (High - Low). |
|
Sets whether the data functions should be adjusted for splits and dividends. The default is true unless explicitly modified in the Options window or this function is called with false. |
|
Gets the start date/time of a specified bar of the underlying symbol. |
|
Gets the total number of bars processed so far for the underlying symbol. |
|
Gets the trade price of a specified tick of the underlying symbol. |
|
Gets the trade date/time of a specified tick of the underlying symbol |
|
Gets the last size of a specified tick of the underlying symbol. |
|
Gets the typical price of a specified bar of the underlying symbol (High + Low + Close) / 3. |
|
Gets the volume of a specified bar of the underlying symbol. |
double DataAsk(int barShift) |
||||||
Gets the ask price of a specified tick of the underlying symbol. Returns The ask price of the specified tick of the underlying symbol. Parameters
Scripts Alert, TradeManagementStrategy, Drawing, Indicator, MultiSymbolTradingStrategy, Screener, Pattern, PositionSizing, Signal, TradingStrategy |
long DataAskDateTime(int barShift) |
||||||
Gets the ask date/time of a specified tick of the underlying symbol. Returns The ask date/time of the specified tick of the underlying symbol. Parameters
Scripts Alert, TradeManagementStrategy, Drawing, Indicator, MultiSymbolTradingStrategy, Screener, Pattern, PositionSizing, Signal, TradingStrategy |
double DataAskSize(int barShift) |
||||||
Gets the ask size of a specified tick of the underlying symbol. Returns The ask size of the specified tick of the underlying symbol. Parameters
Scripts Alert, TradeManagementStrategy, Drawing, Indicator, MultiSymbolTradingStrategy, Screener, Pattern, PositionSizing, Signal, TradingStrategy |
double DataAveragePrice(int barShift) |
||||||
Gets the average price of a specified bar of the underlying symbol (Open + High + Low + Close) / 4. Returns The average price of the specified bar of the underlying symbol. Parameters
Scripts Alert, TradeManagementStrategy, Drawing, Indicator, MultiSymbolTradingStrategy, Screener, Pattern, PositionSizing, Signal, TradingStrategy |
double DataBid(int barShift) |
||||||
Gets the bid price of a specified tick of the underlying symbol. Returns The bid price of the specified tick of the underlying symbol. Parameters
Scripts Alert, TradeManagementStrategy, Drawing, Indicator, MultiSymbolTradingStrategy, Screener, Pattern, PositionSizing, Signal, TradingStrategy |
long DataBidDateTime(int barShift) |
||||||
Gets the bid date/time of a specified tick of the underlying symbol. Returns The bid date/time of the specified tick of the underlying symbol. Parameters
Scripts Alert, TradeManagementStrategy, Drawing, Indicator, MultiSymbolTradingStrategy, Screener, Pattern, PositionSizing, Signal, TradingStrategy |
double DataBidSize(int barShift) |
||||||
Gets the bid size of a specified tick of the underlying symbol. Returns The bid size of the specified tick of the underlying symbol. Parameters
Scripts Alert, TradeManagementStrategy, Drawing, Indicator, MultiSymbolTradingStrategy, Screener, Pattern, PositionSizing, Signal, TradingStrategy |
double DataClose(int barShift) |
||||||
Gets the closing price of a specified bar of the underlying symbol. Returns The closing price of the specified bar of the underlying symbol. Parameters
Scripts Alert, TradeManagementStrategy, Drawing, Indicator, MultiSymbolTradingStrategy, Screener, Pattern, PositionSizing, Signal, TradingStrategy |
long DataEndDateTime(int barShift) |
||||||
Gets the end date/time of a specified bar of the underlying symbol. Returns The end date/time of the specified bar of the underlying symbol. Parameters
Scripts Alert, TradeManagementStrategy, Drawing, Indicator, MultiSymbolTradingStrategy, Screener, Pattern, PositionSizing, Signal, TradingStrategy |
double DataFundamental(C_FundamentalsReportType fundamentalsReportType, int reportIndex, C_FundamentalType fundamentalType) |
||||||||||||
Gets a specified fundamental value for the underlying symbol from a specified financial report. Returns The specified fundamental value for the underlying symbol from the specified financial report. Parameters
Scripts TradeManagementStrategy, Indicator, MultiSymbolTradingStrategy, Screener, Pattern, PositionSizing, Signal, TradingStrategy |
int DataFundamentalReportCount(C_FundamentalsReportType fundamentalsReportType) |
||||||
Gets the number of financial reports of a specified type that are available for the underlying symbol. Returns The number of financial reports of the specified type that are available for the underlying symbol. Parameters
Scripts TradeManagementStrategy, Indicator, MultiSymbolTradingStrategy, Screener, Pattern, PositionSizing, Signal, TradingStrategy |
double DataHigh(int barShift) |
||||||
Gets the highest price of a specified bar of the underlying symbol. Returns The highest price of the specified bar of the underlying symbol. Parameters
Scripts Alert, TradeManagementStrategy, Drawing, Indicator, MultiSymbolTradingStrategy, Screener, Pattern, PositionSizing, Signal, TradingStrategy |
bool DataIsComplete(int barShift) |
||||||
Determines whether a specified bar of the underlying symbol is completely built. Returns True if the specified bar of the underlying symbol is completely built, false otherwise. Parameters
Scripts Alert, TradeManagementStrategy, Drawing, Indicator, MultiSymbolTradingStrategy, Screener, Pattern, PositionSizing, Signal, TradingStrategy |
bool DataIsMissing(int barShift) |
||||||
Determines whether a specified bar of the underlying symbol is missing. Returns True if the specified bar of the underlying symbol is missing, false otherwise. Parameters
Scripts Alert, TradeManagementStrategy, Drawing, Indicator, MultiSymbolTradingStrategy, Screener, Pattern, PositionSizing, Signal, TradingStrategy |
double DataLow(int barShift) |
||||||
Gets the lowest price of a specified bar of the underlying symbol. Returns The lowest price of the specified bar of the underlying symbol. Parameters
Scripts Alert, TradeManagementStrategy, Drawing, Indicator, MultiSymbolTradingStrategy, Screener, Pattern, PositionSizing, Signal, TradingStrategy |
double DataNextOpen() |
Gets the open price of the next bar of the underlying symbol. This function should not be used during live trading, as the value does not exist. Returns The open price of the next bar of the underlying symbol. Scripts Alert, TradeManagementStrategy, Drawing, Indicator, MultiSymbolTradingStrategy, Screener, Pattern, PositionSizing, Signal, TradingStrategy |
double DataOpen(int barShift) |
||||||
Gets the opening price of a specified bar of the underlying symbol. Returns The opening price of the specified bar of the underlying symbol. Parameters
Scripts Alert, TradeManagementStrategy, Drawing, Indicator, MultiSymbolTradingStrategy, Screener, Pattern, PositionSizing, Signal, TradingStrategy |
double DataOpenInterest(int barShift) |
||||||
Gets the open interest of a specified bar of the underlying symbol. Returns The open interest of the specified bar of the underlying symbol. Parameters
Scripts Alert, TradeManagementStrategy, Drawing, Indicator, MultiSymbolTradingStrategy, Screener, Pattern, PositionSizing, Signal, TradingStrategy |
double DataRange(int barShift) |
||||||
Gets the price range of a specified bar of the underlying symbol (High - Low). Returns The price range of the specified bar of the underlying symbol. Parameters
Scripts Alert, TradeManagementStrategy, Drawing, Indicator, MultiSymbolTradingStrategy, Screener, Pattern, PositionSizing, Signal, TradingStrategy |
void DataSplitsDividendsAdjusted(bool shouldAdjust) |
||||||
Sets whether the data functions should be adjusted for splits and dividends. The default is true unless explicitly modified in the Options window or this function is called with false. Parameters
Scripts Alert, TradeManagementStrategy, Drawing, Indicator, MultiSymbolTradingStrategy, Screener, Pattern, PositionSizing, Signal, TradingStrategy |
long DataStartDateTime(int barShift) |
||||||
Gets the start date/time of a specified bar of the underlying symbol. Returns The start date/time of the specified bar of the underlying symbol. Parameters
Scripts Alert, TradeManagementStrategy, Drawing, Indicator, MultiSymbolTradingStrategy, Screener, Pattern, PositionSizing, Signal, TradingStrategy |
int DataTotalCount() |
Gets the total number of bars processed so far for the underlying symbol. Returns The total number of bars processed so far for the underlying symbol. Scripts Alert, TradeManagementStrategy, Drawing, Indicator, MultiSymbolTradingStrategy, Screener, Pattern, PositionSizing, Signal, TradingStrategy |
double DataTrade(int barShift) |
||||||
Gets the trade price of a specified tick of the underlying symbol. Returns The trade price of the specified tick of the underlying symbol. Parameters
Scripts Alert, TradeManagementStrategy, Drawing, Indicator, MultiSymbolTradingStrategy, Screener, Pattern, PositionSizing, Signal, TradingStrategy |
long DataTradeDateTime(int barShift) |
||||||
Gets the trade date/time of a specified tick of the underlying symbol. Returns The trade date/time of the specified tick of the underlying symbol. Parameters
Scripts Alert, TradeManagementStrategy, Drawing, Indicator, MultiSymbolTradingStrategy, Screener, Pattern, PositionSizing, Signal, TradingStrategy |
double DataTradeSize(int barShift) |
||||||
Gets the trade size of a specified tick of the underlying symbol. Returns The trade size of the specified tick of the underlying symbol. Parameters
Scripts Alert, TradeManagementStrategy, Drawing, Indicator, MultiSymbolTradingStrategy, Screener, Pattern, PositionSizing, Signal, TradingStrategy |
double DataTypicalPrice(int barShift) |
||||||
Gets the typical price of a specified bar of the underlying symbol (High + Low + Close) / 3. Returns The typical price of the specified bar of the underlying symbol. Parameters
Scripts Alert, TradeManagementStrategy, Drawing, Indicator, MultiSymbolTradingStrategy, Screener, Pattern, PositionSizing, Signal, TradingStrategy |
double DataVolume(int barShift) |
||||||
Gets the volume of a specified bar of the underlying symbol. Returns The volume of the specified bar of the underlying symbol. Parameters
Scripts Alert, TradeManagementStrategy, Drawing, Indicator, MultiSymbolTradingStrategy, Screener, Pattern, PositionSizing, Signal, TradingStrategy |