Refactor BacktestSpotBot signal generation to utilize base implementation for optimizations; update BacktestExecutorTests with revised metrics reflecting recent backtest results; add new performance benchmark entries for improved tracking.
This commit is contained in:
@@ -163,13 +163,11 @@ public class BacktestSpotBot : TradingBotBase, ITradingBot
|
||||
protected override async Task UpdateSignalsCore(IReadOnlyList<Candle> candles,
|
||||
Dictionary<IndicatorType, IndicatorsResultBase> preCalculatedIndicatorValues = null)
|
||||
{
|
||||
// For spot trading, always fetch signals regardless of open positions
|
||||
// Check if we're in cooldown period
|
||||
if (await IsInCooldownPeriodAsync())
|
||||
{
|
||||
// Still in cooldown period, skip signal generation
|
||||
return;
|
||||
}
|
||||
// Call base implementation for common optimizations (flip check, cooldown check)
|
||||
// This will return early if:
|
||||
// - FlipPosition is disabled AND there's an open position
|
||||
// - Bot is in cooldown period
|
||||
await base.UpdateSignalsCore(candles, preCalculatedIndicatorValues);
|
||||
|
||||
// For backtest, if no candles provided (called from Run()), skip signal generation
|
||||
// Signals are generated in BacktestExecutor with rolling window candles
|
||||
|
||||
Reference in New Issue
Block a user