Syntax
Public Function NewMarketOrder(ByVal BuySell As OpertationTypeEnum, ByVal SymbolID As Integer, ByVal Lots As String , Optional ByVal Note As string = "") As CallingResultsEnum
Description
This function used to create new market order (Trade on a symbol) After NewMarketOrder method executes theNewOrderResultevent fires.
To get result from the server after accepted order, you have to consumeOnPositionTradeevent.
Parameters
Parameter | Description |
BuySell | Markert order type, value of typeOpertionTypeEnum |
SymbolID | Trading symbol ID, value of type Integer. |
Lots | Amount of lots, value of type Double. |
Note | To add noteto comments fieldon trade tap at the client terminal |
Return value
Returns value of typeCallingResultsEnum.If the request sent to the server successfully it will return SuccessResult.
Sample
Public Sub Main () Dim TradeSymbolID As VTLGeneral.CSymbol TradeSymbolID=ClientCode.GetSymbolByName("EUR/USD") Dim Res as VTLGeneral.CallingResultsEnum 'It will return SuccessResult if sent to server successfully Res = ClientCode.NewMarketOrder (1,TradeSymbolID.ID,0.1,"") GUI.MsgDialog(Res) End Sub
See Also