Nifty ends in red after touching historic high of 10,000