1Copy the scriptPress Copy script above, or the copy button on the code below.
2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
3Paste over the templateCreate a new strategy, select all of the template text and paste. Press Save and give it a name.
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.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Range Lookback
int
30
rangeLb
Volume Lookback
int
50
volLb
High Vol Mult
float
1.5
volMult
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 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.
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
Liquidity Sweep Reversal Strategy [Lab] identifies potential price reversals following liquidity sweeps of previous high or low levels. A bullish setup occurs when price sweeps below a prior low and closes back inside, while a bearish setup occurs when price s
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
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
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