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 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
233 lines of Pine Script v5 from IPDA Deviations.txt, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.
Monthly, weekly, daily and intraday lookbacks can each be switched on and are applied according to the chart timeframe range set for them. The deviation multiples are typed in as a list, with defaults such as 0, 1, minus 1, minus 1.5 and minus 2. It offers up and down toggles for three time-window groups, label size and hiding, and optional removal of deviations once invalidated. It draws lines and labels on price.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Insert the Deviations you want to plot, one per line:
text
0
1
-1
-1.5
-2
-2.5
-4
dvs
Label Size
string
Small
label_size
Hide Labels?
bool
false
lbl
Monthly
bool
true
MLB
lMTF
timeframe
D
lMTF
hMTF
timeframe
D
hMTF
Weekly
bool
true
WLB
lWTF
timeframe
240
lWTF
hWTF
timeframe
480
hWTF
Daily
bool
true
DLB
lDTF
timeframe
15
lDTF
hDTF
timeframe
60
hDTF
Show all 22 settings
Setting
Type
Default
Variable
Intraday
bool
true
ILB
lITF
timeframe
1
lITF
hITF
timeframe
5
hITF
Remove Deviations Once Invalidated?
bool
false
remove
TW3 Up
bool
true
tw3_up
TW2 Up
bool
true
tw2_up
TW1 Up
bool
true
tw1_up
TW3 Down
bool
true
tw3_dw
TW2 Down
bool
true
tw2_dw
TW1 Down
bool
true
tw1_dw
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.
The Golden Bullet Strategy is an overlay signal indicator based on Smart Money Concepts and time-based liquidity models. It identifies liquidity sweeps of a designated reference session range during a specified hunt window. It then confirms Market Structure Sh
Indicatorv6SMC / ICT / price actionSessions & time
This indicator overlays options gamma-exposure levels, session VWAP bands, and intraday market structure tools directly on the price chart. It provides three modular components: strike walls with standard deviation bands and opening ranges, a gamma regime engi
This indicator detects and draws the first Fair Value Gap (FVG) that forms in each hourly session based on a selected lower timeframe, with specialized handling for Regular Trading Hours (RTH) confluence windows. It draws FVG range boxes, midpoint lines, hourl
This indicator combines six trading tools into a single chart overlay to optimize indicator limits. It calculates Bollinger Bands, projects weekend price boundaries, plots market structure elements like order blocks, breaker blocks, and MSB lines, marks New Yo
This indicator highlights Inner Circle Trader (ICT) killzones and key session pivot points directly on the price chart. It projects shaded boxes for specific trading sessions, including Asia, London, NY AM, NY Lunch, and NY PM, to help traders identify high-li
Indicatorv5SMC / ICT / price actionSessions & time
Bandz Session Ranges + ORG + Opening Prices plots trading session ranges, killzones, opening RTH gaps, standard deviation projections, and key opening prices directly on the price chart. It calculates gap ranges based on prior regular trading hours close sourc