Step 5: Close Expressions

In cases where your plan also has different conditions for closing positions, set “Close Expressions”. First, set the “Checking Mode” and if the close condition must be checked per candle, set the time frame for checking desired conditions. Then, write a logical expression for buy and sell positions. The ESB checks these conditions for every tick or every candle as you set, and if the result of expressions is true, it closes that position. If the Buy and Sell Expressions are left empty, ESB doesn’t check any condition.

Partial Close Expressions

Partial Close is one of the forex exit strategies available to forex traders. It is a strategy where a trader exits a trade in parts rather than exiting the trade all at once. It allows a trader to close a portion of a trade as profits begin to accumulate, ensuring some level of profit is secured no matter what happens later. Partial close helps ensure at least a small amount of profit when trading is favorable.

ESB supports all kinds of partial closing. First, you need to enable partial close by setting the “Enabled” option to true. You can define different conditions and percentages for each step. ESB has a series of conditions and percentages’ expressions for Buy and Sell positions. You need to add your condition and the percentage for each step in a comma-separated format. For example:

Condition Expressions: MA1>MA2, MA1 CROSSUP MA2, RSI<30

Percentage Expressions: 25%, 45%, 0.5

In this example, if MA1>MA2, ESB closes 25% of the position. Then it waits for MA1 to cross up MA2 to close 45% of the initial size of the order. Finally, it waits for RSI to come below 30 to close 0.5 lots. If the remaining size is less than 0.5 lots, it closes the whole order. You can use % for percentage cases and remove % for fixed lots. Also, you can use expressions for defining the percentage of each step.

Note: The number of conditions and the number of percentages in the series have to be equal.