Free trial
Menu
Strategy guide

Define Support and Resistance Trading Rules

Support is a price level where buying has tended to stop a fall; resistance is a level where selling has tended to stop a rise. Every trader uses these ideas, but most use them by eye. A rule-based support and resistance strategy defines the levels exactly, so they can be tested and automated.

QuantPower Research · Updated 6 Nov 2026 · 4 min read

This guide explains objective ways to define support and resistance, the two main ways to trade them, worked examples, and how to automate and test the rules.

At a glance

Support and resistance strategy
StyleMean reversion at levels, or breakout through them
InstrumentsIndices, futures, stocks
TimeframeIntraday to daily
LevelsSwing highs and lows, the previous day's range, pivot points, round numbers
EntryA bounce from a level, or a close through it
StopJust beyond the level

Defining levels objectively

To automate support and resistance, each level needs an exact definition. Common choices:

Swing highs and lows

A swing high is a candle whose high is above the highs of the candles on either side, for example the two before and the two after. Resistance is the most recent swing high above the price; support is the most recent swing low below it.

The previous day's high, low and close

The previous session's high and low are widely watched intraday levels. They are simple to define and the same for everyone.

Pivot points and CPR

Pivot points are calculated from the previous day's high, low and close, and give a set of support and resistance levels for the day. The pivot point calculator and CPR calculator show how they are derived.

Round numbers

Levels such as 25,000 on Nifty often attract attention and orders.

Clusters

A level is stronger when several definitions agree, for example when a swing low, a pivot level and a round number fall within a few points of each other. A rule can count how many definitions sit within a tolerance band.

Strategy 1: Bounce from a level

  1. Level: the nearest support below the price, defined by one of the methods above.
  2. Setup: the price falls to within a set distance of the level.
  3. Trigger: a candle closes back up, for example above the previous candle's high, showing buyers stepped in.
  4. Entry: buy at the next price.
  5. Stop: a set distance below the level, such as 0.5 times ATR.
  6. Target: the next resistance level, or a multiple of the risk.

Strategy 2: Break through a level

  1. Level: the nearest resistance above the price.
  2. Trigger: a candle closes above the level, ideally with higher volume.
  3. Entry: buy at the next price, or on a retest of the level from above.
  4. Stop: below the broken level.
  5. Target: the next resistance level, or a trailing stop.

When resistance breaks, it often becomes support on a pullback. This "role reversal" is the basis of the retest entry.

A worked example

This is a hypothetical example, not a result.

  • Yesterday, Nifty futures made a low of 24,880. Today's S1 pivot level is 24,875. The two levels form a support cluster.
  • At 11:30 am, the futures fall to 24,884 and the next 5-minute candle closes at 24,902, above the previous candle's high.
  • The algo buys one lot of 65 at 24,905, with a stop 15 points below the cluster at 24,860, a risk of 45 × 65 = ₹2,925.
  • The target is the day's pivot at 24,990, a gain of 85 × 65 = ₹5,525 if reached.
Support bounce rules: a support cluster at 24,875–24,880, buy 24,905 after a close above the previous high, stop 24,860, target the pivot at 24,990 (illustration)

Bounce or break?

The hardest question in support and resistance trading is whether a level will hold. Some context helps:

  • Trend: in an uptrend, support tends to hold and resistance tends to break.
  • Number of tests: a level tested many times may weaken as orders there are used up.
  • Volume: a break on strong volume is more convincing than one on thin volume.
  • Time of day: levels tested late in the session may break as positions are closed.

A rule-based approach can use these as filters, for example taking bounces only in the direction of the trend.

Risk management

  • Keep stops just beyond the level. If the level breaks, the reason for the trade is gone.
  • Size by the stop distance with the position size calculator.
  • Avoid trading levels into news, when gaps can jump past both the level and the stop.

Automating support and resistance

Defining levels by rule is what makes automation possible. QuantPower's strategy builder lets you set price conditions, indicator filters, stops and targets, and run the strategy as a bot. Test the rules in the backtesting engine and paper trading first.

Start your free trial

Connect your broker, build a strategy and test it on paper before a single live order goes out.

Backtesting tips

  • Avoid hindsight. A swing high is only confirmed after the candles that follow it. Use levels only after they were confirmed.
  • Fix the tolerance for "near a level" before testing.
  • Test both strategies on the same levels to see which suits your instrument.

See how to backtest trading strategies.

Frequently asked questions

How do I find support and resistance levels?

Use objective definitions: swing highs and lows, the previous day's high and low, pivot points and round numbers. Levels where several of these meet are stronger.

What happens when support breaks?

It often becomes resistance. Prices that fall through support may later rally back to the level and turn down again.

Are support and resistance levels reliable?

They are widely watched, which gives them some influence, but they break often. Treat them as areas where a reaction is likely, not certain.

Can I use open interest as support and resistance?

Some traders treat strikes with large open interest as levels. Our Nifty PCR guide explains what OI does and does not show.

Sources

  • Murphy, J. J. (1999). Technical Analysis of the Financial Markets. New York Institute of Finance
The example on this page is hypothetical and for illustration. Trading involves substantial risk. This guide is for education and is not investment advice.