diff --git a/app/api/trading/check-risk/route.ts b/app/api/trading/check-risk/route.ts index 33cfa62..c62bd39 100644 --- a/app/api/trading/check-risk/route.ts +++ b/app/api/trading/check-risk/route.ts @@ -22,6 +22,7 @@ export interface RiskCheckRequest { currentPrice?: number // Current market price (for flip-flop context) signalPrice?: number // TradingView-provided price snapshot indicatorVersion?: string // Pine Script version tag (v8/v9/v10) + indicatorScore?: number // v11.2+ SCORE:100 bypass - when >= 90, bypass quality checks // Optional context metrics from TradingView atr?: number adx?: number @@ -472,6 +473,20 @@ export async function POST(request: NextRequest): Promise= 90 + if (hasIndicatorScore) { + console.log(`✅ INDICATOR SCORE BYPASS: indicatorScore=${body.indicatorScore} >= 90, skipping quality check`) + return NextResponse.json({ + allowed: true, + reason: 'Indicator score bypass', + details: `Signal passed with indicator score ${body.indicatorScore} (v11.2+ pre-filtered)`, + qualityScore: body.indicatorScore, + }) + } + // Get current price from Pyth for flip-flop price context check const priceMonitor = getPythPriceMonitor() const latestPrice = priceMonitor.getCachedPrice(body.symbol) diff --git a/app/api/trading/execute/route.ts b/app/api/trading/execute/route.ts index 6bfea69..b7e63be 100644 --- a/app/api/trading/execute/route.ts +++ b/app/api/trading/execute/route.ts @@ -35,6 +35,7 @@ export interface ExecuteTradeRequest { maGap?: number // V9: MA gap convergence metric volume?: number // Raw volume value for time-series tracking indicatorVersion?: string // Pine Script version (v5, v6, etc.) + indicatorScore?: number // v11.2+: Pre-validated score from indicator (100 = bypass bot quality check) // Smart Validation Queue integration (Bug 5 fix - Dec 3, 2025) validatedEntry?: boolean // Flag indicating signal was validated by Smart Entry Queue originalQualityScore?: number // Original quality score before validation @@ -271,7 +272,8 @@ export async function POST(request: NextRequest): Promise