mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-25 16:25:16 +00:00
improve/profitStatsTracker: temporarily remove lines relate to time in profit stats
This commit is contained in:
parent
ae7ae27d82
commit
2ccce12cbf
|
@ -165,8 +165,8 @@ type ProfitStats struct {
|
||||||
TodayGrossLoss fixedpoint.Value `json:"todayGrossLoss,omitempty"`
|
TodayGrossLoss fixedpoint.Value `json:"todayGrossLoss,omitempty"`
|
||||||
TodaySince int64 `json:"todaySince,omitempty"`
|
TodaySince int64 `json:"todaySince,omitempty"`
|
||||||
|
|
||||||
startTime time.Time
|
//StartTime time.Time
|
||||||
endTime time.Time
|
//EndTime time.Time
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewProfitStats(market Market) *ProfitStats {
|
func NewProfitStats(market Market) *ProfitStats {
|
||||||
|
@ -185,8 +185,8 @@ func NewProfitStats(market Market) *ProfitStats {
|
||||||
TodayGrossProfit: fixedpoint.Zero,
|
TodayGrossProfit: fixedpoint.Zero,
|
||||||
TodayGrossLoss: fixedpoint.Zero,
|
TodayGrossLoss: fixedpoint.Zero,
|
||||||
TodaySince: 0,
|
TodaySince: 0,
|
||||||
startTime: time.Now().UTC(),
|
//StartTime: time.Now().UTC(),
|
||||||
endTime: time.Now().UTC(),
|
//EndTime: time.Now().UTC(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -229,7 +229,7 @@ func (s *ProfitStats) AddProfit(profit Profit) {
|
||||||
s.TodayGrossLoss = s.TodayGrossLoss.Add(profit.Profit)
|
s.TodayGrossLoss = s.TodayGrossLoss.Add(profit.Profit)
|
||||||
}
|
}
|
||||||
|
|
||||||
s.endTime = profit.TradedAt.UTC()
|
//s.EndTime = profit.TradedAt.UTC()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *ProfitStats) AddTrade(trade Trade) {
|
func (s *ProfitStats) AddTrade(trade Trade) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user