Click or drag to resize

OrderClientOrderCloseByAsync Method

Close of pair of opposite open orders without awiting reply from server. Use OnOrderProgress event to get result.

Namespace:  TradingAPI.MT4Server
Assembly:  MT4ServerAPI (in MT4ServerAPI.dll) Version: 4.0.1170.31 (4.0.1170.31)
Syntax
public int OrderCloseByAsync(
	string symbol,
	int ticket1,
	int ticket2
)

Parameters

symbol
Type: SystemString
Symbol for trading.
ticket1
Type: SystemInt32
Unique number of the first order ticket.
ticket2
Type: SystemInt32
Unique number of the two order ticket.

Return Value

Type: Int32
Temporary ID to identify order until it get a ticket number.
Exceptions
ExceptionCondition
TradeContextBusyExceptionAll trade connections are busy.
ServerExceptionCheck exception message for details.
TimeoutExceptionNo reply from server in TradeTimeout milliseconds.
See Also