mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-21 22:43:52 +00:00
xdepthmaker: add fullReplenishTicker
This commit is contained in:
parent
888a550c80
commit
25b04cb36c
|
@ -363,6 +363,9 @@ func (s *Strategy) CrossRun(
|
|||
posTicker := time.NewTicker(util.MillisecondsJitter(s.HedgeInterval.Duration(), 200))
|
||||
defer posTicker.Stop()
|
||||
|
||||
fullReplenishTicker := time.NewTicker(util.MillisecondsJitter(15*time.Minute, 200))
|
||||
defer fullReplenishTicker.Stop()
|
||||
|
||||
for {
|
||||
select {
|
||||
|
||||
|
@ -374,6 +377,9 @@ func (s *Strategy) CrossRun(
|
|||
log.Warnf("%s maker goroutine stopped, due to the cancelled context", s.Symbol)
|
||||
return
|
||||
|
||||
case <-fullReplenishTicker.C:
|
||||
s.updateQuote(ctx, 0)
|
||||
|
||||
case sig, ok := <-s.pricingBook.C:
|
||||
// when any book change event happened
|
||||
if !ok {
|
||||
|
|
Loading…
Reference in New Issue
Block a user