mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-06-06 05:51:19 +08:00
Problem: When TotalTrades == 0 (no completed trades), formatPerformanceFeedback would return early, hiding Sharpe ratio and adaptive behavior recommendations from AI's prompt. This caused AI to say "no historical data" even though Sharpe ratio was calculated and displayed on frontend. Solution: - Display Sharpe ratio BEFORE checking TotalTrades - Don't return early when TotalTrades == 0 - Always show adaptive behavior recommendations if Sharpe ratio exists - Sharpe ratio is calculated from account equity changes, not just closed trades Impact: AI can now properly use Sharpe ratio for self-evolution, even in early stages before any trades are closed. Co-Authored-By: tinkle-community <tinklefund@gmail.com>