Indicator · Pine Script v6 · On the chart

Structure & Flow

by majixai

A smart money style indicator that detects swing structure and breaks of structure with an ATR buffer, then marks order blocks found within a lookback, extends them forward and hides or removes them when mitigated by a wick or a close.

View on GitHub

GitHub stars1on the repository
Pine versionv6current
Lines of code716
Settings40inputs
LicenceNone stated
Last updateyesterday28 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

Signals are graded in tiers using a location gate, a higher-timeframe filter, delta and relative volume thresholds and a cooldown. Optional trail bands and a trail line are drawn. It draws on the price chart.

Details

Published by

majixai on GitHub

Type

Indicator, Pine Script v6

Draws

On the price chart

Category

SMC / ICT / price action, Support & resistance, Volatility & bands

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
Swing Pivot Lengthint5swingLen
ATR Lengthint14atrLen
BOS ATR Bufferfloat0.05bosAtrBufMult
OB Search Barsint12obLookback
Min OB Body %float0.25obMinBodyPct
OB Forward Extension Barsint140obForwardBars
Auto-Hide Far OBsbooltrueobAutoHideFar
Max OB Distance (ATR)float12.0obMaxDistanceAtr
OB MitigationstringClose throughmitigationMode
Require Location GatebooltrueuseLocationGate
Location Tolerance (ATR)float0.40locAtrMult
Enable B-TierbooltrueshowB
Show all 40 settings
SettingTypeDefaultVariable
B-Tier Needs HTFbooltruebTierNeedsHTF
Use HTF FilterbooltruehtfOn
Higher TimeframetimeframeWhtfTf
Delta Thresholdfloat0.05deltaThresh
RVOL Thresholdfloat1.30rvolThresh
Signal Cooldownint8cooldownBars
Min ATR %float0.003minAtrPct
Lower TF Activity Relaxationfloat0.20ltfActivityMult
A+ Score Thresholdfloat95plusScore
Show Trail BandsbooltrueshowBands
Show Middle Trail ChannelbooltrueshowMidChannel
Show Trail LinebooltrueshowTrailLine
Zone ATR Multiplierfloat1.05zoneAtrMult
Stack Gap Multiplierfloat0.65zoneGapMult
Lower TF Stack Gap Weightfloat0.15ltfGapWeight
Max Stack Gap Used In Bands (ATR)float3.0maxGapAtrMult
Trail Smoothingint8trailSmooth
Width Smoothingint10widthSmooth
Edge Smoothingint7edgeSmooth
Middle Channel Widthfloat0.30channelWidth
Inner Zone Widthfloat0.90innerBandWidth
Outer Zone Widthfloat1.70outerBandWidth
Minimum Zone Floor (ATR)float0.70minZoneFloor
Max Band Compression Per Barfloat0.06maxCompressStep
Lower TF Floor Boostfloat0.20ltfFloorBoost
Swing LinesbooltrueshowSwingLines
Order BlocksbooltrueshowOBs
Fade Mitigated OBsbooltruefadeMitigated
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

ICT Liquidity Void Fill

by ArunKBhaskar
575 stars

This overlay indicator marks ICT liquidity void fills on the price chart and can show long and short signals. It places a Fibonacci level inside a displacement candle, defaulting to the midpoint, and draws lines in a chosen style. Optional filters limit the fi

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 1 year ago · MPL-2.0 GitHub repository of ICT Liquidity Void Fill
218 stars

This indicator maps market structure and supply and demand zones on the price chart. It marks validated and optional unvalidated swing highs and lows using a pivot length and extra confirmation bars. Consolidation and impulse moves are measured against ATR to

Indicator v6 SMC / ICT / price actionSupport & resistance Repaints
Updated 3 months ago · None stated GitHub repository of Market Structure + Supply/Demand
55 stars

This Pine Script indicator overlays institutional liquidity levels on the price chart. It identifies order block levels using pivot highs and lows, then draws mean reversion lines from the 20 and 50 period simple moving averages, a volatility range midpoint pr

Indicator v6 Support & resistanceSMC / ICT / price action Repaints
Updated 6 months ago · Apache-2.0 GitHub repository of AAPL Institutional Liquidity Grid

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

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