mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 06:53:52 +00:00
schedule: add interval check
This commit is contained in:
parent
7016d24fad
commit
f0503b99a1
|
@ -94,6 +94,10 @@ func (s *Strategy) Run(ctx context.Context, orderExecutor bbgo.OrderExecutor, se
|
|||
return
|
||||
}
|
||||
|
||||
if kline.Interval != s.Interval {
|
||||
return
|
||||
}
|
||||
|
||||
closePrice := fixedpoint.NewFromFloat(kline.Close)
|
||||
quantity := s.Quantity
|
||||
amount := s.Amount
|
||||
|
@ -136,7 +140,7 @@ func (s *Strategy) Run(ctx context.Context, orderExecutor bbgo.OrderExecutor, se
|
|||
}
|
||||
|
||||
if !match {
|
||||
s.Notifiability.Notify("skip, the closed price is below or above moving average")
|
||||
s.Notifiability.Notify("skip, the %s closed price is below or above moving average", s.Symbol)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user