From ec80cbfd9f852d731cef50cc590c2a4127f14d58 Mon Sep 17 00:00:00 2001 From: c9s Date: Fri, 30 Aug 2024 17:52:28 +0800 Subject: [PATCH] xmaker: check 0.0 --- pkg/strategy/xmaker/strategy.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/strategy/xmaker/strategy.go b/pkg/strategy/xmaker/strategy.go index db4d29a5c..879df048b 100644 --- a/pkg/strategy/xmaker/strategy.go +++ b/pkg/strategy/xmaker/strategy.go @@ -267,6 +267,10 @@ func (s *Strategy) applySignalMargin(ctx context.Context, quote *Quote) error { s.logger.Infof("aggregated signal: %f", signal) + if signal == 0.0 { + return nil + } + scale, err := s.SignalMarginScale.Scale() if err != nil { return err