sS trading_directionToPositionType(double direction) { ret direction == 0 ? null : direction > 0 ? "long" : "short"; }