### Question:
DetrendedPriceOscillator extends SingleValueIndicator { @Override public double getValue() { return value; } DetrendedPriceOscillator(TimeInterval interval);  DetrendedPriceOscillator(int length, TimeInterval interval);  DetrendedPriceOscillator(int length, TimeInterval interval, ToDoubleFunction<Candle> valueGetter); @Override double getValue();  }### Answer:
@Test public void dpo() { int i = 0; DetrendedPriceOscillator indicator = new DetrendedPriceOscillator(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++])); assertEquals(0.12, indicator.getValue(), 0.0001); indicator.accumulate(CandleHelper.newCandle(i, values[i++])); assertEquals(-0.028571428571424917, indicator.getValue(), 0.0001); indicator.accumulate(CandleHelper.newCandle(i, values[i++])); assertEquals(0.18000000000000327, indicator.getValue(), 0.0001); indicator.accumulate(CandleHelper.newCandle(i, values[i++])); assertEquals(0.16666666666666785, indicator.getValue(), 0.0001); }