public void RelativeStrengthIndexHappyFlow()
        {
            var input = Candles.Take(10);
            var rsi   = input.RelativeStrengthIndex();

            Assert.Equal(47.348886532343584305408271475M, rsi);
        }
Example #2
0
 private BacktestingCandle[] GetFiveMinuteCandles(int count)
 {
     return(Candles.Take(count).ToArray());
 }
        public void RelativeStrengthIndexSingle()
        {
            var input = Candles.Take(1);

            Assert.Throws <InvalidOperationException>(() => input.RelativeStrengthIndex());
        }
Example #4
0
        public void RateOfChangeOneCandle()
        {
            var roc = Candles.Take(1).RateOfChange();

            Assert.Equal(0, roc);
        }