src/main/java/xdean/graduation/handler/trader/TraderUtil.java
public void tradeByPosition(Repo repo, Order order, double position) {
    if (Double.isNaN(position) == false) {
      if (position > repo.getPosition()) {
        sellPrice(repo, order);
      } else {
        buyPrice(repo, order);
      }
      repo.open(position);
    }
    currentPrice(repo, order);
  }
/**
   * @param repo
   * @param order
   * @param position the position adjust to, do nothing if NaN
   */
@param repo
@param order
@param position the position adjust to, do nothing if NaN
@param repo @param order @param position the position adjust to do nothing if NaN
public void tradeByPosition(Repo repo, Order order, double position) {
    if (Double.isNaN(position) == false) {
      if (position > repo.getPosition()) {
        sellPrice(repo, order);
      } else {
        buyPrice(repo, order);
      }
      repo.open(position);
    }
    currentPrice(repo, order);
  }
public void tradeByPosition ( Repo repo , Order order , double position ) { if ( Double . isNaN ( position ) == false ) { if ( position > repo . getPosition ( ) ) { sellPrice ( repo , order ) ; } else { buyPrice ( repo , order ) ; } repo . open ( position ) ; } currentPrice ( repo , order ) ; }
@param repo
 @param order
 @param position the position adjust to, do nothing if NaN
@param repo @param order @param position the position adjust to do nothing if NaN