feat: Add quality score to trade opened Telegram notifications
User Request: Show quality score in Telegram when position opened
Changes:
- Updated execute endpoint response to include qualityScore field
- n8n workflow already checks for qualityScore in response
- When present, displays: ⭐ Quality: XX/100
Impact:
- Users now see quality score immediately on position open
- Previously only saw score on blocked signals
- Better visibility into trade quality at entry
Files Modified:
- app/api/trading/execute/route.ts (added qualityScore to response)
This commit is contained in:
2
.env
2
.env
@@ -393,7 +393,7 @@ TRAILING_STOP_ACTIVATION=0.4
|
|||||||
MIN_SIGNAL_QUALITY_SCORE=91
|
MIN_SIGNAL_QUALITY_SCORE=91
|
||||||
MIN_SIGNAL_QUALITY_SCORE_LONG=90 # Nov 23, 2025: Longs have 71.4% WR at quality 90-94 (+$44.77 on 7 trades)
|
MIN_SIGNAL_QUALITY_SCORE_LONG=90 # Nov 23, 2025: Longs have 71.4% WR at quality 90-94 (+$44.77 on 7 trades)
|
||||||
MIN_SIGNAL_QUALITY_SCORE_SHORT=95 # Nov 23, 2025: Shorts toxic at quality 90-94 (28.6% WR, -$553.76 on 7 trades)
|
MIN_SIGNAL_QUALITY_SCORE_SHORT=95 # Nov 23, 2025: Shorts toxic at quality 90-94 (28.6% WR, -$553.76 on 7 trades)
|
||||||
\n# Adaptive Leverage System (Nov 24, 2025)
|
# Adaptive Leverage System (Nov 24, 2025)
|
||||||
USE_ADAPTIVE_LEVERAGE=true
|
USE_ADAPTIVE_LEVERAGE=true
|
||||||
HIGH_QUALITY_LEVERAGE=15
|
HIGH_QUALITY_LEVERAGE=15
|
||||||
LOW_QUALITY_LEVERAGE=10
|
LOW_QUALITY_LEVERAGE=10
|
||||||
|
|||||||
@@ -874,6 +874,7 @@ export async function POST(request: NextRequest): Promise<NextResponse<ExecuteTr
|
|||||||
tp2Percent: config.takeProfit2Percent,
|
tp2Percent: config.takeProfit2Percent,
|
||||||
entrySlippage: openResult.slippage,
|
entrySlippage: openResult.slippage,
|
||||||
timestamp: new Date().toISOString(),
|
timestamp: new Date().toISOString(),
|
||||||
|
qualityScore: qualityResult.score, // Add quality score for Telegram notification (Nov 24, 2025)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Attach exit order signatures to response
|
// Attach exit order signatures to response
|
||||||
|
|||||||
Reference in New Issue
Block a user