SymbolInfoDoubleReturns the corresponding property of a specified symbol. There are 2 variants of the function. 1. Immediately returns the property value.
2. Returns true or false depending on whether a function is successfully performed. In case of success, the value of the property is placed into a recipient variable, passed by reference by the last parameter.
Parameters name [in] Symbol name. prop_id [in] Identifier of a symbol property. The value can be one of the values of the ENUM_SYMBOL_INFO_DOUBLE enumeration. double_var [out] Variable of double type receiving the value of the requested property. Return Value The value of double type. In case of execution failure, information about the error can be obtained using GetLastError() function:
Note 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. Example:
|