### Question:
PercentagePriceOscillator extends SingleValueIndicator { @Override public double getValue() { return value; } PercentagePriceOscillator(TimeInterval interval);  PercentagePriceOscillator(int shortBarCount, int longBarCount, int signalBarCount, TimeInterval interval);  PercentagePriceOscillator(int shortBarCount, int longBarCount, int signalBarCount, TimeInterval interval, ToDoubleFunction<Candle> valueGetter); @Override double getValue(); double getSignal(); double getHistogram();  }### Answer:
@Test public void ppo() { int i = 0; PercentagePriceOscillator indicator = new PercentagePriceOscillator(10, 20, 9, TimeInterval.minutes(1)); indicator.accumulate(CandleHelper.newCandle(i, values[i++])); indicator.accumulate(CandleHelper.newCandle(i, values[i++])); indicator.accumulate(CandleHelper.newCandle(i, values[i++])); indicator.accumulate(CandleHelper.newCandle(i, values[i++])); indicator.accumulate(CandleHelper.newCandle(i, values[i++])); indicator.accumulate(CandleHelper.newCandle(i, values[i++])); indicator.accumulate(CandleHelper.newCandle(i, values[i++])); indicator.accumulate(CandleHelper.newCandle(i, values[i++])); indicator.accumulate(CandleHelper.newCandle(i, values[i++])); indicator.accumulate(CandleHelper.newCandle(i, values[i++])); indicator.accumulate(CandleHelper.newCandle(i, values[i++])); indicator.accumulate(CandleHelper.newCandle(i, values[i++])); indicator.accumulate(CandleHelper.newCandle(i, values[i++])); indicator.accumulate(CandleHelper.newCandle(i, values[i++])); indicator.accumulate(CandleHelper.newCandle(i, values[i++])); indicator.accumulate(CandleHelper.newCandle(i, values[i++])); indicator.accumulate(CandleHelper.newCandle(i, values[i++])); indicator.accumulate(CandleHelper.newCandle(i, values[i++])); indicator.accumulate(CandleHelper.newCandle(i, values[i++])); indicator.accumulate(CandleHelper.newCandle(i, values[i++])); indicator.accumulate(CandleHelper.newCandle(i, values[i++])); indicator.accumulate(CandleHelper.newCandle(i, values[i++])); assertEquals(1.6778, indicator.getValue(), 0.001); indicator.accumulate(CandleHelper.newCandle(i, values[i++])); assertEquals(1.5669, indicator.getValue(), 0.001); indicator.accumulate(CandleHelper.newCandle(i, values[i++])); assertEquals(1.2884, indicator.getValue(), 0.001); indicator.accumulate(CandleHelper.newCandle(i, values[i++])); indicator.accumulate(CandleHelper.newCandle(i, values[i++])); indicator.accumulate(CandleHelper.newCandle(i, values[i++])); indicator.accumulate(CandleHelper.newCandle(i, values[i++])); indicator.accumulate(CandleHelper.newCandle(i, values[i++])); assertEquals(-0.292, indicator.getValue(), 0.001); indicator.accumulate(CandleHelper.newCandle(i, values[i++])); assertEquals(-1.3088, indicator.getValue(), 0.01); }