//@version=5
// =============================================================================
// Average Bar Range Stats v1.1 · 20260512
// =============================================================================
// Purpose: Computes three values for a Daily Range Distribution study and
// exposes them in the Data Window only. Nothing is rendered on the chart.
// Values are picked up by TradingView's "Export chart data" feature.
//
// Output columns (CSV export):
// - Range today's daily range (high - low), in points
// - Average Bar Range N-bar simple moving average of Range
// - Range / ABR Range divided by Average Bar Range
//
// Apply on the DAILY timeframe of any instrument.
//
// Notes:
// - Range = high - low (intraday range only). Gaps are NOT included.
// - The first N-1 bars have a blank Average Bar Range from the SMA warm-up.
// Drop these rows before analysis.
// =============================================================================
indicator("Average Bar Range Stats", overlay = true)
// --- Inputs ---
abr_length = input.int(8, title = "Average Bar Range Length", minval = 1, maxval = 200,
tooltip = "Number of bars in the simple moving average of daily range. Default 8.")
// --- Computations ---
rng = high - low
abr = ta.sma(rng, abr_length)
rng_over_abr = abr > 0 ? rng / abr : na
// --- Data-window-only output (invisible on chart, included in CSV export) ---
plot(rng, title = "Range", display = display.data_window)
plot(abr, title = "Average Bar Range", display = display.data_window)
plot(rng_over_abr, title = "Range / ABR", display = display.data_window)
Overview
Average Bar Range Stats then computes a simple moving average of that range over a user-set length and the ratio of the current range to that average. The length input defaults to eight bars and can run from one to two hundred. All three series are plotted only in the data window for chart-data export, so nothing is drawn on the price chart. It is intended for the daily timeframe of any instrument. The first bars stay blank while the average warms up.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Average Bar Range Length
int
8
abr_length
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.
This indicator plots an ATR-based Chandelier Exit trailing stop on the price chart. It tracks a long stop under recent highs and a short stop above recent lows, then switches direction when price crosses the opposite stop. Buy and sell labels mark those flips.
This overlay indicator marks ICT liquidity void fills on the price chart and can show long and short signals. It places a Fibonacci level inside a displacement candle, defaulting to the midpoint, and draws lines in a chosen style. Optional filters limit the fi
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
This indicator calculates an ATR trailing stop line derived from the highest high minus an average true range multiple over a specified lookback period. It plots the trailing stop line directly on the price chart and colors price bars based on whether the clos
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
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