mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 23:05:15 +00:00
grid2: add isCompleteGridOrderBook doc comment
This commit is contained in:
parent
72b6f73cb6
commit
a75bc2e590
|
@ -1524,6 +1524,7 @@ func (s *Strategy) replayOrderHistory(ctx context.Context, grid *Grid, orderBook
|
|||
return nil
|
||||
}
|
||||
|
||||
// isCompleteGridOrderBook checks if the number of open orders == gridNum - 1 and all orders are active order
|
||||
func isCompleteGridOrderBook(orderBook *bbgo.ActiveOrderBook, gridNum int64) bool {
|
||||
tmpOrders := orderBook.Orders()
|
||||
return len(tmpOrders) == int(gridNum)-1 && types.OrdersAll(tmpOrders, types.IsActiveOrder)
|
||||
|
|
Loading…
Reference in New Issue
Block a user