diff --git a/pkg/strategy/atrpin/strategy.go b/pkg/strategy/atrpin/strategy.go index bc2529f61..dae310db7 100644 --- a/pkg/strategy/atrpin/strategy.go +++ b/pkg/strategy/atrpin/strategy.go @@ -38,7 +38,9 @@ type Strategy struct { } func (s *Strategy) Initialize() error { - s.Strategy = &common.Strategy{} + if s.Strategy == nil { + s.Strategy = &common.Strategy{} + } return nil } diff --git a/pkg/strategy/random/strategy.go b/pkg/strategy/random/strategy.go index cb62667af..1d9544032 100644 --- a/pkg/strategy/random/strategy.go +++ b/pkg/strategy/random/strategy.go @@ -42,7 +42,9 @@ func (s *Strategy) Defaults() error { } func (s *Strategy) Initialize() error { - s.Strategy = &common.Strategy{} + if s.Strategy == nil { + s.Strategy = &common.Strategy{} + } return nil } diff --git a/pkg/strategy/wall/strategy.go b/pkg/strategy/wall/strategy.go index 39ef033f9..58ef15bc0 100644 --- a/pkg/strategy/wall/strategy.go +++ b/pkg/strategy/wall/strategy.go @@ -65,7 +65,9 @@ type Strategy struct { } func (s *Strategy) Initialize() error { - s.Strategy = &common.Strategy{} + if s.Strategy == nil { + s.Strategy = &common.Strategy{} + } return nil } diff --git a/pkg/strategy/xfixedmaker/strategy.go b/pkg/strategy/xfixedmaker/strategy.go index 01b10b8c4..fe7e2a855 100644 --- a/pkg/strategy/xfixedmaker/strategy.go +++ b/pkg/strategy/xfixedmaker/strategy.go @@ -55,7 +55,9 @@ func (s *Strategy) Defaults() error { } func (s *Strategy) Initialize() error { - s.Strategy = &common.Strategy{} + if s.Strategy == nil { + s.Strategy = &common.Strategy{} + } return nil }