Knowledgebase:
ManualNewLimitOrder
Posted by Mohammad Rahhal, Last modified by Rawan Al Hourani on 10 July 2017 09:50 AM

Syntax

 Public Function ManualNewLimitOrder(AccountID As Integer, OrderType As OperationTypeEnum, SymbolID As Long, Lots As Double, AtPrice As Double, Optional SL As Object = "", Optional TP As Object = "", Optional Note As String = "", Optional TransTag As String = "") As CallingResultsEnum 

This function is used to open an entry order without the need to select an account. After ManualNewLimitOrder method executes, the NewLimitOrderResult event fires.

Parameters

Parameter Description 
AccountID Account number to open an entry orders for, value of type is Integer
OrderType Operation type, value of type is OperationTypeEnum.
SymbolID Trading symbol Id, value of type is Integer
Lots Amount of Lots, value of type is Double
AtPrice Price value to open limit order at, value of type is Double 
SL Stop lose value, Optional value of type is Double
TP Take profit value, Optional value of type is Double
Notes Custom String used to mark the taken order at server 
TransTag String value is used to mark the new limit order operation when the result came from the server.

Return value

Returns value of type CallingResultsEnum. If the request was sent to server successfully it will return SuccessResult 

Sample

 Private Sub Newlimit_Click (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles newLimit.Click

   ‘BOAPI is predefined variable as CVertexBOAPI 

   Dim Result as CallingResultsEnum
   Dim vAccount as COAccount
   Dim vClient as COClient
   vClient  = BOAPI.ClientByIndex(1)

   vAccount = BOAPI.AccountByIndex (vClient.ClientID,1)
   Result = BOAPI.Manualnewlimitorder (vAccount.AccountID,vertexGeneral10.OperationTypeEnum.BuyType, 6, 1, 1.0,” ”,” ”,”New limit by BOAPI”)
   Msgbox (Result.ToString

 End sub 


See Also


VertexFX Backoffice API 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