feat: Add signalSource field to identify manual vs TradingView trades
- Set signalSource='manual' for Telegram trades, 'tradingview' for TradingView - Updated analytics queries to exclude manual trades from indicator analysis - getTradingStats() filters manual trades (TradingView performance only) - Version comparison endpoint filters manual trades - Created comprehensive filtering guide: docs/MANUAL_TRADE_FILTERING.md - Ensures clean data for indicator optimization without contamination
This commit is contained in:
@@ -56,6 +56,7 @@ export async function GET() {
|
||||
WHERE "exitReason" IS NOT NULL
|
||||
AND "exitReason" NOT LIKE '%CLEANUP%'
|
||||
AND "isTestTrade" = false
|
||||
AND ("signalSource" IS NULL OR "signalSource" != 'manual')
|
||||
GROUP BY "indicatorVersion"
|
||||
ORDER BY version DESC
|
||||
`
|
||||
@@ -78,6 +79,7 @@ export async function GET() {
|
||||
WHERE "exitReason" IS NOT NULL
|
||||
AND "exitReason" NOT LIKE '%CLEANUP%'
|
||||
AND "isTestTrade" = false
|
||||
AND ("signalSource" IS NULL OR "signalSource" != 'manual')
|
||||
AND "pricePositionAtEntry" < 15
|
||||
GROUP BY "indicatorVersion"
|
||||
ORDER BY version DESC
|
||||
|
||||
Reference in New Issue
Block a user