Documentation
MQL5 ReferenceTrade FunctionsPositionGetSymbol 

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(
   int  index      // Number in the list of positions
   );

Parameters

index

[in]  Number of the position in the list of open positions.

Return Value

Value of the string type.

Note

For each symbol, at any given moment of time, only one position can be open, which is the result of one or more deals. Do not confuse current pending orders with positions, which are also displayed on the "Trade" tab of the "Toolbox" of the client terminal.

The total number of positions on a trade account cannot exceed the total number of financial instruments.

See also

PositionGetSymbol(), PositionSelect(), Position Properties