Close Order

From Boolean Trader
Jump to: navigation, search

Description

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

Syntax



Inputs

eaid
Identifies the Expert Advisor which has to perform the trade.

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.

Outputs

Ready. Start Trading to place request
Awaiting start for execution.
Posted
Function executed.

Example Calculations

eaid ticket volume price slippage RESULT
"tester" 43 0 0 3 It will fully close the order with ticket number 43 and allow for 3 pips slippage.
"tester" 1 0.5 0 0 It will partially close the order at 0.5 lot with ticket number 1 at exact market price.
"tester" 434 0.01 0 1 It will partially close the order at 0.01 lot with ticket number 434 and allow for 1 pip slippage.
"tester" 54 0 0 0 It will fully close the order with ticket number 54 at exact market price.