mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 01:01:56 +00:00
xdepthmaker: fix aggregatePrice quantity issue
This commit is contained in:
parent
b8fb2ac478
commit
35dabe8a72
|
@ -27,6 +27,6 @@ func aggregatePrice(pvs types.PriceVolumeSlice, requiredQuantity fixedpoint.Valu
|
|||
totalAmount = totalAmount.Add(pv.Volume.Mul(pv.Price))
|
||||
}
|
||||
|
||||
price = totalAmount.Div(requiredQuantity)
|
||||
price = totalAmount.Div(requiredQuantity.Sub(q))
|
||||
return price
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user