Posted by Mohammad Rahhal, Last modified by Diana Alkouni on 14 September 2020 12:53 PM


Public Function SymbolInfoDouble(SymbolName As String, propId As ENUM_SYMBOL_INFO_DOUBLE, ByRef doubleVal As Variant) As Boolean


This function is used to return a given symbol information according to property ID and receive the result on doubleVal parameter.


Key Description 
SymbolName  Trading symbol name to get the information for it, value of type String
propId The specific information to get it value, A value of type ENUM_SYMBOL_INFO_DOUBLE.
doubleVal The received result value of type Double.

Return value

Returns true if successful. In order to get an error, call GetLastError() function.


 Dim exeResult

 Dim rst

 Dim symbolName

 Public Sub main()


    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


       exeResult=exeResult & "Error during Get " & CSTR(enumDescription) & " due to error code " & ErrorDescription(GetLastError())

    end if

       exeResult=exeResult & vbNewLine


End Sub​

See Also

Back to VTL Client Script Index

(2 vote(s))
Not helpful

Comments (0)
Post a new comment
Full Name:
CAPTCHA Verification 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).

Help Desk Software by Hybrid Solutions