예제 #1
0
파일: Order.cs 프로젝트: TzarIvan/ratel
 public Order(String description, Symbol symbol, OrderDetails details, Direction direction, long size, OrderDuration duration)
 {
     this.description = description;
     this.symbol      = symbol;
     this.details     = details;
     this.size        = size;
     this.duration    = duration;
     this.direction   = direction;
     stack            = reDebug() ? Environment.StackTrace : "locked";
     Bomb.when(size <= 0, () => "size must be > 0: " + this);
     Bomb.when(size > MAX_TRADE_SIZE, () => "size must be < 1 trillion (for now - expand if this is not an error): " + this);
     duration.requireSupported(details);
     id = nextIdentifier++;
 }