diff --git a/.env b/.env index 6513f86..c66b38b 100644 --- a/.env +++ b/.env @@ -69,11 +69,10 @@ PYTH_HERMES_URL=https://hermes.pyth.network # Example: 50 with 10x leverage = $500 notional position MAX_POSITION_SIZE_USD=210 -# REDUCED TO 5x FOR SAFETY (Dec 5, 2025) -# Reason: 0% TP hit rate indicates exits are broken -# Lower leverage = less risk while we fix exit management -# Will raise back to 10x once TP1 hit rate improves -LEVERAGE=5 +# Leverage multiplier (1-20, default: 10) +# Higher leverage = bigger gains AND bigger losses +# REDUCED TO 1x FOR SAFETY (Nov 27, 2025) - Until system verified working +LEVERAGE=1 # Risk parameters (LEGACY FALLBACK - used when ATR unavailable) # Stop Loss: Close 100% of position when price drops this much @@ -104,10 +103,8 @@ HARD_STOP_PERCENT=-2.5 TAKE_PROFIT_1_PERCENT=0.8 # Take Profit 1 Size: What % of position to close at TP1 -# OPTIMIZED (Dec 5, 2025): Close MORE at TP1 to lock profit -# Problem: Moves reverse quickly, we need to capture them -# 75% close at TP1 = bank profit immediately, 25% runner for big moves -TAKE_PROFIT_1_SIZE_PERCENT=75 +# 60 = close 60%, leave 40% for runner +TAKE_PROFIT_1_SIZE_PERCENT=60 # Take Profit 2: Trigger trailing stop at this profit level (FALLBACK) # Example: +1.8% on 10x = +18% account gain @@ -128,30 +125,26 @@ TAKE_PROFIT_2_SIZE_PERCENT=0 USE_ATR_BASED_TARGETS=true # ATR multipliers for TP1, TP2, and SL -# OPTIMIZED (Dec 5, 2025): Based on data analysis showing: -# - Current targets being hit but not captured (0% hit rate) -# - Price immediately reversing before 2-second monitoring loop detects -# - Average MFE 17-24% but targets at ~0.8-1.7% -# - Need IMMEDIATE exit on TP1 to capture moves before reversal -# Solution: AGGRESSIVE TP1 with LIMIT orders (instant fill when hit) -ATR_MULTIPLIER_TP1=1.5 -ATR_MULTIPLIER_TP2=3.0 -ATR_MULTIPLIER_SL=2.5 +# Example with SOL ATR = 0.45% of price: +# TP1 = 0.45% × 2.0 = 0.90% target +# TP2 = 0.45% × 4.0 = 1.80% target +# SL = 0.45% × 3.0 = 1.35% distance +ATR_MULTIPLIER_TP1=2.0 +ATR_MULTIPLIER_TP2=4.0 +ATR_MULTIPLIER_SL=3.0 -# Safety bounds (OPTIMIZED Dec 5, 2025) -# Based on blocked signal analysis: avg MFE 0.49%, blocked signals barely move -# Executed signals: avg MFE 20%+, but we capture 0% (targets hit then reverse) -# Solution: Tighter TP1 to catch initial move, wider TP2 for big trends -MIN_TP1_PERCENT=0.4 # Tighter minimum - catch small moves -MAX_TP1_PERCENT=1.0 # Lower maximum - don't wait for huge moves +# Safety bounds (prevent extreme values) +# TP1 bounds +MIN_TP1_PERCENT=0.5 # Never below +0.5% +MAX_TP1_PERCENT=1.5 # Never above +1.5% -# TP2 bounds - for capturing extended trends -MIN_TP2_PERCENT=0.8 # Lower minimum to activate trailing sooner -MAX_TP2_PERCENT=2.5 # Slightly lower max +# TP2 bounds +MIN_TP2_PERCENT=1 +MAX_TP2_PERCENT=3 -# SL bounds - wider to avoid noise -MIN_SL_PERCENT=0.7 # Slightly tighter -MAX_SL_PERCENT=1.8 # Slightly tighter (keep runner protected) +# SL bounds +MIN_SL_PERCENT=0.8 # Never tighter than -0.8% +MAX_SL_PERCENT=2.0 # Never wider than -2.0% # Emergency Stop: Hard stop if this level is breached # Example: -2.0% on 10x = -20% account loss (rare but protects from flash crashes) @@ -425,9 +418,9 @@ MAX_SCALE_MULTIPLIER=2 SCALE_SIZE_PERCENT=50 MIN_ADX_INCREASE=5 MAX_PRICE_POSITION_FOR_SCALE=70 -TRAILING_STOP_ATR_MULTIPLIER=1.5 # Tighter trailing to protect 25% runner -TRAILING_STOP_MIN_PERCENT=0.20 # Minimum trail distance -TRAILING_STOP_MAX_PERCENT=1.5 # Maximum trail distance +TRAILING_STOP_ATR_MULTIPLIER=2.5 +TRAILING_STOP_MIN_PERCENT=0.25 +TRAILING_STOP_MAX_PERCENT=2.5 USE_PERCENTAGE_SIZE=false BREAKEVEN_TRIGGER_PERCENT=0.4 diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 01ef39b..42f2311 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -774,20 +774,14 @@ When you have high-resolution data (1 minute), use it immediately. Arbitrary del **Key Design Principle:** Dual-layer redundancy - every trade has both on-chain orders (Drift) AND software monitoring (Position Manager) as backup. -**Exit Strategy:** ATR-Based TP2-as-Runner system (OPTIMIZED - Dec 5, 2025): +**Exit Strategy:** ATR-Based TP2-as-Runner system (CURRENT - Nov 17, 2025): - **ATR-BASED TP/SL** (PRIMARY): TP1/TP2/SL calculated from ATR × multipliers - - TP1: ATR × 1.5 (typically ~0.65%, closes 75%) - OPTIMIZED for capture before reversal - - TP2: ATR × 3.0 (typically ~1.3%, activates trailing stop) - - SL: ATR × 2.5 (typically ~1.08%) - - Safety bounds: 0.4-1.0% TP1, 0.8-2.5% TP2, 0.7-1.8% SL + - TP1: ATR × 2.0 (typically ~0.86%, closes 60% default) + - TP2: ATR × 4.0 (typically ~1.72%, activates trailing stop) + - SL: ATR × 3.0 (typically ~1.29%) + - Safety bounds: MIN/MAX caps prevent extremes - Falls back to fixed % if ATR unavailable -- **Runner:** 25% remaining after TP1 (configurable via `TAKE_PROFIT_1_SIZE_PERCENT=75`) -- **Optimization Rationale (Dec 5, 2025):** - - Previous config: 0% TP1/TP2 hit rate despite 17-24% avg MFE - - Problem: Targets hit during spikes, reversed before 2s monitoring loop detected - - Solution: Tighter targets (1.5×/3.0× vs 2.0×/4.0×) capture moves before reversal - - Close 75% at TP1 to bank profit immediately, 25% runner for extended trends - - Leverage reduced to 5× during testing phase (from 10×) +- **Runner:** 40% remaining after TP1 (configurable via `TAKE_PROFIT_1_SIZE_PERCENT=60`) - **Runner SL after TP1:** ADX-based adaptive positioning (Nov 19, 2025): - ADX < 20: SL at 0% (breakeven) - Weak trend, preserve TP1 profit - ADX 20-25: SL at -0.3% - Moderate trend, some retracement room diff --git a/cluster/exploration.db b/cluster/exploration.db index d810f64..284ab9a 100644 Binary files a/cluster/exploration.db and b/cluster/exploration.db differ