Click or drag to resize

OrderClientOrderCloseAsync Method

Close opened 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 OrderCloseAsync(
	string symbol,
	int ticket,
	double volume,
	double price,
	int slippage
)

Parameters

symbol
Type: SystemString
Symbol for trading.
ticket
Type: SystemInt32
Unique number of the order ticket.
volume
Type: SystemDouble
Number of lots.
price
Type: SystemDouble
Preferred closing price.
slippage
Type: SystemInt32
Value of the maximum price slippage in points.

Return Value

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