Syntax
Public Overrides Function ManualNewLimitOrder (ByVal AccountID As Integer, ByVal OrderType As VertexFXBridgeAPI.OperationTypeEnum, ByVal SymbolID As Integer,ByVal Lots As Double, ByVal AtPrice As Double, Optional ByVal SL As Object = "", Optional ByVal TP As Object = "") As VertexFXBridgeAPI.TransResult
This function is used to open an entry order for a specific account number. After ManualNewLimitOrder method executes, NewLimitOrderResultevent fired.
Parameters
Key | Description |
AccountID | Account number to open an entry order for. Value of type is Integer. |
OrderType | Order Opertation type can be one of OperationTypeEnum. |
SymbolID | Trading symbol ID. Value of type is Integer. |
Lots | Amount of lot. Value of type is Double. |
AtPrice | Open Price value. Value of type is Double. |
SL | Stop loss value. Optional value of type Double. |
TP | Take profit value. Optional Value of type Double. |
Return value
Returns value of type TransResult. If the request was sent to server successfully it will return Succeeded.
Sample
Private Sub NewLimit_Click (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NewLimit.Click Dim Result As VertexFXBridgeAPI.TransResult Dim vClient As VertexFXBridgeAPI.Client Dim vAccount As VertexFXBridgeAPI.Account vClient = BO.GetBO.ClientByIndex (1) vAccount = BO.GetBO.AccountByIndex (vClient.ClientID, 1) Result= BO.GetBO.ManualNewLimitOrder (vAccount.AccountID,VertexFXBridgeAPI.OperationTypeEnum.BuyType, 6, 0.1, 1,,) End Sub
See Also