Introduction
Support and resistance are the foundation of technical analysis. Support is a price level where buying pressure tends to stop a decline, while resistance is a level where selling pressure tends to stop a rise. These levels are not exact lines — they are zones where price reacts. A trend is the overall direction of price movement, and identifying it correctly helps traders align with the market rather than against it.
Mapping Support and Resistance Levels
To draw support and resistance on a chart, look for areas where price has reversed direction multiple times. The more times price touches a level and bounces, the stronger that level becomes. Use historical swing highs for resistance and swing lows for support. On higher timeframes like the daily or 4-hour chart, these levels carry more weight than on lower timeframes.
The code above scans price data for swing points. Swing highs become candidates for resistance zones, and swing lows become candidates for support zones. A trader can then plot these values on a chart.
Identifying Market Structure
Market structure describes how price behaves over time. An uptrend is defined by a sequence of higher highs and higher lows. A downtrend is defined by lower highs and lower lows. A sideways or ranging market shows price moving between roughly parallel support and resistance without a clear directional bias. The first time market structure breaks — for example, an uptrend producing a lower low — it is often called a structure break or trend reversal signal.
This function checks whether recent swing highs and lows are consistently rising, consistently falling, or mixed. The output tells the trader whether to look for long setups, short setups, or wait for a breakout.
Using Support and Resistance in Trade Planning
Once levels are mapped and the trend is identified, combine the two. In an uptrend, look for long entries near support. In a downtrend, look for short entries near resistance. A breakout above resistance in an uptrend confirms continuation, while a breakdown below support in a downtrend signals further downside. Always place stop-loss orders just beyond the support or resistance level so that a clean break invalidates the trade idea.
The output shows the risk-reward ratio for the planned trade. A ratio above 2.0 is generally considered favorable in crypto markets due to their volatility.
Common Mistakes
Traders often draw too many support and resistance lines, cluttering the chart and causing confusion. Focus on the most obvious levels that price has respected multiple times. Another mistake is assuming a level will hold forever — broken support often becomes new resistance, and broken resistance often becomes new support. This role reversal is a key concept.
Summary
Support and resistance are zones where price reacts, drawn from swing highs and lows. Market structure is defined by the sequence of these swings — uptrend, downtrend, or sideways. Combining level mapping with trend identification gives traders a clear framework for planning entries, exits, and stop-loss placement.
Lesson Checkpoint
Review what you learned and get feedback on your work.