Markets closed in the green with the Sensex up 50 points at 21,255 and the Nifty added 12 points to end at 6,316.