Пример #1
0
        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);
        }
Пример #2
0
        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);
        }
Пример #3
0
        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);
        }