Indicator · Pine Script v6 · On the chart

Wyckoff Spring Upthrust

by bader61888· code credited to Bader

Wyckoff Spring Upthrust is an overlay indicator that detects Wyckoff Spring and Upthrust patterns.

View on GitHub

GitHub stars1on the repository
Pine versionv6current
Lines of code65
Settings4inputs
LicenceMIT
Last update4 weeks ago22 Oct 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

65 lines of Pine Script v6 from standalone/WyckoffSpring_standalone.pine, published under MIT. Keep the author's credit and licence lines when you reuse it.

WyckoffSpring_standalone.pine
//@version=6
// SPDX-License-Identifier: MIT
// © 2026 Bader Alrashdi — https://github.com/bader61888/saudi-pine-toolkit
indicator("Wyckoff Spring Upthrust", shorttitle="WySpring", overlay=true)

// Cardwell RSI range regime: 1 = bull range (RSI holds 40-80), -1 = bear range (RSI holds 20-60), 0 = neutral
cardwellRsiRange(series float src, simple int rsiLen, simple int lookback) =>
    float r = ta.rsi(src, rsiLen)
    float lo = ta.lowest(r, lookback)
    float hi = ta.highest(r, lookback)
    int regime = lo >= 40 ? 1 : hi <= 60 ? -1 : 0
    [r, regime]

// Cardwell reversals (confirmed pivotLen bars late). Positive: price higher low + RSI lower low. Negative: price lower high + RSI higher high.
rsiReversals(series float src, simple int rsiLen, simple int pivotLen) =>
    float r = ta.rsi(src, rsiLen)
    bool pl = not na(ta.pivotlow(r, pivotLen, pivotLen))
    bool ph = not na(ta.pivothigh(r, pivotLen, pivotLen))
    float prevRl = ta.valuewhen(pl, r[pivotLen], 1)
    float prevPl = ta.valuewhen(pl, low[pivotLen], 1)
    float prevRh = ta.valuewhen(ph, r[pivotLen], 1)
    float prevPh = ta.valuewhen(ph, high[pivotLen], 1)
    bool pos = pl and r[pivotLen] < prevRl and low[pivotLen] > prevPl
    bool neg = ph and r[pivotLen] > prevRh and high[pivotLen] < prevPh
    [pos, neg]

// Relative volume and relative bar spread vs their SMA
volumeSpread(simple int len) =>
    float spread = high - low
    float avgV = ta.sma(volume, len)
    float avgS = ta.sma(spread, len)
    float relVol = avgV > 0 ? volume / avgV : na
    float relSpread = avgS > 0 ? spread / avgS : na
    [relVol, relSpread]

// Simple Wyckoff spring / upthrust detector
wyckoffSpringUpthrust(simple int rangeLen, simple int volLen, simple float volMult) =>
    float rl = ta.lowest(low, rangeLen)[1]
    float rh = ta.highest(high, rangeLen)[1]
    float avgV = ta.sma(volume, volLen)
    bool hiVol = volume > avgV * volMult
    bool spring = low < rl and close > rl and hiVol
    bool upthrust = high > rh and close < rh and hiVol
    [spring, upthrust]

// True during Tadawul main session: Sun-Thu 10:00-15:00 Asia/Riyadh
inTadawulSession() =>
    int d = dayofweek(time, "Asia/Riyadh")
    int mins = hour(time, "Asia/Riyadh") * 60 + minute(time, "Asia/Riyadh")
    bool tradingDay = d == dayofweek.sunday or d == dayofweek.monday or d == dayofweek.tuesday or d == dayofweek.wednesday or d == dayofweek.thursday
    bool inHours = timeframe.isintraday ? (mins >= 600 and mins < 900) : true
    tradingDay and inHours

rangeLen = input.int(20, "Range Length", minval=5)
volLen = input.int(20, "Volume SMA Length", minval=2)
volMult = input.float(1.2, "Volume Multiplier", minval=0.1, step=0.1)
onlySession = input.bool(false, "Only during Tadawul session")

[spring, upthrust] = wyckoffSpringUpthrust(rangeLen, volLen, volMult)
bool ok = onlySession ? inTadawulSession() : true

plotshape(spring and ok, "Spring", shape.labelup, location.belowbar, color.green, text="S", textcolor=color.white, size=size.tiny)
plotshape(upthrust and ok, "Upthrust", shape.labeldown, location.abovebar, color.red, text="UT", textcolor=color.white, size=size.tiny)
alertcondition(spring and ok, "Spring", "Wyckoff spring detected")
alertcondition(upthrust and ok, "Upthrust", "Wyckoff upthrust detected")

Overview

A Spring triggers when price breaches the lowest low of a user-defined range and closes back above it on high volume. An Upthrust triggers when price exceeds the highest high of the range and closes back below it on high volume. The indicator plots labels on the price chart and provides alerts for both signals. Settings allow users to adjust the range length, volume moving average length, volume multiplier, and optionally limit signal generation to the Tadawul trading session.

Details

Published by

bader61888 on GitHub

Code credit

Bader, as written in the script's header

Draws

On the price chart

Markets

Stocks, Indices

Timeframes

M15-H1, H4 and above

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.

Topics

pinescriptsauditadawultechnical-analysistradingviewwyckoff

Settings

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

SettingTypeDefaultVariable
Range Lengthint20rangeLen
Volume SMA Lengthint20volLen
Volume Multiplierfloat1.2volMult
Only during Tadawul sessionboolfalseonlySession
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

Moon Dev GEX Sweep & CVD

by moondevonyt
98 stars

The indicator detects liquidity sweeps across key price levels and calculates a cumulative volume delta proxy. It uses pivot high and low lookbacks to identify swing points, marking sweeps when price breaks beyond a level and quickly closes back inside. Featur

Indicator v5 Support & resistanceSMC / ICT / price action
Updated 2 months ago · Custom licence GitHub repository of Moon Dev GEX Sweep & CVD

CRT State Engine

by alboogycOdR
6 stars

CRT State Engine is an overlay indicator that maps New York-timed CRT models, unmitigated order blocks, market structure, liquidity pools, and volume profile on the price chart. It can draw session boxes for Asia, London, London lunch, and New York and optiona

Indicator v5 SMC / ICT / price actionSessions & time
Updated 8 months ago · None stated GitHub repository of CRT State Engine

Smart Money Concepts

by TamTH-Dev
2 stars

This indicator maps market structure and session activity directly on the price chart. It detects and labels internal and swing structures with customizable confluence filters and candle coloring. Additionally, it highlights major trading killzones including N

Indicator v5 SMC / ICT / price actionSessions & time Repaints
Updated 2 months ago · None stated GitHub repository of Smart Money Concepts

This overlay indicator builds a weighted volume profile over a chosen number of bars and plots pivot points with a point of control line on the price chart. Volume can be weighted toward recent, normal, or past bars, and swing length, row count, and alignment

Indicator v5 VolumeSupport & resistance
Updated 6 months ago · None stated GitHub repository of Weighted Volume Profile Pivot Points | Flux Charts

A.W. Strategy

by abdulwh1d
1 stars

This overlay indicator plots market structure, order flow metrics, and dealer gamma levels on the price chart. It tracks breaks of structure, fair value gaps, 79% retracements, liquidity sweeps, and intrabar delta alongside relative volume and big prints. Sign

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 11 days ago · None stated GitHub repository of A.W. Strategy
1 stars

Advanced Market Theory calculates Market Profile, TPO, and Hybrid profiles directly on the price chart. It identifies key structural levels including the Point of Control, Value Area High and Low boundaries, Initial Balance range projections, single prints, po

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 1 year ago · None stated GitHub repository of Advanced Market Theory

More SMC / ICT 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