Syntax
Public Function SymbolInfoDouble(SymbolName As String, propId As ENUM_SYMBOL_INFO_DOUBLE, ByRef doubleVal As Variant) As Boolean
Description
This function is used to return agiven symbol information according to property IDand receive the result on doubleVal parameter.
Parameters
Key | Description |
SymbolName | Trading symbol name to get the information for it, value of type String |
propId | The specific information to get it value, Avalue of typeENUM_SYMBOL_INFO_DOUBLE. |
doubleVal | Thereceived result value of type Double. |
Return value
Returns true if successful.In order to get an error, call GetLastError() function.
Sample
Dim exeResult Dim rst Dim symbolName Public Sub main() symbolName="EUR/USD" ShowResult SymbolInfoDouble( cstr(symbolName),SYMBOL_STOP_OFFSET,rst) , "SYMBOL_STOP_OFFSET",cstr(symbolName) ShowResult SymbolInfoDouble( cstr(symbolName),SYMBOL_ASK,rst) , "SYMBOL_ASK",cstr(symbolName) ShowResult SymbolInfoDouble( cstr(symbolName),SYMBOL_BID,rst) , "SYMBOL_BID",cstr(symbolName) ShowResult SymbolInfoDouble( cstr(symbolName),SYMBOL_High,rst) , "SYMBOL_High",cstr(symbolName) ShowResult SymbolInfoDouble( cstr(symbolName),SYMBOL_LOW,rst) , "SYMBOL_LOW",cstr(symbolName) ShowResult SymbolInfoDouble( cstr(symbolName),SYMBOL_VOLUME_MIN,rst) , "SYMBOL_VOLUME_MIN",cstr(symbolName) ShowResult SymbolInfoDouble( cstr(symbolName),SYMBOL_VOLUME_MAX,rst) , "SYMBOL_VOLUME_MAX",cstr(symbolName) ShowResult SymbolInfoDouble( cstr(symbolName),SYMBOL_COMMISSION,rst) , "SYMBOL_COMMISSION",cstr(symbolName) ShowResult SymbolInfoDouble( cstr(symbolName),SYMBOL_LIMIT_OFFSET,rst) , "SYMBOL_LIMIT_OFFSET",cstr(symbolName) ShowResult SymbolInfoDouble( cstr(symbolName),SYMBOL_MARGIN_INITIAL,rst) , "SYMBOL_MARGIN_INITIAL",cstr(symbolName) ShowResult SymbolInfoDouble( cstr(symbolName),SYMBOL_CONTRACT_SIZE,rst) , "SYMBOL_CONTRACT_SIZE",cstr(symbolName) AlertMessage cstr(exeResult) End Sub Public Sub ShowResult(isTrue,enumDescription,symName) if isTrue then exeResult=exeResult & CSTR(enumDescription) & " for " & CSTR(symName) & " is : " & rst else exeResult=exeResult & "Error during Get " & CSTR(enumDescription) & " due to error code " & ErrorDescription(GetLastError()) end if exeResult=exeResult & vbNewLine rst=""End Sub
See Also