Update bot market type

This commit is contained in:
2025-12-11 23:32:06 +07:00
parent 35df25915f
commit a254db6d24
20 changed files with 1986 additions and 44 deletions

View File

@@ -438,6 +438,8 @@ public class PostgreSqlBacktestRepository : IBacktestRepository
baseQuery = baseQuery.Where(b => b.Duration >= filter.DurationMin.Value);
if (filter.DurationMax.HasValue)
baseQuery = baseQuery.Where(b => b.Duration <= filter.DurationMax.Value);
if (filter.TradingType.HasValue)
baseQuery = baseQuery.Where(b => b.TradingType == (int)filter.TradingType.Value);
}
var entities = await baseQuery.ToListAsync().ConfigureAwait(false);
@@ -503,6 +505,8 @@ public class PostgreSqlBacktestRepository : IBacktestRepository
baseQuery = baseQuery.Where(b => b.Duration >= filter.DurationMin.Value);
if (filter.DurationMax.HasValue)
baseQuery = baseQuery.Where(b => b.Duration <= filter.DurationMax.Value);
if (filter.TradingType.HasValue)
baseQuery = baseQuery.Where(b => b.TradingType == (int)filter.TradingType.Value);
}
var afterQueryMs = stopwatch.ElapsedMilliseconds;
@@ -642,6 +646,8 @@ public class PostgreSqlBacktestRepository : IBacktestRepository
baseQuery = baseQuery.Where(b => b.Duration >= filter.DurationMin.Value);
if (filter.DurationMax.HasValue)
baseQuery = baseQuery.Where(b => b.Duration <= filter.DurationMax.Value);
if (filter.TradingType.HasValue)
baseQuery = baseQuery.Where(b => b.TradingType == (int)filter.TradingType.Value);
}
var afterQueryMs = stopwatch.ElapsedMilliseconds;