Made partial exit but avg remains high as 2nd buy

I bought X at 292 with 52 qty. Then added 19 quantities at 420. Avg came 326. I sold 60 qty at 344 SL. But why is avg of remaining 11 Qty at 420? Please help.

Shares that you bought first are sold first that is why you are seeing higher average price.