Skip to content
ViprasolWE SOLVE INFINITYGet started
Back to Blog

Support and Resistance Indicators: Automatic vs Manual Levels

How automatic support and resistance indicators find levels, how they differ from hand-drawn lines, and how to spot levels that were drawn with hindsight.

Viprasol Tech Team
11 min read
Updated 2026

Support and Resistance Indicators: Automatic vs Manual Levels

TLDR

A support and resistance indicator is a script that finds price levels where the market has previously turned and draws them on the chart, so you do not have to. The common methods are swing pivots, floor-trader pivot formulas, prior session highs and lows, volume clusters and round numbers. Automatic levels are consistent, testable and available on every chart you open; manual levels can encode judgment that no formula captures, but they are impossible to backtest and easy to draw after the fact. The practical approach is to use an automatic method for the levels you will trade mechanically, confirm that it does not draw levels before they could have been known, and reserve manual lines for context. This article compares the methods, works one example in numbers, and gives an original Pine Script v6 level finder that is honest about when each level appears.

What a level is, mechanically

Strip the vocabulary away and a support or resistance level is a price where, in the past, enough orders arrived to stop a move and reverse it. Support is a price where buying appeared; resistance is a price where selling appeared. The reason levels have any forward value at all is that the orders which caused the earlier reversal may still be there, or that traders who saw the earlier reversal will place orders at the same price again. Neither is certain, and both decay with time.

Every automatic method is a rule for deciding which past prices qualify. The rules differ in what they look at (price turns, time, volume, arithmetic on the previous session) and in how long they wait before they commit to a level. That second property, the wait, decides whether an indicator is honest or a hindsight machine, and it is the one most buyers never check.

Automatic methods compared

MethodHow the level is foundWhen it becomes knownStrengthWeakness
Swing pivotsA high with N lower highs on each side (and the mirror for lows)N bars after the actual highMatches what traders draw by eye; adapts to any timeframeDelayed by N bars; many scripts draw the level back to the high, hiding the delay
Floor-trader pivot formulasArithmetic on the prior session's high, low and close (PP, R1 to R3, S1 to S3)At the session open, with no delayFully known in advance; identical for everyone using the same sessionNo relation to where orders actually sit; several formula variants give different levels
Prior session or week high and lowThe extreme of a completed periodAt the period closeWidely watched; cheap to compute; objectiveOnly a handful of levels; says nothing about intra-period structure
Volume clustersPrices where traded volume concentrated (profile nodes, high-volume bars)As volume accumulates; stable after the factBased on participation rather than shape; one of the more independent inputsNeeds reliable volume, so it is weak on spot forex and some CFDs; profile boundaries are arbitrary
Round numbersFixed grid, for example every 50 or 100 pointsAlways knownTrivially honest; captures order clustering at psychologically obvious pricesMost grid levels are irrelevant on any given day
Moving averages as dynamic levelsA long average treated as support in an uptrendEach barAdapts to trendNot a level in the order-flow sense; really a trend filter

Most commercial "key levels" indicators are a swing-pivot engine with clustering on top, sometimes with a touch counter that upgrades a level after price respects it several times. That architecture is fine. The questions to ask are how many right-side bars it requires before a pivot is confirmed, whether it draws the level from the confirmation bar or from the pivot bar, and whether old levels are ever retired.

Automatic versus manual levels

The case for manual levels is that an experienced trader sees things a pivot formula does not: that a level was tested on heavy volume, that a wick pierced it during a news spike and should be ignored, that a zone matters more than a line. All of that is real. The case against is equally real:

  • Manual levels cannot be backtested. There is no way to know what you would have drawn on a chart two years ago without looking at the right side of it. Any apparent track record is contaminated.
  • Manual levels drift. Two traders given the same chart draw different lines, and the same trader draws different lines on different days. A rule that changes with mood is not a rule.
  • Manual levels are usually drawn after the turn. The level that "held perfectly" was often drawn after it held. The non-repainting indicators article calls this hindsight structure; it applies to hand-drawn lines just as much as to scripts.

The compromise that works for most people: let an automatic method define the tradeable levels so that entries, stops and backtests are mechanical, and use discretion only to decline a trade, never to invent one. Declining trades on a mechanical system is still a judgment call, but it can be logged and its effect measured.

Worked example: pivots, clustering and a stop

Take a 15 minute chart of a gold CFD. The indicator uses swing pivots with 10 bars on each side, and merges levels closer than 0.15 percent of price. Over the past two sessions it has confirmed these pivot highs: 2,648.2, 2,651.0 and 2,675.6, and these pivot lows: 2,612.4 and 2,615.1.

Clustering first. 2,648.2 and 2,651.0 differ by 2.8, which is 2.8 / 2,648.2 = 0.106 percent, below the 0.15 percent threshold, so they merge into one resistance at the average, 2,649.6. The two lows differ by 2.7, or 0.103 percent, so they merge into one support at 2,613.75. The 2,675.6 high stands alone. The chart now shows three levels instead of five, which is the point of clustering: a trader does not want two lines three points apart on gold.

Now a trade. Price pulls back to 2,614.0 and prints a bullish engulfing bar on the 15 minute chart that closes at 2,618.5. A mechanical rule might be: buy at the close of the confirming bar, stop 0.3 percent below the level, target the next level up.

  • Entry: 2,618.5
  • Stop: 2,613.75 x (1 - 0.003) = 2,605.9
  • Risk per unit: 2,618.5 - 2,605.9 = 12.6
  • Target: 2,649.6 (the merged resistance)
  • Reward per unit: 2,649.6 - 2,618.5 = 31.1
  • Reward to risk: 31.1 / 12.6 = 2.47

With an account of 20,000 and risk per trade of 0.5 percent, the risk budget is 100. Position size is 100 / 12.6 = 7.9 units, rounded down to whatever the broker's lot step allows. None of this required judgment, which is why it can be tested over several years of data; whether the rule is profitable on gold at this timeframe is exactly what such a test would tell you, and we are not asserting that it is.

One more detail: the 2,613.75 support became known 10 bars after the second low printed, so about two and a half hours later on a 15 minute chart. The trade above happened the following session, so the level was available in time. A trade that used the level on the very bar the low formed would be hindsight.

Original Pine Script v6: confirmed pivot levels with clustering

This script finds swing pivots, merges levels that sit within a percentage band of each other, keeps a bounded list of recent levels and draws them as rays from the current bar. The circles mark the bar on which each pivot was confirmed, not the bar where the high or low occurred, so the delay is visible.

//@version=6
indicator("Pivot S/R levels (confirmed)", overlay = true, max_lines_count = 100)

leftBars = input.int(10, "Left bars", minval = 1) rightBars = input.int(10, "Right bars", minval = 1) mergePct = input.float(0.15, "Merge levels closer than (percent)", step = 0.05, minval = 0.0) maxLevels = input.int(12, "Levels to keep", minval = 1)

ph = ta.pivothigh(high, leftBars, rightBars) pl = ta.pivotlow(low, leftBars, rightBars)

var array<float> levels = array.new<float>() var array<line> drawn = array.new<line>()

addLevel(float px) => bool merged = false if array.size(levels) > 0 for i = 0 to array.size(levels) - 1 lv = array.get(levels, i) if math.abs(lv - px) / px * 100 < mergePct array.set(levels, i, (lv + px) / 2) merged := true break if not merged array.unshift(levels, px) if array.size(levels) > maxLevels array.pop(levels)

if not na(ph) addLevel(ph) if not na(pl) addLevel(pl)

if barstate.islast while array.size(drawn) > 0 line.delete(array.pop(drawn)) if array.size(levels) > 0 for i = 0 to array.size(levels) - 1 lv = array.get(levels, i) col = lv > close ? color.red : color.green array.push(drawn, line.new(bar_index - 100, lv, bar_index, lv, color = col, extend = extend.right))

plotshape(not na(ph), "Resistance confirmed", shape.circle, location.abovebar, color.red, size = size.tiny) plotshape(not na(pl), "Support confirmed", shape.circle, location.belowbar, color.green, size = size.tiny)

Design notes:

  • ta.pivothigh(high, 10, 10) returns a value on the bar that is 10 bars after the high. That is the first bar on which anyone could have known the pivot existed, and the circle is drawn there. If you want the visual to point back at the high, add an offset = -rightBars to the plotshape and accept that the drawing now implies knowledge you did not have.
  • Merging averages the two prices. A zone implementation would keep both and draw a box; this version keeps a single line for clarity.
  • Levels are retired by count, not by distance or age. A more complete tool would also drop levels that price has closed through decisively, and would track how many times each has been touched.
  • The lines are rebuilt only on the last bar, so the script is cheap even with long histories.

Testing a level indicator before you trust it

  1. Replay test. Use TradingView's bar replay or MT5's visual tester. Step forward bar by bar and watch when each level appears. If a level appears on the bar of the high itself, the script is reading the future.
  2. Count the levels. An indicator that draws twenty lines on a screen will have one near every reversal. Check how many levels are active at once; a dozen is already a lot on a single timeframe.
  3. Measure touch outcomes mechanically. Define a touch (price within X percent of a level) and an outcome (did price move Y away from the level before moving Y through it). Count. Compare against random prices. If the levels are not better than random on your instrument, the indicator is decoration.
  4. Vary the parameters. Pivots with 5 bars each side give very different levels from 20 bars each side. If your results change sign between neighboring settings, you are looking at noise.

The backtesting platforms comparison covers the tooling for step three; it is the part most traders skip and the part that would save them the most money.

Levels as a confluence factor

Levels are strongest when they are one input among several that are computed from different data. A level by itself is a place where something might happen; a level plus a higher-timeframe trend in the same direction plus a momentum reset is a setup. The confluence trading article explains how to score factors without double counting, and support and resistance sit in its structure category. Two warnings from that article apply with extra force here: a swing level and a Fibonacci retracement drawn between the same swings are not two factors, and a level that you drew because price just bounced there is not a factor at all.

FAQ

What is the most accurate support and resistance indicator?

No method is accurate in the sense of predicting reversals. The useful question is which method is honest about when its levels become known and which produces levels you can test. Swing pivots with a stated confirmation delay, prior-period extremes and floor-trader pivots all pass that bar. Anything that draws a level on the bar where the turn happened does not.

Do support and resistance indicators repaint?

Many do, in the specific sense of drawing a level back to a bar where it could not have been known. The level itself does not move, but a backtest that enters on the pivot bar is using future information. Check with bar replay before trusting any of them.

Should I use lines or zones?

Zones are more realistic because reversals happen in an area, not at a tick. For mechanical trading, though, you need a number for the stop and the entry, so zones end up with an edge that is treated as a line anyway. Many traders use a zone for the visual and the zone's far edge for the stop.

How many levels should be on the chart?

Enough to cover the range price is likely to travel in your holding period, and no more. On an intraday chart that is usually the nearest support and resistance above and below, the prior session's high and low, and perhaps a daily level. If a level is more than a day's average range away, it is unlikely to matter today.

Can an expert advisor trade support and resistance?

Yes, once the levels are defined by a rule. Pivot detection, clustering, touch counting and the entry trigger can all be written in MQL5 using completed bars only. What an EA cannot do is draw the line you would have drawn; it can only follow the rule you give it, which is the reason it can be tested.

Where Viprasol fits

Viprasol builds support and resistance tooling for TradingView and MetaTrader: pivot and volume-based level engines with clustering, touch scoring and alerts, as well as confluence panels that combine levels with trend and session factors. Everything is delivered as readable Pine Script v6 or MQL5 source with the confirmation delay made explicit, so you can replay it and see exactly when each level appeared. If you want levels wired into a strategy or an EA, our TradingView Pine Script development service and MT5 indicator development service cover both platforms. Pricing is on the pricing page; send your level rules through the contact form.

Risk disclaimer: trading futures, forex, CFDs and crypto involves substantial risk of loss. This article is educational and is not investment advice; the example trade is illustrative and does not indicate future performance.

support and resistance indicatorsupport resistance levelspivot pointskey levels indicatorpine script v6price actionconfluence trading

External Resources

Share this article:

About the Author

V

Viprasol Tech Team

Custom Software Development Specialists

The Viprasol Tech team specialises in algorithmic trading software, AI agent systems, and SaaS development. With 1000+ projects delivered across MT4/MT5 EAs, fintech platforms, and production AI systems, the team brings deep technical experience to every engagement.

MT4/MT5 EA DevelopmentAI Agent SystemsSaaS DevelopmentAlgorithmic Trading

Ready to Automate Your Trading?

Discuss a custom Expert Advisor with defined strategy rules, risk controls and a testing plan.

Free consultation • No commitment • Response within 24 hours

Viprasol · Trading Software

Need a custom EA or trading bot built?

We build MT4/MT5 Expert Advisors around your strategy, broker and risk requirements. Each project has an agreed scope, testing plan and individual quote.