Test strategy combo
This commit is contained in:
@@ -8,68 +8,38 @@ namespace Managing.Application.Abstractions.Services
|
||||
public interface IBacktester
|
||||
{
|
||||
/// <summary>
|
||||
/// Runs a unified trading bot backtest with the specified configuration and date range.
|
||||
/// Automatically handles ScalpingBot and FlippingBot behavior based on config.BotType.
|
||||
/// Runs a trading bot backtest with the specified configuration and date range.
|
||||
/// Automatically handles different bot types based on config.BotType.
|
||||
/// </summary>
|
||||
/// <param name="config">The trading bot configuration</param>
|
||||
/// <param name="config">The trading bot configuration (must include Scenario object or ScenarioName)</param>
|
||||
/// <param name="startDate">The start date for the backtest</param>
|
||||
/// <param name="endDate">The end date for the backtest</param>
|
||||
/// <param name="user">The user running the backtest</param>
|
||||
/// <param name="user">The user running the backtest (optional)</param>
|
||||
/// <param name="save">Whether to save the backtest results</param>
|
||||
/// <param name="initialCandles">Optional pre-loaded candles</param>
|
||||
/// <returns>The backtest results</returns>
|
||||
Task<Backtest> RunTradingBotBacktest(
|
||||
TradingBotConfig config,
|
||||
DateTime startDate,
|
||||
DateTime endDate,
|
||||
User user = null,
|
||||
bool save = false,
|
||||
List<Candle>? initialCandles = null);
|
||||
bool save = false);
|
||||
|
||||
/// <summary>
|
||||
/// Runs a unified trading bot backtest with pre-loaded candles.
|
||||
/// Automatically handles ScalpingBot and FlippingBot behavior based on config.BotType.
|
||||
/// Runs a trading bot backtest with pre-loaded candles.
|
||||
/// Automatically handles different bot types based on config.BotType.
|
||||
/// </summary>
|
||||
/// <param name="config">The trading bot configuration</param>
|
||||
/// <param name="config">The trading bot configuration (must include Scenario object or ScenarioName)</param>
|
||||
/// <param name="candles">The candles to use for backtesting</param>
|
||||
/// <param name="user">The user running the backtest</param>
|
||||
/// <param name="user">The user running the backtest (optional)</param>
|
||||
/// <returns>The backtest results</returns>
|
||||
Task<Backtest> RunTradingBotBacktest(
|
||||
TradingBotConfig config,
|
||||
List<Candle> candles,
|
||||
User user = null);
|
||||
|
||||
// Legacy methods - maintained for backward compatibility
|
||||
Task<Backtest> RunScalpingBotBacktest(
|
||||
TradingBotConfig config,
|
||||
DateTime startDate,
|
||||
DateTime endDate,
|
||||
User user = null,
|
||||
bool save = false,
|
||||
List<Candle>? initialCandles = null);
|
||||
|
||||
Task<Backtest> RunFlippingBotBacktest(
|
||||
TradingBotConfig config,
|
||||
DateTime startDate,
|
||||
DateTime endDate,
|
||||
User user = null,
|
||||
bool save = false,
|
||||
List<Candle>? initialCandles = null);
|
||||
|
||||
// Additional methods for backtest management
|
||||
bool DeleteBacktest(string id);
|
||||
bool DeleteBacktests();
|
||||
|
||||
Task<Backtest> RunScalpingBotBacktest(
|
||||
TradingBotConfig config,
|
||||
List<Candle> candles,
|
||||
User user = null);
|
||||
|
||||
Task<Backtest> RunFlippingBotBacktest(
|
||||
TradingBotConfig config,
|
||||
List<Candle> candles,
|
||||
User user = null);
|
||||
|
||||
// User-specific operations
|
||||
Task<IEnumerable<Backtest>> GetBacktestsByUser(User user);
|
||||
Backtest GetBacktestByIdForUser(User user, string id);
|
||||
bool DeleteBacktestByUser(User user, string id);
|
||||
|
||||
Reference in New Issue
Block a user