Posted by Mohammad Rahhal, Last modified by Salameh Abu Hashish on 21 December 2018 12:33 PM


Public Function OrderGetInteger(PropertyID As Integer, ByRef integerVar As Variant) As Boolean

This function is used to get the property information for Selected Order according to property ID  value and set the result on an integerVar variable.


Key Description 
PropertyID  The property to get it value, can be one of the ENUM_ORDER_PROPERTY_INTEGER
integerVar Received result, a value of type Integer.

Return value

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


 Dim TradeDescription
 Dim OrderDescription

Public Sub main()

 Dim barNumber
 Dim result
 Dim orderId 

For i= 1 to OrdersTotal


    If Cbool(result)= TRUE Then

       orderId = OrderGetID(cint(i))

       GetOrderType result

       OrderGetInteger OPERATION_TYPE_ENUM,result

       GetTradeAction result

       ' The data will be Logged in this path   ...\VTL10\Log

        PrintData "Order Id is  : "  &  CSTR(orderId) & " ,  Operation Type is : " & CSTR(TradeDescription)

        OrderGetInteger ORDER_TYPE_ENUM,result

        GetOrderType  result

        ' The data will be Logged in this path   ...\VTL10\Log

        PrintData "Order Id is  : "  &  CSTR(orderId) & " ,  Order Type is : " & CSTR(OrderDescription)

    End If


  End Sub

 Public sub GetOrderType( orderValue )

        If orderValue=1 then

               OrderDescription="Market Order"

             elseif orderValue=2 then

                    OrderDescription="Limit Order"

             elseif actionValue=3 then

                    OrderDescription="SL/TP Order"



        End If

 End Sub

 Public sub GetTradeAction( actionValue )

        If actionValue= -2 then

               TradeDescription="Sell stop"

             elseif actionValue=2 then

                    TradeDescription="Buy stop"

             elseif actionValue=-1 then

                    TradeDescription="Sell Limit"

             elseif actionValue=1 then

                    TradeDescription="Buy Limit"



        End If

 End Sub

See Also

Back to VTL Client Script Index

(1 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