|
1 | 1 | ## Exit logic comparisons |
2 | 2 |
|
3 | | -Freqtrade allows your strategy to implement different exit logics. |
| 3 | +Freqtrade allows your strategy to implement different exit logic using signal-based or callback-based functions. |
4 | 4 | This section aims to compare each different section, helping you to choose the one that best fits your needs. |
5 | 5 |
|
6 | | -* **`populate_exit_trend()`** - Vectorized exit logic based on the dataframe |
7 | | - ✅ **Use** to define exit conditions based on indicators or other data that can be calculated in a vectorized manner. |
| 6 | +* **`populate_exit_trend()`** - Vectorized signal-based exit logic using indicators in the main dataframe |
| 7 | + ✅ **Use** to define exit signals based on indicators or other data that can be calculated in a vectorized manner. |
8 | 8 | 🚫 **Don't use** to customize exit conditions for each individual trade, or if trade data is necessary to make an exit decision. |
9 | | -* **`custom_exit()`** - Custom exit signal, called for every open trade every iteration until a trade is closed. |
10 | | - ✅ **Use** to customize exit conditions for each individual trade, or if trade data is necessary to make an exit decision. |
11 | | -* **`custom_stoploss()`** - Custom stoploss, called for every open trade every iteration until a trade is closed. The value returned here is also used for [stoploss on exchange](stoploss.md#stop-loss-on-exchangefreqtrade). |
12 | | - ✅ **Use** to customize the stoploss logic to set a dynamic stoploss based on trade data or other conditions. |
13 | | - 🚫 **Don't use** to exit a trade immediately based on a specific condition. Use `custom_exit()` for that purpose. |
14 | | -* **`custom_roi()`** - Custom ROI, called for every open trade every iteration until a trade is closed. |
15 | | - ✅ **Use** to customize the minimum ROI threshold to exit a trade dynamically based on profit or other conditions. |
16 | | - 🚫 **Don't use** to exit a trade immediately based on a specific condition. Use `custom_exit()` for that purpose. |
17 | | - 🚫 **Don't use** for static roi. Use `minimal_roi` for that purpose instead. |
| 9 | +* **`custom_exit()`** - Custom exit logic that will exit a position immediately, called for every open trade at every bot loop iteration until a trade is closed. |
| 10 | + ✅ **Use** to specify exit conditions for each individual trade, or if trade data is necessary to make an exit decision, e.g. using profit data to exit. |
| 11 | + 🚫 **Don't use** when you want to exit at candle close (use a `populate_exit_trend()` signal instead), or as a proxy for `custom_stoploss()`, and be aware that rate-based exits in backtesting can be inaccurate. |
| 12 | +* **`custom_stoploss()`** - Custom trailing stoploss, called for every open trade every iteration until a trade is closed. The value returned here is also used for [stoploss on exchange](stoploss.md#stop-loss-on-exchangefreqtrade). |
| 13 | + ✅ **Use** to customize the stoploss logic to set a dynamic stoploss based on trade data or other conditions. |
| 14 | + 🚫 **Don't use** to exit a trade immediately based on a specific condition. Use `custom_exit()` for that purpose. |
| 15 | +* **`custom_roi()`** - Custom ROI, called for every open trade every iteration until a trade is closed. |
| 16 | + ✅ **Use** to specify a minimum ROI threshold ("take-profit") to exit a trade at this ROI level at some point within the trade duration, based on profit or other conditions. |
| 17 | + 🚫 **Don't use** to exit a trade immediately based on a specific condition. Use `custom_exit()`. |
| 18 | + 🚫 **Don't use** for static ROI. Use `minimal_roi`. |
0 commit comments