OPEN-SOURCE SCRIPT
SMC Range + Order Block + Dealing Range [v6]

This indicator is designed to help you visually track three core Smart Money Concepts on the chart:
Range / Consolidation Zones
Order Blocks
Dealing Ranges / Expansion Legs
Together, those three things help you answer the real trading questions:
Where is price compressing?
Where did price launch from?
Where is price likely to react or rebalance?
Is price in discount, premium, or near equilibrium?
Is this move continuation, manipulation, or distribution?
That’s what this script is trying to solve.
What the indicator is made of
This script is built from five main parts:
1) Swing High / Swing Low Detection
This is the foundation of the whole script.
It uses pivot logic to detect recent:
swing highs
swing lows
These are the “reference points” used to build:
ranges
structure levels
dealing zones
Why this matters:
SMC is based on price delivery.
If you can’t identify the meaningful highs and lows, you can’t identify:
liquidity
reaction zones
premium / discount
valid breakout / breakdown structure
So this part of the script is what gives it structure awareness.
2) Range Detection
This is the consolidation box part of the indicator.
The script checks whether recent swing highs and swing lows are staying close enough together to suggest price is trading inside a range, instead of trending cleanly.
When it finds that, it draws a range box.
What it represents:
This zone is where price is:
compressing
pausing
balancing
trapping traders
building liquidity
Why it matters:
A range is often where smart money is:
accumulating
distributing
engineering liquidity
setting up the next expansion
This is one of the most useful parts of the script because it helps you stop entering in the middle of random noise and instead focus on:
range highs
range lows
range deviations
range breakdowns / breakouts
3) Structure Lines
Once a range is found, the script plots key internal levels:
It draws:
Range High
Range Low
Equilibrium (EQ)
Inner Premium Level
Inner Discount Level
These are very important.
Range High
This is the top of the dealing range.
It often acts as:
buy-side liquidity
resistance
distribution edge
premium side of price
Range Low
This is the bottom of the dealing range.
It often acts as:
sell-side liquidity
support
accumulation edge
discount side of price
Equilibrium (EQ)
This is the midpoint of the range.
This is where price is “fairly priced” inside that range.
Why it matters:
EQ helps you know whether price is currently:
too expensive to buy
too cheap to sell
balanced
in a likely reaction zone
In SMC language:
above EQ = more premium
below EQ = more discount
Inner Levels
These are “internal structure levels” between the high/low and EQ.
These help you track micro reaction zones inside the larger range.
Why they matter:
Sometimes price won’t reach the full range high or range low.
Instead, it reacts from:
internal liquidity
mini OB zones
inner premium / discount areas
That’s why these inner levels are useful.
4) Order Blocks
This is the launch candle zone part of the indicator.
The script tries to identify candles that acted like a possible:
Bullish Order Block
Bearish Order Block
These are shown as gold / amber boxes.
Bullish Order Block
This usually means:
a down candle existed before a strong move up
that candle may have been where smart money accumulated
That area can later act as:
support
retracement buy zone
re-entry zone
Bearish Order Block
This usually means:
an up candle existed before a strong move down
that candle may have been where smart money distributed
That area can later act as:
resistance
retracement short zone
re-entry zone
Important truth about OBs
Not every candle box is a real institutional order block.
A lot of traders misuse order blocks.
A valid OB usually works best when it lines up with:
a sweep
displacement
BOS / CHOCH
premium / discount logic
range edge
liquidity event
So this indicator helps you see potential OBs, but you still need context.
That’s why the indicator works best when you combine the OBs with the range and dealing range logic, not by themselves.
5) Micro Order Block
This is the smaller pink box inside the broader structure.
This is meant to represent a smaller internal reaction candle or micro launch area.
Why it matters:
Sometimes your best entries are not from the big OB.
They’re from the smaller refined reaction zone inside the larger move.
This is especially useful if you trade:
1H entries
15M sniper entries
retests after displacement
That makes the micro OB very useful for refining entries.
6) Dealing Range Projection
This is one of the better conceptual parts of the script.
It detects an impulsive expansion move and then projects a dealing range / channel forward.
What it shows:
It visually maps:
where the move started
where the expansion leg traveled
what price is likely “working off” after the impulse
This helps you think in terms of:
expansion → retracement → continuation
impulse → rebalance → reaction
Range / Consolidation Zones
Order Blocks
Dealing Ranges / Expansion Legs
Together, those three things help you answer the real trading questions:
Where is price compressing?
Where did price launch from?
Where is price likely to react or rebalance?
Is price in discount, premium, or near equilibrium?
Is this move continuation, manipulation, or distribution?
That’s what this script is trying to solve.
What the indicator is made of
This script is built from five main parts:
1) Swing High / Swing Low Detection
This is the foundation of the whole script.
It uses pivot logic to detect recent:
swing highs
swing lows
These are the “reference points” used to build:
ranges
structure levels
dealing zones
Why this matters:
SMC is based on price delivery.
If you can’t identify the meaningful highs and lows, you can’t identify:
liquidity
reaction zones
premium / discount
valid breakout / breakdown structure
So this part of the script is what gives it structure awareness.
2) Range Detection
This is the consolidation box part of the indicator.
The script checks whether recent swing highs and swing lows are staying close enough together to suggest price is trading inside a range, instead of trending cleanly.
When it finds that, it draws a range box.
What it represents:
This zone is where price is:
compressing
pausing
balancing
trapping traders
building liquidity
Why it matters:
A range is often where smart money is:
accumulating
distributing
engineering liquidity
setting up the next expansion
This is one of the most useful parts of the script because it helps you stop entering in the middle of random noise and instead focus on:
range highs
range lows
range deviations
range breakdowns / breakouts
3) Structure Lines
Once a range is found, the script plots key internal levels:
It draws:
Range High
Range Low
Equilibrium (EQ)
Inner Premium Level
Inner Discount Level
These are very important.
Range High
This is the top of the dealing range.
It often acts as:
buy-side liquidity
resistance
distribution edge
premium side of price
Range Low
This is the bottom of the dealing range.
It often acts as:
sell-side liquidity
support
accumulation edge
discount side of price
Equilibrium (EQ)
This is the midpoint of the range.
This is where price is “fairly priced” inside that range.
Why it matters:
EQ helps you know whether price is currently:
too expensive to buy
too cheap to sell
balanced
in a likely reaction zone
In SMC language:
above EQ = more premium
below EQ = more discount
Inner Levels
These are “internal structure levels” between the high/low and EQ.
These help you track micro reaction zones inside the larger range.
Why they matter:
Sometimes price won’t reach the full range high or range low.
Instead, it reacts from:
internal liquidity
mini OB zones
inner premium / discount areas
That’s why these inner levels are useful.
4) Order Blocks
This is the launch candle zone part of the indicator.
The script tries to identify candles that acted like a possible:
Bullish Order Block
Bearish Order Block
These are shown as gold / amber boxes.
Bullish Order Block
This usually means:
a down candle existed before a strong move up
that candle may have been where smart money accumulated
That area can later act as:
support
retracement buy zone
re-entry zone
Bearish Order Block
This usually means:
an up candle existed before a strong move down
that candle may have been where smart money distributed
That area can later act as:
resistance
retracement short zone
re-entry zone
Important truth about OBs
Not every candle box is a real institutional order block.
A lot of traders misuse order blocks.
A valid OB usually works best when it lines up with:
a sweep
displacement
BOS / CHOCH
premium / discount logic
range edge
liquidity event
So this indicator helps you see potential OBs, but you still need context.
That’s why the indicator works best when you combine the OBs with the range and dealing range logic, not by themselves.
5) Micro Order Block
This is the smaller pink box inside the broader structure.
This is meant to represent a smaller internal reaction candle or micro launch area.
Why it matters:
Sometimes your best entries are not from the big OB.
They’re from the smaller refined reaction zone inside the larger move.
This is especially useful if you trade:
1H entries
15M sniper entries
retests after displacement
That makes the micro OB very useful for refining entries.
6) Dealing Range Projection
This is one of the better conceptual parts of the script.
It detects an impulsive expansion move and then projects a dealing range / channel forward.
What it shows:
It visually maps:
where the move started
where the expansion leg traveled
what price is likely “working off” after the impulse
This helps you think in terms of:
expansion → retracement → continuation
impulse → rebalance → reaction
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.