What is an "Average Price", how to calculate it?

When I buy shares it executes at “Average price”

For e.g.: I buy 100 shares of Rs.90 and sold it at Rs.85 and still shares are moving down and I buy again the same share at Rs.70, then this order execute at some “Average Price” greater than Rs.70 and if share start moving upward still it was showing negative P&L because “Average Price” at which shares are bought is greater than LTP/market price at that time.

So, if I want to do more than one intraday trade in same share, how do I calculate “Average Price” ?

And One more question >>> if I purchase 100 shares of a company for long term and after some time say after 2 weeks, I want to do intraday trading in the same share then will it affect my previously bought 100 shares

The positions window which tracks your P&L on trading platforms typically average all trades done for the day and show up the net P&L per scrip. But this doesn’t mean that the trade you have already exited is affected by the new trade that you take.

Calculating average price is straight forward formula, (previous purchase x Qty+ current purchase x Qty)/total qty