Indicator · Pine Script v6 · On the chart

1-Minute ATR Table

by ryangaraygay

This indicator calculates 1-minute Average True Range (ATR) values for three different period lengths: 5, 8, and 14.

View on GitHub

GitHub stars2on the repository
Pine versionv6current
Lines of code50
Settings2inputs
LicenceMIT
Last update1 year ago10 Apr 2025

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

50 lines of Pine Script v6 from 1-min-atr-table.pine, published under MIT. Keep the author's credit and licence lines when you reuse it.

1-min-atr-table.pine
//@version=6
indicator("1-Minute ATR Table", overlay=true)

// === Display Settings ===
var string GP2 = "Display"
string  tableYposInput = input.string("bottom", "Panel position", inline = "11", options = ["top", "middle", "bottom"], group = GP2)
string  tableXposInput = input.string("left", "", inline = "11", options = ["left", "center", "right"], group = GP2)

// === Pull 1-Minute ATR Values ===
atr5  = request.security(syminfo.tickerid, "1", ta.atr(5))
atr8  = request.security(syminfo.tickerid, "1", ta.atr(8))
atr14 = request.security(syminfo.tickerid, "1", ta.atr(14))

// === Define Multipliers ===
mult5  = 1.5
mult8  = 1.2
mult14 = 1.0

// === Calculate Stops ===
stop5  = atr5 * mult5
stop8  = atr8 * mult8
stop14 = atr14 * mult14

// === Create the Table ===
var table atrTable = table.new(tableYposInput + "_" + tableXposInput, 4, 4, border_width = 1, frame_color=color.new(color.gray, 80), frame_width=1)

if bar_index % 1 == 0
    // Row 0: Column Headers
    table.cell(atrTable, 0, 0, "1-Min Period", bgcolor=color.gray, text_color=color.white)
    table.cell(atrTable, 1, 0, "ATR", bgcolor=color.gray, text_color=color.white)
    table.cell(atrTable, 2, 0, "Multiplier", bgcolor=color.gray, text_color=color.white)
    table.cell(atrTable, 3, 0, "Stop", bgcolor=color.gray, text_color=color.white)

    // Row 1: ATR(5)
    table.cell(atrTable, 0, 1, "ATR(5)", text_color=color.orange)
    table.cell(atrTable, 1, 1, str.tostring(atr5, format.mintick), text_color=color.orange)
    table.cell(atrTable, 2, 1, str.tostring(mult5, "#.##"), text_color=color.orange)
    table.cell(atrTable, 3, 1, str.tostring(stop5, format.mintick), text_color=color.orange)

    // Row 2: ATR(8)
    table.cell(atrTable, 0, 2, "ATR(8)", text_color=color.teal)
    table.cell(atrTable, 1, 2, str.tostring(atr8, format.mintick), text_color=color.teal)
    table.cell(atrTable, 2, 2, str.tostring(mult8, "#.##"), text_color=color.teal)
    table.cell(atrTable, 3, 2, str.tostring(stop8, format.mintick), text_color=color.teal)

    // Row 3: ATR(14)
    table.cell(atrTable, 0, 3, "ATR(14)", text_color=color.fuchsia)
    table.cell(atrTable, 1, 3, str.tostring(atr14, format.mintick), text_color=color.fuchsia)
    table.cell(atrTable, 2, 3, str.tostring(mult14, "#.##"), text_color=color.fuchsia)
    table.cell(atrTable, 3, 3, str.tostring(stop14, format.mintick), text_color=color.fuchsia)

Overview

1-Minute ATR Table applies predefined multipliers to these ATR values to compute estimated stop-loss distances in price ticks. The output is displayed in a customizable panel table directly on the main chart area. User settings allow adjusting the table vertical and horizontal screen positions. It provides a quick reference for volatility-based stop distances derived from a 1-minute timeframe regardless of the current chart resolution.

Details

Published by

ryangaraygay on GitHub

Type

Indicator, Pine Script v6

Draws

On the price chart

Category

Volatility & bands, Screeners & dashboards

Markets

Any symbol

Timeframes

M1-M5, M15-H1

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
Panel positionstringbottomtableYposInput
tableXposInputstringlefttableXposInput
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

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
330 stars

This multi-symbol indicator evaluates a combined trading condition across up to 40 user-defined symbols. It processes MACD bullish crossovers, RSI thresholds, Bollinger Band boundaries, and DMI/ADX trend filters using security calls. When buy or sell criteria

Indicator v5 Oscillators & momentumVolatility & bands
Updated 2 months ago · None stated GitHub repository of Multi MACD + BB + RSI [Alorse]

Pricing Table

by namuan
318 stars

This indicator calculates theoretical options contract values and in-the-money probabilities using historical realized volatility across multiple standard deviations. It displays these metrics in a table overlay directly on the price chart. Users can adjust th

Indicator v4 Volatility & bandsScreeners & dashboards
Updated 2 months ago · MIT GitHub repository of Pricing Table
218 stars

This indicator maps market structure and supply and demand zones on the price chart. It marks validated and optional unvalidated swing highs and lows using a pivot length and extra confirmation bars. Consolidation and impulse moves are measured against ATR to

Indicator v6 SMC / ICT / price actionSupport & resistance Repaints
Updated 3 months ago · None stated GitHub repository of Market Structure + Supply/Demand
200 stars

Storm Gauge calculates annualized realized volatility and compares it against a historical percentile lookback window to classify market volatility regimes into calm, normal, or storm conditions. Based on a target volatility input, it calculates dynamic positi

Indicator v5 Volatility & bandsScreeners & dashboards
Updated 3 months ago · MIT GitHub repository of Storm Gauge — Vol Regime + Position Size

8zz反指標v2

by hansai-art
121 stars

The 8zz Contrarian Indicator plots reverse sentiment trading signals directly on the price chart based on tracked retail post activity. It generates bullish signals during retail panic and bearish signals during market euphoria. The indicator features adjustab

Indicator v6 Moving averagesOscillators & momentum
Updated 3 months ago · None stated GitHub repository of 8zz反指標v2

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