Indicator · Pine Script v6 · On the chart

SMC Zones

by allanninal

SMC Zones is an overlay indicator that identifies Smart Money Concepts structure on the price chart using closed-bar logic.

View on GitHub

GitHub stars1on the repository
Pine versionv6current
Lines of code463
Settings31inputs
LicenceCustom licence
Last update8 days ago22 Oct 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

SMC Zones calculates and plots order blocks, fair value gaps, BOS and CHoCH break lines, and optional liquidity sweeps. Users can adjust swing length, ATR parameters for gap sizing, session filters, mitigation rules (touch, midpoint, wick, or close), and display higher timeframe zones. The script draws visual boxes and lines directly on the price chart and offers customizable alert events for new zones, touches, or structural breaks.

Details

Published by

allanninal on GitHub

Draws

On the price chart

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

pine-scriptpinescript-v6smart-money-conceptstradingviewtradingview-indicator

Settings

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

SettingTypeDefaultVariable
Swing strength, bars on each sideint3swingLen
ATR periodint14atrLen
Draw order blocksbooltrueshowOB
Order block is mitigated whenstringMIT_CLOSEobMitTxt
Draw fair value gapsbooltrueshowFVG
Minimum gap, x ATRfloat0.20fvgMin
Gap is mitigated whenstringMIT_WICKfvgMitTxt
Mark liquidity sweepsboolfalseshowSweeps
Swing looked back, barsint60sweepLook
Wick beyond the swing, min x ATRfloat0.10sweepMin
Only create zones and sweeps in the sessionboolfalseuseSession
Session start hourint7sessStart
Show all 31 settings
SettingTypeDefaultVariable
end hourint17sessEnd
Hours are instringTZ_NYCLOSEsessTz
Also draw zones of this timeframetimeframehtf
Draw BOS / CHoCH linesbooltrueshowStruct
Keep mitigated zones, up to their mitigation barboolfalseshowMitigated
Draw zones created within this many barsint1000drawBars
Draw at most this many zones (newest first)int80maxZones
Extend live zones this many bars past the last barint12extendBars
Fill the zonesbooltruefillZones
Order blockcolor#089981colOBBull
colOBBearcolor#F23645colOBBear
Gapcolor#2962FFcolFVGBull
colFVGBearcolor#FF9800colFVGBear
Higher-timeframe zonescolor#9598A1colHTF
New order block or gapbooltruealNew
Price touches a live zonebooltruealTouch
A zone is mitigatedboolfalsealMit
BOS / CHoCHbooltruealStruct
Liquidity sweepboolfalsealSweep
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

Golden Bullet Strategy

by TradersPost
228 stars

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

Indicator v6 SMC / ICT / price actionSessions & time
Updated 3 months ago · None stated GitHub repository of Golden Bullet Strategy

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

Indicator v5 SMC / ICT / price actionSupport & resistance Repaints

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

Indicator v6 Support & resistanceSMC / ICT / price action Repaints
19 stars

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

Indicator v5 SMC / ICT / price actionSessions & time
Updated 3 years ago · MIT GitHub repository of ICT Killzones & Pivots

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

Indicator v6 Sessions & timeSupport & resistance
Updated 2 weeks ago · MPL-2.0 GitHub repository of Bandz Session Ranges + ORG + Opening Prices

More SMC / ICT scripts

Related on ForexR

Trade Your Charts With a Regulated Broker

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

Compare brokers