The buy average is calculated basis the total traded quantity for the day. It may happen so that you have traded intraday multiple times in one particular scrip on the same day. Under positions, we show the overall P/L for all the trades done in that particular scrip on that day. 

Let us understand this with an example:

Trade 1: Consider you buy 30 shares of XYZ at Rs.100 each. The stock moves up to Rs.105 and you close the position, thus booking a profit of Rs.150. 

Trade 2: Now the stock moves down to Rs.102. You buy 40 quantity of XYZ shares again.

Buy average of both trades: (30x100)+(40x102)/70 = 101.14

Now, consider the price of the stock moves further down to Rs.100 (which is less than the buy average) but the positions P/L will also consider the profit that you already made during the first trade, i.e.

Positions P/L for XYZ = Profit made in Trade1 - Loss made in Trade 2

                                  = 150 - (40x2)

                                  = 70

Hence, the profit or loss appearing in positions is considering the all trades made in that stock during the day.