@Test public void keltnerChannelUpperIndicatorTest() { KeltnerChannelMiddleIndicator km = new KeltnerChannelMiddleIndicator(new ClosePriceIndicator(data), 14); KeltnerChannelUpperIndicator ku = new KeltnerChannelUpperIndicator(km, Decimal.valueOf(2), 14); assertDecimalEquals(ku.getValue(13), 11857.4642); assertDecimalEquals(ku.getValue(14), 11896.8619); assertDecimalEquals(ku.getValue(15), 11927.1486); assertDecimalEquals(ku.getValue(16), 11950.6832); assertDecimalEquals(ku.getValue(17), 11970.0729); assertDecimalEquals(ku.getValue(18), 11991.4828); assertDecimalEquals(ku.getValue(19), 12028.9281); assertDecimalEquals(ku.getValue(20), 12045.3761); assertDecimalEquals(ku.getValue(21), 12070.6204); assertDecimalEquals(ku.getValue(22), 12092.044); assertDecimalEquals(ku.getValue(23), 12124.1007); assertDecimalEquals(ku.getValue(24), 12160.508); assertDecimalEquals(ku.getValue(25), 12189.8451); assertDecimalEquals(ku.getValue(26), 12216.1915); assertDecimalEquals(ku.getValue(27), 12248.1771); assertDecimalEquals(ku.getValue(28), 12266.181); assertDecimalEquals(ku.getValue(29), 12280.8623); }
public KeltnerChannelUpperIndicator(KeltnerChannelMiddleIndicator keltnerMiddleIndicator, Decimal ratio, int timeFrameATR) { super(keltnerMiddleIndicator); this.ratio = ratio; this.keltnerMiddleIndicator = keltnerMiddleIndicator; averageTrueRangeIndicator = new AverageTrueRangeIndicator(keltnerMiddleIndicator.getTimeSeries(), timeFrameATR); }
KeltnerChannelUpperIndicator extends CachedIndicator<Decimal> { public KeltnerChannelUpperIndicator(KeltnerChannelMiddleIndicator keltnerMiddleIndicator, Decimal ratio, int timeFrameATR) { super(keltnerMiddleIndicator); this.ratio = ratio; this.keltnerMiddleIndicator = keltnerMiddleIndicator; averageTrueRangeIndicator = new AverageTrueRangeIndicator(keltnerMiddleIndicator.getTimeSeries(), timeFrameATR); } }
KeltnerChannelUpperIndicator extends CachedIndicator<Decimal> { public KeltnerChannelUpperIndicator(KeltnerChannelMiddleIndicator keltnerMiddleIndicator, Decimal ratio, int timeFrameATR) { super(keltnerMiddleIndicator); this.ratio = ratio; this.keltnerMiddleIndicator = keltnerMiddleIndicator; averageTrueRangeIndicator = new AverageTrueRangeIndicator(keltnerMiddleIndicator.getTimeSeries(), timeFrameATR); } KeltnerChannelUpperIndicator(KeltnerChannelMiddleIndicator keltnerMiddleIndicator, Decimal ratio, int timeFrameATR); }
KeltnerChannelUpperIndicator extends CachedIndicator<Decimal> { public KeltnerChannelUpperIndicator(KeltnerChannelMiddleIndicator keltnerMiddleIndicator, Decimal ratio, int timeFrameATR) { super(keltnerMiddleIndicator); this.ratio = ratio; this.keltnerMiddleIndicator = keltnerMiddleIndicator; averageTrueRangeIndicator = new AverageTrueRangeIndicator(keltnerMiddleIndicator.getTimeSeries(), timeFrameATR); } KeltnerChannelUpperIndicator(KeltnerChannelMiddleIndicator keltnerMiddleIndicator, Decimal ratio, int timeFrameATR);  }
KeltnerChannelUpperIndicator extends CachedIndicator<Decimal> { public KeltnerChannelUpperIndicator(KeltnerChannelMiddleIndicator keltnerMiddleIndicator, Decimal ratio, int timeFrameATR) { super(keltnerMiddleIndicator); this.ratio = ratio; this.keltnerMiddleIndicator = keltnerMiddleIndicator; averageTrueRangeIndicator = new AverageTrueRangeIndicator(keltnerMiddleIndicator.getTimeSeries(), timeFrameATR); } KeltnerChannelUpperIndicator(KeltnerChannelMiddleIndicator keltnerMiddleIndicator, Decimal ratio, int timeFrameATR);   }