@Test void afterNoGainNoLoss() { OrderBook book = OrderBook.builder().bestSell(1.0).build(); binance.setMinOrder(BigDecimal.TEN); FeeFitted fitted = fitter.after(book, binance); assertThat(fitted.getSellPrice()).isEqualByComparingTo("1.0020031"); assertThat(fitted.getBuyPrice()).isEqualByComparingTo("1"); assertThat(fitted.getSellAmount()).isEqualByComparingTo("9.99"); assertThat(fitted.getBuyAmount()).isEqualByComparingTo("10.00"); assertThat(fitted.getAmount()).isEqualByComparingTo("9.995"); assertThat(fitted.getProfitFrom()).isEqualByComparingTo("0.0"); assertThat(fitted.getProfitTo()).isEqualByComparingTo("9.58E-7"); }
@Override public FeeFitted after(OrderBook book, ClientConfig config) { if (Util.canUseNoLoss(config)) { return afterNoLoss(book, config); } return afterLoss(book, config); }
BuyLowSellHighFitter implements Fitter { @Override public FeeFitted after(OrderBook book, ClientConfig config) { if (Util.canUseNoLoss(config)) { return afterNoLoss(book, config); } return afterLoss(book, config); } }
BuyLowSellHighFitter implements Fitter { @Override public FeeFitted after(OrderBook book, ClientConfig config) { if (Util.canUseNoLoss(config)) { return afterNoLoss(book, config); } return afterLoss(book, config); }  }
BuyLowSellHighFitter 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); }
BuyLowSellHighFitter 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);  }