Returns the corresponding property of a specified symbol
- Parameters
-
name | Symbol name |
prop_id | Identifier of a symbol property. The value can be one of the following values:
SYMBOL_BID | Bid - best sell offer |
SYMBOL_ASK | Ask - best buy offer |
SYMBOL_POINT | Symbol point value |
SYMBOL_TRADE_TICK_VALUE | Value of SYMBOL_TRADE_TICK_VALUE_PROFIT |
SYMBOL_TRADE_TICK_SIZE | Minimal price change |
SYMBOL_TRADE_CONTRACT_SIZE | Trade contract size |
SYMBOL_VOLUME_MIN | Minimal volume for a deal |
SYMBOL_VOLUME_MAX | Maximal volume for a deal |
SYMBOL_VOLUME_STEP | Minimal volume change step for deal execution |
SYMBOL_SWAP_LONG | Buy order swap value |
SYMBOL_SWAP_SHORT | Sell order swap value |
SYMBOL_MARGIN_INITIAL | Initial margin means the amount in the margin currency required for opening an order with the volume of one lot. It is used for checking a client's assets when he or she enters the market. |
SYMBOL_MARGIN_MAINTENANCE | The maintenance margin. If it is set, it sets the margin amount in the margin currency of the symbol, charged from one lot. It is used for checking a client's assets when his/her account state changes. If the maintenance margin is equal to 0, the initial margin is used. |
|
- Returns
- Double value of symbol property. In case of execution failure, information about the error can be obtained using GetLastError() function:
-
5040 invalid string parameter for specifying a symbol name,
-
4301 unknown symbol (financial instrument),
-
4302 symbol is not selected in "Market Watch" (not found in the list of available ones),
-
4303 invalid identifier of a symbol property.
It is recommended to use SymbolInfoTick() if the function is used for getting information about the last tick.
It may well be that not a single quote has appeared yet since the terminal is connected to a trading account. In such a case, the requested value will be indefinite.
In most cases, it is enough to use SymbolInfoTick() function allowing a user to receive the values of Ask, Bid, Last,
Volume and the time of the last tick's arrival during a single call.