From 2ed5095ffb9502f8714349adfd81b2a48c9da231 Mon Sep 17 00:00:00 2001 From: Andy Cheng Date: Thu, 15 Jun 2023 17:35:52 +0800 Subject: [PATCH] feature/profitReport: pass 0 to Last() --- pkg/report/profit_report.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/report/profit_report.go b/pkg/report/profit_report.go index e3faaa50f..9d39b3278 100644 --- a/pkg/report/profit_report.go +++ b/pkg/report/profit_report.go @@ -122,7 +122,7 @@ func (r *AccumulatedProfitReport) DailyUpdate(tradeStats *types.TradeStats) { // Accumulated profit MA r.accumulatedProfitMA.Update(r.accumulatedProfit.Float64()) - r.accumulatedProfitMAPerDay.Update(r.accumulatedProfitMA.Last()) + r.accumulatedProfitMAPerDay.Update(r.accumulatedProfitMA.Last(0)) // Accumulated Fee r.accumulatedFeePerDay.Update(r.accumulatedFee.Float64())