mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
fix stopEMA range check
This commit is contained in:
parent
83d6f4764c
commit
4bb2e4a25f
|
@ -337,7 +337,7 @@ func (s *Strategy) Run(ctx context.Context, orderExecutor bbgo.OrderExecutor, se
|
|||
log.Infof("%s breakLow signal detected, closed price %f < breakPrice %f", kline.Symbol, closePrice.Float64(), breakPrice.Float64())
|
||||
|
||||
// stop EMA protection
|
||||
if s.stopEWMA != nil && !s.BreakLow.StopEMARange.IsZero() {
|
||||
if s.stopEWMA != nil {
|
||||
ema := fixedpoint.NewFromFloat(s.stopEWMA.Last())
|
||||
if ema.IsZero() {
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue
Block a user