Price Action Indicators

Support & Resistance: Key Price Levels | AlfaTactix

📖 6 min read

📝 1,152 words

🏷️ Price Action Indicators

In this page: what Support/Resistance is, how it works, when to use it, a practical example with code, and a bonus tip.

Use Support/Resistance in a real strategy—no code required

Create a free account to save your progress and build strategies with this indicator and 80+ others in minutes. Backtest, then export to MQL5.


Support/Resistance Indicator Explanation

The Support/Resistance levels are fundamental price action concepts that identify key price levels where buying or selling pressure is expected to be significant, causing price to bounce or reverse. Support is a price level where buying pressure is strong enough to prevent price from falling further, often identified by previous lows, consolidation areas, or psychological price levels. Resistance is a price level where selling pressure is strong enough to prevent price from rising further, often identified by previous highs, consolidation areas, or psychological price levels. These levels are among the most important concepts in technical analysis and price action trading, providing traders with entry points, exit targets, and stop-loss levels.

How Support/Resistance Works: Support and Resistance levels are identified by analyzing historical price action. Support levels form when price reaches a specific level multiple times and bounces higher, indicating strong buying interest at that level. The more times price touches a support level without breaking through, the stronger it becomes. Resistance levels form when price reaches a specific level multiple times and bounces lower, indicating strong selling interest at that level. The more times price touches a resistance level without breaking through, the stronger it becomes. When support or resistance is broken, it often reverses roles: a broken support becomes resistance, and a broken resistance becomes support. These levels can be horizontal (static) or dynamic (trend lines, moving averages).

When to Use Support/Resistance:

  • Entry and Exit Points: Support and Resistance levels are highly effective for identifying entry and exit points. Buying at support levels or selling at resistance levels provides favorable risk-reward ratios. Price often bounces from these levels, making them ideal entry points.
  • Stop-Loss Placement: Support and Resistance levels help determine stop-loss placement. Stop-losses for long positions are typically placed below support levels, while stop-losses for short positions are typically placed above resistance levels. This helps manage risk effectively.
  • Target Identification: Support and Resistance levels help identify profit targets. When price breaks through resistance, the next resistance level becomes a target. When price breaks through support, the next support level becomes a target.

Advantages:

  • Provides clear visual reference points for price levels where significant buying or selling pressure is expected, making it easy to identify key trading areas. These levels are universal and work across all markets and timeframes.
  • Works effectively across multiple timeframes and asset classes, including stocks, forex, commodities, and cryptocurrencies. The concept is fundamental to all technical analysis.
  • Helps identify high-probability trading opportunities by focusing on price levels where price is likely to react, providing valuable information for risk management and trade placement.

Limitations:

  • Support and Resistance levels can be subjective, as different traders may identify different levels based on their analysis methods. The levels require skill and experience to identify accurately.
  • The indicator may require confirmation from price action, as support and resistance levels alone do not guarantee bounces or breakouts. Price can sometimes break through these levels without hesitation.
  • Support and Resistance levels alone do not provide information about trend direction or momentum, only price levels where reactions are expected. Traders should combine them with trend analysis and other indicators for more reliable signals.

In summary, Support/Resistance are fundamental price action concepts that identify key price levels where buying or selling pressure is significant, making them ideal for entry points, exit targets, and stop-loss placement. For comprehensive understanding, refer to technical analysis literature, including works by John J. Murphy on technical analysis, Investopedia's Support and Resistance guide, TradingView's Support/Resistance documentation, and academic research on price levels and market microstructure published in journals such as the Journal of Finance and the Review of Financial Studies.

Practical Example: Using the Support/Resistance Indicator in a Trading Strategy

The Support/Resistance levels are fundamental price action concepts used to identify key price levels where buying or selling pressure is significant. In a trading strategy, Support/Resistance levels help traders identify entry points, exit targets, and stop-loss placement based on historical price action.

Scenario: You're creating a range trading strategy for EUR/USD on a 4-hour chart. You want to buy when price bounces from a support level (indicating buying interest), and sell when price bounces from a resistance level (indicating selling interest), with stop-losses placed beyond these levels.

Strategy Logic:

  • Identify Support/Resistance levels: price levels where price has bounced multiple times. Support: previous lows where price bounces higher. Resistance: previous highs where price bounces lower.
  • Buy signal: When price bounces from a support level (e.g., price touches support and then closes higher), indicating buying interest and potential upward movement.
  • Sell signal: When price bounces from a resistance level (e.g., price touches resistance and then closes lower), indicating selling interest and potential downward movement.

Backtrader Example:

import backtrader as bt

class SupportResistanceRangeStrategy(bt.Strategy):
    params = dict(
        lookback_period=20,  # Period to identify support/resistance
        bounce_threshold=0.001  # Price must bounce at least 0.1% from level
    )
    
    def __init__(self):
        self.support_level = None  # Identify support level
        self.resistance_level = None  # Identify resistance level
        
    def identify_support_resistance(self):
        """Identify support and resistance levels"""
        # Simplified: use recent highs and lows
        if len(self.data) >= self.p.lookback_period:
            recent_lows = [self.data.low[-i] for i in range(1, self.p.lookback_period + 1)]
            recent_highs = [self.data.high[-i] for i in range(1, self.p.lookback_period + 1)]
            self.support_level = min(recent_lows)
            self.resistance_level = max(recent_highs)
        
    def next(self):
        self.identify_support_resistance()
        
        if self.support_level is None or self.resistance_level is None:
            return
        
        current_price = self.data.close[0]
        prev_close = self.data.close[-1]
        
        if not self.position:
            # Buy when price bounces from support
            if (prev_close <= self.support_level * (1 + self.p.bounce_threshold) and
                current_price > prev_close):
                self.buy()
            # Sell when price bounces from resistance
            elif (prev_close >= self.resistance_level * (1 - self.p.bounce_threshold) and
                  current_price < prev_close):
                self.sell()
        else:
            # Exit when price reaches opposite level or stop-loss
            if self.position.size > 0:  # Long position
                if (current_price >= self.resistance_level * 0.999 or  # Target
                    current_price <= self.support_level * 0.995):  # Stop-loss
                    self.close()
            else:  # Short position
                if (current_price <= self.support_level * 1.001 or  # Target
                    current_price >= self.resistance_level * 1.005):  # Stop-loss
                    self.close()

# Usage
cerebro = bt.Cerebro()
cerebro.addstrategy(SupportResistanceRangeStrategy)

Expected Outcome: By using Support/Resistance levels, your strategy identifies key price levels where buying or selling pressure is significant, helping you enter trades when price bounces from these levels and exit when price reaches opposite levels or stop-losses. This approach leads to better entry timing, improved risk management, and enhanced profit targeting by trading price reactions at key levels.

💡 Bonus Tip

Consider using Support/Resistance levels in combination with volume analysis for confirmation. When price bounces from support with high volume, it suggests stronger buying interest and higher probability of upward movement. When price bounces from resistance with high volume, it suggests stronger selling interest and higher probability of downward movement. This technique, documented in technical analysis literature, can significantly improve the accuracy of Support/Resistance-based trading strategies.

Using Support/Resistance levels ensures your strategy trades price reactions at key levels effectively, improving entry and exit timing based on historical price action analysis.

Use Support/Resistance in a real strategy—no code required

Create a free account to save your progress and build strategies with this indicator and 80+ others in minutes. Backtest, then export to MQL5.

Try Strategy Builder

Use this indicator in Strategy Builder — free

Create free account