using Managing.Domain.Backtests;
using Managing.Domain.Bots;
using Managing.Domain.Candles;
using Managing.Domain.Users;
namespace Managing.Application.Abstractions.Services
{
public interface IBacktester
{
///
/// Runs a trading bot backtest with the specified configuration and date range.
/// Automatically handles different bot types based on config.BotType.
///
/// The trading bot configuration (must include Scenario object or ScenarioName)
/// The start date for the backtest
/// The end date for the backtest
/// The user running the backtest (optional)
/// Whether to save the backtest results
/// Whether to include candles and indicators values in the response
/// The request ID to associate with this backtest (optional)
/// The backtest results
Task RunTradingBotBacktest(
TradingBotConfig config,
DateTime startDate,
DateTime endDate,
User user = null,
bool save = false,
bool withCandles = false,
string requestId = null);
///
/// Runs a trading bot backtest with pre-loaded candles.
/// Automatically handles different bot types based on config.BotType.
///
/// The trading bot configuration (must include Scenario object or ScenarioName)
/// The candles to use for backtesting
/// The user running the backtest (optional)
/// Whether to include candles and indicators values in the response
/// The request ID to associate with this backtest (optional)
/// The backtest results
Task RunTradingBotBacktest(
TradingBotConfig config,
List candles,
User user = null,
bool withCandles = false,
string requestId = null);
// Additional methods for backtest management
bool DeleteBacktest(string id);
bool DeleteBacktests();
IEnumerable GetBacktestsByUser(User user);
Backtest GetBacktestByIdForUser(User user, string id);
bool DeleteBacktestByUser(User user, string id);
bool DeleteBacktestsByUser(User user);
}
}