From: Jérôme Benoit Date: Wed, 28 Oct 2026 16:17:09 +0000 (+0100) Subject: fix(quickadapter): tighten final exit retracement (#297) X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=7101a2b5584db12e1f14d36c86575647beda5666;p=freqai-strategies.git fix(quickadapter): tighten final exit retracement (#297) --- diff --git a/quickadapter/README.md b/quickadapter/README.md index 7d95a4b..ac02fb2 100644 --- a/quickadapter/README.md +++ b/quickadapter/README.md @@ -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 diff --git a/quickadapter/user_data/strategies/Utils.py b/quickadapter/user_data/strategies/Utils.py index 507f817..ec39343 100644 --- a/quickadapter/user_data/strategies/Utils.py +++ b/quickadapter/user_data/strategies/Utils.py @@ -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] ),