mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 06:53:52 +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
|
Price, Volume fixedpoint.Value
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (p PriceVolume) InQuote() fixedpoint.Value {
|
||||||
|
return p.Price.Mul(p.Volume)
|
||||||
|
}
|
||||||
|
|
||||||
func (p PriceVolume) Equals(b PriceVolume) bool {
|
func (p PriceVolume) Equals(b PriceVolume) bool {
|
||||||
return p.Price.Eq(b.Price) && p.Volume.Eq(b.Volume)
|
return p.Price.Eq(b.Price) && p.Volume.Eq(b.Volume)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user