Knowledgebase : Technical Support > API > Client API's/VTL > VTL Client Scripts > Trade Functions
SYNTAX Public Function selectedOrder() As Long DESCRIPTION This function is used to return the selected order number. PARAMETERS No parameter RETURN VALUE Returns order  number as value of type long, if returns zero then no selected order. Sample ...
SYNTAX Public Function selectedPosition() As Long DESCRIPTION This function is used to get the selected position ticket number. PARAMETERS No parameter RETURN VALUE Returns ticket  number as value of type long, if returns zero then no selected posi...
SYNTAX Public Function CloseByHedge(Ticket1 As Long,Ticket2 As Long, Amount As Double) As Boolean DESCRIPTION This function closes specific amount of two tickets by hedge. PARAMETERS Key Description  Ticket1 The ID of the first Ticket ...
ENUM_ORDER_TYPE Value Identifer Description 1 ORDER_MARKET_DATA For market order type. 2 ORDER_LIMIT_ORDER For limit order type. 3 ORDER_SLTP_ORDER For SLTP order type. ------------------------- SEE ALSO ...
SYNTAX Public Function OrderGetInteger(PropertyID As Integer, ByRef integerVar As Variant) As Boolean DESCRIPTION This function is used to get the property information for Selected Order [http://www.hybrid-solutions.com/support/index.php?/Knowledgebase...
SYNTAX Public Function CloseMultiPositions(PositionIDs As string, Lots As String) As Boolean DESCRIPTION This function is used to close multiple market orders at once.To get a result from the server, you have to consume OnOrderTrade [http://www.hybrid-...
SYNTAX Public Function RequestManageOrders(ticket As Long) As Boolean DESCRIPTION This function is used to request all managed orders that related to specific position from the server. To get result from the server, you have to consume OnManageOrdersRe...
SYNTAX Public Function DeleteSlTpOrder(OrderID As String) As Boolean DESCRIPTION This function is used to delete a given manage order number.To get a result from the server, you have to consume OnOrderTrade [http://www.hybrid-solutions.com/support/inde...
SYNTAX Public Function UpdateSLTPOrder(vOrdId As Long, vLots As Double, Optional vSL As Object = "", Optional vTP As Object = "") As Boolean DESCRIPTION This function is used to update the manage order (SL/TP order) for a given order ID, To get result ...
SYNTAX Public Function NewSLTPOrder(Ticket As Long, Lots As Double, Optional SL As Double =0 , Optional TP As Double =0) As Boolean DESCRIPTION This function is used to create a manage order at specific ticket number.To get result from the server, you ...
SYNTAX Public Function CloseMarketOrder(ticketID As Long, vLots As Double) As Boolean DESCRIPTION This function is used to close the market order by given ticket number.To get a result from the server, you have to consume OnOrderTrade [http://www.hybri...
SYNTAX Public Function OrderSelectByIndex(Index As Long) As Boolean DESCRIPTION This function is used to choose an order by the taking its index in orders list. PARAMETERS Key Description  Index Order index in the orders list, value of t...
SYNTAX Public Function OrderLots(orderID As Long) As Double DESCRIPTION This function is used to return the order lots for a given order ID as a value of double. PARAMETERS Key Description  orderID Order number to get its amount, A value ...
SYNTAX Public Function PositionGetTicket(Index As Integer) As String DESCRIPTION This function is used to return the ticket number for a given open position index on the trade list. PARAMETERS Key Description  Index Open position index a...
SYNTAX  Public Function OrderType() As Integer DESCRIPTION This function is used to return the order type for selected order [http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/1748] as ENUM_ORDER_TYPE [http://www.hybrid-solu...
SYNTAX  Public Function OrderTime() As String DESCRIPTION This function is used to return the order time for selected order [http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/1748] as a string value. PARAMETER No Parameter...
SYNTAX  Public Function OrderSymbol() As String DESCRIPTION This function is used to return symbol name for selected order [http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/1748] as a String value. PARAMETER No parameters...
SYNTAX  Public Function OrderPrice() As Double DESCRIPTION This function is used to return the open price for selected order [http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/1748] as a value of double. PARAMETER No param...
SYNTAX  Public Function OrderGetString(propertyID As Integer, ByRef stringVar As Variant) As Boolean DESCRIPTION This function is used to get the string information for Selected Order [http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Ar...
SYNTAX  Public Function OrderGetDouble(propertyID As Integer, ByRef doubleVar As Variant) As Boolean DESCRIPTION This function is used to get the property information for Selected Order [http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/...
SYNTAX  Public Function OrderSelect(OrderID As Long) As Boolean DESCRIPTION This function is used to choose an pending order at the orders list  by taking its ID. PARAMETERS Key Description  OrderID Pinding order number to be seleced,val...
SYNTAX  Public Function OrdersTotal() As Integer DESCRIPTION This function is used to return the total number of pending orders on trade list. PARAMETER No parameters. RETURN VALUE Returns the total number of pending orders as a value of type Integ...
SYNTAX  Public Function GetPositionSymbol() As String DESCRIPTION This function is used to return the position symbol name for the Selected Position [http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/1742]. PARAMETER No pa...
SYNTAX  Public Function GetPositionTime() As String DESCRIPTION This function is used to get open Date and Time for Selected Position [http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/1742]. PARAMETER No parameters. RETU...
SYNTAX Public Function GetPositionType() As ENUM_TRADE_ACTION DESCRIPTION This function is used to return the position operation type for Selected Position [http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/1742]. PARAMETER...
SYNTAX Public Function PositionGetDouble(propertyID ENUM_POSITION_PROPERTY_DOUBLE, ByRef doubleVar As Variant) As Boolean DESCRIPTION This function is used to get the position property after Selected Position [http://www.hybrid-solutions.com/support/in...
SYNTAX Public Function PositionSelect(ticketNumber As Long) As Boolean DESCRIPTION This function is used to choose an open position for a given ticket number on a trade list. PARAMETERS Key Description  ticketNumber Position number to be...
SYNTAX Public Function PositionGetSymbol(Index As Integer) As String DESCRIPTION This function is used to get the position symbol name for a given index to an open position on the trade list. PARAMETERS Key Description  Index The index o...
SYNTAX  Public Function PositionTotal() As Integer DESCRIPTION This function is used to return the number of open positions on a trade list. PARAMETERS No Parameters. RETURN VALUE Returns open positions total as a value of type Integer. SAMPLE Pu...
SYNTAX Public Function UpdateLimitOrder(OrderID As Long, NewLots As Double, NewPrice As Double, Optional NewSL As variant = "", Optional NewTP As Variant= "",Optional Comment As String ="") As Boolean DESCRIPTION This function is used to update a given...
SYNTAX Public Function DeleteLimitOrder(OrderID As String) As Boolean DESCRIPTION This function is used to cancel the limit order by a given the order ID.To get a result from the server, you have to consume OnOrderTrade [http://www.hybrid-solutions.com...
SYNTAX Public Function NewLimitOrder(vSellBuy As ENUM_TRADE_ACTION, SymbolName As String, vLots As Double, vPrice As Double, Optional vSL As Object="", Optional vTP As Object="",Optional Comment As String ="") As Boolean DESCRIPTION This function is us...
SYNTAX Public Function NewMarketOrder(vSellBuy As ENUM_TRADE_ACTION, SymbolName As String, vLots As Double,Optional Comment As String = "") As Boolean Description This function is used to make a new market order at the given trading symbol.To get a res...
Help Desk Software by Hybrid Solutions