📘Sell Only When You Should! Freqtrade Quantitative Custom Exit Guide — Precise Exits, Profit Without
✳️ Function 1: custom_exit — Control Whether to Sell (Market Order)
custom_exit — Control Whether to Sell (Market Order)Overview
🧪 Example 1: 10% Take Profit, 5% Stop Loss
def custom_exit(self, trade, current_time, current_rate, current_profit, **kwargs) -> float | bool:
"""
Logic:
- Current profit > 10%, sell immediately (take profit)
- Current profit < -5%, sell immediately (stop loss)
- Otherwise, hold
"""
if current_profit > 0.10:
return True
if current_profit < -0.05:
return True
return False✳️ Function 2: custom_exit_price — Set Limit Exit Price
custom_exit_price — Set Limit Exit PriceOverview
🧪 Example 2: Limit Sell 1% Above Current Price
⚠️ Notes
🔄 Can Both Functions Be Used Together?
🧪 Example 3: Limit + Forced Exit for Extra Profit
🔍 Usage & Configuration Requirements
📊 Comparison Table: custom_exit vs custom_exit_price
custom_exit vs custom_exit_price🎯 Summary Tips
Last updated