mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-21 22:43:52 +00:00
grid2: add stringer method on gridProfit
This commit is contained in:
parent
e29f3c50e8
commit
402b625126
|
@ -1,6 +1,7 @@
|
|||
package grid2
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/c9s/bbgo/pkg/fixedpoint"
|
||||
|
@ -13,3 +14,7 @@ type GridProfit struct {
|
|||
Time time.Time `json:"time"`
|
||||
Order types.Order `json:"order"`
|
||||
}
|
||||
|
||||
func (p *GridProfit) String() string {
|
||||
return fmt.Sprintf("GRID PROFIT: %f %s @ %s orderID %d", p.Profit.Float64(), p.Currency, p.Time.String(), p.Order.OrderID)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user