@Test void afterGainLoss() { OrderBook book = OrderBook.builder().bestBuy(1.0).build(); nnBinance.setFuturePriceGainPct(BigDecimal.ONE); FeeFitted fitted = fitter.after(book, binance); assertThat(fitted.getBuyPrice()).isEqualByComparingTo("0.9891089"); assertThat(fitted.getSellPrice()).isEqualByComparingTo("1"); assertThat(fitted.getBuyAmount()).isEqualByComparingTo("1"); assertThat(fitted.getSellAmount()).isEqualByComparingTo("1"); assertThat(fitted.getAmount()).isEqualByComparingTo("1"); assertThat(fitted.getProfitFrom()).isEqualByComparingTo("-0.001"); assertThat(fitted.getProfitTo()).isEqualByComparingTo("0.0098911"); }
@Override public FeeFitted after(OrderBook book, ClientConfig config) { if (Util.canUseNoLoss(config)) { return afterNoLoss(book, config); } return afterLoss(book, config); }
SellHighBuyLowFitter implements Fitter { @Override public FeeFitted after(OrderBook book, ClientConfig config) { if (Util.canUseNoLoss(config)) { return afterNoLoss(book, config); } return afterLoss(book, config); } }
SellHighBuyLowFitter implements Fitter { @Override public FeeFitted after(OrderBook book, ClientConfig config) { if (Util.canUseNoLoss(config)) { return afterNoLoss(book, config); } return afterLoss(book, config); }  }
SellHighBuyLowFitter implements Fitter { @Override public FeeFitted after(OrderBook book, ClientConfig config) { if (Util.canUseNoLoss(config)) { return afterNoLoss(book, config); } return afterLoss(book, config); }  @Override FeeFitted after(OrderBook book, ClientConfig config); @Override FeeFitted before(OrderBook book, ClientConfig config); }
SellHighBuyLowFitter implements Fitter { @Override public FeeFitted after(OrderBook book, ClientConfig config) { if (Util.canUseNoLoss(config)) { return afterNoLoss(book, config); } return afterLoss(book, config); }  @Override FeeFitted after(OrderBook book, ClientConfig config); @Override FeeFitted before(OrderBook book, ClientConfig config);  }