Commit Graph

6 Commits

Author SHA1 Message Date
mindesbunister
46c4ee412c fix: Total P&L now uses actual account growth instead of API value
- Changed Total P&L display from tradingStats.totalPnL (closed trades only)
  to currentCapital - STARTING_CAPITAL (actual account growth)
- Now matches Net Profit calculation (22 vs previous 77)
- Both metrics now show consistent, accurate profit figures
2026-01-14 20:32:20 +01:00
mindesbunister
ed18c9e70f docs: Document projection page v11.2 filter and cleanup trade exclusion (Jan 13, 2026)
- STARTING_CAPITAL set to 1437 (actual v11.2 start capital)
- START_DATE set to Jan 6, 2026 (v11.2 production start)
- getTradingStats filters for v11.2 indicator + recent manual trades
- Excludes cleanup trades (DUPLICATE_CLEANUP, PHANTOM_CLEANUP, phantom)
- Current v11.2 performance: 6 trades, 83.3% WR, +$406.04 P&L
2026-01-13 11:12:53 +01:00
mindesbunister
f6424c4d04 config: Change fixed SL from 2.8% to 2.6%
- config/trading.ts: stopLossPercent -2.8 → -2.6 (fallback SL)
- config/trading.ts: minSlPercent 2.8 → 2.6 (floor)
- config/trading.ts: maxSlPercent 2.8 → 2.6 (cap)
- moneyline_v11_2_strategy.pinescript: slPct default 2.8 → 2.6

Based on TradingView backtest data:
- SL 2.6%: 87.80% WR, +$766.21 P&L, PF 4.437
- Tighter SL preserves capital on losing trades

Did NOT implement dynamic breakeven (analysis showed -$50 P&L impact
when normalized to current $1,400 @ 7x leverage position size)
2026-01-12 13:09:47 +01:00
mindesbunister
b4bcde942a critical: Fix entry AND exit prices to use actual Drift fills (Bug #89)
- Extended getActualFillPriceFromTx() to also extract entry fill prices
- openPosition() now uses actual fill from tx logs (was using oracle price)
- closePosition() already fixed to use actual exit fills
- Both prices now extracted via Drift SDK LogParser OrderActionRecord events
- Eliminates ~0.08% entry and exit price discrepancies vs Drift UI
- P&L calculations now 100% accurate to actual execution prices

Files changed:
- lib/drift/orders.ts (entry extraction in openPosition)
- docs/COMMON_PITFALLS.md (updated Pitfall #89)

Expected impact: Entry AND exit prices match Drift exactly on all future trades
2026-01-12 08:32:48 +01:00
mindesbunister
5677d8d1b4 fix: Correct useEffect placement in projection page
- Moved useEffect hook before return statement (proper React component structure)
- Was causing Docker build failures with 'Unexpected token' error
- useEffect must be inside component function but before JSX return
- Build now completes successfully in 71.8s
2025-11-25 07:33:37 +01:00
mindesbunister
45b5e888aa feat: Add Projection Dashboard with Navigation
- Created PROFIT_PROJECTION_NOV24_2025.md for Feb 2026 accountability
- Built interactive dashboard at /app/projection/page.tsx
  - Live Drift API integration for current capital
  - 12-week projection with status indicators (🚀⚠️📅)
  - Discovery cards showing +98 vs -53 quality 90 shorts
  - System fixes documentation
  - Weekly tracking table with milestone highlights
- Added projection card to homepage (yellow/orange gradient, 🚀 icon)
- Projection page includes back to home button
- Container rebuilt and deployed successfully

User can now track 01 → 00K journey with real-time comparison of
projected vs actual performance. See you Feb 16, 2026 to verify! 🎯
2025-11-24 20:32:08 +01:00