1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.
Source Code
The code stays on GitHub. The author has not published this script under an open licence, so ForexR does not show its code. Copy script reads the file straight from GitHub into your clipboard, so you can still try it on your own chart. Ask the author before reusing the code anywhere else.
Overview
A displacement candle is one whose range is at least 1.2 times ATR on above-average volume; the last opposite-colour candle before it becomes the zone. Each zone is scored on five checks such as clean body, low volume candle and compact size, and only zones at or above a minimum quality percentage are drawn. Accepted zones get a stop guide with a pip buffer and a target at a set risk-reward, plus an optional dashboard.
Displacement candle detection using ATR and volume
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
ATR Length
int
14
atrLen
Displacement Candle = ATR x
float
1.2
dispMult
Volume Average Length
int
20
volAvgLen
Displacement Volume = Avg x
float
1.2
volMult
Max Active Zones Per Side
int
3
maxZonesPerSide
Zone Box Extend (bars)
int
150
zoneExtendBars
Minimum OB Quality %
int
80
minQualityPct
Strong Displacement Tier = ATR x
float
1.5
strongDispMult
Max OB Size = ATR x
float
0.8
maxObAtrMult
Minimum Risk Reward
float
3.0
targetRR
SL Buffer (pips)
float
2.0
slBufferPips
Show Dashboard
bool
true
showDash
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.
Apex Protocol v3.3 is a Smart Money Concepts trading indicator that plots order blocks, fair value gaps, BOS and MSS markers, auto Fibonacci levels, area of interest zones and external internal structures on the price chart. It supports multiple killzone sessi
This indicator tracks multi-timeframe liquidity levels from daily, 1-hour, 15-minute, and 5-minute charts on a 1-minute timeframe. It identifies liquidity sweeps where a 1-minute candle wicks through a higher-timeframe level and closes back inside, followed by
A price-chart overlay for gold that extends the earlier version of this scalping tool with stricter confirmation rules. It combines pivot market structure, liquidity sweeps, candlestick confirmation, breakout and retest logic, a higher-timeframe filter and a q
This overlay indicator finds pivot highs and lows on the price chart and compares the last two highs and the last two lows. When the percentage difference between a pair is below the Equal HL threshold, it treats them as equal levels and draws a box. Left and
This indicator plots labels on the TradingView price chart to mark ARK Invest's buy and sell trades for the DE stock. Buy transactions appear in green with X1 or X2 multipliers showing the number of ARK ETFs involved on the same day; sells appear in red. The m
This Pine Script indicator plots a ZigZag on the price chart. It identifies reversal points when price moves more than a set percentage from the last pivot. The script calculates forecasts using zigzag data and labels detected geometric patterns including harm