feature/profitReport: pass 0 to Last()

This commit is contained in:
Andy Cheng 2023-06-15 17:35:52 +08:00
parent 6b46b1e01e
commit 2ed5095ffb
No known key found for this signature in database
GPG Key ID: 936427CF651A9D28

View File

@ -122,7 +122,7 @@ func (r *AccumulatedProfitReport) DailyUpdate(tradeStats *types.TradeStats) {
// Accumulated profit MA // Accumulated profit MA
r.accumulatedProfitMA.Update(r.accumulatedProfit.Float64()) r.accumulatedProfitMA.Update(r.accumulatedProfit.Float64())
r.accumulatedProfitMAPerDay.Update(r.accumulatedProfitMA.Last()) r.accumulatedProfitMAPerDay.Update(r.accumulatedProfitMA.Last(0))
// Accumulated Fee // Accumulated Fee
r.accumulatedFeePerDay.Update(r.accumulatedFee.Float64()) r.accumulatedFeePerDay.Update(r.accumulatedFee.Float64())