Syntax
Public Function ManualUpdateLimitOrder(AccountID As Integer, OrderID As Integer, OrderType As OperationTypeEnum, Lots As Double, SymbolName As String, NewPrice 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 update an entry order without the need to select an account. After ManualUpdateLimitOrder method executes the UpdateLimitOrderResult event fires.
Parameters
Parameter |
Description |
AccountID |
Account number to update an entry orders for, value of type is Integer |
OrderID |
Order number to be updated, value of type is Integer |
OrderType |
Order operation type, value of type is OperationTypeEnum |
Lots |
Amount of Lots, value of type is Double |
SymbolName |
Order symbol name, value of type is String |
NewPrice |
New price value to open limit order at, value of type is Double |
SL |
Stop lose value, Optional value of type Double |
TP |
Take profit value, Optional value of type Double |
Notes |
Custom String used to mark the taken order |
TransTag |
String value is used to mark the update 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 updatelimit_Click (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles updateLimit.Click
‘BOAPI is predefined variable as CVertexBOAPI
Dim Result as CallingResultsEnum
Dim vAccount as COAccount
vAccount = BOAPI.AccountByIndex (1)
vOrder= BOAPI.OrderByIndex (1)
Result=BOAPI.ManualUpdatelimitorder(vAccount.AccountID ,vOrder.OrderID ,vOrder.BuySell ,vOrder.Lots, vOrder.SymbolName , 1.0, ”” , ”” , ”Update limit by BOAPI”)
Msgbox (Result.ToString)
End sub
See Also
VertexFX Backoffice API Index
|