From 60a0035f56f4ffcbe8f1dc762c5910bb5fdd3c7b Mon Sep 17 00:00:00 2001 From: mindesbunister Date: Mon, 10 Nov 2025 07:46:46 +0100 Subject: [PATCH] Add anti-chop filter: Penalize high volume during weak trend MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PROBLEM ANALYSIS: Signal that lost -$32: ADX 14.8, VOL 2.29x → scored 70-90 (PASSED) Signal that won +3%: ADX 15.7, VOL 1.18x → scored 45-65 (got BLOCKED before fix) Key insight: High volume during choppy conditions (ADX < 16) indicates whipsaw/trap, not genuine breakout. Our volume bonus (+15 pts for >1.5x) was rewarding flip-flop signals instead of real moves. FIX: Add anti-chop filter in volume scoring: - If ADX < 16 AND volume > 1.5x → -15 points (whipsaw trap) - Overrides the normal +15 bonus for high volume - Protects against false signals during consolidation IMPACT ON RECENT SIGNALS: 1. 00:40 SHORT (ADX 17.2, VOL 0.98): 55→75 ✅ Still passes 2. 00:55 LONG (ADX 15, VOL 0.47): 35→55 ❌ Still blocked (correct, weak vol) 3. 01:05 SHORT (ADX 14.8, VOL 2.29): 70→60 ⚠️ Now flagged as whipsaw trap 4. 01:10 LONG (ADX 15.7, VOL 1.18): 45→65 ✅ Catches the +3% runup Result: Loser signal now barely passes (60) with warning flag, winner signal passes cleanly (65). Better risk/reward profile. --- lib/trading/signal-quality.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/trading/signal-quality.ts b/lib/trading/signal-quality.ts index 86cc192..2a53544 100644 --- a/lib/trading/signal-quality.ts +++ b/lib/trading/signal-quality.ts @@ -118,8 +118,16 @@ export function scoreSignalQuality(params: { } // Volume check (want > 1.0 = above average) + // ANTI-CHOP FILTER: High volume + low ADX = whipsaw trap if (params.volumeRatio > 0) { - if (params.volumeRatio > 1.5) { + const isChoppy = params.adx > 0 && params.adx < 16 + const hasHighVolume = params.volumeRatio > 1.5 + + if (isChoppy && hasHighVolume) { + // High volume during choppy conditions (ADX < 16) is often a trap + score -= 15 + reasons.push(`⚠️ Whipsaw trap: High volume (${params.volumeRatio.toFixed(2)}x) + choppy market (ADX ${params.adx.toFixed(1)})`) + } else if (params.volumeRatio > 1.5) { score += 15 reasons.push(`Very strong volume (${params.volumeRatio.toFixed(2)}x avg)`) } else if (params.volumeRatio > 1.2) {