Auto Support Resistance Indicator: Two Stepping Lines

Written by Dominic Walsh · Published · Last updated

The auto support resistance indicator keeps only the most recent swing on each side. A five-bar high becomes the resistance line. A five-bar low becomes support. Both hold flat until something newer replaces them.

This build ships as a compiled .ex4 for MT4 and .ex5 for MT5; the screenshots below come from EURUSD H1.

Platforms MT4 (.ex4) + MT5 (.ex5)
Chart window Main price chart
Plots 2: Resistance, Support
Alerts popup, push notification, email, sound
Inputs 7

What the Auto Support Resistance Indicator draws on the chart

A tomato `Resistance` line carries the latest swing high.

A medium sea green `Support` line carries the latest swing low.

Both hold perfectly flat between swings, so the plot looks like steps.

No arrows and no panels ship with this build.

  • Resistance: line, tomato, width 2
  • Support: line, medium sea green, width 2
Auto support resistance indicator stepping swing lines on the EURUSD H1 chart.
Auto support resistance indicator stepping swing lines on the EURUSD H1 chart.

How the Auto Support Resistance Indicator calculates its values

One swing test per side

`SwingDepth` `5` asks a bar to beat five neighbours on each side. A qualifying high replaces the resistance value and a qualifying low replaces support.

Values carry forward

Between swings the buffers repeat the last value on every bar. That is what produces the flat step rather than a gap, and it means the level stays visible across the whole chart.

Only the newest survives

There is no list and no clustering here. A fresh swing high overwrites the old resistance outright, even when the older level was tested more often.

How to read the signals

A long flat stretch means no new swing has formed on that side.

The step down in `Resistance` marks a lower high, which is structure changing.

Both lines confirm five bars late, so the newest turn is never shown yet.

The two lines can sit very close together in a tight range.

Alert channels in this build: popup, push notification, email and sound.

`EnableAlerts` heads four routes and ships true beside `EnablePopup`. `EnablePushNotify` reaches a handset, `EnableEmail` sends mail and `EnableSound` plays `SoundFile`, all three off by default. Note that no once-per-bar guard applies in this build.

Every Auto Support Resistance Indicator input

Core settings

Setting What it does Default
SwingDepth Bars either side that confirm a swing, default `5`. 5

Alert settings

Setting What it does Default
EnableAlerts Overall control of the four routes, default `true`. on
EnablePopup Terminal window on a level change, default `true`. on
EnablePushNotify Handset message on a level change, default `false`. off
EnableEmail Mail on a level change, default `false`. off
EnableSound Clip on a level change, default `false`. off
SoundFile Which clip plays, default `”alert.wav”`. alert.wav
Auto support resistance indicator inputs panel showing SwingDepth and the alert switches.
Auto support resistance indicator inputs panel showing SwingDepth and the alert switches.

Settings that fit your chart

A five-bar swing is shallow, so the lines update often. EURUSD H1 is the reference chart, where each line steps a few times a day. On M5 they step constantly. H4 gives levels that hold for a week.

When the Auto Support Resistance Indicator fails

Keeping only the newest swing throws away older levels that mattered more.

`SwingDepth` `5` confirms five bars late, so the current turn is never on the chart.

This build has no once-per-bar guard, so a level alert can repeat.

Copy the compiled Auto Support Resistance Indicator file into your MQL4/Indicators folder, and the MT5 build into MQL5/Indicators, then restart the terminal and drag it onto a chart. The step-by-step guide with screenshots is at how to install MT4 and MT5 indicators.

Related on forexmt4systems.com: Support and Resistance Strategy.

Background reading on the method behind the Auto Support Resistance Indicator: Candlesticks And Support at StockCharts ChartSchool, Drummond geometry on Wikipedia.

Download the Auto Support Resistance Indicator for MT4 and MT5

The zip holds the compiled Auto Support Resistance Indicator build for MT4 and MT5, plus a short README. Compiled files only, no source. Enter your email below and the download link arrives in your inbox.

Download this indicator free

Enter your email and the file is yours. You also get the full MT4 and MT5 library.

  • 1,380+ indicators
  • MT4 and MT5 files
  • No spam, unsubscribe any time

FAQ

What does SwingDepth 5 require?

That a bar beats five neighbours on each side before it counts as a swing. Raising it produces fewer and more meaningful levels, at the cost of confirming even later than five bars.

Why does the Resistance line hold flat?

Because the buffer repeats the last swing high on every bar until a new one arrives. That flat stretch is the level itself, drawn continuously so you can see where price is trading against it.

Does SwingDepth keep older levels too?

No. Only the most recent swing on each side survives. A new high overwrites the old resistance immediately, even if the older price had been tested several times and looked more important.

How late is a new Support level?

Five bars. The swing low needs five newer bars to close without beating it, so the line steps down five bars after the low actually printed. That delay is unavoidable with a fractal test.

Are results guaranteed?

No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the Auto Support Resistance Indicator as one input. Always backtest before trading live.

Category: this is part of our Support and Resistance collection. Also, still, hence, plainly, truly, browse more Support and Resistance for MetaTrader, or explore every MT4 indicator and MT5 indicator on the site.

External references

Dominic Walsh - Forex trader and MT4/MT5 developer

About the author

Written by Dominic Walsh, a Forex trader and MT4/MT5 indicator, Expert Advisor and script developer. Every tool on forexmt4systems.com is tested on live charts before release and ships with ready-to-use compiled MT4 (.ex4) and MT5 (.ex5) files. Learn more about the trader and developer behind this site.

How we build, test and correct every tool: Editorial & Testing Policy. Trading carries risk; see the disclaimer.

Leave a Comment