src/main/java/xdean/graduation/model/Repo.java
public int open(double position) {
    position = MathUtil.toRange(position, -1d, 1d);
    return buy((int) ((getMaxHold() * position)) - hold) -
        sell((int) (getMaxHold() * (-position)) + hold);
  }
/**
   * Adjust position to assigned rate
   * 
   * @param position negative means short if can sell short
   * @return actual volume(lot), negative means sell
   */
Adjust position to assigned rate

@param position negative means short if can sell short
@return actual volume(lot), negative means sell
Adjust position to assigned rate @param position negative means short if can sell short @return actual volume ( lot ) negative means sell
public int open(double position) {
    position = MathUtil.toRange(position, -1d, 1d);
    return buy((int) ((getMaxHold() * position)) - hold) -
        sell((int) (getMaxHold() * (-position)) + hold);
  }
public int open ( double position ) { position = MathUtil . toRange ( position , - 1d , 1d ) ; return buy ( ( int ) ( ( getMaxHold ( ) * position ) ) - hold ) - sell ( ( int ) ( getMaxHold ( ) * ( - position ) ) + hold ) ; }
Adjust position to assigned rate
Adjust position to assigned rate