]> Piment Noir Git Repositories - freqai-strategies.git/commitdiff
fix(quickadapter): tighten final exit retracement (#297)
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Wed, 28 Oct 2026 16:17:09 +0000 (17:17 +0100)
committerGitHub <noreply@github.com>
Wed, 28 Oct 2026 16:17:09 +0000 (17:17 +0100)
quickadapter/README.md
quickadapter/user_data/strategies/Utils.py

index 7d95a4b6bde0b5b64300702ed5aded1908f73b66..ac02fb2f596e98b0ff4698329498d477e48f8e5f 100644 (file)
@@ -313,7 +313,7 @@ The effective leverage is clamped to `[1.0, max_leverage]`, including proposal f
 | Path                                                           | Runtime fallback       | Type / Range                                                        | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
 | -------------------------------------------------------------- | ---------------------- | ------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
 | exit_pricing.trade_natr_method                                 | `moving_average`       | enum {`moving_average`,`quantile_interpolation`,`weighted_average`} | Trade NATR (Normalized Average True Range) aggregation for stoploss and take-profit distances. `moving_average` uses KAMA to preserve nonnegative volatility. The stoploss never loosens, including after partial exits, and remains unchanged on order fills.                                                                                                                                                                                                                                                               |
-| exit_pricing.final_take_profit_retracement_fraction            | 0.5                    | float (0,1]                                                         | Fraction of the final take-profit target distance used as the frozen trailing retracement distance after the final target arms the exit. The final exit tracks the best subsequent per-candle rate and exits only after this material adverse move; elapsed stagnation alone does not exit. Plot annotations show only the current trail boundary from the candle that established it; earlier boundaries are not retained.                                                                                                  |
+| exit_pricing.final_take_profit_retracement_fraction            | 0.375                  | float (0,1]                                                         | Fraction of the final take-profit target distance used as the frozen trailing retracement distance after the final target arms the exit. The final exit tracks the best subsequent per-candle rate and exits only after this material adverse move; elapsed stagnation alone does not exit. Plot annotations show only the current trail boundary from the candle that established it; earlier boundaries are not retained.                                                                                                  |
 | exit_pricing.take_profit_stage_natr_multiplier_fraction_series | `fibonacci_extensions` | enum {`fibonacci_extensions`,`pi_extensions`}                       | With the default four rungs, partial target distances are approximately 23.6%, 38.2% and 61.8% of the full target distance for `fibonacci_extensions`, or 3.2%, 10.1% and 31.8% for `pi_extensions`. Pi places partial targets closer to entry. Partial fractions are recomputed when the rung count changes; the final rung always uses the full distance. This setting changes target distances only, not nominal stake shares; execution constraints are described in the decision cycle. Invalid values use the default. |
 
 ### Reversal confirmation
index 507f817d5b9ec929695820a3b1e949420c0a3693..ec3934382e62a93a939f70b0b4b65706accf05a0 100644 (file)
@@ -1530,7 +1530,7 @@ def get_label_prediction_config(
 
 DEFAULTS_EXIT_PRICING: Final[dict[str, Any]] = {
     "trade_natr_method": TRADE_NATR_METHODS[0],  # "moving_average"
-    "final_take_profit_retracement_fraction": 0.5,
+    "final_take_profit_retracement_fraction": 0.375,
     "take_profit_stage_natr_multiplier_fraction_series": (
         TAKE_PROFIT_STAGE_NATR_MULTIPLIER_FRACTION_SERIES[0]
     ),