Click or drag to resize

OrderClientSafeOrderClose Method

Close opened order.

Namespace:  TradingAPI.MT4Server
Assembly:  MT4ServerApi (in MT4ServerApi.dll) Version: 4.6.1.8
Syntax
public Order OrderClose(
	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: Order
Closed order.
Exceptions
ExceptionCondition
TradeContextBusyExceptionAll trade connections are busy.
ServerExceptionCheck exception message for details.
TradeTimeoutExceptionNo reply from server in TradeTimeout milliseconds.
See Also