Stock shows profit and loss in position section after selling holding stocks

I am bit confused
If I bought a share at 10rs one week back.now the share price is 12rs if I sell the share (i get a profit of 2rs) .now the price has gone down to 10rs again on the same day and it’s showing 2rs profit in position .

if I buy it again on the same day.
Will i get profit of 4rs (2rs for selling+ 2rs which is showing in position).if yes can you explain how ?

No, your profit will be Rs. 2 only.

  1. When you buy back the shares sold on same day they remain in your holdings only. So you will not realise any profit or loss.

  2. Selling shares from holdings and buying back the same day will be considered as intraday trade. The difference between your selling price and buying price will be your P&L, in the above scenario Rs. 2.

You can learn more on this here: How is the buy average affected when shares from holdings are sold and bought back on the same day?

Ya but i have already earned 2rs by selling the shares (buying at 10 and holding for a week and selling at 12rs).and after selling it’s shows P&L in position that is +2(because the share price has come down to 10re again)

So if I buy again I will get 4rs right? (2rs by selling the holding shares + 2rs for buying again the same day)