@Test public void naNValuesInIntervall() { BarSeries series = new BaseBarSeriesBuilder().withNumTypeOf(numFunction).withName("NaN test").build(); for (long i = 10; i >= 0; i--) { Num minPrice = i % 2 == 0 ? series.numOf(i) : NaN; series.addBar(ZonedDateTime.now().plusDays(10 - i), NaN, NaN, minPrice, NaN, NaN); } series.addBar(ZonedDateTime.now().plusDays(11), NaN, NaN, series.numOf(10), NaN, NaN); AroonDownIndicator aroonDownIndicator = new AroonDownIndicator(series, 5); for (int i = series.getBeginIndex(); i <= series.getEndIndex(); i++) { if (i % 2 != 0 && i < 11) { assertEquals(NaN.toString(), aroonDownIndicator.getValue(i).toString()); } else if (i < 11) assertNumEquals(series.numOf(100).toString(), aroonDownIndicator.getValue(i)); else assertNumEquals(series.numOf(80).toString(), aroonDownIndicator.getValue(i)); } }
@Override public String toString() { return getClass().getSimpleName() + " barCount: " + barCount; }
AroonDownIndicator extends CachedIndicator<Num> { @Override public String toString() { return getClass().getSimpleName() + " barCount: " + barCount; } }
AroonDownIndicator extends CachedIndicator<Num> { @Override public String toString() { return getClass().getSimpleName() + " barCount: " + barCount; } AroonDownIndicator(Indicator<Num> minValueIndicator, int barCount);  AroonDownIndicator(BarSeries series, int barCount); }
AroonDownIndicator extends CachedIndicator<Num> { @Override public String toString() { return getClass().getSimpleName() + " barCount: " + barCount; } AroonDownIndicator(Indicator<Num> minValueIndicator, int barCount);  AroonDownIndicator(BarSeries series, int barCount); @Override String toString(); }
AroonDownIndicator extends CachedIndicator<Num> { @Override public String toString() { return getClass().getSimpleName() + " barCount: " + barCount; } AroonDownIndicator(Indicator<Num> minValueIndicator, int barCount);  AroonDownIndicator(BarSeries series, int barCount); @Override String toString();  }