TWO CRITICAL BUGS FIXED:
1. Missing use_quality_filters parameter (Pine Script parity):
- Added use_quality_filters: bool = True to MoneyLineV11Inputs
- Implemented bypass logic in signal generation for both long/short
- When False: only trend flips generate signals (no filtering)
- When True: all filters must pass (original v11 behavior)
- Matches Pine Script: finalSignal = buyReady and (not useQualityFilters or (...filters...))
2. RSI index misalignment causing 100% NaN values:
- np.where() returns numpy arrays without indices
- pd.Series(gain/loss) created NEW integer indices (0,1,2...)
- Result: RSI values misaligned with original datetime index
- Fix: pd.Series(gain/loss, index=series.index) preserves alignment
- Impact: RSI NaN count 100 → 0, all filters now work correctly
VERIFICATION:
- Test 1 (no filters): 1,424 signals ✓
- Test 2 (permissive RSI): 1,308 signals ✓
- Test 3 (moderate RSI 25-70/30-80): 1,157 signals ✓
Progressive sweep can now proceed with corrected signal generation.
- Removed v10 TradingView indicator (moneyline_v10_momentum_dots.pinescript)
- Removed v10 penalty system from signal-quality.ts (-30/-25 point penalties)
- Removed backtest result files (sweep_*.csv)
- Updated copilot-instructions.md to remove v10 references
- Simplified direction-specific quality thresholds (LONG 90+, SHORT 80+)
Rationale:
- 1,944 parameter combinations tested in backtest
- All top results IDENTICAL (568 trades, $498 P&L, 61.09% WR)
- Momentum parameters had ZERO impact on trade selection
- Profit factor 1.027 too low (barely profitable after fees)
- Max drawdown -$1,270 vs +$498 profit = terrible risk-reward
- v10 penalties were blocking good trades (bug: applied to wrong positions)
Keeping v9 as production system - simpler, proven, effective.