- Fix SELL logic: correctly reduce position.quantity after selling (core bug)
Previously positions were never decremented, causing sold positions to be
settled again at backtest end, inflating final balance.
- Fix settleRemainingPositions: profitLoss now correctly computes
settlementValue - cost (was incorrectly using settlementValue.negate())
- Fix max drawdown calculation: use current balance instead of previous
iteration's runningBalance
- Frontend: add comment noting chart shows cash balance, not total equity
- Get issue details (title, url) for TG message
- Send TG via TELEGRAM_BOT_TOKEN/TELEGRAM_CHAT_ID (same as docker-build)
- Use GH_TOKEN from GITHUB_TOKEN for gh CLI
Made-with: Cursor
- Trigger on pull_request closed (merged) to main
- Parse issue number from PR body (Closes #N) or branch name (ai_fix/N_xxx)
- Close linked issue via GitHub API if still open
Made-with: Cursor