diff --git a/pkg/report/profit_stats_tracker.go b/pkg/report/profit_stats_tracker.go index 7330cf16f..1f61cacd6 100644 --- a/pkg/report/profit_stats_tracker.go +++ b/pkg/report/profit_stats_tracker.go @@ -25,8 +25,8 @@ func (p *ProfitStatsTracker) Subscribe(session *bbgo.ExchangeSession, symbol str session.Subscribe(types.KLineChannel, symbol, types.SubscribeOptions{Interval: p.Interval}) } -// InitOld is for backward capability. ps is the ProfitStats of the strategy, Market is the strategy Market -func (p *ProfitStatsTracker) InitOld(market types.Market, ps **types.ProfitStats, ts *types.TradeStats) { +// InitLegacy is for backward capability. ps is the ProfitStats of the strategy, Market is the strategy Market +func (p *ProfitStatsTracker) InitLegacy(market types.Market, ps **types.ProfitStats, ts *types.TradeStats) { p.Market = market if *ps == nil { @@ -46,7 +46,7 @@ func (p *ProfitStatsTracker) InitOld(market types.Market, ps **types.ProfitStats // Init initialize the tracker with the given Market func (p *ProfitStatsTracker) Init(market types.Market, ts *types.TradeStats) { ps := types.NewProfitStats(p.Market) - p.InitOld(market, &ps, ts) + p.InitLegacy(market, &ps, ts) } func (p *ProfitStatsTracker) Bind(session *bbgo.ExchangeSession, tradeCollector *core.TradeCollector) { diff --git a/pkg/strategy/supertrend/strategy.go b/pkg/strategy/supertrend/strategy.go index ea5764a77..a0942b064 100644 --- a/pkg/strategy/supertrend/strategy.go +++ b/pkg/strategy/supertrend/strategy.go @@ -358,7 +358,7 @@ func (s *Strategy) Run(ctx context.Context, orderExecutor bbgo.OrderExecutor, se // Setup profit tracker if s.ProfitStatsTracker != nil { if s.ProfitStatsTracker.CurrentProfitStats == nil { - s.ProfitStatsTracker.InitOld(s.Market, &s.ProfitStats, s.TradeStats) + s.ProfitStatsTracker.InitLegacy(s.Market, &s.ProfitStats, s.TradeStats) } // Add strategy parameters to report