"""Per-strategy 'small trick' candidates for elimination audits."""

from __future__ import annotations

# Each trick: human label + param overrides (applied on top of 123.set solo baseline).
STRATEGY_TWEAKS: dict[str, list[dict]] = {
    "DB": [
        {"name": "close_on", "params": {"DB_CloseUnprofitableOnNewSignal": True}},
        {"name": "tighter_sl", "params": {"DB_StopLoss": 1400}},
        {"name": "wider_tp", "params": {"DB_TakeProfit": 4200}},
        {"name": "shorter_box", "params": {"DB_BoxPeriod": 140}},
        {"name": "no_volume_filter", "params": {"DB_UseVolumeSpikeFilter": False}},
        {"name": "lower_trend_thresh", "params": {"DB_TrendThreshold": 3.8}},
    ],
    "ES": [
        {"name": "tighter_trail", "params": {"ES_TrailingStop": 280}},
        {"name": "wider_trail", "params": {"ES_TrailingStop": 420}},
        {"name": "faster_profit_check", "params": {"ES_ProfitCheckBars": 12}},
        {"name": "stale_sl_exit", "params": {"ES_UseStaleStopLossExit": True}},
        {"name": "lower_adx_gate", "params": {"ES_WeeklyADXMin": 35}},
        {"name": "more_trades_per_x", "params": {"ES_MaxTradesPerCrossover": 12}},
    ],
    "RC": [
        {"name": "close_on", "params": {"RC_CloseUnprofitableOnNewSignal": True}},
        {"name": "short_cooldown", "params": {"RC_cooldownSeconds": 120}},
        {"name": "long_cooldown", "params": {"RC_cooldownSeconds": 300}},
        {"name": "tighter_trail", "params": {"RC_TrailingStop": 220}},
        {"name": "looser_ema_slope", "params": {"RC_emaSlopeThreshold": 90}},
        {"name": "rsi_exit_tighter", "params": {"RC_exitBuyRSI": 82, "RC_exitSellRSI": 14}},
    ],
    "RM": [
        {"name": "close_on", "params": {"RM_CloseUnprofitableOnNewSignal": True}},
        {"name": "short_reverse_cd", "params": {"RM_InpRSIReverseCooldownBars": 8}},
        {"name": "ema_cross_only", "params": {"RM_InpEnableRSIFollow": False, "RM_InpEnableRSIReverse": False}},
        {"name": "rsi_follow_only", "params": {"RM_InpEnableRSIReverse": False, "RM_InpEnableEMACross": False}},
        {"name": "tighter_ema_dist", "params": {"RM_InpEMADistancePips": 120}},
        {"name": "close_outside_hours", "params": {"RM_InpRSIFollowCloseOutsideHours": True}},
    ],
    "RS_APPL": [
        {"name": "close_on", "params": {"RS_APPL_CloseUnprofitableOnNewSignal": True}},
        {"name": "faster_bars", "params": {"RS_APPL_BarsToWait": 5}},
        {"name": "trail_activate_50", "params": {"RS_APPL_TrailActivationPoints": 50}},
        {"name": "tighter_trail", "params": {"RS_APPL_TrailDistancePoints": 80}},
        {"name": "wider_targets", "params": {"RS_APPL_RSI_Target_Buy": 92, "RS_APPL_RSI_Target_Sell": 40}},
    ],
    "RS_ADBE": [
        {"name": "close_on", "params": {"RS_ADBE_CloseUnprofitableOnNewSignal": True}},
        {"name": "faster_bars", "params": {"RS_ADBE_BarsToWait": 6}},
        {"name": "trail_activate_10", "params": {"RS_ADBE_TrailActivationPoints": 10}},
        {"name": "tighter_trail", "params": {"RS_ADBE_TrailDistancePoints": 350}},
    ],
    "RS_BTCUSD": [
        {"name": "close_on", "params": {"RS_BTCUSD_CloseUnprofitableOnNewSignal": True}},
        {"name": "faster_bars", "params": {"RS_BTCUSD_BarsToWait": 4}},
        {"name": "trail_activate_30", "params": {"RS_BTCUSD_TrailActivationPoints": 30}},
        {"name": "tighter_trail", "params": {"RS_BTCUSD_TrailDistancePoints": 90}},
        {"name": "reversal_escape_off", "params": {"RS_UseReversalEscape": False}},
    ],
    "RS_NVDA": [
        {"name": "close_on", "params": {"RS_NVDA_CloseUnprofitableOnNewSignal": True}},
        {"name": "faster_bars", "params": {"RS_NVDA_BarsToWait": 3}},
        {"name": "tighter_trail", "params": {"RS_NVDA_TrailDistancePoints": 280}},
        {"name": "lower_trail_act", "params": {"RS_NVDA_TrailActivationPoints": 50}},
        {"name": "wider_ob_os", "params": {"RS_NVDA_RSI_Overbought": 40, "RS_NVDA_RSI_Oversold": 35}},
    ],
    "RS_TSLA": [
        {"name": "faster_bars", "params": {"RS_TSLA_BarsToWait": 2}},
        {"name": "trail_act_400", "params": {"RS_TSLA_TrailActivationPoints": 400}},
        {"name": "trail_act_600", "params": {"RS_TSLA_TrailActivationPoints": 600}},
        {"name": "tighter_trail", "params": {"RS_TSLA_TrailDistancePoints": 700}},
        {"name": "wider_trail", "params": {"RS_TSLA_TrailDistancePoints": 1100}},
    ],
    "RS_XAUUSD": [
        {"name": "faster_bars", "params": {"RS_XAUUSD_BarsToWait": 3}},
        {"name": "lower_trail_act", "params": {"RS_XAUUSD_TrailActivationPoints": 25}},
        {"name": "tighter_trail", "params": {"RS_XAUUSD_TrailDistancePoints": 55}},
        {"name": "wider_trail", "params": {"RS_XAUUSD_TrailDistancePoints": 90}},
        {"name": "reversal_escape_off", "params": {"RS_UseReversalEscape": False}},
    ],
    "RS_MU": [
        {"name": "close_on", "params": {"RS_MU_CloseUnprofitableOnNewSignal": True}},
        {"name": "faster_bars", "params": {"RS_MU_BarsToWait": 20}},
        {"name": "symbol_munas", "params": {"RS_MU_Symbol": "MU.NAS"}},
        {"name": "symbol_muus", "params": {"RS_MU_Symbol": "MU.US"}},
        {"name": "looser_ob_os", "params": {"RS_MU_RSI_Overbought": 40, "RS_MU_RSI_Oversold": 75}},
    ],
    "SE": [
        {"name": "close_on", "params": {"SE_CloseUnprofitableOnNewSignal": True}},
        {"name": "exit_trend_flip", "params": {"SE_ExitOnTrendFlip": True}},
        {"name": "shorter_hold", "params": {"SE_MaxHoldingBars": 120}},
        {"name": "longer_hold", "params": {"SE_MaxHoldingBars": 220}},
        {"name": "structural_sl", "params": {"SE_UseStructuralSL": True}},
        {"name": "cci_looser", "params": {"SE_CciOversold": -120}},
    ],
    "RCO": [
        {"name": "close_on", "params": {"RCO_CloseUnprofitableOnNewSignal": True}},
        {"name": "higher_adx_cap", "params": {"RCO_ADX_Max": 32}},
        {"name": "tighter_sl", "params": {"RCO_SL_ATR_Mult": 1.9}},
        {"name": "wider_tp", "params": {"RCO_TP_ATR_Mult": 2.7}},
        {"name": "shorter_max_bars", "params": {"RCO_MaxBarsInTrade": 40}},
    ],
    "RRA_EUR": [
        {"name": "close_on", "params": {"RRA_EURUSD_CloseUnprofitableOnNewSignal": True}},
        {"name": "shorter_duration", "params": {"RRA_EURUSD_MaxDuration": 200}},
        {"name": "close_outside", "params": {"RRA_EURUSD_CloseOutsideSession": True}},
        {"name": "rsi_exit_50", "params": {"RRA_EURUSD_RSIExitLevel": 50}},
        {"name": "tighter_os", "params": {"RRA_EURUSD_OversoldLevel": 12}},
    ],
    "RRA_AUD": [
        {"name": "close_on", "params": {"RRA_AUDUSD_CloseUnprofitableOnNewSignal": True}},
        {"name": "shorter_duration", "params": {"RRA_AUDUSD_MaxDuration": 250}},
        {"name": "no_close_outside", "params": {"RRA_AUDUSD_CloseOutsideSession": False}},
        {"name": "tighter_os", "params": {"RRA_AUDUSD_OversoldLevel": 28}},
        {"name": "rsi_exit_45", "params": {"RRA_AUDUSD_RSIExitLevel": 45}},
    ],
    "ST_BTC": [
        {"name": "close_on", "params": {"ST_BTC_CloseUnprofitableOnNewSignal": True}},
        {"name": "tighter_break", "params": {"ST_BTC_BreakBuffer": 70}},
        {"name": "looser_touch", "params": {"ST_BTC_LineTouchTolerance": 150}},
        {"name": "longer_ma", "params": {"ST_BTC_MAPeriod": 180}},
    ],
    "ST_XAU": [
        {"name": "close_on", "params": {"ST_XAU_CloseUnprofitableOnNewSignal": True}},
        {"name": "tighter_break", "params": {"ST_XAU_BreakBuffer": 90}},
        {"name": "shorter_ma", "params": {"ST_XAU_MAPeriod": 55}},
        {"name": "looser_touch", "params": {"ST_XAU_LineTouchTolerance": 260}},
    ],
    "ST_GER": [
        {"name": "close_on", "params": {"ST_GER_CloseUnprofitableOnNewSignal": True}},
        {"name": "tighter_break", "params": {"ST_GER_BreakBuffer": 60}},
        {"name": "looser_touch", "params": {"ST_GER_LineTouchTolerance": 120}},
        {"name": "longer_ma", "params": {"ST_GER_MAPeriod": 80}},
    ],
    "RSS": [
        {"name": "close_on", "params": {"RSS_CloseUnprofitableOnNewSignal": True}},
        {"name": "swing_sl", "params": {"RSS_UseSwingStopLoss": True}},
        {"name": "shorter_cooldown", "params": {"RSS_MinBarsBetweenTrades": 4}},
        {"name": "tighter_sl_atr", "params": {"RSS_StopLossATR": 2.2}},
    ],
    "UB": [
        {"name": "close_on", "params": {"UB_CloseUnprofitableOnNewSignal": True}},
        {"name": "min_range_12", "params": {"UB_MinRangePoints": 12}},
        {"name": "order_buf_35", "params": {"UB_OrderBufferPoints": 3.5}},
        {"name": "first_trade_only", "params": {"UB_FirstTradeOnly": True}},
        {"name": "wider_range", "params": {"UB_MinRangePoints": 18}},
        {"name": "tighter_buffer", "params": {"UB_OrderBufferPoints": 3.0}},
    ],
}
