Knowledgebase : Technical Support > API > Client API's/VTL > VTL Server Scripts > Trade Functions
Syntax Public Function SlTpRelation (ByVal TransType As OperationTypeEnum [http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/2026], ByVal SlorTP As String) As String. This function is used to determine if Stop Loss / Take Pr...
Syntax Public Function SlTpPrice (ByVal TransType As OperationTypeEnum [http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/2026], ByVal SymbolID As Integer, ByVal FromPrice As Double, ByVal SlorTP As String) As String. This f...
Syntax Public Function LimitRelation (ByVal TransType As OperationTypeEnum [http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/2026]) As String. This function is used to determine if the prices should be greater than or less ...
Syntax Public Function LimitPrice (ByVal TransType As OperationTypeEnum [http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/2026], ByVal SymbolId As Integer) As Double. This function is used to get the limit price according t...
Syntax Public Function OrderGetID (ByVal index As Integer) As Long. This function is used to return the order number by the given index in the trade list.  PARAMETERS Parameter  Description  Index Order index in trade list. Value of type...
Syntax Public Function OrderGetString(ByVal property_id As ENUM_ORDER_PROPERTY_STRING [http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/5246]) As String. This function is used to return value of type String that is correspo...
Syntax Public Function OrderGetInteger(ByVal property_id As ENUM_ORDER_PROPERTY_INTEGER [http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/5244]) As Long. This function is used to return value of type Integer that is corresp...
Syntax Public Function OrderGetDouble(ByVal property_id As ENUM_ORDER_PROPERTY_DOUBLE [http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/5245]) As Double. This function is used to return value of type double that is correspo...
`Syntax Public Function OrderPrice () As String. This function is used to return the order price for the selected order through SelectOrderByIndex [http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/5222] or SelectOrderByID [...
SYNTAX Public Function OrderTime () As String. This function is used to return the order time for the selected order through SelectOrderByIndex [http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/5222] or SelectOrderByID [htt...
Syntax Public Function OrderLots (ByVal orderID As Long) As Double. This function is used to get the order amount for the given order ID.  PARAMETERS Parameter  Description  OrderID The order number to get its amount. Value of type is Lo...
Syntax Public Function OrderSymbol () As String. This function is used to return the order symbol name for the selected Order through SelectOrderByIndex [http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/5222] or SelectOrder...
Syntax Public Function OrderType () As VertexGeneral10.OperationTypeEnum [http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/1902]. This function is used to return the type for selected order through SelectOrderByIndex [http:...
Syntax CloseByHedge (Ticket1 As long, Ticket2 As Long, Lots As Double) This function is used to close two tickets by hedge after the CloseByHedge method executes with acceptance the CloseOrderResult [http://www.hybrid-solutions.com/support/index.php?/K...
Syntax Public Function CloseMulitPositions (ByVal tickets As String, ByVal lots As String) As CallingResultsEnum [http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/2027]. This function is used to close multiple open position...
Syntax Public Function SelectOrderByIndex(ByVal Index As Integer) As Boolean. This function is used to choose the order by the given index in the trade list. PARAMETERS Parameter  Description  Index Order index in the trade list,. Value...
Syntax Public Function SelectOrderByID (ByVal OrderID As Integer) As Boolean. This function is used to choose the order by the given ID number to get order information.  PARAMETERS Parameter  Description  OrderID  Order index in the tra...
Syntax Public Function PositionGetSymbol (ByVal index  As Integer) As String. This function is used to return symbol name for the given open position Index in the trade list. PARAMETERS Parameter  Description  index Open position index i...
SYNTAX This function overloads 2 variants as the following Public Function PositionGetTime(ByVal property_id As ENUM_POSITION_PROPERTY_TIME [http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/5243]) As Date.   Public Func...
SYNTAX This function overloads 2 variants as the following Public Function PositionGetBool(ByVal property_id As ENUM_POSITION_PROPERTY_BOOL [http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/5242]) As Boolean.   Public F...
SYNTAX This function overloads 2 variants like the following Public Function PositionGetString (ByVal property_id As ENUM_POSITION_PROPERTY_STRING [http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/5241]) As String.   Pu...
SYNTAX This function overloads 2 variants as the following Public Function PostionGetInteger (ByVal property_id As ENUM_POSITION_PROPERTY_INTEGER [http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/5240] ) As Long.   Publ...
Syntax This function overloads 2 variants like the following Public Function PositionGetDouble (ByVal property_id As ENUM_POSITION_PROPERTY_DOUBLE [http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/5239]) As Double.   Pub...
SYNTAX Public Function PositionSelectByIndex (ByVal Index As Integer) As Boolean. This function is used to choose an open position for the given position index at trade list. PARAMETERS Parameter  Description  index Open position inde...
SYNTAX Public Function OpenPositionByTicket (ByVal Ticket As Integer) As CPosition [http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/1893] This function is used to return the symbol Position object by the given ticket numb...
Syntax  Public Function OrderGetID(Index As Integer) As Long This function is used to return order number based on its index in the orders list. PARAMETERS Key Description  Index Order index in the orders list , value of type Integer....
SYNTAX Public Function CloseMultiPositions(PositionIDs As string, Lots As String) As Boolean 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-solutions.c...
SYNTAX Public Function OrdersTotal() As Integer This function used to return the orders count for the selected account. RETURN VALUE Returns order count as value of type Integer SAMPLE Public Sub main()          Dim Count as integer       ...
SYNTAX Public Function OrderByID(ByVal ID As Integer) As Order [http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/3666] This function used to returns the order object for a specific order number PARAMETERS Parameter ...
SYNTAX Public Function OrderByIndex(ByVal Index As Integer) As Order [http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/3666] This function used to returns an order object for a specific order index at the trading list on t...
SYNTAX Public Function RequestManageOrders(ticket As Long) As Boolean 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 OnManageOrdersReceived [htt...
SYNTAX Public Function UpdateSLTPOrder(ByVal OrderId As Integer, ByVal Lots As Double, Optional ByVal SL As Object = "", Optional ByVal TP As Object = "") As CallingResultsEnum [http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/Vi...
SYNTAX Public Function PositionsTotal() As Integer This function used to get the open positions count of the selected account. PARAMETERS No Parameters. RETURN VALUE Returns the open positions count as the value of type Integer. SAMPLE    ...
SYNTAX Public Function DeleteLimitOrder(ByVal OrderId As Integer) As CallingResultsEnum [http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/1901] This function used to Delete the existing pending order, After DeleteSLTPOrder...
SYNTAX Public Function DeleteSLTPOrder(ByVal OrderId As Integer) As CallingResultsEnum [http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/1901]  This function used to Delete the existing manage order at a specific open posi...
SYNTAX Public Function UpdateLimitOrder(ByVal OrderId As Integer, ByVal Lots As Double, ByVal NewPrice As Double, Optional ByVal SL As Object = "", Optional ByVal TP As Object = "",Optional ByVal Note As String = "") As CallingResultsEnum [http://www.hy...
SYNTAX Public Function NewSLTPOrder(ByVal Ticket As Integer, ByVal Lots As Double, Optional ByVal SL As Object = "", Optional ByVal TP As Object = "") As CallingResultsEnum [http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/1...
SYNTAX Public Function NewLimitOrder(ByVal OrderType As OperationTypeEnum [http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/1902], ByVal SymbolId As Integer, ByVal Lots As Double, ByVal AtPrice As Double, Optional ByVal SL A...
SYNTAX Public Function RejectOrder(ByVal OrderId As Integer) As Integer This function use to reject a re-quoted order by given the order number. PARAMETERS Parameter Description OrderId Requoted order number to be rejected, value of...
SYNTAX Public Function AcceptOrder(ByVal OrderId As Integer) As CallingResultsEnum [http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/1901] This function used to accept a re-quoted order by given the order ID PARAMETERS ...
SYNTAX Public Function CloseMarketOrder(ByVal Ticket As Integer, ByVal Lots As Double) As CallingResultsEnum [http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/1901] This function used to close an open position by given the...
SYNTAX Public Function NewMarketOrder(ByVal BuySell As OpertationTypeEnum [http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/1902], ByVal SymbolID As Integer, ByVal Lots As String , Optional ByVal Note As string = "") As Call...
Help Desk Software by Hybrid Solutions