Let’s say I purchased 1000 of Rcom at Rs 30 on CNC mode on Oct 20.
Next day I purchased same number 1000 at Rs 35 on CNC mode on Oct 21.
Now, on next trading day RCom price is 32, I want to sell 1000 which I purchased @ Rs 32. How will Zerodha know which one of the 1000 stocks will be on sale? For instance, will it be possible that Zerodha will sell 1000 stocks which I purchased @ 35, making big lose for me?
Nobody will make you lose except you. The price will be averaged. In your scenario the average price for your 2000 share is @ 32.5.
Coming to While selling as @naveengarg said it is FIFO. The shares you bought first will be sold first.
NOTE If you buy CNC shares there will be T+2 Settlement. If you sell the shares with out delivering to your demat then they will go to auction market. In most liquid stocks it will not be a major problem.