xmaker: apply math.Abs on signal for margin scale

This commit is contained in:
c9s 2024-08-30 22:38:35 +08:00
parent b87213827e
commit d501e8ff4d
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -276,7 +276,7 @@ func (s *Strategy) applySignalMargin(ctx context.Context, quote *Quote) error {
return err return err
} }
margin := scale.Call(signal) margin := scale.Call(math.Abs(signal))
s.logger.Infof("signal margin: %f", margin) s.logger.Infof("signal margin: %f", margin)