mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-25 08:15:15 +00:00
Merge pull request #1349 from c9s/feature/grid2/remove-profit-entries
MINOR: remove profit entries from profit stats
This commit is contained in:
commit
7860bff379
|
@ -22,7 +22,6 @@ type GridProfitStats struct {
|
||||||
TotalFee map[string]fixedpoint.Value `json:"totalFee,omitempty"`
|
TotalFee map[string]fixedpoint.Value `json:"totalFee,omitempty"`
|
||||||
Volume fixedpoint.Value `json:"volume,omitempty"`
|
Volume fixedpoint.Value `json:"volume,omitempty"`
|
||||||
Market types.Market `json:"market,omitempty"`
|
Market types.Market `json:"market,omitempty"`
|
||||||
ProfitEntries []*GridProfit `json:"profitEntries,omitempty"`
|
|
||||||
Since *time.Time `json:"since,omitempty"`
|
Since *time.Time `json:"since,omitempty"`
|
||||||
InitialOrderID uint64 `json:"initialOrderID"`
|
InitialOrderID uint64 `json:"initialOrderID"`
|
||||||
}
|
}
|
||||||
|
@ -38,7 +37,6 @@ func newGridProfitStats(market types.Market) *GridProfitStats {
|
||||||
TotalFee: make(map[string]fixedpoint.Value),
|
TotalFee: make(map[string]fixedpoint.Value),
|
||||||
Volume: fixedpoint.Zero,
|
Volume: fixedpoint.Zero,
|
||||||
Market: market,
|
Market: market,
|
||||||
ProfitEntries: nil,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,8 +67,6 @@ func (s *GridProfitStats) AddProfit(profit *GridProfit) {
|
||||||
case s.Market.BaseCurrency:
|
case s.Market.BaseCurrency:
|
||||||
s.TotalBaseProfit = s.TotalBaseProfit.Add(profit.Profit)
|
s.TotalBaseProfit = s.TotalBaseProfit.Add(profit.Profit)
|
||||||
}
|
}
|
||||||
|
|
||||||
s.ProfitEntries = append(s.ProfitEntries, profit)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *GridProfitStats) SlackAttachment() slack.Attachment {
|
func (s *GridProfitStats) SlackAttachment() slack.Attachment {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user