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
Description
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
|