Posted by Mohammad Rahhal, Last modified by Diana Alkouni on 14 September 2020 10:26 AM


Public Function NewLimitOrder(ByRef OrderType As OperationTypeEnum , ByRef SymbolID As Integer, ByRef Lots As Double, ByRef Atprice As Double, [ByRef SL As Object  = ""], [ByRef TP As Object = ""],[ByRef TransTag As String = ""],[ByRef Note As String = ""]) As CallingResultsEnum


This function used to create a new limit order(Pending order)A user account must be selected before using selectAccount .After NewLimitOrder method executes with acceptance the NewLimitOrderResult event fires.


Part Description 
OrderType Operation type,value of type OperationTypeEnum.
SymbolID  Trading Symbol ID, value of type Integer.
Lots  Amount of lots , value of type Double
Atprice Limit order price, value of type Double
SL Stop loss amount ,optional value.
TP Take profit amount optional value.
TransTag String value to mark the limit order when the result came from server,optional value.
Note Comment of type string, in order to bypass the auto broker for both real/demo clients you can put the following token#$CHAT$# in the note field. Even if AUTO BROKER is on, with this tag in the comment order will be sent to the dealing room "CHAT SCREEN" and handled by dealers according to the dealing room regular configuration, optional value.

Return value

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


 Private Sub Btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btn.Click
     'API is a predefined variable as CVertexFXClientAPI10
      Dimresult As VertexFXClientAPI10.CallingResultsEnum

      Dim Sym As COSymbol = API.SymbolByID(6)'EUR/USD

      result = API.NewLimitOrder(VertexGeneral10.OperationTypeEnum.BuyType, Sym.ID, 1, Sym.Ask, "","")

      MsgBox("New Limit Order Result : " & result.Tostring)

End Sub

See Also

VertexFX Client API Index

(2 vote(s))
Not helpful

Comments (0)
Post a new comment
Full Name:
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