| .calcPosAvgCost | R Documentation | 
Calculates the average cost of a resulting position from a transaction
.calcPosAvgCost(PrevPosQty, PrevPosAvgCost, TxnValue, PosQty, ConMult = 1)
| PrevPosQty | quantity of the previous position | 
| PrevPosAvgCost | average position cost of the previous position | 
| TxnValue | total value of the transaction, including fees | 
| PosQty | total units (shares) of the resulting position | 
| ConMult | multiplier from instrument data | 
PosAvgCost: average cost of the resulting position
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.