mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 00:35:15 +00:00
fix method name
This commit is contained in:
parent
c92c395f67
commit
2392fddc3c
|
@ -21,7 +21,7 @@ func NewBboMonitor() *BboMonitor {
|
||||||
return &BboMonitor{}
|
return &BboMonitor{}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *BboMonitor) OnUpdateFromBook(book *types.StreamOrderBook) bool {
|
func (m *BboMonitor) UpdateFromBook(book *types.StreamOrderBook) bool {
|
||||||
bestBid, ok1 := book.BestBid()
|
bestBid, ok1 := book.BestBid()
|
||||||
bestAsk, ok2 := book.BestAsk()
|
bestAsk, ok2 := book.BestAsk()
|
||||||
if !ok1 || !ok2 {
|
if !ok1 || !ok2 {
|
||||||
|
|
|
@ -276,7 +276,7 @@ func (e *FixedQuantityExecutor) orderUpdater(ctx context.Context) {
|
||||||
return
|
return
|
||||||
|
|
||||||
case <-e.orderBook.C:
|
case <-e.orderBook.C:
|
||||||
changed := monitor.OnUpdateFromBook(e.orderBook)
|
changed := monitor.UpdateFromBook(e.orderBook)
|
||||||
if !changed {
|
if !changed {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
@ -293,7 +293,7 @@ func (e *FixedQuantityExecutor) orderUpdater(ctx context.Context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
case <-ticker.C:
|
case <-ticker.C:
|
||||||
changed := monitor.OnUpdateFromBook(e.orderBook)
|
changed := monitor.UpdateFromBook(e.orderBook)
|
||||||
if !changed {
|
if !changed {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user