# Close Order

## Description

The Close Order function closes an order. This function will execute immediately if not inside a condition.

## Syntax

${\displaystyle fx=BT\_CLOSEORDER(eaid,ticket,volume,price,slippage)}$

## Inputs

eaid

ticket
The ticket number of your open order.

volume
How many lots to close. Minimum is 0.01 lot. Maximum is the size of the order.

price
Price at which to close the order. If price is set to 0, then the order will be closed at market price on the tick.

slippage
Allowed difference (in pips not points) between requested price and market price when executing the order. In other words this is saying if we say 3 pips slippage you accept to open an order anywhere between 3 pips above or below the price and 0 or no input mean you won't accept anything but the exact price. This is not required and can be empty.