@Test public void passesClosePriceOfMarketDataToSmoother() { final Stream<MarketData> marketData = Arrays.stream(new double[] {1.42128, 1.42032, 1.42142}).mapToObj(BasicMarketData::new); marketData.forEach(candle -> cut.indicate(candle)); verify(smoother).smooth(new Price(1.42128)); verify(smoother).smooth(new Price(1.42032)); verify(smoother).smooth(new Price(1.42142)); }
@Override public Optional<Price> indicate(final MP marketPrice) { return priceSmoother.smooth(marketPrice.getClose()); }
SmoothedPriceIndicator implements Indicator<Price, MP> { @Override public Optional<Price> indicate(final MP marketPrice) { return priceSmoother.smooth(marketPrice.getClose()); } }
SmoothedPriceIndicator implements Indicator<Price, MP> { @Override public Optional<Price> indicate(final MP marketPrice) { return priceSmoother.smooth(marketPrice.getClose()); } SmoothedPriceIndicator(final Smoother<Price> priceSmoother); }
SmoothedPriceIndicator implements Indicator<Price, MP> { @Override public Optional<Price> indicate(final MP marketPrice) { return priceSmoother.smooth(marketPrice.getClose()); } SmoothedPriceIndicator(final Smoother<Price> priceSmoother); @Override Optional<Price> indicate(final MP marketPrice); }
SmoothedPriceIndicator implements Indicator<Price, MP> { @Override public Optional<Price> indicate(final MP marketPrice) { return priceSmoother.smooth(marketPrice.getClose()); } SmoothedPriceIndicator(final Smoother<Price> priceSmoother); @Override Optional<Price> indicate(final MP marketPrice);  }