Syntax
Public Function NewMarketOrder(ByRef BuySell As VertexGeneral.OperationTypeEnum, ByRef SymbolID As Integer, ByRef Lots As Double,[ByRef TransTag As String = ""],[ByRef Note As String = ""]) As VertexFXClientAPI.CallingResultsEnum
Description
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.
Parameters
Part |
Description |
BuySell |
Markert order type, value of type VertexGeneral.OperationTypeEnum. |
SymbolID |
Trading symbol ID, value of type Integer. |
Lots |
Amount of lots, value of type Double. |
TransTag |
String value to mark the market 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.
Sample
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)
End Sub
See Also
VertexFX Client API Index
|