Compare commits
2 Commits
5feb6ba61b
...
cc3a0a85a0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cc3a0a85a0 | ||
|
|
09825782bb |
13
.github/copilot-instructions.md
vendored
13
.github/copilot-instructions.md
vendored
@@ -818,12 +818,23 @@ Frequency penalties (overtrading / flip-flop / alternating) now ignore 1-minute
|
||||
- Purpose: Enables quick manual entries when TradingView signals unavailable
|
||||
- Note: Re-entry analytics validate against fresh TradingView data when cached (<5min)
|
||||
|
||||
**Re-Entry Analytics System:** Manual trades are validated before execution using fresh TradingView data:
|
||||
**Manual Trade Quality Bypass (Dec 4, 2025 - USER MANDATE):**
|
||||
- **User requirement:** "when i say short or long it shall do it straight away and DO it"
|
||||
- Manual trades (`timeframe='manual'`) bypass ALL quality scoring checks
|
||||
- Execute endpoint detects `isManualTrade` flag and skips quality threshold validation
|
||||
- Logs show: `✅ MANUAL TRADE BYPASS: Quality scoring skipped (Telegram command - executes immediately)`
|
||||
- **Purpose:** Instant execution for user-initiated trades without automated filtering
|
||||
- **Implementation:** `app/api/trading/execute/route.ts` line ~237-242 (commit 0982578, Dec 4, 2025)
|
||||
- **Behavior:** Manual trades execute regardless of ADX/ATR/RSI/quality score
|
||||
- **--force flag:** No longer needed (all manual trades bypass by default)
|
||||
|
||||
**Re-Entry Analytics System (OPTIONAL VALIDATION):** Manual trades CAN be validated before execution using fresh TradingView data:
|
||||
- Market data cached from TradingView signals (5min expiry)
|
||||
- `/api/analytics/reentry-check` scores re-entry based on fresh metrics + recent performance
|
||||
- Telegram bot blocks low-quality re-entries unless `--force` flag used
|
||||
- Uses real TradingView ADX/ATR/RSI when available, falls back to historical data
|
||||
- Penalty for recent losing trades, bonus for winning streaks
|
||||
- **Note:** Analytics check is advisory only - manual trades execute even if rejected by analytics
|
||||
|
||||
## VERIFICATION MANDATE: Financial Code Requires Proof
|
||||
|
||||
|
||||
@@ -234,15 +234,25 @@ export async function POST(request: NextRequest): Promise<NextResponse<ExecuteTr
|
||||
// Solution: If validatedEntry=true flag present, bypass quality check (signal already validated by queue)
|
||||
const isValidatedEntry = body.validatedEntry === true
|
||||
|
||||
// CRITICAL FIX (Dec 4, 2025): Manual Telegram trades bypass quality scoring
|
||||
// User requirement: "when i say short or long it shall do it straight away and DO it"
|
||||
// Manual trades (timeframe='manual') execute immediately without quality checks
|
||||
const isManualTrade = timeframe === 'manual'
|
||||
|
||||
if (isValidatedEntry) {
|
||||
console.log(`✅ VALIDATED ENTRY BYPASS: Quality ${qualityResult.score} accepted (validated by Smart Entry Queue)`)
|
||||
console.log(` Original quality: ${body.originalQualityScore}, Validation delay: ${body.validationDelayMinutes}min`)
|
||||
}
|
||||
|
||||
if (isManualTrade) {
|
||||
console.log(`✅ MANUAL TRADE BYPASS: Quality scoring skipped (Telegram command - executes immediately)`)
|
||||
}
|
||||
|
||||
// CRITICAL FIX (Nov 27, 2025): Verify quality score meets minimum threshold
|
||||
// Bug: Quality 30 trade executed because no quality check after timeframe validation
|
||||
// ENHANCED (Dec 3, 2025): Skip this check if validatedEntry=true (already validated by queue)
|
||||
if (!isValidatedEntry && qualityResult.score < minQualityScore) {
|
||||
// ENHANCED (Dec 4, 2025): Skip this check if isManualTrade=true (Telegram commands execute immediately)
|
||||
if (!isValidatedEntry && !isManualTrade && qualityResult.score < minQualityScore) {
|
||||
console.log(`❌ QUALITY TOO LOW: ${qualityResult.score} < ${minQualityScore} threshold for ${body.direction.toUpperCase()}`)
|
||||
console.log(` Reasons: ${qualityResult.reasons.join(', ')}`)
|
||||
return NextResponse.json({
|
||||
|
||||
BIN
cluster/__pycache__/v9_advanced_coordinator.cpython-37.pyc
Normal file
BIN
cluster/__pycache__/v9_advanced_coordinator.cpython-37.pyc
Normal file
Binary file not shown.
Binary file not shown.
1308
docs/analysis/COMPREHENSIVE_IMPROVEMENT_PLAN_DEC2025.md
Normal file
1308
docs/analysis/COMPREHENSIVE_IMPROVEMENT_PLAN_DEC2025.md
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user