- OrderCalcMargin
- OrderCalcProfit
- OrderCheck
- OrderSend
- OrderSendAsync
- PositionsTotal
- PositionGetSymbol
- PositionSelect
- PositionSelectByTicket
- PositionGetDouble
- PositionGetInteger
- PositionGetString
- PositionGetTicket
- OrdersTotal
- OrderGetTicket
- OrderSelect
- OrderGetDouble
- OrderGetInteger
- OrderGetString
- HistorySelect
- HistorySelectByPosition
- HistoryOrderSelect
- HistoryOrdersTotal
- HistoryOrderGetTicket
- HistoryOrderGetDouble
- HistoryOrderGetInteger
- HistoryOrderGetString
- HistoryDealSelect
- HistoryDealsTotal
- HistoryDealGetTicket
- HistoryDealGetDouble
- HistoryDealGetInteger
- HistoryDealGetString
PositionGetSymbol
Returns the symbol corresponding to the open position and automatically selects the position for further working with it using functions PositionGetDouble, PositionGetInteger, PositionGetString.
string PositionGetSymbol(
|
Parameters
index
[in] Number of the position in the list of open positions.
Return Value
Value of the string type. If the position was not found, an empty string will be returned. To get an error code, call the GetLastError() function.
Note
For the "netting" interpretation of positions (ACCOUNT_MARGIN_MODE_RETAIL_NETTING and ACCOUNT_MARGIN_MODE_EXCHANGE), only one position can exist for a symbol at any moment of time. This position is a result of one or more deals. Do not confuse positions with valid pending orders, which are also displayed on the Trading tab of the Toolbox window.
If individual positions are allowed (ACCOUNT_MARGIN_MODE_RETAIL_HEDGING), multiple positions can be open for one symbol.
Example:
//+------------------------------------------------------------------+
|
See also