19. 6. 2025

5 0

Smoothed ATR With Bands (SATRB)

Smoothed ATR with Bands (SATRB) – Custom Indicator

The Smoothed ATR with Bands indicator combines dual ATR calculations with statistical bands to provide enhanced volatility analysis. This indicator creates a more sophisticated approach to measuring market volatility by smoothing the ATR values and adding standard deviation bands.

How It Works

The indicator calculates two separate ATR values:

  • ATR1: Used for bands calculation with its own period and smoothing
  • ATR2: The main plotted line with independent period and smoothing settings

Both ATR values are smoothed using Simple Moving Average (SMA) to reduce noise. The bands are created by adding and subtracting a multiple of the standard deviation from the smoothed ATR1 value.

Parameters

The indicator accepts the following parameters:

  • ATR1Period (default: 14) – Period for ATR used in bands calculation
  • ATR2Period (default: 21) – Period for the plotted ATR line
  • ATR1SmoothingPeriod (default: 5) – SMA smoothing period for ATR1
  • ATR2SmoothingPeriod (default: 5) – SMA smoothing period for ATR2
  • StdDevMult (default: 1.0) – Standard deviation multiplier for bands

Outputs

The indicator produces three outputs:

  • UpperBand (Red) – Upper volatility band
  • LowerBand (Red) – Lower volatility band
  • ATR2Line (Blue) – Main smoothed ATR line

Implementation Details

The indicator calculates ATR using the traditional method:

TrueRange = Max(High-Low, |High-PrevClose|, |Low-PrevClose|)

For the first bar, it simply uses High-Low. The ATR is then calculated as a simple average of True Range values over the specified period.

Both ATR values are smoothed using SMA, and the standard deviation is calculated from the smoothed ATR1 values to create the bands.

Parameter Sets

Three optimized parameter sets are included:

  1. Default: ATR1=14, ATR2=21, Smoothing=5/5, StdDev=1.0
  2. Sensitive: ATR1=10, ATR2=20, Smoothing=5/3, StdDev=2.0
  3. Conservative: ATR1=20, ATR2=30, Smoothing=10/7, StdDev=1.5

Usage

The indicator can be used to:

  • Identify periods of high/low volatility when ATR2 breaks above/below bands
  • Assess trend strength based on ATR2 position relative to bands
  • Spot potential breakout conditions when volatility is compressed

The dual ATR approach allows for more nuanced volatility analysis compared to single ATR indicators, while the smoothing reduces false signals common in raw ATR calculations.

 

 

Indicator Availability:
This indicator is implemented for MT4, MT5, TradeStation, and MultiCharts.

Using Custom Blocks for Conditions:
You can easily define your own conditions in StrategyQuant X using Custom Blocks. This allows you to set up parameters such as periods or steps to fine-tune the indicator to your strategy. For more detailed information, refer to the following resources:

Importing Custom Indicators into SQX:
To import custom indicators into StrategyQuant X, follow the step-by-step instructions provided here:
Import & Export Custom Indicators and Other Snippets

Subscribe
Notify of
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments