Indicator · Pine Script v5 · On the chart

SahanS Full Indicator

by sahansbandara· code credited to SahanS

An all-in-one overlay indicator that merges a divergence detector, smart money concepts, order blocks, liquidity swings and moving averages.

View on GitHub

GitHub stars1on the repository
Pine versionv5runs as is
Lines of code155
Settings40inputs
LicenceNone stated
Last update5 months ago11 May 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
  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

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

The divergence part checks regular and hidden divergences between price and up to ten oscillators including RSI, MACD, stochastic, CCI, OBV, CMF and MFI, with an optional external series. Settings control pivot period, bars checked, minimum divergences, label style and colours. Structure shows swing breaks within a bar window and limit.

Details

Published by

sahansbandara on GitHub

Code credit

SahanS, as written in the script's header

Type

Indicator, Pine Script v5

Draws

On the price chart

Category

Divergence, SMC / ICT / price action, Support & resistance, Moving averages

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.

Settings

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

SettingTypeDefaultVariable
Divergence Pivot Periodint5prd
Source for Pivot PointsstringClosesource_div
Divergence TypestringRegularsearchdiv
Show Indicator NamesstringFullshowindis
Minimum Number of Divergenceint1showlimit
Maximum Pivot Points to Checkint10maxpp
Maximum Bars to Checkint100maxbars
Show Divergence Numberbooltrueshownum
Don't Wait for Confirmationboolfalsedontconfirm
Divergence: RSIbooltruecalcrsi
Divergence: MACDbooltruecalcmacd
Divergence: MACD Histbooltruecalcmacda
Show all 40 settings
SettingTypeDefaultVariable
Divergence: Stochbooltruecalcstoc
Divergence: CCIbooltruecalccci
Divergence: Momentumbooltruecalcmom
Divergence: OBVbooltruecalcobv
Divergence: VWmacdbooltruecalcvwmacd
Divergence: CMFbooltruecalccmf
Divergence: MFIbooltruecalcmfi
Divergence: Externalboolfalsecalcext
External Indicatorsourcecloseexternalindi
Positive Regular Div Colorcolorcolor.yellowpos_reg_div_col
Negative Regular Div Colorcolorcolor.navyneg_reg_div_col
Positive Hidden Div Colorcolorcolor.limepos_hid_div_col
Negative Hidden Div Colorcolorcolor.redneg_hid_div_col
SMC Windowint5000mswindow
Show Swing StructurebooltrueshowSwing
Swing Limitint100swingLimit
SMC Bullish Colorcolor#089981swingcssup
SMC Bearish Colorcolor#f23645swingcssdn
SMC Pivot Lengthint5mslen
Show Order Blocksbooltrueobshow
OB Show Lastint5oblast
Bullish OB Colorcolorcolor.new(#089981, 80)obupcs
Bearish OB Colorcolorcolor.new(#f23645, 80)obdncs
OB MitigationstringCloseobmiti
Liquidity Pivot Lengthint14liqLimit
Liquidity High Colorcolorcolor.redliqTopCss
Liquidity Low Colorcolorcolor.tealliqBtmCss
MA 1 Lengthint20ma1Len
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

23 stars

This indicator collection calculates and plots previous daily high and low price levels on the chart to identify potential supply and demand zones. It includes real-time intraday high and low calculations, RSI divergence detection across a customizable period

Indicator v4 Support & resistanceDivergence
Updated 3 years ago · None stated GitHub repository of Daily High and Low Strategy

Bandz HTF

by samuelharting
18 stars

Bandz HTF projects higher-timeframe candle structures, ranges, and key levels directly onto the main price chart. It visualizes multiple configurable timeframe lanes from intraday to weekly alongside primary and macro range levels, including 25%, 50%, and 75%

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 2 weeks ago · MPL-2.0 GitHub repository of Bandz HTF

Larper Suite

by DeolinNaidoo
8 stars

Larper Suite is an overlay indicator for ICT and quarterly-theory analysis. It plots true session, daily, weekly, monthly, and yearly opens plus prior and current high-low liquidity levels. It tracks multi-asset SMT, swing divergence, fair-value-gap fills, and

Indicator v6 SMC / ICT / price actionDivergence Repaints
Updated 3 months ago · GPL-3.0 GitHub repository of Larper Suite
6 stars

Apex Protocol v3.0 - The SMC Engine is an overlay indicator designed for Smart Money Concepts (SMC) trading strategies. It detects market structure shifts (MSS), breaks of structure (BOS), M5 Fair Value Gaps (FVG), Order Blocks (OB), and Asian session ranges.

Indicator v5 SMC / ICT / price actionSupport & resistance Repaints
Updated 7 months ago · None stated GitHub repository of Apex Protocol v3.0 - The SMC Engine

HH-LL Buy/Sell + EMA

by vinitpatil519
5 stars

This overlay indicator classifies market structure with an ATR-based ZigZag that marks higher highs, higher lows, lower highs, and lower lows. A state machine plots buy and sell labels on the confirmation bar, not on the earlier pivot, and by default waits for

Indicator v5 TrendSupport & resistance
Updated 2 months ago · None stated GitHub repository of HH-LL Buy/Sell + EMA

More indicators

Trade Your Charts With a Regulated Broker

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

Compare brokers