Markets ended marginally in the negative for the third consecutive session on Tuesday after selling in the second half erased the early gains. The BSE Sensex ended at 50,363.96, down 31.12 points or 0.06%. The Nifty closed at 14,910.45, down 19.05 points or 0.13%.