mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
strategy/supertrend: only show nterval profit report in backtesting
This commit is contained in:
parent
b133767e47
commit
5455ae810b
|
@ -334,10 +334,14 @@ func (s *Strategy) Run(ctx context.Context, orderExecutor bbgo.OrderExecutor, se
|
||||||
if s.TradeStats == nil {
|
if s.TradeStats == nil {
|
||||||
s.TradeStats = types.NewTradeStats(s.Symbol)
|
s.TradeStats = types.NewTradeStats(s.Symbol)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Interval profit report
|
||||||
|
if bbgo.IsBackTesting {
|
||||||
startTime := s.Environment.StartTime()
|
startTime := s.Environment.StartTime()
|
||||||
s.TradeStats.SetIntervalProfitCollector(types.NewIntervalProfitCollector(types.Interval1d, startTime))
|
s.TradeStats.SetIntervalProfitCollector(types.NewIntervalProfitCollector(types.Interval1d, startTime))
|
||||||
s.TradeStats.SetIntervalProfitCollector(types.NewIntervalProfitCollector(types.Interval1w, startTime))
|
s.TradeStats.SetIntervalProfitCollector(types.NewIntervalProfitCollector(types.Interval1w, startTime))
|
||||||
s.TradeStats.SetIntervalProfitCollector(types.NewIntervalProfitCollector(types.Interval1mo, startTime))
|
s.TradeStats.SetIntervalProfitCollector(types.NewIntervalProfitCollector(types.Interval1mo, startTime))
|
||||||
|
}
|
||||||
|
|
||||||
// Set fee rate
|
// Set fee rate
|
||||||
if s.session.MakerFeeRate.Sign() > 0 || s.session.TakerFeeRate.Sign() > 0 {
|
if s.session.MakerFeeRate.Sign() > 0 || s.session.TakerFeeRate.Sign() > 0 {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user