@Test public void naNValuesInIntervall() { BaseBarSeries series = new BaseBarSeries("NaN test"); for (long i = 0; i <= 10; i++) { Num maxPrice = i % 2 == 0 ? series.numOf(i) : NaN; series.addBar(ZonedDateTime.now().plusDays(i), NaN, maxPrice, NaN, NaN, NaN); } AroonUpIndicator aroonUpIndicator = new AroonUpIndicator(series, 5); for (int i = series.getBeginIndex(); i <= series.getEndIndex(); i++) { if (i % 2 != 0) { assertEquals(NaN.toString(), aroonUpIndicator.getValue(i).toString()); } else { assertNumEquals(aroonUpIndicator.getValue(i).toString(), series.numOf(100)); } } }
@Override public String toString() { return getClass().getSimpleName() + " barCount: " + barCount; }
AroonUpIndicator extends CachedIndicator<Num> { @Override public String toString() { return getClass().getSimpleName() + " barCount: " + barCount; } }
AroonUpIndicator extends CachedIndicator<Num> { @Override public String toString() { return getClass().getSimpleName() + " barCount: " + barCount; } AroonUpIndicator(Indicator<Num> maxValueIndicator, int barCount);  AroonUpIndicator(BarSeries series, int barCount); }
AroonUpIndicator extends CachedIndicator<Num> { @Override public String toString() { return getClass().getSimpleName() + " barCount: " + barCount; } AroonUpIndicator(Indicator<Num> maxValueIndicator, int barCount);  AroonUpIndicator(BarSeries series, int barCount); @Override String toString(); }
AroonUpIndicator extends CachedIndicator<Num> { @Override public String toString() { return getClass().getSimpleName() + " barCount: " + barCount; } AroonUpIndicator(Indicator<Num> maxValueIndicator, int barCount);  AroonUpIndicator(BarSeries series, int barCount); @Override String toString();  }