From 16eeeb852c34060b31dd17414723ddb3d28661ef Mon Sep 17 00:00:00 2001 From: c9s Date: Wed, 22 Jun 2022 13:31:25 +0800 Subject: [PATCH] rsmaker: drop the legacy persistence state --- pkg/strategy/rsmaker/strategy.go | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/pkg/strategy/rsmaker/strategy.go b/pkg/strategy/rsmaker/strategy.go index ed50d0189..b3db11c0b 100644 --- a/pkg/strategy/rsmaker/strategy.go +++ b/pkg/strategy/rsmaker/strategy.go @@ -264,26 +264,6 @@ func (s *Strategy) Resume(ctx context.Context) error { return nil } -// func (s *Strategy) EmergencyStop(ctx context.Context) error { -// // Close 100% position -// percentage, _ := fixedpoint.NewFromString("100%") -// err := s.ClosePosition(ctx, percentage) -// -// // Suspend strategy -// _ = s.Suspend(ctx) -// -// return err -// } - -func (s *Strategy) SaveState() error { - if err := s.Persistence.Save(s.state, ID, s.Symbol, stateKey); err != nil { - return err - } - - log.Infof("state is saved => %+v", s.state) - return nil -} - func (s *Strategy) getCurrentAllowedExposurePosition(bandPercentage float64) (fixedpoint.Value, error) { if s.DynamicExposurePositionScale != nil { v, err := s.DynamicExposurePositionScale.Scale(bandPercentage)