public static async Task <List <BackTestResult> > BackTestShowTrades(ITradingStrategy strategy, BacktestOptions backtestOptions, IDataStoreBacktest dataStore) { var runner = new BackTestRunner(); var results = await runner.RunSingleStrategy(strategy, backtestOptions, dataStore); return(results); }
public static async Task <List <BackTestResult> > BackTest(ITradingStrategy strategy, BacktestOptions backtestOptions, IDataStoreBacktest dataStore, string baseCurrency, bool saveSignals, decimal startingWallet, decimal tradeAmount) { var runner = new BackTestRunner(); var results = await runner.RunSingleStrategy(strategy, backtestOptions, dataStore, baseCurrency, saveSignals, startingWallet, tradeAmount); return(results); }
public static async Task <List <BackTestStrategyResult> > BackTestAll(BacktestOptions backtestOptions, IDataStoreBacktest dataStore) { var runner = new BackTestRunner(); var results = new List <BackTestStrategyResult>(); foreach (var item in GetTradingStrategies()) { var stratResult = new BackTestStrategyResult() { Strategy = item.Name }; stratResult.Results.AddRange(await runner.RunSingleStrategy(item, backtestOptions, dataStore)); results.Add(stratResult); } return(results); }