Indicator · Pine Script v6 · On the chart

Wave Amplitude Levels

by MRMD07· code credited to MRMD

Wave Amplitude Levels is an overlay indicator that measures average daily price amplitude as half the daily high-low range, smoothed over a user-set lookback.

View on GitHub

GitHub stars2on the repository
Pine versionv6current
Lines of code58
Settings1inputs
LicenceNone statedfile: MPL-2.0
Last update8 weeks ago4 Sep 2026

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

58 lines of Pine Script v6 from Trading View Projects/Wave Amplitude Levels/Wave_amplitude_levels.pine, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.

Wave_amplitude_levels.pine
// This Pine Script® code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © MRMD

//@version=6
plot(close)

indicator("Wave Amplitude Levels", overlay=true)

// --- Inputs ---
lookback = input.int(30, title="Average Amplitude Lookback (Days)", minval=1)


daily_amp = (high - low) / 2

// Fetch the Previous Close and Average Amplitude using the non-repainting method
[prev_close, avg_amp] = request.security(syminfo.tickerid, "D", [close[1], ta.sma(daily_amp, lookback)[1]], lookahead=barmerge.lookahead_on)

// Calculate the Natural Levels
level_plus_2  = prev_close + (2 * avg_amp)
level_plus_1  = prev_close + avg_amp
mean_level    = prev_close
level_minus_1 = prev_close - avg_amp
level_minus_2 = prev_close - (2 * avg_amp)

// Plotting the Levels 
plot(level_plus_2,  title="+2 Amplitude", color=color.new(color.red, 40),   style=plot.style_stepline, linewidth=2)
plot(level_plus_1,  title="+1 Amplitude", color=color.new(color.orange, 40),style=plot.style_stepline, linewidth=1)
plot(mean_level,    title="Mean (Prev Close)", color=color.new(color.white, 30), style=plot.style_stepline, linewidth=2)
plot(level_minus_1, title="-1 Amplitude", color=color.new(color.blue, 40),  style=plot.style_stepline, linewidth=1)
plot(level_minus_2, title="-2 Amplitude", color=color.new(color.green, 40), style=plot.style_stepline, linewidth=2)


var table levelsTable = table.new(position.top_right, 2, 6, bgcolor=color.new(color.black, 70), border_width=1, border_color=color.gray)

if barstate.islast
    
    table.cell(levelsTable, 0, 0, "Wave Level", text_color=color.white, text_halign=text.align_left)
    table.cell(levelsTable, 1, 0, "Price",      text_color=color.white, text_halign=text.align_right)

    
    table.cell(levelsTable, 0, 1, "+2 Amplitude", text_color=color.red, text_halign=text.align_left)
    table.cell(levelsTable, 1, 1, str.tostring(level_plus_2, format.mintick), text_color=color.red, text_halign=text.align_right)

    
    table.cell(levelsTable, 0, 2, "+1 Amplitude", text_color=color.orange, text_halign=text.align_left)
    table.cell(levelsTable, 1, 2, str.tostring(level_plus_1, format.mintick), text_color=color.orange, text_halign=text.align_right)

    // Mean
    table.cell(levelsTable, 0, 3, "Mean (Yest. Close)", text_color=color.white, text_halign=text.align_left)
    table.cell(levelsTable, 1, 3, str.tostring(mean_level, format.mintick), text_color=color.white, text_halign=text.align_right)

   
    table.cell(levelsTable, 0, 4, "-1 Amplitude", text_color=color.blue, text_halign=text.align_left)
    table.cell(levelsTable, 1, 4, str.tostring(level_minus_1, format.mintick), text_color=color.blue, text_halign=text.align_right)

   
    table.cell(levelsTable, 0, 5, "-2 Amplitude", text_color=color.green, text_halign=text.align_left)
    table.cell(levelsTable, 1, 5, str.tostring(level_minus_2, format.mintick), text_color=color.green, text_halign=text.align_right)

Overview

Wave Amplitude Levels requests the previous daily close and that average with a one-bar offset, then plots five stepline levels: the prior close and one and two amplitudes above and below it. A table in the top-right corner lists each level and its price. The lookback changes how many daily bars form the average amplitude. It does not generate entries, exits, or alerts.

Details

Published by

MRMD07 on GitHub

Code credit

MRMD, as written in the script's header

Draws

On the price chart

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
Average Amplitude Lookback (Days)int30lookback
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

228 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
56 stars

This indicator marks forex trading sessions and opening ranges on the price chart. It can draw Sydney, Tokyo, Frankfurt, London, and New York session boxes or five- and fifteen-minute opening ranges, plus an optional opening channel and a day-open range. Day r

Indicator v5 Sessions & timeSupport & resistance Repaints
Updated 2 months ago · None stated GitHub repository of Day Trading Booster by DGT

ADR levels

by TamaraKGreen
46 stars

This indicator plots average daily range levels on the price chart, together with optional standard-deviation and Fibonacci levels scaled from that range. Users set the lookback in days, a scale factor, and the visibility, color, and line style of the ADR line

Indicator v5 Support & resistanceVolatility & bands
Updated 8 weeks ago · None stated GitHub repository of ADR levels
41 stars

ATR Matrix calculates Average True Range and a 50-period Simple Moving Average to display multi-tier volatility levels and risk-reward metrics. It project stop levels using negative ATR multiples from an entry price, alongside target levels from 0x to 11x ATR

Indicator v5 Volatility & bandsSupport & resistance

Zen Trading Toolkit

by Zen-Tim
29 stars

This indicator plots average bar range (ABR) measured move targets, opening range boxes, and historical key reference levels directly on the price chart. It projects bullish and bearish targets (0.5x, 1.0x, 1.5x, 2.0x ABR) from the previous session's close, al

Indicator v6 Support & resistanceVolatility & bands
Updated 2 weeks ago · MIT GitHub repository of Zen Trading Toolkit
20 stars

This indicator calculates a base moving average (EMA, SMA, WMA, or HMA) and projects multiple symmetrical envelope bands around it directly on the price chart. Users can adjust the length, source, moving average type, and initial envelope multiplier. Additiona

Indicator v5 Moving averagesVolatility & bands
Updated 1 year ago · None stated GitHub repository of Multiple Moving Average Envelope

More Support & resistance scripts

Related on ForexR

Trade Your Charts With a Regulated Broker

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

Compare brokers