Indian stocks marginally gained on May 18, driven by strong tech buying and pharma support, with Nifty 50 up 0.03% at 23,649 and BSE Sensex at 75,263. However, the broader market faced pressure as Nifty Midcap 100 and Nifty Smallcap 100 fell.