Strategy · Pine Script v5 · On the chart

Wyckoff Phase

by muammeryldrm42

This strategy identifies Wyckoff consolidation ranges directly on the price chart to trade potential spring and upthrust events.

View on GitHub

GitHub stars7on the repository
Pine versionv5runs as is
Lines of code35
Settings3inputs
LicenceMIT
Last update3 months ago8 Jul 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 strategy, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart. The trades and results appear in the Strategy Tester tab; adjust the settings with the gear icon.

Source Code

35 lines of Pine Script v5 from public/code/indicators__wyckoff.pine, published under MIT. Keep the author's credit and licence lines when you reuse it.

indicators__wyckoff.pine
//@version=5
strategy("Wyckoff Phase", overlay=true,
         default_qty_type=strategy.percent_of_equity, default_qty_value=10)

rangeLb = input.int(30, "Range Lookback")
volLb   = input.int(50, "Volume Lookback")
volMult = input.float(1.5, "High Vol Mult")

atrV      = ta.atr(14)
rangeHigh = ta.highest(high[1], rangeLb)
rangeLow  = ta.lowest(low[1],   rangeLb)
rangeSize = rangeHigh - rangeLow
avgVol    = ta.sma(volume, volLb)
highVol   = volume > avgVol * volMult

rangeAtrRatio = rangeSize / atrV
isConsol = rangeAtrRatio < 8

spring   = isConsol and low < rangeLow  and close > rangeLow  and close > open and highVol
upthrust = isConsol and high > rangeHigh and close < rangeHigh and close < open and highVol

if spring and strategy.position_size == 0
    sl = low - 0.5 * atrV
    strategy.entry("Spring", strategy.long)
    strategy.exit("X", "Spring", stop=sl, limit=rangeHigh + rangeSize * 0.5)

if upthrust and strategy.position_size == 0
    sl = high + 0.5 * atrV
    strategy.entry("Upthrust", strategy.short)
    strategy.exit("X", "Upthrust", stop=sl, limit=rangeLow - rangeSize * 0.5)

plot(rangeHigh, "Range High", color.red, 1)
plot(rangeLow,  "Range Low",  color.green, 1)
plotshape(spring,   "Spring",   shape.triangleup,   location.belowbar, color.lime, size=size.normal)
plotshape(upthrust, "Upthrust", shape.triangledown, location.abovebar, color.red,  size=size.normal)

Overview

Wyckoff Phase calculates highest highs and lowest lows over a customizable lookback period, filtering setups by average volume spikes and ATR range consolidation limits. When a spring occurs during consolidation, it enters long with an ATR-based stop loss and target projection. When an upthrust occurs, it enters short with corresponding stop and target levels. Main inputs configure range lookback, volume lookback, and the volume threshold multiplier.

Details

Published by

muammeryldrm42 on GitHub

Type

Strategy, Pine Script v5

Draws

On the price chart

Category

SMC / ICT / price action, Support & resistance, Volume, Mean reversion

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.

Topics

cryptofuturessodexsosovaluestrategyvaluechain

Settings

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

SettingTypeDefaultVariable
Range Lookbackint30rangeLb
Volume Lookbackint50volLb
High Vol Multfloat1.5volMult
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

SMC + VWAP Edge Strategy

by StockPro-AI
1 stars

This strategy combines Smart Money Concepts with Order Blocks and Fair Value Gaps alongside multiple VWAP levels including session, weekly, monthly, and anchored variants. It detects confluence zones to generate long and short entry signals on the price chart.

Strategy v6 SMC / ICT / price actionSupport & resistance
Updated 6 months ago · None stated GitHub repository of SMC + VWAP Edge Strategy

FairValueGap E003

by ruckard
13 stars

Calculates the distance between the current price and the opposite end of the latest fair value gap, entering trades on the expectation that price will partially fill the gap. It incorporates risk management with customizable stop loss, take profit based on ri

Strategy v5 SMC / ICT / price actionSupport & resistance
Updated 1 year ago · None stated GitHub repository of FairValueGap E003

The Judas Indicator

by regardhodler
3 stars

The Judas Indicator strategy calculates a multi-factor composite score combining Volume Profile High Volume Nodes, Cumulative Volume Delta (CVD), pivot proximity, volume absorption, order imbalance, and higher-timeframe trend EMAs. It triggers trade entries wh

Strategy v5 TrendVolume
Updated 8 months ago · None stated GitHub repository of The Judas Indicator
1 stars

This strategy identifies Initial Balance periods on NQ and ES futures charts using user-defined start and end hours in Eastern Time. It classifies days as narrow or wide based on average range lookback and skips narrow or trending days per settings. Entries tr

Strategy v6 Mean reversionSupport & resistance
Updated 7 months ago · MIT GitHub repository of IB Mean Reversion Fade
1 stars

This Pine Script strategy detects ICT smart money concepts including order test zones, fair value gaps, and wicks on BTC and XAUUSD price charts. It calculates swings using pivot high and low. Signals enter long or short when the order test zone is hit with su

Strategy v5 SMC / ICT / price actionCandlestick patterns
Updated 6 months ago · None stated GitHub repository of ICT v4-weinkya BTC Improved

More strategys

Trade Your Charts With a Regulated Broker

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

Compare brokers