The Sensex and the Nifty ended in the negative territory amid choppiness on the back of profit-taking and muted third-quarter earnings reports.The week ahead is crucial for investors, local as well as global, due to key events — US Federal Reserve meeting and Budget of India for FY2020-2021 (scheduled for February 1). Investors should tread with caution in the January month expiry week. January auto sales and rupee movement also need to be watched.Nifty 50 (12,248.2)After registering a new high at 12,430 last Monday, the Nifty began to decline on the back of profit-booking and selling pressure at higher levels. The index breached a key support at 12,300 and found support around 12,100 by recording an intra-week low at 12,087.But it subsequently witnessed a corrective rally and trimmed the weekly loss to 104 points, or 0.84 per cent. The 50-day moving average had cushioned the index at around 12,100.On the weekly chart, the index has formed a bearish engulfing candlestick pattern, which is a bearish reversal pattern.The Nifty faces resistance ahead at 12,300. A downward reversal from this barrier can drag the index lower to 12,100 once again and then to 12,000.On the upside, a decisive break above 12,300 can push the index higher to the next crucial resistance between 12,400 and 12,430.A further rally above these levels can test the resistance at 12,500 in the short term.Showing selling interest, the daily price rate of change indicator hovers in the negative terrain and its weekly counter-part continues to chart downwards, exhibiting negative divergence.So, investors should remain cautious in the derivative expiry week ahead.We restate that a decline below the vital support level of 12,000 can drag the index down to 11,850.The short-term uptrend will be under threat on a strong slump below 11,850 and drag the index down to 11,700 levels. The uptrend will remain intact as long as the index trades above the key trend-deciding level of 11,600. An emphatic fall below this level can pull the index lower to 11,500 and then to 11,350 or 11,200.Medium-term trend: The recent fall has raised concerns about the medium-term uptrend that has been in place since the September 2019 low of 10,670.The price action since November last year depicts a formation of a rising wedge in an uptrend that happens when the price records higher highs and higher lows that are contracting.This pattern acts as a reversal pattern and shows a decelerating momentum. Also, the formation of the bearish engulfing candlestick pattern in the weekly chart indicates a trend-reversal. Therefore, investors with a medium-term perspective can consider taking a partial profit off the table if the index fails to move beyond 12,400 levels, and remain invested with a stop-loss at 11,300.The next key medium-term resistance is at 12,500. A strong break above this will underpin the bullish momentum and take the index higher to 13,000 over the medium term. In contrast, if the index tumbles below 12,000, it can decline to test the next support at 11,800.The medium-term uptrend will be under threat on a fall below 11,500 and drag the index down to the trend-deciding level of 11,300.The next supports are at 11,000, 10,800 and 10,700.Sensex (41,613.1)After registering a new high at 42,273, the Sensex started to decline in the past week and ended falling 332 points, or 0.8 per cent.A support at around 41,000 and the 50-day moving average had provided base recently.But a strong fall below 41,000 can pull the index down to 40,500 and then to 40,000 in the coming weeks.The Sensex faces a key hurdle at 42,000; an inability to move beyond this level will keep the index consolidating sideways between 41,000 and 42,000 for a while.The formation of the bearish engulfing candlestick pattern and the price rate of change displaying negative divergence in the weekly chart are the key threats to the short-term uptrend. We reaffirm that a decisive fall below 40,000 can pull the index lower to 39,750 and 39,500 in the short-to-medium term.Nevertheless, as long as the index trades above 39,000, the medium-term uptrend that has been in place since September last year will remain.Nifty Bank (31,241.7)Last week, the Nifty Bank declined 348 points, or 1.1 per cent, extending the near-term downtrend. In late December 2019, the index encountered a key resistance at 32,500 and changed direction, and has been in a near-term downtrend since then.A strong plunge last Monday has decisively breached the key support at 31,500.A strong rally above the immediate resistance level of 31,500 can push the index higher to 32,000 in the ensuing week.But a further rally above this level will encounter a significant resistance at 32,500. A strong break above 32,500 is required to strengthen the uptrend and take the index northwards to 33,000 in the short term.On the other hand, a fall below 31,000 can strengthen the downtrend and drag the index lower to 30,500. The next key support is at 30,000, a psychological base.The key supports thereafter are at 29,500 and 29,000 levels.Traders with a short-term view can initiate fresh short positions with a fixed stop-loss on a strong fall below 31,000.