diff --git a/config/supertrend.yaml b/config/supertrend.yaml index 99815245b..fe427a9b6 100644 --- a/config/supertrend.yaml +++ b/config/supertrend.yaml @@ -120,3 +120,4 @@ exchangeStrategies: profitMAWindow: 60 shortTermProfitWindow: 14 tsvReportPath: res.tsv + trackParameters: false diff --git a/pkg/strategy/supertrend/strategy.go b/pkg/strategy/supertrend/strategy.go index a0942b064..2cb789c52 100644 --- a/pkg/strategy/supertrend/strategy.go +++ b/pkg/strategy/supertrend/strategy.go @@ -39,7 +39,9 @@ type Strategy struct { ProfitStats *types.ProfitStats `persistence:"profit_stats"` TradeStats *types.TradeStats `persistence:"trade_stats"` + // ProfitStatsTracker tracks profit related status and generates report ProfitStatsTracker *report.ProfitStatsTracker `json:"profitStatsTracker"` + TrackParameters bool `json:"trackParameters"` // Symbol is the market symbol you want to trade Symbol string `json:"symbol"` @@ -362,7 +364,7 @@ func (s *Strategy) Run(ctx context.Context, orderExecutor bbgo.OrderExecutor, se } // Add strategy parameters to report - if s.ProfitStatsTracker.AccumulatedProfitReport != nil { + if s.TrackParameters && s.ProfitStatsTracker.AccumulatedProfitReport != nil { s.ProfitStatsTracker.AccumulatedProfitReport.AddStrategyParameter("window", fmt.Sprintf("%d", s.Window)) s.ProfitStatsTracker.AccumulatedProfitReport.AddStrategyParameter("multiplier", fmt.Sprintf("%f", s.SupertrendMultiplier)) s.ProfitStatsTracker.AccumulatedProfitReport.AddStrategyParameter("fastDEMA", fmt.Sprintf("%d", s.FastDEMAWindow))