Sell reversal on same day

Lets say I have 100 shares of RIL baught at say price X, sold them on price Y. Later on the same day if I buy 100 shares of RIL again at price Z. What exactly does happen to my both these transactions?
Zerodha does not really execute the sell and buy transaction, rather, end of the day my shares remain un-transacted that means my shares remain in my account at price X.
In this process, do I lose any money?

Hi, consider this.
You had brought Reliance at 1000, sold at 1050 and again bought at 1020. You are left with 1 share of Reliance at price of 1020 and 30 RS added to your funds. Borkerage and other charges will apply


Lets consider 2 scenarios -

  • All Intraday trades in CNC

You buy 1 share of Reliance at 1000 in CNC, sell it at 1050 and then buy it back at 1020 in CNC. All transactions take place on a FIFO basis - First In First Out basis.

Here your first trade - buying Reliance at 1000(First to come into the account) and selling at 1050 will be considered as an Intraday trade and your Intraday profit will be Rs.50.

The second trade will be a delivery trade and Reliance will be bought at 1020 for delivery into your demat account.

  • Having holding + Performing intraday trade on the holding

You have a holding of 1 qty of Reliance at 1000. This is already in your demat account. You sell your holding at 1050 and then you buy back your holding at 1020 before the market closes.

Here, your sell at 1050 and buy at 1020. This will be considered as an intraday trade and a profit of Rs.30 will be credited to your account. Your holding of 1 qty of Reliance at 1000 will remain in your Demat account.

@BharatW but the new buying cost should be 1020, right?