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