The Closing logic conditions slots can be used only if the indicator Bar Closing is placed in the Closing point of the position slot. These slots contain an indicator whose logic is a logic condition by nature. This logic condition is assessed separately for both, short and long positions and is always presented by a value - fulfilled or not fulfilled. The condition may be fulfilled for a short position but not for a long one. With some indicators, it is possible that the condition is fulfilled in both directions of trade at the same time (ADX).
The function of the Closing logic conditions is to allow you to close the position. To do this, at least one of the existing logic conditions needs to be met.
If the strategy does not include exit logic conditions, the position will close every time the market price reaches the exit price of the position which is set in the Closing point of the position slot.
There are two Closing logic condition slots at the most. The logic within them is set for a long position only. Forex Strategy Builder automatically calculates the mirror short position logic.
Using the Add a closing logic condition button you can add a new exit logic condition. This button is active only if the exit price of the position is Bar Closing.
Closing point of the position
Indicator: Bar Closing
Logic: Exit the market at the end of the bar
Parameters: Base price: Close
Closing logic condition
Indicator: Stochastics
Logic: The Slow %D crosses the Level line downward
Parameters: Smoothing method: Simple, %K period: 15, Fast %D period: 5, Slow %D period: 5, Level: 20
In this example, the position will close at the Bar Closing price only if the Slow %D line of the Stochastics indicator crosses a certain level. You should notice that the level mentioned is 20. This is the long position value. Forex Strategy Builder will automatically calculate the mirror short position logic. In the present example, the short position level is 80 (100 - 20).