Пример #1
0
        public IEnumerable <decimal> Calculate(IEnumerable <Candle> candles)
        {
            var calculator = new TrCalculator();
            var trs        = calculator.Calculate(candles);

            return(Calculate(trs));
        }
Пример #2
0
        public async Task <IEnumerable <decimal> > CalculateTrAsync(string symbol)
        {
            var candles = await _dataProvider.FetchCandlesAsync(symbol, TimePeriod.InYears(5), TimePeriod.InWeeks(1));

            var calculator = new TrCalculator();

            return(calculator.Calculate(candles));
        }