Position
Position functions are mostly used for accessing the strategy positions in the positions table. Each strategy in the Desktop has its own separate positions table which it uses to hold all of its positions. The indexes of those positions in the table are used to identify the positions when using the Position functions (see the PositionByStatus functions to access those position indexes).
Sections
Name |
Description |
Gets the number of bars a specified position has been held open. |
|
Gets the number of bars a specified position has been held open. |
|
Gets the indexes of the positions in a specified status that belong to the underlying symbol(s). |
|
Gets the indexes of the positions in a specified status that belong to a specified strategy. |
|
Gets the indexes of the positions in a specified status that belong to any of the strategy symbols. |
|
Gets the number of positions of the underlying symbol(s). |
|
Gets the number of positions of a specified strategy. |
|
Gets the total number of positions for all of the symbols. |
|
Gets the number of positions of the underlying symbol(s) in a specified status. |
|
Gets the number of positions of a specified strategy in a specified status. |
|
Gets the total number of positions, for all of the symbols, in a specified status. |
|
Gets the currency code of a specified position. (USD, EUR, GPB, etc.) |
|
Gets the currency code of a specified position. (USD, EUR, GPB, etc.) |
|
Gets the starting date/time of the current bar in a specified open position. |
|
Gets the starting date/time of the current bar in a specified open position. |
|
Gets the current price of a specified position. |
|
Gets the current price of a specified position. |
|
Gets the quantity of shares, contracts or units of a specified position. |
|
Gets the quantity of shares, contracts or units of a specified position. |
|
Gets the current value (quantity * current price) of a specified position. |
|
Gets the current value (quantity * current price) of a specified position. |
|
Gets the number of days a specified position has been held open. |
|
Gets the number of days a specified position has been held open. |
|
Gets the direction of a specified position. |
|
Gets the direction of a specified position. |
|
Gets the date/time in which a specified position was entered. |
|
Gets the date/time in which a specified position was entered. |
|
Gets the average entry price of a specified position, which is the weighted average execution price of all of its entry orders. |
|
Gets the average entry price of a specified position, which is the weighted average execution price of all of its entry orders. |
|
Determines whether a position with a specified status exists for the underlying symbol. |
|
Determines whether a position with a specified status and symbol index exists. |
|
bool PositionExistsInDirection(C_PositionStatus, C_Direction) |
Determines whether a position with a specified status and direction exists for the underlying symbol. |
bool PositionExistsInDirection(int, C_PositionStatus, C_Direction, int?) |
Determines whether a position with a specified status, symbol index and direction exists. |
Gets the execution date/time of the latest exit order of a specified position. |
|
Gets the execution date/time of the latest exit order of a specified position. |
|
Gets the average exit price of a specified position, which is the weighted average execution price of all of its exit orders. |
|
Gets the average exit price of a specified position, which is the weighted average execution price of all of its exit orders. |
|
Gets the highest price of a specified position's symbol during the time the position has been held open. |
|
Gets the highest price of a specified position's symbol during the time the position has been held open. |
|
Gets the instrument type of a specified position. |
|
Gets the instrument type of a specified position. |
|
Determines whether a specified position is closed. |
|
Determines whether a specified position is closed. |
|
Gets the lowest price of a specified position's symbol during the time the position has been held open. |
|
Gets the lowest price of a specified position's symbol during the time the position has been held open. |
|
Gets the MAE of a specified position. |
|
Gets the MAE of a specified position. |
|
Gets the MAE in price of a specified position. |
|
Gets the MAE in price of a specified position. |
|
Gets the initial margin used by a specified futures/forex position. |
|
Gets the initial margin used by a specified futures/forex position. |
|
Gets the MFE of a specified position. |
|
Gets the MFE of a specified position. |
|
Gets the MFE in price of a specified position. |
|
Gets the MFE in price of a specified position. |
|
Gets the indexes of a specified position's orders. |
|
Gets the indexes of a specified position's orders. |
|
Gets the point change of a specified futures position, from its opening price to its closing price or to its current price if it's still open. |
|
Gets the point change of a specified futures position, from its opening price to its closing price or to its current price if it's still open. |
|
Gets the price change of a specified position, from its opening price to its closing price or to its current price if it's still open. |
|
Gets the price change of a specified position, from its opening price to its closing price or to its current price if it's still open. |
|
Gets the % change in a specified position price, from its opening price to its closing price or to its current price if it's still open. |
|
Gets the % change in a specified position price, from its opening price to its closing price or to its current price if it's still open. |
|
Gets the PnL of a specified position. (Including both realized and unrealized PnL.) |
|
Gets the PnL of a specified position. (Including both realized and unrealized PnL.) |
|
Gets the PnL % of a specified position. (Including both realized and unrealized PnL.) |
|
Gets the PnL % of a specified position. (Including both realized and unrealized PnL.) |
|
Gets the realized PnL of a specified closed or partially closed position. (The actual PnL based on the exit price of each closed trade in the position.) |
|
Gets the realized PnL of a specified closed or partially closed position. (The actual PnL based on the exit price of each closed trade in the position.) |
|
Gets the settled cash of a specified futures position. Futures settlements are processed at the Desktop EOD time using the last available price of the symbol. |
|
Gets the settled cash of a specified futures position. Futures settlements are processed at the Desktop EOD time using the last available price of the symbol. |
|
Gets the sim-account Id of a specified position. |
|
Gets the symbol index of the underlying symbol of a specified position (the symbol index in the strategy's symbols table). |
|
Gets the symbol index of the underlying symbol of a specified position (the symbol index in the strategy's symbols table). |
|
Gets the tick/pip change of a specified position, from its opening price to its closing price or to its current price if it's still open. |
|
Gets the tick/pip change of a specified position, from its opening price to its closing price or to its current price if it's still open. |
|
Gets the total quantity of all executed entry orders of a specified position. |
|
Gets the total quantity of all executed entry orders of a specified position. |
|
Gets the total entry value of a specified position, which is the sum of its executed entry orders values (price * quantity). |
|
Gets the total entry value of a specified position, which is the sum of its executed entry orders values (price * quantity). |
|
Gets the total quantity of all executed exit orders of a specified position. |
|
Gets the total quantity of all executed exit orders of a specified position. |
|
Gets the total exit value of a specified position, which is the sum of its executed exit orders values (price * quantity). |
|
Gets the total exit value of a specified position, which is the sum of its executed exit orders values (price * quantity). |
|
Gets the unrealized PnL of a specified open position. (The theoretical PnL based on the current market price of the still open position.) |
|
Gets the unrealized PnL of a specified open position. (The theoretical PnL based on the current market price of the still open position.) |
int PositionBars(int positionIndex) |
||||||
Gets the number of bars a specified position has been held open. Returns The number of bars the specified position has been held open (including the bar the entry order executed on). Parameters
Scripts Alert, TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, PositionSizing, TradingStrategy |
int PositionBars(int strategyNumber, int positionIndex) |
|||||||||
Gets the number of bars a specified position has been held open. Returns The number of bars the specified position has been held open (including the bar the entry order executed on). Parameters
Scripts AddOn, Commission, DynamicAllocation, PerformanceMetric, RiskManagement, Slippage, TaxSystem |
int[] PositionByStatus(C_PositionStatus positionStatus) |
||||||
Gets the indexes of the positions in a specified status that belong to the underlying symbol(s). Returns The indexes of the positions in the specified status that belong to the underlying symbol(s). Parameters
Scripts Alert, TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, PositionSizing, TradingStrategy |
int[] PositionByStatus(int strategyNumber, C_PositionStatus positionStatus, int? symbolIndex) |
||||||||||||
Gets the indexes of the positions in a specified status that belong to a specified strategy. Returns The indexes of the positions in the specified status that belong to the specified strategy. Parameters
Scripts AddOn, Commission, DynamicAllocation, PerformanceMetric, RiskManagement, Slippage, TaxSystem |
int[] PositionByStatusAll(C_PositionStatus positionStatus) |
||||||
Gets the indexes of the positions in a specified status that belong to any of the strategy symbols. Returns The indexes of the positions in a specified status that belong to any of the strategy symbols. Parameters
Scripts MultiSymbolTradingStrategy |
int PositionCount() |
Gets the number of positions of the underlying symbol(s). Returns The number of positions of the underlying symbol(s). Scripts Alert, TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, PositionSizing, TradingStrategy |
int PositionCount(int strategyNumber) |
||||||
Gets the number of positions of a specified strategy. Returns The number of positions of the specified strategy. Parameters
Scripts AddOn, Commission, DynamicAllocation, PerformanceMetric, RiskManagement, Slippage, TaxSystem |
int PositionCountAll() |
Gets the total number of positions for all of the symbols. Returns The total number of positions for all of the symbols. Scripts MultiSymbolTradingStrategy |
int PositionCountByStatus(C_PositionStatus positionStatus) |
||||||
Gets the number of positions of the underlying symbol(s) in a specified status. Returns The number of positions of the underlying symbol(s) in the specified status. Parameters
Scripts Alert, TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, PositionSizing, TradingStrategy |
int PositionCountByStatus(int strategyNumber, C_PositionStatus positionStatus, int? symbolIndex) |
||||||||||||
Gets the number of positions of a specified strategy in a specified status. Returns The number of positions of the specified strategy in the specified status. Parameters
Scripts AddOn, Commission, DynamicAllocation, PerformanceMetric, RiskManagement, Slippage, TaxSystem |
int PositionCountByStatusAll(C_PositionStatus positionStatus) |
||||||
Gets the total number of positions, for all of the symbols, in a specified status. Returns The total number of positions, for all of the symbols, in a specified status. Parameters
Scripts MultiSymbolTradingStrategy |
string PositionCurrencyCode(int positionIndex) |
||||||
Gets the currency code of a specified position. (USD, EUR, GPB, etc.) Returns The currency code of the specified position. (USD, EUR, GPB, etc.) Parameters
Scripts Alert, TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, PositionSizing, TradingStrategy |
string PositionCurrencyCode(int strategyNumber, int positionIndex) |
|||||||||
Gets the currency code of a specified position. (USD, EUR, GPB, etc.) Returns The currency code of the specified position. (USD, EUR, GPB, etc.) Parameters
Scripts AddOn, Commission, DynamicAllocation, PerformanceMetric, RiskManagement, Slippage, TaxSystem |
long PositionCurrentBarDateTime(int positionIndex) |
||||||
Gets the starting date/time of the current bar in a specified open position. Returns The starting date/time of the current bar in the specified open position. If the position is closed the date/time will equal that from DateTimeMax(). Parameters
Scripts Alert, TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, PositionSizing, TradingStrategy |
long PositionCurrentBarDateTime(int strategyNumber, int positionIndex) |
|||||||||
Gets the starting date/time of the current bar in a specified open position. Returns The starting date/time of the current bar in the specified open position. If the position is closed the date/time will equal that from DateTimeMax(). Parameters
Scripts AddOn, Commission, DynamicAllocation, PerformanceMetric, RiskManagement, Slippage, TaxSystem |
double PositionCurrentPrice(int positionIndex) |
||||||
Gets the current price of a specified position. Returns The current price of the specified position. Parameters
Scripts Alert, TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, PositionSizing, TradingStrategy |
double PositionCurrentPrice(int strategyNumber, int positionIndex) |
|||||||||
Gets the current price of a specified position. Returns The current price of the specified position. Parameters
Scripts AddOn, Commission, DynamicAllocation, PerformanceMetric, RiskManagement, Slippage, TaxSystem |
double PositionCurrentQuantity(int positionIndex) |
||||||
Gets the quantity of shares, contracts or units of a specified position. Returns The quantity of shares, contracts or units of the specified position. Parameters
Scripts Alert, TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, PositionSizing, TradingStrategy |
double PositionCurrentQuantity(int strategyNumber, int positionIndex) |
|||||||||
Gets the quantity of shares, contracts or units of a specified position. Returns The quantity of shares, contracts or units of the specified position. Parameters
Scripts AddOn, Commission, DynamicAllocation, PerformanceMetric, RiskManagement, Slippage, TaxSystem |
double PositionCurrentValue(int positionIndex) |
||||||
Gets the current value (quantity * current price) of a specified position. Returns The current value of the specified position. Parameters
Scripts Alert, TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, PositionSizing, TradingStrategy |
double PositionCurrentValue(int strategyNumber, int positionIndex) |
|||||||||
Gets the current value (quantity * current price) of a specified position. Returns The current value of the specified position. Parameters
Scripts AddOn, Commission, DynamicAllocation, PerformanceMetric, RiskManagement, Slippage, TaxSystem |
double PositionDays(int positionIndex) |
||||||
Gets the number of days a specified position has been held open. Returns The number of days the specified position has been held open. Parameters
Scripts Alert, TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, PositionSizing, TradingStrategy |
double PositionDays(int strategyNumber, int positionIndex) |
|||||||||
Gets the number of days a specified position has been held open. Returns The number of days the specified position has been held open. Parameters
Scripts AddOn, Commission, DynamicAllocation, PerformanceMetric, RiskManagement, Slippage, TaxSystem |
C_Direction PositionDirection(int positionIndex) |
||||||
Gets the direction of a specified position. Returns The direction of the specified position. (View Options) Parameters
Scripts Alert, TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, PositionSizing, TradingStrategy |
C_Direction PositionDirection(int strategyNumber, int positionIndex) |
|||||||||
Gets the direction of a specified position. Returns The direction of the specified position. (View Options) Parameters
Scripts AddOn, Commission, DynamicAllocation, PerformanceMetric, RiskManagement, Slippage, TaxSystem |
long PositionEntryDateTime(int positionIndex) |
||||||
Gets the date/time in which a specified position was entered. Returns The date/time in which the specified position was entered. Parameters
Scripts Alert, TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, PositionSizing, TradingStrategy |
long PositionEntryDateTime(int strategyNumber, int positionIndex) |
|||||||||
Gets the date/time in which a specified position was entered. Returns The date/time in which the specified position was entered. Parameters
Scripts AddOn, Commission, DynamicAllocation, PerformanceMetric, RiskManagement, Slippage, TaxSystem |
double PositionEntryPrice(int positionIndex) |
||||||
Gets the average entry price of a specified position, which is the weighted average execution price of all of its entry orders. Returns The average entry price of a specified position, which is the weighted average execution price of all of its entry orders. Parameters
Scripts Alert, TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, PositionSizing, TradingStrategy |
double PositionEntryPrice(int strategyNumber, int positionIndex) |
|||||||||
Gets the average entry price of a specified position, which is the weighted average execution price of all of its entry orders. Returns The average entry price of a specified position, which is the weighted average execution price of all of its entry orders. Parameters
Scripts AddOn, Commission, DynamicAllocation, PerformanceMetric, RiskManagement, Slippage, TaxSystem |
bool PositionExists(C_PositionStatus positionStatus) |
||||||
Determines whether a position with a specified status exists for the underlying symbol. Returns True if the specified position exists, false otherwise. Parameters
Scripts Alert, TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, PositionSizing, TradingStrategy |
bool PositionExists(int strategyNumber, C_PositionStatus positionStatus, int? symbolIndex) |
||||||||||||
Determines whether a position with a specified status and symbol index exists. Returns True if the specified position exists, false otherwise. Parameters
Scripts AddOn, Commission, DynamicAllocation, PerformanceMetric, RiskManagement, Slippage, TaxSystem |
bool PositionExistsInDirection(C_PositionStatus positionStatus, C_Direction direction) |
|||||||||
Determines whether a position with a specified status and direction exists for the underlying symbol. Returns True if the specified position exists, false otherwise. Parameters
Scripts Alert, TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, PositionSizing, TradingStrategy |
bool PositionExistsInDirection(int strategyNumber, C_PositionStatus positionStatus, C_Direction direction, int? symbolIndex) |
|||||||||||||||
Determines whether a position with a specified status, symbol index and direction exists. Returns True if the specified position exists, false otherwise. Parameters
Scripts AddOn, Commission, DynamicAllocation, PerformanceMetric, RiskManagement, Slippage, TaxSystem |
long PositionExitDateTime(int positionIndex) |
||||||
Gets the execution date/time of the latest exit order of a specified position. Returns The execution date/time of the latest exit order of the specified position. Parameters
Scripts Alert, TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, PositionSizing, TradingStrategy |
long PositionExitDateTime(int strategyNumber, int positionIndex) |
|||||||||
Gets the execution date/time of the latest exit order of a specified position. Returns The execution date/time of the latest exit order of the specified position. Parameters
Scripts AddOn, Commission, DynamicAllocation, PerformanceMetric, RiskManagement, Slippage, TaxSystem |
double PositionExitPrice(int positionIndex) |
||||||
Gets the average exit price of a specified position, which is the weighted average execution price of all of its exit orders. Returns The average exit price of a specified position, which is the weighted average execution price of all of its exit orders. Parameters
Scripts Alert, TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, PositionSizing, TradingStrategy |
double PositionExitPrice(int strategyNumber, int positionIndex) |
|||||||||
Gets the average exit price of a specified position, which is the weighted average execution price of all of its exit orders. Returns The average exit price of a specified position, which is the weighted average execution price of all of its exit orders. Parameters
Scripts AddOn, Commission, DynamicAllocation, PerformanceMetric, RiskManagement, Slippage, TaxSystem |
double PositionHighestPrice(int positionIndex) |
||||||
Gets the highest price of a specified position's symbol during the time the position has been held open. Returns The highest price of a specified position's symbol during the time the position has been held open. Parameters
Scripts Alert, TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, PositionSizing, TradingStrategy |
double PositionHighestPrice(int strategyNumber, int positionIndex) |
|||||||||
Gets the highest price of a specified position's symbol during the time the position has been held open. Returns The highest price of a specified position's symbol during the time the position has been held open. Parameters
Scripts AddOn, Commission, DynamicAllocation, PerformanceMetric, RiskManagement, Slippage, TaxSystem |
C_Instrument PositionInstrumentType(int positionIndex) |
||||||
Gets the instrument type of a specified position. Returns The instrument type of the specified position. (View Options) Parameters
Scripts Alert, TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, PositionSizing, TradingStrategy |
C_Instrument PositionInstrumentType(int strategyNumber, int positionIndex) |
|||||||||
Gets the instrument type of a specified position. Returns The instrument type of the specified position. (View Options) Parameters
Scripts AddOn, Commission, DynamicAllocation, PerformanceMetric, RiskManagement, Slippage, TaxSystem |
bool PositionIsClosed(int positionIndex) |
||||||
Determines whether a specified position is closed. Returns True if the specified position is closed, false otherwise. Parameters
Scripts Alert, TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, PositionSizing, TradingStrategy |
bool PositionIsClosed(int strategyNumber, int positionIndex) |
|||||||||
Determines whether a specified position is closed. Returns True if the specified position is closed, false otherwise. Parameters
Scripts AddOn, Commission, DynamicAllocation, PerformanceMetric, RiskManagement, Slippage, TaxSystem |
double PositionLowestPrice(int positionIndex) |
||||||
Gets the lowest price of a specified position's symbol during the time the position has been held open. Returns The lowest price of the specified position's symbol during the time the position has been held open. Parameters
Scripts Alert, TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, PositionSizing, TradingStrategy |
double PositionLowestPrice(int strategyNumber, int positionIndex) |
|||||||||
Gets the lowest price of a specified position's symbol during the time the position has been held open. Returns The lowest price of the specified position's symbol during the time the position has been held open. Parameters
Scripts AddOn, Commission, DynamicAllocation, PerformanceMetric, RiskManagement, Slippage, TaxSystem |
double PositionMAE(int positionIndex) |
||||||
Gets the MAE of a specified position. Returns The MAE of the specified position. Parameters
Scripts Alert, TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, PositionSizing, TradingStrategy |
double PositionMAE(int strategyNumber, int positionIndex) |
|||||||||
Gets the MAE of a specified position. Returns The MAE of the specified position. Parameters
Scripts AddOn, Commission, DynamicAllocation, PerformanceMetric, RiskManagement, Slippage, TaxSystem |
double PositionMAEPrice(int positionIndex) |
||||||
Gets the MAE in price of a specified position. Returns The MAE in price of the specified position. Parameters
Scripts Alert, TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, PositionSizing, TradingStrategy |
double PositionMAEPrice(int strategyNumber, int positionIndex) |
|||||||||
Gets the MAE in price of a specified position. Returns The MAE in price of the specified position. Parameters
Scripts AddOn, Commission, DynamicAllocation, PerformanceMetric, RiskManagement, Slippage, TaxSystem |
double PositionMargin(int positionIndex) |
||||||
Gets the initial margin used by a specified futures/forex position. Returns The initial margin used by the specified futures/forex position. Parameters
Scripts Alert, TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, PositionSizing, TradingStrategy |
double PositionMargin(int strategyNumber, int positionIndex) |
|||||||||
Gets the initial margin used by a specified futures/forex position. Returns The initial margin used by the specified futures/forex position. Parameters
Scripts AddOn, Commission, DynamicAllocation, PerformanceMetric, RiskManagement, Slippage, TaxSystem |
double PositionMFE(int positionIndex) |
||||||
Gets the MFE of a specified position. Returns The MFE of the specified position. Parameters
Scripts Alert, TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, PositionSizing, TradingStrategy |
double PositionMFE(int strategyNumber, int positionIndex) |
|||||||||
Gets the MFE of a specified position. Returns The MFE of the specified position. Parameters
Scripts AddOn, Commission, DynamicAllocation, PerformanceMetric, RiskManagement, Slippage, TaxSystem |
double PositionMFEPrice(int positionIndex) |
||||||
Gets the MFE in price of a specified position. Returns The MFE in price of the specified position. Parameters
Scripts Alert, TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, PositionSizing, TradingStrategy |
double PositionMFEPrice(int strategyNumber, int positionIndex) |
|||||||||
Gets the MFE in price of a specified position. Returns The MFE in price of the specified position. Parameters
Scripts AddOn, Commission, DynamicAllocation, PerformanceMetric, RiskManagement, Slippage, TaxSystem |
int[] PositionOrders(int positionIndex) |
||||||
Gets the indexes of a specified position's orders. Returns The indexes of the specified position's orders. Parameters
Scripts Alert, TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, PositionSizing, TradingStrategy |
int[] PositionOrders(int strategyNumber, int positionIndex) |
|||||||||
Gets the indexes of a specified position's orders. Returns The indexes of the specified position's orders. Parameters
Scripts AddOn, Commission, DynamicAllocation, PerformanceMetric, RiskManagement, Slippage, TaxSystem |
double PositionPointChange(int positionIndex) |
||||||
Gets the point change of a specified futures position, from its opening price to its closing price or to its current price if it's still open. Returns The point change of the specified futures position, from its opening price to its closing price or to its current price if it's still open. Parameters
Scripts Alert, TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, PositionSizing, TradingStrategy |
double PositionPointChange(int strategyNumber, int positionIndex) |
|||||||||
Gets the point change of a specified futures position, from its opening price to its closing price or to its current price if it's still open. Returns The point change of the specified futures position, from its opening price to its closing price or to its current price if it's still open. Parameters
Scripts AddOn, Commission, DynamicAllocation, PerformanceMetric, RiskManagement, Slippage, TaxSystem |
double PositionPriceChange(int positionIndex) |
||||||
Gets the price change of a specified position, from its opening price to its closing price or to its current price if it's still open. Returns The price change of the specified position, from its opening price to its closing price or to its current price if it's still open. Parameters
Scripts Alert, TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, PositionSizing, TradingStrategy |
double PositionPriceChange(int strategyNumber, int positionIndex) |
|||||||||
Gets the price change of a specified position, from its opening price to its closing price or to its current price if it's still open. Returns The price change of the specified position, from its opening price to its closing price or to its current price if it's still open. Parameters
Scripts AddOn, Commission, DynamicAllocation, PerformanceMetric, RiskManagement, Slippage, TaxSystem |
double PositionPricePercentChange(int positionIndex) |
||||||
Gets the % change in a specified position price, from its opening price to its closing price or to its current price if it's still open. Returns The % change in the specified position price, from its opening price to its closing price or to its current price if it's still open. Parameters
Scripts Alert, TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, PositionSizing, TradingStrategy |
double PositionPricePercentChange(int strategyNumber, int positionIndex) |
|||||||||
Gets the % change in a specified position price, from its opening price to its closing price or to its current price if it's still open. Returns The % change in the specified position price, from its opening price to its closing price or to its current price if it's still open. Parameters
Scripts AddOn, Commission, DynamicAllocation, PerformanceMetric, RiskManagement, Slippage, TaxSystem |
double PositionProfitLoss(int positionIndex) |
||||||
Gets the PnL of a specified position. (Including both realized and unrealized PnL.) Returns The PnL of the specified position. (Including both realized and unrealized PnL.) Parameters
Scripts Alert, TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, PositionSizing, TradingStrategy |
double PositionProfitLoss(int strategyNumber, int positionIndex) |
|||||||||
Gets the PnL of a specified position. (Including both realized and unrealized PnL.) Returns The PnL of the specified position. (Including both realized and unrealized PnL.) Parameters
Scripts AddOn, Commission, DynamicAllocation, PerformanceMetric, RiskManagement, Slippage, TaxSystem |
double PositionProfitLossPercent(int positionIndex) |
||||||
Gets the PnL % of a specified position. (Including both realized and unrealized PnL.) Returns The PnL % of the specified position. (Including both realized and unrealized PnL.) Parameters
Scripts Alert, TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, PositionSizing, TradingStrategy |
double PositionProfitLossPercent(int strategyNumber, int positionIndex) |
|||||||||
Gets the PnL % of a specified position. (Including both realized and unrealized PnL.) Returns The PnL % of the specified position. (Including both realized and unrealized PnL.) Parameters
Scripts AddOn, Commission, DynamicAllocation, PerformanceMetric, RiskManagement, Slippage, TaxSystem |
double PositionRealizedProfitLoss(int positionIndex) |
||||||
Gets the realized PnL of a specified closed or partially closed position. (The actual PnL based on the exit price of each closed trade in the position.) Returns The realized PnL of the specified closed or partially closed position. (The actual PnL based on the exit price of each closed trade in the position.) Parameters
Scripts Alert, TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, PositionSizing, TradingStrategy |
double PositionRealizedProfitLoss(int strategyNumber, int positionIndex) |
|||||||||
Gets the realized PnL of a specified closed or partially closed position. (The actual PnL based on the exit price of each closed trade in the position.) Returns The realized PnL of the specified closed or partially closed position. (The actual PnL based on the exit price of each closed trade in the position.) Parameters
Scripts AddOn, Commission, DynamicAllocation, PerformanceMetric, RiskManagement, Slippage, TaxSystem |
double PositionSettledCash(int positionIndex) |
||||||
Gets the settled cash of a specified futures position. Futures settlements are processed at the Desktop EOD time using the last available price of the symbol. Returns The settled cash of the specified futures position. Parameters
Scripts Alert, TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, PositionSizing, TradingStrategy |
double PositionSettledCash(int strategyNumber, int positionIndex) |
|||||||||
Gets the settled cash of a specified futures position. Futures settlements are processed at the Desktop EOD time using the last available price of the symbol. Returns The settled cash of the specified futures position. Parameters
Scripts AddOn, Commission, DynamicAllocation, PerformanceMetric, RiskManagement, Slippage, TaxSystem |
long PositionSimAccountId(int positionIndex) |
||||||
Gets the sim-account Id of a specified position. Returns The sim-account Id of the specified position. Parameters
Scripts TradeManagementStrategy |
int PositionSymbolIndex(int positionIndex) |
||||||
Gets the symbol index of the underlying symbol of a specified position (the symbol index in the strategy's symbols table). Returns The symbol index of the underlying symbol of the specified position (the symbol index in the strategy's symbols table). Parameters
Scripts Alert, TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, PositionSizing, TradingStrategy |
int PositionSymbolIndex(int strategyNumber, int positionIndex) |
|||||||||
Gets the symbol index of the underlying symbol of a specified position (the symbol index in the strategy's symbols table). Returns The symbol index of the underlying symbol of the specified position (the symbol index in the strategy's symbols table). Parameters
Scripts AddOn, Commission, DynamicAllocation, PerformanceMetric, RiskManagement, Slippage, TaxSystem |
double PositionTickChange(int positionIndex) |
||||||
Gets the tick/pip change of a specified position, from its opening price to its closing price or to its current price if it's still open. Returns The tick/pip change of the specified position, from its opening price to its closing price or to its current price if it's still open. Parameters
Scripts Alert, TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, PositionSizing, TradingStrategy |
double PositionTickChange(int strategyNumber, int positionIndex) |
|||||||||
Gets the tick/pip change of a specified position, from its opening price to its closing price or to its current price if it's still open. Returns The tick/pip change of the specified position, from its opening price to its closing price or to its current price if it's still open. Parameters
Scripts AddOn, Commission, DynamicAllocation, PerformanceMetric, RiskManagement, Slippage, TaxSystem |
double PositionTotalEntryQuantity(int positionIndex) |
||||||
Gets the total quantity of all executed entry orders of a specified position. Returns The total quantity of all executed entry orders of the specified position. Parameters
Scripts Alert, TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, PositionSizing, TradingStrategy |
double PositionTotalEntryQuantity(int strategyNumber, int positionIndex) |
|||||||||
Gets the total quantity of all executed entry orders of a specified position. Returns The total quantity of all executed entry orders of the specified position. Parameters
Scripts AddOn, Commission, DynamicAllocation, PerformanceMetric, RiskManagement, Slippage, TaxSystem |
double PositionTotalEntryValue(int positionIndex) |
||||||
Gets the total entry value of a specified position, which is the sum of its executed entry orders values (price * quantity). Returns The total entry value of the specified position, which is the sum of its executed entry orders values (price * quantity). Parameters
Scripts Alert, TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, PositionSizing, TradingStrategy |
double PositionTotalEntryValue(int strategyNumber, int positionIndex) |
|||||||||
Gets the total entry value of a specified position, which is the sum of its executed entry orders values (price * quantity). Returns The total entry value of the specified position, which is the sum of its executed entry orders values (price * quantity). Parameters
Scripts AddOn, Commission, DynamicAllocation, PerformanceMetric, RiskManagement, Slippage, TaxSystem |
double PositionTotalExitQuantity(int positionIndex) |
||||||
Gets the total quantity of all executed exit orders of a specified position. Returns The total quantity of all executed exit orders of the specified position. Parameters
Scripts Alert, TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, PositionSizing, TradingStrategy |
double PositionTotalExitQuantity(int strategyNumber, int positionIndex) |
|||||||||
Gets the total quantity of all executed exit orders of a specified position. Returns The total quantity of all executed exit orders of the specified position. Parameters
Scripts AddOn, Commission, DynamicAllocation, PerformanceMetric, RiskManagement, Slippage, TaxSystem |
double PositionTotalExitValue(int positionIndex) |
||||||
Gets the total exit value of a specified position, which is the sum of its executed exit orders values (price * quantity). Returns The total exit value of the specified position, which is the sum of its executed exit orders values (price * quantity). Parameters
Scripts Alert, TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, PositionSizing, TradingStrategy |
double PositionTotalExitValue(int strategyNumber, int positionIndex) |
|||||||||
Gets the total exit value of a specified position, which is the sum of its executed exit orders values (price * quantity). Returns The total exit value of the specified position, which is the sum of its executed exit orders values (price * quantity). Parameters
Scripts AddOn, Commission, DynamicAllocation, PerformanceMetric, RiskManagement, Slippage, TaxSystem |
double PositionUnrealizedProfitLoss(int positionIndex) |
||||||
Gets the unrealized PnL of a specified open position. (The theoretical PnL based on the current market price of the still open position.) Returns The unrealized PnL of the specified open position. (The theoretical PnL based on the current market price of the still open position.) Parameters
Scripts Alert, TradeManagementStrategy, MultiSymbolTradingStrategy, Screener, PositionSizing, TradingStrategy |
double PositionUnrealizedProfitLoss(int strategyNumber, int positionIndex) |
|||||||||
Gets the unrealized PnL of a specified open position. (The theoretical PnL based on the current market price of the still open position.) Returns The unrealized PnL of the specified open position. (The theoretical PnL based on the current market price of the still open position.) Parameters
Scripts AddOn, Commission, DynamicAllocation, PerformanceMetric, RiskManagement, Slippage, TaxSystem |