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

Syntax

Public Function SymbolInfoInteger(SymbolName As String, propId As ENUM_SYMBOL_INFO_INTEGER, ByRef LongVal As Variant) As Boolean

Description

This function is used to get symbol information for a given symbol name according to property ID and receive the result on longval parameter.

Parameters

Key Description 
SymbolName  Trading symbol name, value of type string.
propId The information to get it, Value of type ENUM_SYMBOL_INFO_INTEGER.
LongVal The received result, value of type Long.

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 SymbolInfoInteger( cstr(symbolName),SYMBOL_PIP_LOCATION,rst) , "SYMBOL_PIP_LOCATION",cstr(symbolName)

     ShowResult SymbolInfoInteger( CSTR(symbolName),SYMBOL_SPREAD,rst) , "SYMBOL_SPREAD",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


Back to VTL Client Script Index

(0 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
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