revert: Undo exit strategy optimization based on corrupted MFE data

CRITICAL DATA BUG DISCOVERED (Dec 5, 2025):
Previous commits a67a338 and f65aae5 implemented optimizations based on
INCORRECT analysis of maxFavorableExcursion (MFE) data.

Problem: Old Trade records stored MFE in DOLLARS, not PERCENTAGES
- Appeared to show 20%+ average favorable movement
- Actually only 0.76% (long) and 1.20% (short) average movement
- 26× inflation of perceived performance due to unit mismatch

Incorrect Changes Reverted:
- ATR_MULTIPLIER_TP1: 1.5 → back to 2.0
- ATR_MULTIPLIER_TP2: 3.0 → back to 4.0
- ATR_MULTIPLIER_SL: 2.5 → back to 3.0
- TAKE_PROFIT_1_SIZE_PERCENT: 75 → back to 60
- LEVERAGE: 5 → back to 1
- Safety bounds restored to original values
- TRAILING_STOP_ATR_MULTIPLIER: back to 2.5

REAL FINDINGS (after data correction):
- TP1 orders ARE being placed (tp1OrderTx populated)
- TP1 prices NOT being reached (only 2/11 trades in sample)
- Recent trades (6 total): avg MFE 0.74%, only 2/6 reached TP1
- Problem is ENTRY QUALITY, not exit timing
- Quality 90+ signals barely move favorably before reversing

See Common Pitfall #54 - MFE data stored in mixed units
Need to filter by createdAt >= '2025-11-23' for accurate analysis
This commit is contained in:
mindesbunister
2025-12-05 10:05:39 +01:00
parent f65aae5eb7
commit a15f17f489
3 changed files with 32 additions and 45 deletions

View File

@@ -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