mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
types/tradeStats: call updates when marshalling
This commit is contained in:
parent
d12df59c1b
commit
950e998ed1
|
@ -390,6 +390,7 @@ func (s *TradeStats) add(profit *Profit) {
|
|||
|
||||
// Output TradeStats without Profits and Losses
|
||||
func (s *TradeStats) BriefString() string {
|
||||
s.update()
|
||||
out, _ := yaml.Marshal(&TradeStats{
|
||||
Symbol: s.Symbol,
|
||||
WinningRatio: s.WinningRatio,
|
||||
|
@ -413,6 +414,7 @@ func (s *TradeStats) BriefString() string {
|
|||
}
|
||||
|
||||
func (s *TradeStats) String() string {
|
||||
s.update()
|
||||
out, _ := yaml.Marshal(s)
|
||||
return string(out)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user