Fix genetic backend

This commit is contained in:
2025-07-11 14:11:41 +07:00
parent d04d8f310d
commit e43a1af5ef
15 changed files with 542 additions and 205 deletions

View File

@@ -80,8 +80,7 @@ namespace Managing.Application.Backtesting
bool withCandles = false,
string requestId = null)
{
var account = await GetAccountFromConfig(config);
var candles = GetCandles(account, config.Ticker, config.Timeframe, startDate, endDate);
var candles = GetCandles(config.Ticker, config.Timeframe, startDate, endDate);
var result = await RunBacktestWithCandles(config, candles, user, withCandles, requestId);
@@ -165,7 +164,7 @@ namespace Managing.Application.Backtesting
};
}
private List<Candle> GetCandles(Account account, Ticker ticker, Timeframe timeframe,
private List<Candle> GetCandles(Ticker ticker, Timeframe timeframe,
DateTime startDate, DateTime endDate)
{
var candles = _exchangeService.GetCandlesInflux(TradingExchanges.Evm, ticker,
@@ -400,6 +399,12 @@ namespace Managing.Application.Backtesting
return backtests;
}
public IEnumerable<Backtest> GetBacktestsByRequestId(string requestId)
{
var backtests = _backtestRepository.GetBacktestsByRequestId(requestId).ToList();
return backtests;
}
public Backtest GetBacktestByIdForUser(User user, string id)
{
var backtest = _backtestRepository.GetBacktestByIdForUser(user, id);
@@ -462,7 +467,5 @@ namespace Managing.Application.Backtesting
return false;
}
}
}
}