func NewOrderBook(actions chan *Action) *OrderBook {
	ob := new(OrderBook)
	ob.bid = 0
	ob.ask = MAX_PRICE
	ob.actions = actions
	ob.orderIndex = make(map[Hash]*Order)

	for i := range ob.prices {
		ob.prices[i] = new(PricePoint)
	}

	return ob
}
// NewOrderbook returns a default orderbook struct
NewOrderbook returns a default orderbook struct
// NewOrderbook returns a default orderbook struct
func NewOrderBook(actions chan *Action) *OrderBook {
	ob := new(OrderBook)
	ob.bid = 0
	ob.ask = MAX_PRICE
	ob.actions = actions
	ob.orderIndex = make(map[Hash]*Order)
	for i := range ob.prices {
		ob.prices[i] = new(PricePoint)
	}
	return ob
}
func NewOrderBook ( actions chan * Action ) * OrderBook { ob := new ( OrderBook ) ob . bid = 0 ob . ask = MAX_PRICE ob . actions = actions ob . orderIndex = make ( map [ Hash ] * Order ) for i := range ob . prices { ob . prices [ i ] = new ( PricePoint ) } return ob }
NewOrderbook returns a default orderbook struct
NewOrderbook returns a default orderbook struct