How is avg price calculated for MIS position

mnkartik
Supposingly i have done below trades

WIPRO MIS SELL 280.35 QTY=1
WIPRO MIS SELL 280.15 QTY=1
WIPRO MIS BUY 280.20 QTY=3

Which would lead to having +1 qty left in position. What would be avg price and how is it calculated.
This discussion has been closed.