critical: v11.1 - Apply ALL filter checks to signal logic (Bug #84)

CRITICAL BUG FIX: Filters were calculated but NEVER applied to signals!

Bug Discovery:
- User reported: 'when i disable it nothing changes on the chart'
- Investigation: rsiLongOk/rsiShortOk calculated but never referenced
- Root Cause: finalLongSignal = buyReady (missing AND conditions)
- Result: All 7 trades were UNFILTERED despite 'All Filters' indicator name

Filters That Were Broken:
- RSI momentum filter (rsiLongOk, rsiShortOk)
- ADX trend strength (adxOk)
- Entry buffer (longBufferOk, shortBufferOk)
- Price position (longPositionOk, shortPositionOk)
- Volume filter (volumeOk)
- MACD confirmation (longOk, shortOk)

THE FIX (lines 263-264):
BEFORE: finalLongSignal = buyReady
AFTER:  finalLongSignal = buyReady and longOk and adxOk and longBufferOk and rsiLongOk and longPositionOk and volumeOk

BEFORE: finalShortSignal = sellReady
AFTER:  finalShortSignal = sellReady and shortOk and adxOk and shortBufferOk and rsiShortOk and shortPositionOk and volumeOk

Impact:
- All previous 7 v11 trades were unfiltered (explains poor performance)
- Trade at RSI 73.5 occurred despite max=67 setting
- Previous v11.1 update (rsiLongMin 30→60) had ZERO effect
- This is why toggles had no visual effect in TradingView

User Must:
1. Copy updated .pinescript file
2. Paste into TradingView (replace v11 indicator)
3. Verify filter toggles now affect signals
4. Monitor for 15-20 new FILTERED trades
5. Re-analyze performance (previous 7 trades = unfiltered baseline)

Financial Impact:
- This bug explains the -,000 user mentioned
- Indicator name 'All Filters' was misleading (zero filters applied)
- All filter optimization work had zero effect on actual signals
- Expected: Much fewer signals now (filters will actually work)
This commit is contained in:
mindesbunister
2025-12-15 12:41:30 +01:00
parent da20e1802f
commit acf103cd38

View File

@@ -260,8 +260,9 @@ rsiShortOk = not useRsiFilter or (rsi14 >= rsiShortMin and rsi14 <= rsiShortMax)
// Protection: 0.25% flip threshold + 0.10 ATR buffer + ADX 5+ + quality filters
// Result: $4,158 PnL vs v9 $406 baseline (72.5% WR, 1.755 PF, $95 max DD)
// V11 trades 2.7× more signals while maintaining 93% less drawdown
finalLongSignal = buyReady // 🟢 Signal on red → green flip (with threshold)
finalShortSignal = sellReady // 🔴 Signal on green → red flip (with threshold)
// CRITICAL FIX (v11.1): Apply ALL filter checks to signals (previously filters were calculated but not applied!)
finalLongSignal = buyReady and longOk and adxOk and longBufferOk and rsiLongOk and longPositionOk and volumeOk
finalShortSignal = sellReady and shortOk and adxOk and shortBufferOk and rsiShortOk and shortPositionOk and volumeOk
plotshape(finalLongSignal, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.circle, size=size.small)
plotshape(finalShortSignal, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.circle, size=size.small)