Download MetaTrader 5

OrderGetString

Returns the requested order property, pre-selected using OrderGetTicket or OrderSelect. The order property must be of the string type. There are 2 variants of the function.

1. Immediately returns the property value.

string  OrderGetString(
   ENUM_ORDER_PROPERTY_STRING  property_id        // Property identifier
   );

2. Returns true or false, depending on the success of the function. If successful, the value of the property is placed into a target variable passed by reference by the last parameter.

bool  OrderGetString(
   ENUM_ORDER_PROPERTY_STRING  property_id,       // Property identifier
   string&                     string_var         // Here we accept the property value
   );

Parameters

property_id

[in]  Identifier of the order property. The value can be one of the values of the ENUM_ORDER_PROPERTY_STRING enumeration.

string_var

[out]  Variable of the string type that accepts the value of the requested property.

Return Value

Value of the string type.

Note

Do not confuse current pending orders with positions, which are also displayed on the "Trade" tab of the "Toolbox" of the client terminal.

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.

To ensure receipt of fresh data about an order, it is recommended to call OrderSelect() right before referring to them.

See also

OrdersTotal(), OrderGetTicket(), Order Properties


Updated: 2016.06.14