Markets closed higher for the third consecutive day after making another record high on Monday. The BSE Sensex ended at 58,296.91, up 166.96 points or 0.29%. The Nifty closed at 17,377.80, up 54.20 points or 0.31%.