Avg Price formula: { (100*159.2) + (200*156) }/300
Avg Price Value: 157.07
The shares which are bought and sold on same day are considered as intraday
transactions and would get knocked off against each other. For example, in this
case, 18 June 2018 sell entry would be knocked off against 18 June 2018 buy
entry. Once intraday knock off is done, FIFO logic gets applied.