Click or drag to resize

OrderClientOrderSendAsync Method

Send order without awiting reply from server. Use OnOrderProgress event to get result.

Namespace:  TradingAPI.MT4Server
Assembly:  MT4ServerApi (in MT4ServerApi.dll) Version: 4.6.1.8
Syntax
public int OrderSendAsync(
	string symbol,
	Op operation,
	double volume,
	double price,
	int slippage,
	double stoploss,
	double takeprofit,
	string comment,
	int magic,
	DateTime expiration
)

Parameters

symbol
Type: SystemString
Symbol for trading.
operation
Type: TradingAPI.MT4ServerOp
Operation type.
volume
Type: SystemDouble
Number of lots.
price
Type: SystemDouble
Preferred price of the trade.
slippage
Type: SystemInt32
Maximum price slippage for buy or sell order.
stoploss
Type: SystemDouble
Stop loss level.
takeprofit
Type: SystemDouble
Take profit level.
comment
Type: SystemString
Order comment text. Last part of the comment may be changed by server.
magic
Type: SystemInt32
Order magic number. May be used as user defined identifier.
expiration
Type: SystemDateTime
Order expiration time (for pending orders only).

Return Value

Type: Int32
Temporary ID to identify order until it get a ticket number from server.
Exceptions
ExceptionCondition
TradeContextBusyExceptionAll trade connections are busy.
See Also