ATR Dynamic Support and Resistance Bands

ATR Dynamic Support and Resistance Bands
Download ALL MT5 indicators (6026)
YouTube Video Thumbnail



Similar MetaTrader Tools

ATR Dynamic Support and Resistance Bands

Info

The ATR Dynamic Support and Resistance Bands is a Indicator for MetaTrader 5 that atr dynamic support and resistance bandsthe idea behind itfixed price levels do not adapt to the market. A 50-pip move means a lot on a quiet day and very little on a volatile one.

Usage

This tool is typically used for enhancing chart analysis and decision making.

Platform

This Indicator works exclusively on MetaTrader 5 (both build 600+ and newer versions).

Setup

Place the downloaded file in MQL5/Indicators folder via File ? Open Data Folder in MetaTrader 5.


How to Install and Use ATR Dynamic Support and Resistance Bands

1. Installation: Place your file in the MQL/Indicators folder via "Open Data Folder" and restart your terminal.

2. Loading: Find the indicator in the Navigator, drag it onto your chart, and configure the input parameters in the popup window.

3. Customization: Press Ctrl+I to open the indicator list, select your tool, and click "Properties" to change colors, levels, or visual styles.

4. Updating: Replace the old file in the Indicators folder with the new version and restart the platform to apply changes.

Frequently Asked Questions

Q: Why is my indicator not showing? A: Verify the file is in the MQL/Indicators folder, or try right-clicking the "Indicators" tree in the Navigator and clicking "Refresh."

Q: Do custom indicators slow down the platform? A: Too many complex indicators can impact performance; remove unused ones via the "Indicator List" (Ctrl+I).

Q: Can I use MT4 indicators on MT5? A: No, MQL4 and MQL5 are distinct languages; ensure the indicator is compiled specifically for your platform version.

What this tool does

ATR Dynamic Support and Resistance BandsThe idea behind itFixed price levels do not adapt to the market.

Typical Use Case

This Indicator excels in automated trading and technical analysis on MetaTrader 5.

Compatible Platform & Setup

This Indicator works on MetaTrader 5. Place the file in the MQL5/Indicators folder and restart the terminal.

Description & Settings

Related: Support/Resistance and Fair Value Gap Zones - another powerful indicator for MetaTrader 5 traders.

ATR Dynamic Support and Resistance Bands

Also recommended: Thanos AI Level Strength: Identifying Significant Support and Resistance - similar indicator with strong performance on MetaTrader 5.


The idea behind it

Fixed price levels do not adapt to the market. A 50-pip move means a lot on a quiet day and very little on a volatile one. This indicator solves that by measuring the distance from a central moving average in units of ATR (Average True Range) of recent bars.

The upper band is calculated as basis + multiplier x ATR, and the lower band is calculated as basis - multiplier x ATR. Price tends to react near these bands, so they function as dynamic resistance and support that automatically adjust to current volatility.

The ATR is calculated within the indicator using Wilder smoothing, eliminating the need for external indicator handles. On each new tick, only the last bar is recalculated, and the full history is processed only once at the start.

How to interpret it

Upper band (dashed line) - dynamic resistance. Price reaching this band in a range can signal an overextended move. A close beyond it with expanding bands can signal a breakout.

Lower band (dashed line) - dynamic support, interpreted similarly for downward moves.

Basis line (dotted line) - the moving average (SMA or EMA) that the bands are built around. It acts as the mean price and as dynamic support or resistance within a trend.

Distance between the bands - provides a direct view of volatility. Narrowing bands indicate a quiet market and often precede a volatility expansion, while widening bands show increasing volatility.

Info label (top-left corner) - displays the ATR settings and the current ATR value in price units, useful for sizing stop-losses and targets.

Bands serve as context, not as standalone signals. In a strong trend, price can move along a band for an extended period, so confirmation with price action or other tools is recommended.

External variables (inputs)

Input

Default

Purpose

Basis line

InpBasisPeriod

20

Period of the basis moving average (2 and above)

InpBasisMethod

BASIS_SMA

Basis moving average method: BASIS_SMA (simple) or BASIS_EMA (exponential)

ATR bands

InpAtrPeriod

14

ATR period (1 and above)

InpMultiplier

2.0

ATR multiplier; the distance of each band from the basis (must be greater than zero)

Appearance

InpUpperColor

clrWhite

Color of the upper band

InpLowerColor

clrSilver

Color of the lower band

InpBasisColor

clrGray

Color of the basis line

InpBandStyle

STYLE_DASH

Line style of the upper and lower bands

InpBasisStyle

STYLE_DOT

Line style of the basis line

InpLineWidth

1

Line width of all lines (1 to 5)

InpShowBasis

true

Show or hide the basis line

Info label

InpShowInfo

true

Show the info label with the ATR value in the chart corner

InpInfoColor

clrWhite

Color of the info label

Recommended use

This indicator is effective on any symbol and timeframe. A good starting point is to use the default settings (SMA 20, ATR 14, multiplier 2.0) on M15 to H4 charts.

A smaller multiplier (1.0-1.5) results in tighter bands suitable for scalping and short-term targets. A larger multiplier (2.5-3.0) highlights only extreme price movements.

The EMA basis reacts more quickly to price changes, while the SMA provides a smoother line. The choice depends on your trading style.

The values of closed bars remain constant (no repainting). The last bar is recalculated while it is forming, similar to any moving average or ATR.

The ATR is a lagging indicator. Therefore, after a sudden news-driven spike, the bands will adapt over the subsequent bars.

The indicator requires at least a few more bars than the larger of the two periods to begin drawing.

As this is a chart indicator and does not execute trades, it functions identically on both netting and hedging accounts.

Fig. 1. AtrBands on an H1 chart with default settings (black and white image per Code Base guidelines).

You may also like: Support and Resistance Channels Ranked by Strength - excellent alternative for indicator users on MetaTrader 5.

Source Code

#property copyright "RobotFX"
#property link "https://robotfx.org"
#property version     "1.00"
#property description "This code is educational. Feel free to use, modify and upgrade as you wish. Visit ROBOTFX.ORG for professional trading tools"
#property indicator_chart_window
#property indicator_buffers 4
#property indicator_plots   3
#property indicator_label1  "ATR Upper"
#property indicator_type1   DRAW_LINE
#property indicator_color1  clrWhite

.......

Leave your opinion, ask a question, share some knowledge

⚠ Limitations & Risk Warning

  • This tool is provided for educational and testing purposes only.
  • Past performance does not guarantee future results.
  • Trading involves substantial risk of loss. Use on a demo account first.
  • Results may vary depending on market conditions, broker, and settings.
  • We recommend thorough backtesting and forward testing before using with real funds.
© ROBOTFX Free educational tools by RobotFX. Use entirely at your own risk; we are not liable for any financial losses incurred.