예제 #1
0
        public void RsiSingle_PeriodBiggerOrEqualToDataLength_ReturnNull()
        {
            //When
            var result = Rsi.RsiSingle(descending_data, period: 10);

            //Then
            Assert.Null(result);
        }
예제 #2
0
        public void RsiSingle_SimpleValues_Calculated()
        {
            //When
            var result  = Rsi.RsiSingle(descending_data, period: 9);
            var result2 = Rsi.RsiSingle(ascending_data, period: 9);

            //Then
            Assert.Equal(0D, result);
            Assert.Equal(100D, result2);
        }
예제 #3
0
        public void RsiSingle_SimpleValues_Calculated(int period)
        {
            //When
            var result  = Rsi.RsiSingle(_descendingData, period);
            var result2 = Rsi.RsiSingle(_ascendingData, period);

            //Then
            Assert.Equal(0D, result);
            Assert.Equal(100D, result2);
        }