Skip to content

Commit

Permalink
pivotshort: remove the legacy support take profit
Browse files Browse the repository at this point in the history
  • Loading branch information
c9s committed Aug 30, 2022
1 parent 251d1b7 commit ca1e9e9
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions pkg/strategy/pivotshort/strategy.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ type Strategy struct {
// ResistanceShort is one of the entry method
ResistanceShort *ResistanceShort `json:"resistanceShort"`

SupportTakeProfit []*bbgo.SupportTakeProfit `json:"supportTakeProfit"`

ExitMethods bbgo.ExitMethodSet `json:"exits"`

session *bbgo.ExchangeSession
Expand Down Expand Up @@ -80,12 +78,6 @@ func (s *Strategy) Subscribe(session *bbgo.ExchangeSession) {
s.BreakLow.Subscribe(session)
}

for i := range s.SupportTakeProfit {
m := s.SupportTakeProfit[i]
dynamic.InheritStructValues(m, s)
m.Subscribe(session)
}

if !bbgo.IsBackTesting {
session.Subscribe(types.MarketTradeChannel, s.Symbol, types.SubscribeOptions{})
}
Expand Down Expand Up @@ -157,10 +149,6 @@ func (s *Strategy) Run(ctx context.Context, orderExecutor bbgo.OrderExecutor, se
s.BreakLow.Bind(session, s.orderExecutor)
}

for i := range s.SupportTakeProfit {
s.SupportTakeProfit[i].Bind(session, s.orderExecutor)
}

bbgo.OnShutdown(func(ctx context.Context, wg *sync.WaitGroup) {
defer wg.Done()

Expand Down

0 comments on commit ca1e9e9

Please sign in to comment.