SFX Automation: Exit Conditions

The SFX Automation allows users to create and backtest strategies using features from the SFX Algo toolkit. This article covers the various conditions and rules for exiting positions in long and short entries.
Exit Conditions
Exit on Opposite Signal

When enabled, a long position will close when short entry conditions are met, and a short position will close when long entry conditions are met.
Exit on Session End
%2520(14).png%3Falt%3Dmedia&w=3840&q=75)
When enabled, positions will be closed at the end of the trading session of the selected ticker.
Take Profit Conditions
There are several methods available for setting take profit exits and conditions.
TP Condition 1, 2, 3
The SFX Automation lets users set up to three distinct Take Profit (TP) levels within a strategy, enabling the creation of customized TP conditions. With TP Conditions 1, 2, and 3, you can use the same Entry Conditions that your strategy is based on as triggers. These options are found below the long and short exit conditions within the settings.
Users can also customize the % of their position that exits the trade when the TP condition is triggered. The sum of the % across all the TP conditions used must add up to 100. For example, if TP Condition 1 and 2 are used, you could set TP 1 to 70% and TP 2 to 30%.
Below is an example of three TP conditions being used with 50% of the initial position exiting when TP 1 is triggered, 30% when TP 2 is triggered, and the remaining 20% when TP 3 is triggered. The TP triggers for TP 1, 2, and 3 are set to be a Buy Signal Upgrade.
%2520(12).png%3Falt%3Dmedia&w=3840&q=75)
Fixed TP
%2520(15).png%3Falt%3Dmedia&w=3840&q=75)
Users can set a fixed TP for exits. This setting can be found under the long and short exit conditions. Users can choose between the following:
Price: This method triggers a TP exit when price reaches a specified level.
For example, if you set the Price TP to 5 and buy $NVDA at $125, the trade will automatically exit when the price reaches $130 ($125 + $5).
Ticks: This method triggers a TP exit when price moves a specified number of ticks.
Percentage (%): This method triggers a TP exit when price moves a specified percentage.
ATR: This method triggers a TP exit based on a specified multiple of the Average True Range (ATR).
Stop Loss Conditions
There are several methods available for setting stop-loss exits and conditions.
Entry Condition SL
Users can use entry conditions as triggers for stop-loss exits. This setting can be found under the long and short exit conditions.
Here is an example of a stop-loss exit being set to trigger once a 3 star sell signal is detected.
%2520(5).png%3Falt%3Dmedia&w=3840&q=75)
Fixed SL
%2520(16).png%3Falt%3Dmedia&w=3840&q=75)
Users can set a fixed SL for exits. This setting can be found under the long and short exit conditions. Users can choose between the following:
Price: This method triggers a SL exit when price reaches a specified level.
For example, if you set the Price SL to 10 and buy $AMZN at $150, the trade will automatically exit when the price reaches $140 ($150 - $10).
Ticks: This method triggers a SL exit when price moves a specified number of ticks.
Percentage (%): This method triggers a SL exit when price moves a specified percentage.
ATR: This method triggers a SL exit based on a specified multiple of the Average True Range (ATR).
Trailing SL
To use a trailing SL, set the Fixed SL input to 'Trailing'. The trailing stop-loss value entered is measured in ticks.
.png%3Falt%3Dmedia&w=3840&q=75)
If you want to only activate the Trailing SL after a certain number of ticks, you can adjust the 'Trailing Stop Activation' setting.
%2520(2).png%3Falt%3Dmedia&w=3840&q=75)
In this example, an 80-tick trailing SL is triggered once price moves 20 ticks in the intended direction.
%2520(1).png%3Falt%3Dmedia&w=3840&q=75)
If you want to use a fixed SL alongside a trailing SL, enable the Hard SL setting. This option is only applicable when the trailing SL is active.
%2520(3).png%3Falt%3Dmedia&w=3840&q=75)
Move Stop Loss to Breakeven
This setting allows the strategy to automatically move the SL to Breakeven (BE) when the position is in profit by a certain amount. Users can choose between the following:
Price: This method moves the SL to BE when price reaches a specified level.
Ticks: This method moves the SL to BE when price moves a specified number of ticks.
Percentage (%): This method moves the SL to BE when price moves a specified percentage.
ATR: This method moves the SL to BE when price moves a specified multiple of the Average True Range (ATR).
Long TP 1: This method moves the SL to BE when TP Condition 1 is triggered. This method only works if TP Condition 1 is being used.
Long TP 2: This method moves the SL to BE when TP Condition 2 is triggered. This method only works if TP Condition 2 is being used.
Long TP 3: This method moves the SL to BE when TP Condition 3 is triggered. This method only works if TP Condition 3 is being used.