Indicator · Pine Script v4 · On the chart

Acceleration Bands

by capissimo

Acceleration Bands is an overlay indicator that plots a volatility envelope around a central simple moving average.

View on GitHub

GitHub stars114on the repository
Pine versionv4older, still runs
Lines of code37
Settings1inputs
LicenceNone statedfile: MPL-2.0
Last update1 year ago7 Nov 2024

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above, or the copy button on the code below.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.

Source Code

37 lines of Pine Script v4 from scripts/094-Acceleration-Bands.pine, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.

094-Acceleration-Bands.pine
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © capissimo

//@version=4
study("Acceleration Bands", '', true)

// Acceleration Bands 

// Description:
// Acceleration Bands serve as a trading envelope that factor in 
// an assets typical volatility over standard settings of 20 or 80 bars. 
// They can be used across any time period, though Headley prefers to use 
// them most across weekly and monthly timeframes as breakout indicators outside 
// these bands. 

// Using the shorter time frames can define likely support and resistance levels 
// at the lower and upper Acceleration Bands.

// Entry is usually made at the breakout point. Once the price closes back within 
// the Acceleration Bands, this is taken as a signal that the acceleration period is over 
// and it’s best to close out the trade.

//-------------------- Inputs

p = input(80, 'Lookback Window (20,80)', minval=2)

//-------------------- Logic

upper = sma(high * ( 1 + 4 * (high - low) / (high + low)), p)
ma    = sma(close, p)
lower = sma(low * (1 - 4 * (high - low)/ (high + low)), p)

//-------------------- Rendering

plot(upper, color=color.gray)
plot(lower, color=color.gray)
plot(ma,    color=color.orange)

Overview

Acceleration Bands calculates upper and lower boundary bands scaled by the high-to-low bar range relative to the midpoint price, smoothed by an SMA over a user-defined lookback window. The script plots the upper band, baseline, and lower band directly on the price chart. It provides visual reference lines for potential breakout acceleration zones and support or resistance levels, but contains no automated execution signals or built-in trade exits.

Details

Published by

capissimo on GitHub

Type

Indicator, Pine Script v4

Draws

On the price chart

Category

Volatility & bands, Moving averages, Breakout

Markets

Any symbol

Timeframes

Any timeframe

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
Lookback Window (20,80)int80p
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

Hampel Filter

by everget
948 stars

The Hampel Filter indicator identifies and filters out price outliers to smooth price data directly on the main chart. It calculates the rolling median and Median Absolute Deviation (MAD) of the chosen source series over a specified length. When a data point e

Indicator v4 Moving averagesVolatility & bands
Updated 10 days ago · GPL-3.0 GitHub repository of Hampel Filter

This overlay indicator plots a Supertrend from an ATR length and factor, four exponential moving averages, and a selectable VWAP or TWAP taken from a chosen timeframe on the price chart. It also shows MACD and stochastic with adjustable lengths, smoothing, ver

Indicator v5 Oscillators & momentumMoving averages
Updated 1 year ago · MPL-2.0 GitHub repository of Momentum Setup: Vijay Thakare Option Buying Scalping Setup

This indicator plots trade entry and exit signals on the price chart by combining Bollinger Bands with optional filter conditions. It calculates standard Bollinger Bands along with RSI, Aroon, and moving average filters. Reversal signals trigger when price bre

Indicator v4 Volatility & bandsOscillators & momentum
Updated 2 months ago · None stated GitHub repository of Bollinger Bands Winner IND [Alorse]
318 stars

This indicator plots four customizable moving averages directly on the main price chart using default lengths of 3, 8, 21, and 50 periods. It fills the space between adjacent averages in green or maroon depending on trend alignment. Additionally, it computes B

Indicator v5 Moving averagesTrend
Updated 2 months ago · MIT GitHub repository of Multiple Moving Averages

NVDA Trend Ribbon

by longsurf-ai
277 stars

This indicator plots three exponential moving averages and ATR volatility envelopes on the price chart. It compares the fast and slow EMAs to shade a trend ribbon and marks confirmed upward and downward crossovers with triangle labels. Settings change the thre

Indicator v6 TrendMoving averages
Updated yesterday · MIT GitHub repository of NVDA Trend Ribbon

Algo AVT

by ricardosantos79
261 stars

This indicator calculates an outlier-filtered moving average based on statistical filtering concepts. It stores close prices in a rolling array over a user-defined length, calculates the mean and standard deviation, and excludes values falling within a specifi

Indicator v4 Moving averagesVolatility & bands
Updated 4 years ago · None stated GitHub repository of Algo AVT

More indicators

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers