public void keltnerChannelLowerIndicatorTest() { KeltnerChannelMiddleIndicator km = new KeltnerChannelMiddleIndicator(new ClosePriceIndicator(data), 14); KeltnerChannelLowerIndicator kl = new KeltnerChannelLowerIndicator(km, 2M, 14); Assert.AreEqual(kl.GetValue(13), 11556.546828177248809366105958M); Assert.AreEqual(kl.GetValue(14), 11583.797147329798362389943100M); Assert.AreEqual(kl.GetValue(15), 11610.833193244661589705412580M); Assert.AreEqual(kl.GetValue(16), 11639.595504545245219404953137M); Assert.AreEqual(kl.GetValue(17), 11667.087788358141138359298126M); Assert.AreEqual(kl.GetValue(18), 11660.561980680346509914372921M); Assert.AreEqual(kl.GetValue(19), 11675.878240399832294547605752M); Assert.AreEqual(kl.GetValue(20), 11705.949723313134356518658785M); Assert.AreEqual(kl.GetValue(21), 11726.720871721333307757090428M); Assert.AreEqual(kl.GetValue(22), 11753.415454281061670346522651M); Assert.AreEqual(kl.GetValue(23), 11781.837518776452003379479796M); Assert.AreEqual(kl.GetValue(24), 11817.147680024871347550007404M); Assert.AreEqual(kl.GetValue(25), 11851.977117600743378358193839M); Assert.AreEqual(kl.GetValue(26), 11878.613978148938075738513456M); Assert.AreEqual(kl.GetValue(27), 11904.457032798209636242308639M); Assert.AreEqual(kl.GetValue(28), 11935.390757417878562207340871M); Assert.AreEqual(kl.GetValue(29), 11952.201223826870425843892134M); }
public void keltnerChannelLowerIndicatorTest() { var km = new KeltnerChannelMiddleIndicator(new ClosePriceIndicator(_data), 14); var kl = new KeltnerChannelLowerIndicator(km, Decimal.ValueOf(2), 14); TaTestsUtils.AssertDecimalEquals(kl.GetValue(13), 11645.2878); TaTestsUtils.AssertDecimalEquals(kl.GetValue(14), 11666.9952); TaTestsUtils.AssertDecimalEquals(kl.GetValue(15), 11688.7782); TaTestsUtils.AssertDecimalEquals(kl.GetValue(16), 11712.5707); TaTestsUtils.AssertDecimalEquals(kl.GetValue(17), 11735.3684); TaTestsUtils.AssertDecimalEquals(kl.GetValue(18), 11724.4143); TaTestsUtils.AssertDecimalEquals(kl.GetValue(19), 11735.5588); TaTestsUtils.AssertDecimalEquals(kl.GetValue(20), 11761.7046); TaTestsUtils.AssertDecimalEquals(kl.GetValue(21), 11778.7855); TaTestsUtils.AssertDecimalEquals(kl.GetValue(22), 11802.0144); TaTestsUtils.AssertDecimalEquals(kl.GetValue(23), 11827.1846); TaTestsUtils.AssertDecimalEquals(kl.GetValue(24), 11859.4459); TaTestsUtils.AssertDecimalEquals(kl.GetValue(25), 11891.4189); TaTestsUtils.AssertDecimalEquals(kl.GetValue(26), 11915.3814); TaTestsUtils.AssertDecimalEquals(kl.GetValue(27), 11938.7221); TaTestsUtils.AssertDecimalEquals(kl.GetValue(28), 11967.3156); TaTestsUtils.AssertDecimalEquals(kl.GetValue(29), 11981.9387); }