Remove candle from backtest return + fix message when good backtest
This commit is contained in:
@@ -85,7 +85,7 @@ public class BacktestTradingBotGrain : Grain, IBacktestTradingBotGrain
|
||||
var lastYieldTime = DateTime.UtcNow;
|
||||
const int yieldIntervalMs = 5000; // Yield control every 5 seconds to prevent timeout
|
||||
const int candlesPerBatch = 100; // Process in batches to allow Orleans to check for cancellation
|
||||
|
||||
|
||||
// Process all candles following the exact pattern from GetBacktestingResult
|
||||
foreach (var candle in candles)
|
||||
{
|
||||
@@ -164,8 +164,7 @@ public class BacktestTradingBotGrain : Grain, IBacktestTradingBotGrain
|
||||
var finalRequestId = requestId != null ? Guid.Parse(requestId) : Guid.NewGuid();
|
||||
|
||||
// Create backtest result with conditional candles and indicators values
|
||||
var result = new Backtest(config, tradingBot.Positions, tradingBot.Signals,
|
||||
withCandles ? candles : new HashSet<Candle>())
|
||||
var result = new Backtest(config, tradingBot.Positions, tradingBot.Signals)
|
||||
{
|
||||
FinalPnl = finalPnl,
|
||||
WinRate = winRate,
|
||||
|
||||
Reference in New Issue
Block a user