mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-25 16:25:16 +00:00
add priceVolume helper InQuote
This commit is contained in:
parent
97c48e5bb4
commit
cbf957c7ce
|
@ -12,6 +12,10 @@ type PriceVolume struct {
|
|||
Price, Volume fixedpoint.Value
|
||||
}
|
||||
|
||||
func (p PriceVolume) InQuote() fixedpoint.Value {
|
||||
return p.Price.Mul(p.Volume)
|
||||
}
|
||||
|
||||
func (p PriceVolume) Equals(b PriceVolume) bool {
|
||||
return p.Price.Eq(b.Price) && p.Volume.Eq(b.Volume)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user