Exemple #1
0
        public void AverageGain_PeriodBiggerOrEqualToDataLength_ReturnZero()
        {
            //When
            var result = Rsi.AverageGain(ascending_data, period: 10);

            //Then
            Assert.Equal(0, result);
        }
Exemple #2
0
        public void AverageGain_Must_Return_Zero_On_Descending_Values(int period, double expected)
        {
            //When
            var result = Rsi.AverageGain(_descendingData, period);

            //Then
            Assert.Equal(expected, result);
        }
Exemple #3
0
        public void AverageGain_SimpleValues_Calculated()
        {
            //When
            var result = Rsi.AverageGain(ascending_data, period: 9);

            //Then
            Assert.Equal(1, result);
        }
Exemple #4
0
        public void AverageGain_SimpleValues_Calculated(int period, double expected)
        {
            //When
            var result = Rsi.AverageGain(_ascendingData, period);

            //Then
            Assert.Equal(expected, result);
        }