Why not use a simple average?
A small fill and a large fill should not carry equal weight. The calculation multiplies every price by its quantity. It excludes unfilled quantity and does not use the original limit price.
What remains outside the result?
Trading fees, slippage outside the supplied fills, taxes and any later conversion are separate. Use the original trade-history lines for reconciliation.
Privacy: No inputs are sent or stored by Tallypier.