Posted by Mohammad Rahhal, Last modified by Rawan Al Hourani on 28 July 2016 03:22 PM
This function creates new market order (Trade on a symbol). A user account must be selected before using this method. After NewMarketOrder method executes with acceptance the NewOrderResult event fires.
||Markert order type, value of type VertexGeneral.OperationTypeEnum.
||Trading symbol ID, value of type Integer.
||Amount of lots, value of type Double.
||String value to mark the market order when the result came from server, optional value.
||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.
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
Dim result As VertexFXClientAPI.CallingResultsEnum
'API is a predefined variable as CVertexFXClientAPI
result = API.NewMarketOrder(VertexGeneral.OperationTypeEnum.SellType,6,1, "New Market Order" , "")
MsgBox("New Market Order Result : " & result)
VertexFX Client API Index