diff --git a/pkg/strategy/xdepthmaker/profitfixer.go b/pkg/strategy/xdepthmaker/profitfixer.go index 129792b15..cc27c69be 100644 --- a/pkg/strategy/xdepthmaker/profitfixer.go +++ b/pkg/strategy/xdepthmaker/profitfixer.go @@ -77,8 +77,11 @@ func (f *ProfitFixer) Fix(ctx context.Context, since, until time.Time, stats *ty allTrades = types.SortTradesAscending(allTrades) for _, trade := range allTrades { - stats.AddTrade(trade) - position.AddTrade(trade) + profit, netProfit, madeProfit := position.AddTrade(trade) + if madeProfit { + p := position.NewProfit(trade, profit, netProfit) + stats.AddProfit(p) + } } log.Infof("profitFixer done: profitStats and position are updated from %d trades", len(allTrades))