mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
Merge pull request #1723 from c9s/c9s/xmaker/add-signals
FIX: [xmaker] avoid calculate margin from 0.0 signal
This commit is contained in:
commit
b87213827e
|
@ -267,6 +267,10 @@ func (s *Strategy) applySignalMargin(ctx context.Context, quote *Quote) error {
|
||||||
|
|
||||||
s.logger.Infof("aggregated signal: %f", signal)
|
s.logger.Infof("aggregated signal: %f", signal)
|
||||||
|
|
||||||
|
if signal == 0.0 {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
scale, err := s.SignalMarginScale.Scale()
|
scale, err := s.SignalMarginScale.Scale()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in New Issue
Block a user