Refactoring TradingBotBase.cs + clean architecture (#38)
* Refactoring TradingBotBase.cs + clean architecture * Fix basic tests * Fix tests * Fix workers * Fix open positions * Fix closing position stucking the grain * Fix comments * Refactor candle handling to use IReadOnlyList for chronological order preservation across various components
This commit is contained in:
@@ -280,12 +280,15 @@ public class BacktestComputeWorker : BackgroundService
|
||||
var timeoutCts = new CancellationTokenSource(TimeSpan.FromMinutes(_options.JobTimeoutMinutes));
|
||||
var linkedCts = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken, timeoutCts.Token);
|
||||
|
||||
// Convert HashSet to List - candles are already ordered from repository
|
||||
var candlesList = candles.ToList();
|
||||
|
||||
LightBacktest result;
|
||||
try
|
||||
{
|
||||
result = await executor.ExecuteAsync(
|
||||
config,
|
||||
candles,
|
||||
candlesList,
|
||||
user,
|
||||
save: true,
|
||||
withCandles: false,
|
||||
|
||||
Reference in New Issue
Block a user