feat: enhance backtest with real-time positions, P&L fixes, and strategy integration

- Add real-time position display with unrealized P&L during backtest
- Fix P&L calculation by tracking accumulated opening fees
- Add strategy coin source resolution (AI500, OI Top, mixed)
- Infer AI provider from model name for better compatibility
- Cap position size to available margin to prevent insufficient cash errors
- Fix trade markers on K-line chart (long/short instead of buy/sell)
- Add QuantData and OI ranking to backtest decision context
This commit is contained in:
tinkle-community
2025-12-20 01:10:11 +08:00
parent 5534861fe5
commit e2d702c662
9 changed files with 1144 additions and 62 deletions

View File

@@ -35,7 +35,7 @@ func Init() {
cfg := &Config{
APIServerPort: 8080,
RegistrationEnabled: true,
MaxUsers: 1, // Default: only 1 user allowed
MaxUsers: 5, // Default: only 1 user allowed
ExperienceImprovement: true, // Default: enabled to help improve the product
}