Add PositionCount property to Backtest models and responses

- Introduced PositionCount to Backtest, LightBacktest, and their respective response models.
- Updated BacktestController and BacktestExecutor to include PositionCount in responses.
- Modified database schema to accommodate new PositionCount field in relevant entities.
This commit is contained in:
2025-11-18 22:23:20 +07:00
parent 0ee190786e
commit 68e9b2348c
9 changed files with 1776 additions and 4 deletions

View File

@@ -41,6 +41,7 @@ public class Backtest
public string ScoreMessage { get; set; } = string.Empty;
[Required] public decimal InitialBalance { get; set; }
[Required] public decimal NetPnl { get; set; }
[Required] public int PositionCount { get; set; }
/// <summary>
/// Creates a new TradingBotConfig based on this backtest's configuration for starting a live bot.

View File

@@ -27,4 +27,5 @@ public class LightBacktest
[Id(14)] public string Ticker { get; set; } = string.Empty;
[Id(15)] public decimal InitialBalance { get; set; }
[Id(16)] public decimal NetPnl { get; set; }
[Id(17)] public int PositionCount { get; set; }
}