SMT Divergence ICT, Smart Money Technique & Correlation [LunqFX]Two instruments that normally move together stop agreeing. One makes a higher high, the other fails to. That disagreement is the SMT divergence — the Smart Money Technique — and it is one of the few reversal reads that comes from outside the chart you are trading rather than from the chart itself.
Every SMT divergence indicator marks the divergence and stops there. This one does two things they do not.
It draws the correlated symbol on your chart. Its path is rescaled into your own price range, so the moment the two structures part company is something you SEE rather than something a marker announces after the fact. And it measures the correlation between the two live, because an SMT divergence between instruments that are no longer moving together is not a signal at all — it is a coincidence, and by default those are not marked.
Included: automatic SMT detection at confirmed swing highs and lows, the correlated symbol drawn as a rescaled path, a live correlation reading with a warning state, a minimum-disagreement filter, swing-to-swing connectors, a dashboard and alerts.
❶ THE CORRELATED SYMBOL, DRAWN
The instrument yours is measured against is picked from the chart's own asset class — EURUSD against GBPUSD, ES against NQ, gold against silver, Bitcoin against Ethereum, SPX against NDX, a stock against SPY — or named by you, and its path appears on your chart as a grey line. The panel always shows which symbol is in use.
It is rescaled: the second symbol's range over a rolling window is mapped onto your chart's range over the same window, so the two can be compared by shape. The line therefore carries no price of its own. Reading a level off it would be meaningless; reading its STRUCTURE against yours is the entire point.
This is what makes an SMT divergence visible instead of asserted. When your chart pushes to a new high and the grey line rolls over beneath it, you are looking at the divergence itself rather than at a label telling you one occurred.
❷ THE CORRELATION CHECK — the part that decides whether any of it means anything
SMT rests on an assumption nobody states out loud: that the two instruments are correlated. When they are not, they disagree constantly, and every disagreement would print as a divergence.
So the correlation is measured over a window you choose and shown as a number with a bar. Above your threshold the number is white and the panel reads "marks armed". Below it the number turns amber, the panel reads "marks held", and by default no new marks are placed — because a divergence between two instruments that have stopped tracking each other is noise wearing the costume of a signal. The panel also counts how many divergences were held back this way, so a quiet chart is explained rather than mysterious.
That switch can be turned off if you want to see them anyway. The panel keeps telling you what the reading is worth.
❸ HOW A DIVERGENCE IS DETECTED
Swing points come from confirmed pivots, so a pivot only exists once the bars on both sides of it have closed.
At each new pivot the script compares two directions: the way your symbol moved from its previous pivot, and the way the correlated symbol moved between those same two points. When the signs disagree — yours made a higher high, theirs did not, or the reverse — that is the divergence.
The correlated symbol's extreme is read over a three-bar window centred on your pivot rather than off one bar, because two instruments rarely put their swing on exactly the same candle. The window is placed so that its latest bar is always a closed one.
Inverse pairs are handled. EURUSD against the dollar index is a classic SMT pairing, and their swings are mirrored: your high lines up with their low. When the measured correlation is negative the script reads their lows at your highs and their highs at your lows, and asks whether they confirmed in the mirror. The dashboard says "inverse pair" next to the symbols when this is the mode in use, so the marks are never a surprise.
One more condition has to be met. The correlated symbol must have travelled far enough the other way to count, measured against its own average bar range. Without that floor a second symbol that barely moved registers as a divergence, and the chart fills with marks that mean nothing. The threshold is adjustable and it is the setting worth changing first.
A bearish SMT prints at highs, a bullish SMT at lows, each joined to the swing it diverged from by a dashed line. The connector has a maximum length: a divergence is always against the previous pivot, and when that pivot is far back the mark still prints but the line is left out, because a dashed line reaching months across a chart tells you nothing.
❹ THE DASHBOARD
The header is the most recent divergence — bearish or bullish — and how many bars ago it confirmed, so the state of the pair is read in one line. While the divergence is recent the header is lit in its colour; once it is more than a few swings old it dims and reads "last SMT", because a reversal cue from two hundred bars back is history rather than a state. Beneath it: the two symbols, whether the partner was picked automatically, and whether they are being read as a direct or an inverse pair, the correlation right now with a bar and whether marks are armed or held, the number of bearish and bullish divergences found on the chart, and the number held back by weak correlation. When the correlated symbol is the same as the chart's, the header says so rather than showing a flat line and zero results.
The correlation shown is the reading now. A mark already on the chart was placed when the correlation at that bar cleared the threshold; the reading may have dropped since, and that does not remove the mark.
HOW TO USE IT
1 — Check the correlated symbol first. The automatic choice is the classic partner for your asset class and suits most charts; if you trade a pair it does not know, switch automatic selection off and name the instrument yourself. Nothing below works until the partner genuinely tracks yours.
2 — Read the correlation before the divergences. Strong correlation makes an SMT meaningful. Weak correlation means the two have decoupled, which is itself worth knowing and is a reason to stand aside rather than to trade the marks.
3 — Trade the divergence as a reversal cue, not a trigger. The instrument that failed to confirm is the one showing weakness. Combine it with your own entry model — SMT tells you the structures disagree, not where to enter.
4 — Watch the grey line as the swing forms. The divergence is visible before the pivot confirms; the mark simply makes it official. Traders who use SMT live are watching the second symbol fail, not waiting for a label.
5 — Raise the swing length on higher timeframes. At eight bars on a 5-minute chart you get many small divergences; at twenty on an hourly you get the ones that matter to a swing.
HOW IT WORKS
The partner symbol is chosen from the chart's ticker and asset type when automatic selection is on, otherwise taken from the input. Its high, low and close are requested on the chart's own timeframe with lookahead off. Correlation is the standard rolling coefficient between the two closes over your window; its sign decides whether the pair is read directly or in the mirror. The rescaled path maps the second symbol's close from its own rolling high-low range into your chart's, which preserves shape and discards level. Pivots come from the standard confirmed pivot functions. At each pivot the script stores your extreme and the correlated symbol's extreme over a three-bar window centred on that bar, together with the mode in use, and compares the direction of both moves at the next pivot. A divergence is registered when the directions disagree, the correlated move clears the minimum against its own average range, and — unless you switch the gate off — the correlation is above your threshold. If the correlation changes sign between two pivots, the stored pivot is discarded rather than compared across the change.
Works on any pair of instruments and any timeframe. It is most used on forex majors, index futures and the metals, where reliable correlated pairs exist.
LIMITATIONS — read before relying on it
▸ The automatic partner is a convention, not knowledge. It is chosen from the chart's asset class — forex, crypto, index, futures, metals, stocks — and a chart outside those, or one where a different partner is the right one, needs the symbol set by hand. A wrong partner is the fastest way to make this indicator produce nonsense, and the correlation reading is there to catch it.
▸ The rescaled path is shape, not price. It is fitted to a rolling window, so it moves when the window moves. Do not read levels, support or targets off it.
▸ Correlation is measured, not guaranteed. Two instruments can be strongly correlated over the window and uncorrelated during the hours you actually trade. The number describes the window you set and nothing else.
▸ Both directions of disagreement count. Yours making a higher high while theirs does not, and theirs making a higher high while yours does not, are both SMT. They read differently to a trader, and the script marks both.
▸ A pair whose correlation flips sign is unstable, and the script treats it that way: a stored pivot from one mode is never compared against a new pivot from the other. The first pivot after a sign change therefore produces no mark. If you see the panel alternating between direct and inverse, the pair is not one to trade SMT on.
▸ Marks arrive at the pivot's confirmation, not at the swing. That is the cost of not repainting: the swing must have bars closed on both sides of it before it exists. Lower the swing length for earlier marks and more of them.
▸ Different instruments keep different sessions and holidays. A gap in one and not the other can produce a divergence that is a data artefact rather than a market event. Comparing instruments from the same venue and asset class avoids most of this.
▸ On a very long chart the counts and the drawings drift apart. TradingView caps a script at five hundred lines and five hundred labels, and once past that the oldest marks are dropped while the dashboard keeps counting everything it found. Scroll far enough back and the marks stop before the numbers do.
▸ A divergence is a fact about two charts. What price does afterwards is not, and no count in the dashboard should be read as a success rate.
WHY IT IS ORIGINAL
The detection rule itself is the standard one — SMT is a published concept and there would be no point disguising it. What is not published is an SMT tool that draws the second symbol so the divergence can be seen, and that measures whether the two instruments are still correlated before it is willing to call a disagreement a signal.
The three parts need each other. The rescaled path without the correlation reading is a picture with no test behind it. The correlation without the path is a number with nothing to look at. The detection without either is what every other SMT script already is: a marker that asks you to trust its assumption.
SETTINGS
▸ The pair being compared — automatic partner selection or a manual correlated symbol, swing length, minimum disagreement.
▸ Correlation check — window, warning threshold, and whether marks are gated by it.
▸ Visuals — five candle palettes plus off, the correlated path with its rescaling window and line width, swing connectors and their maximum length, mark size, dashboard and its position.
ALERTS — bearish SMT divergence, bullish SMT divergence, and any SMT divergence. All fire on confirmed pivots.
NON-REPAINTING — divergences are built from confirmed pivots and the second symbol is requested on the chart's own timeframe with lookahead explicitly off. A mark that has printed never moves and never disappears.
This indicator is an educational market-analysis tool, not financial advice. It describes a disagreement between two instruments that has already happened and does not predict what either will do next. Always confirm with your own analysis and manage your risk. Indicador

Ultimate SMC & Liquidity ToolkitUltimate SMC & Liquidity ToolkitDescription
The Ultimate SMC & Liquidity Toolkit is an all-in-one Pine Script v6 indicator designed for traders who utilize Smart Money Concepts (SMC) and Inner Circle Trader (ICT) methodologies.
Instead of cluttering your chart with five different indicators, this script combines the most essential price action and liquidity tools into a single, highly customizable script. Whether you are day trading indices or swinging forex, this toolkit dynamically tracks liquidity pools, structural shifts, and critical institutional price levels.
🌟 Key Features
Extending Fair Value Gaps (FVGs): Automatically detects Bullish and Bearish Fair Value Gaps. The script projects a horizontal shadow for each FVG until price fully mitigates (fills) the zone, leaving mitigated gaps on the chart as historical context.
Liquidity Sweeps: Identifies when price wicks through a recent fractal pivot (5-bar highs/lows) but fails to close beyond it, tagging it on the chart as a "Sweep". Excellent for spotting stop hunts and false breakouts.
Session Killzones: Highlights the Highs and Lows of the Asian (18:00–02:00), London (02:00–08:00), and New York (08:00–17:00) sessions.
Higher Timeframe (HTF) Levels: Automatically tracks and projects crucial HTF structural levels, including the Previous Day, Week, and Month Highs/Lows. It also tracks the Daily Open (DO) and Previous Day Close (PDC).
Auto Fibonacci Extensions: Automatically draws a Fibonacci sequence (0, 1, and the 1.618 extension) based on the most recent major swing high and swing low.
Clean Chart Dynamics: Labels and lines (using dotted styles) are coded to project slightly ahead of the current price action, deleting historical line trails to keep your screen completely free of clutter as time progresses.
⚙️ Full Customization Every trader’s eye is different. The settings menu includes a Feature Toggles section, allowing you to independently turn every single feature on or off. Additionally, all color settings use carefully selected transparency levels to ensure they look equally pristine on both Dark Mode and Light Mode backgrounds. Indicador

Swing Liquidity Targets (BSL/SSL)Swing Liquidity Targets (BSL/SSL) marks confirmed swing highs as buy-side liquidity (BSL) and swing lows as sell-side liquidity (SSL), each as a line extending forward from the swing.
HOW IT WORKS:
A target is marked swept the moment price wicks through it. The line freezes there and turns gray. Rather than leaving every old swing on the chart forever, unswept targets expire after a set number of calendar days, so the same setting behaves the same whether you're on a 5 minute chart or a daily one, and when two same-side targets land close together, only the one nearer to price is kept instead of stacking duplicate lines on top of each other.
NON-REPAINTING:
pivots confirm after the bars set in Right Bars, and lines don't move once drawn.
USAGE:
treat the lines as context for where price may be drawn to next, not as a standalone entry signal. Combine with your own structure and confirmation.
LIMITATIONS:
like any pivot-based tool, the most recent swing won't show a target until Right Bars bars have closed after it, so very recent price action may look "missing" for a short while. That's what keeps it non-repainting rather than a bug.
WHAT YOU CAN CHANGE:
-> Left/Right Bars, pivot sensitivity for swing detection
-> Max Target Length (days), how long an unswept target stays active before it stops extending
-> Cluster Tolerance (x ATR), how close two same-side targets need to be before the weaker one is dropped
-> Show BSL / Show SSL, turn either side off completely
-> Line Style, dotted, dashed, or solid
-> Line Width
-> BSL / SSL / Swept colors
-> Show BSL/SSL Labels toggle
I hope this is of use to you! Let me know if you like it. Indicador

Indicador

Market Structure BOS/CHoCH + Break Follow-Through [ForexCracked]🔵 OVERVIEW
Most market structure indicators stop at the break. This one keeps counting after it.
It draws the structure the way you already read it: confirmed swing highs and lows tagged HH, HL, LH and LL, a solid line at the level that would flip the current structure, and a BOS or CHoCH label the moment a bar closes through a swing. Then it does the part most structure tools stop short of. For every break it watches what price did next, files the outcome, and prints the counted result on the chart with the sample size next to it.
So the label on a break does not just say BOS. It says BOS, and that on this chart breaks like this one reached 1 ATR beyond the level before snapping back 116 times out of the last 200.
🔵 THE ANSWER IS THERE BEFORE THE BREAK
The two live levels, the last confirmed swing high and swing low that price has not yet closed through, are drawn as blocks at the right edge of the chart, teal above price and pink below. Each block is captioned with the break it would be under the current structure (BOS or CHoCH), the price, the distance, and what breaks of that kind did here: "BOS above 1.08420 · 12p · 1.0 ATR reached 116/200 (58%) · typical run to 1.08790".
The block's height is not decoration. It is the measured median run after breaks of that class on this symbol, so the top of the teal block is a price that breaks like this one typically reached. Medians print from eight samples and percentages from the minimum n. Below that the block falls back to the follow-through distance and its caption reads "finish line at" instead of "typical run to". A block never draws thinner than the minimum block height, and when that floor is what sets its height the caption reads "run floor at".
🔵 HOW A BREAK IS MEASURED
A break is a bar that closes through a live swing level. It is a BOS if it goes with the current structure and a CHoCH if it goes against it and flips it.
From the next bar the script runs a race with two finish lines the same distance from the level: 1 ATR beyond it in the break direction, and 1 ATR back through it on the other side. ATR is frozen at the break bar so later volatility cannot move the finish lines. Whichever is touched first decides the outcome: reached, or snapped back. If one bar touches both lines it is filed as snapped back, the conservative reading. If neither is touched within 30 bars the outcome is filed as neither. Nothing is estimated and nothing is fitted. Every figure is a count of price events on the chart in front of you, over the last 200 filed breaks of that class, and the n printed beside it is the real count.
Wick-only breaks, where a bar trades through a level but closes back inside, are measured with the same race in their own class. They are never drawn as events (the level's block border turns dashed once it has been wicked), but their number sits on the level's caption, so "should I wait for the close" gets an answer from your own symbol instead of a rule of thumb.
🔵 THE RUN BOX
After each close break a box is drawn from the level in the direction of the break. Its height is the median run for that class, its width the median bars it took to reach the finish line, and its caption prints the far edge as a price. The box then records what this particular break did: the border thickens when the finish line is reached, the box hollows and its border goes dashed when the break snaps back, and it fades if neither happens. The last few breaks stay on the chart as filled or hollow shapes, so the recent record is visible without reading a single number.
The break label itself is frozen at the moment of the break. It shows what the tool said at the time, never a hindsight figure. Only the outcome is added to it afterwards.
🔵 THE SWINGS
Swings are confirmed by price, not by counting bars. A swing high is confirmed the first time a bar closes a set number of ATR below it, and a close through the previous swing confirms the swing in between. There is no lookback length to tune and the same setting reads the same on gold, indices, crypto and forex. Tags land on the swing bar when the swing confirms, so they appear a few bars after the extreme printed. That is confirmation lag, not repainting. No tag, break line or break label is ever moved; only the outcome text is added to a label later. The two right-edge blocks and the panel are redrawn every bar by design, so their height follows the current ATR.
🔵 WHAT IS ON THE CHART
• HH, HL, LH and LL tags on confirmed swings (the first swing of each side is tagged H or L)
• A dashed border on a block means that level has already been wicked without a close through it
• A solid structure line at the level that would flip the current structure, teal under price while bullish and pink above it while bearish, with the dealing range shaded between it and the other live level
• A block at each live level, projected into the space right of price, captioned with the break type, the price, the distance and the counted result for breaks like it
• A line from each broken swing to the bar that closed through it, with a BOS or CHoCH label carrying the count as it stood at that moment
• A run box after each break, filled or hollow depending on what the break did
• A compact panel restating the structure, the two levels, the class counts and the last break
🔵 WHAT THIS IS NOT
This script draws no entries, no stops, no targets and no arrows. It has no order blocks, no fair value gaps, no sessions and no higher timeframe calls. It does not tell you to trade a break. It does not map liquidity pools, equal highs and lows or session extremes, does not count how often price reaches them, and does not mark sweeps or reversals. It is the structure map with the follow-through counted, so you can see on your own symbol whether the breaks you are reading have tended to carry on or to come straight back.
🔵 HOW TO USE
• Read the two blocks first. The block above is the level a close must clear and what happened after closes like that; the block below is the level a close must lose. The prices are printed.
• Treat the follow-through percentage as a base rate for this class on this chart, not as a forecast for this break. One hundred and sixteen out of 200 is a description of the past.
• Use the class split. If close breaks on your chart reach 1 ATR far more often than wick-only breaks, waiting for the close is worth its cost here. If the two numbers are close, it is not.
• Watch the run box after a break rather than the label. A box that hollows out is a break that snapped back, and the structure line will tell you where the next flip sits.
• Lower the swing setting to 1.0 ATR to see internal structure, raise it to 2.0 or more on choppy symbols so only real pullbacks count as swings.
🔵 SETTINGS
• Swing confirmation (x ATR): the close distance from the running extreme that confirms a swing (default 1.5)
• Follow-through distance (x ATR): the two finish lines, the same distance either way from the level (default 1.0)
• Outcome window (bars): how long the race runs before the outcome is filed as neither (default 30)
• Breaks kept per class: the rolling window every count is taken over (default 200), and the minimum n before a percentage prints (default 20)
• Chart: break lines to keep, run boxes to keep, minimum block height, how far the blocks project right, the dashboard and its position, colours
• Works on any symbol and any timeframe. Charts with little history print n below the minimum until the numbers fill in
🔵 ALERTS
• Bullish BOS, bearish BOS, bullish CHoCH, bearish CHoCH, each on the closing bar
• Wick-only break: price traded through a structure level and closed back inside
• Break reached its follow-through distance
• Break snapped back
• Price within a quarter of an ATR of a live structure level
The engine is close-based, so set alerts to fire once per bar close.
⚠️ DISCLAIMER
BOS and CHoCH are community terms for market structure. This is independent work and is not affiliated with or endorsed by any educator or course.
The percentages are counted descriptions of what happened after past breaks on this chart, not predictions. A class that reached its follow-through distance 70 times in 100 can snap back today. Samples vary by symbol and timeframe, and small samples are unreliable by nature, which is why every figure carries its n and prints nothing below the minimum. Nothing here is a trade signal. Results depend on market conditions, settings, and your own execution and risk management. Shared for educational and research purposes. Not financial advice. Indicador

LTF BPR (Balanced Price Range) [D4A]LTF BPR (Balanced Price Range)
Why working on my other BPR script: HTF BPR , I thought it would be interesting to have BPR script that shows BPR from lower timeframe and hence this script was created. The logic is simply the same as in higher timeframe BPR script, with a few differences:
- the main one is to simplify the drawings, this script only draws average line from lower timeframe BPR. The main reason for this is that otherwise you can have too many BPR drawings which overlap and make it look very busy on the chart. From my experience the average line from LTF BPR is a reasonable level which the price usually interacts with. Once candles close beyond this line, the BPR won't hold in most cases.
- the average line is only drawn where the BPR formed and is not extended to avoid having too many lines on the chart.
- another difference is that there are no side markers or labels like in the HTF script
Who is this script for
- students who follow ICT methodology
- scalper traders who want to see where price has already been balanced on lower timeframe
Since two scripts are very similar in what they do, the large part of script description is taken from the other script and only modified where appropriate.
Introduction to BPR Concept
Balanced Price Range (BPR) is especially important ICT methodology, as it helps to navigate institutional order flow. It pinpoints price zones where opposing market inefficiencies intersect, leaving pools of resting liquidity and unexecuted orders. This indicator automates the identification of these overlapping structures across any asset class while using data from lower timeframe (the script pulls data using pine function request.security_lower_tf)
What is BPR
A Balanced Price Range - frequently referred to as a double Fair Value Gap occurs when a bullish FVG and a bearish FVG directly overlap. Because both buyers and sellers created imbalances across the exact same price window, these overlapping zones become high-probability reaction areas. In algorithmic price delivery, BPRs serve as primary rebalancing targets where the market seeks liquidity before expanding or reversing.
What is FVG
FVG or Fair Value Gap is a three-candle formation where the middle candle moves so aggressively creating displacement that it leaves a gap between the wick of the prior candle and the wick of the following candle.
Trading Lower Timeframe BPRs
BPR entries remain one of the most underrated setup models in ICT trading. This script should help to pinpoint areas which may be important levels where the price is going to reverse from after seeking to re-balance and/or to give opportunity for Smart Money to re-enter the market. While using the script, one can easily observe that price very often reverses, which is seen as wicking out to/from these areas. With some experience you can learn how to use this information to make advantage of knowing which levels have been balanced and are not likely to be reversed to while the trend continues in the opposite direction.
The Underlying Mechanics
- Single Inefficiencies: A standard Fair Value Gap represents one-sided delivery—a rapid displacement where either buyers or sellers were largely absent.
- Dual Inefficiencies: A BPR represents a corridor that price aggressively skipped twice — once going up without sellers, and second time going down without buyers.
- Algorithmic Repricing: When price returns to a BPR, the delivery algorithm is repricing an area of double inefficiency. Because both buy-side and sell-side resting orders line up inside this narrow range, retests typically trigger decisive expansion away from the zone.
SETTINGS:
- Show LTF BPRs - enable displaying of BPR zones on lower timeframe
- Looback - how many previous bars are used to find BPRs
- Auto Lower timeframe (one step down) - when enabled, the script works using data from the previous lower timeframe below the chart's timeframe, eg. when on 1m chart, the script uses 15sec data, 5m chart -> 1m data and so on.
- Manual HTF - when the previous option is not enabled, you can select manualy any lower timeframe (it won't work with current timeframe or higher timeframe)
- Max BPR Length (LTF bars) - max distance between two opposing FVGs which are part of the same BPR
- Stop drawing BPR after X Candles - BPR is removed from the chart after this many bars
- Volume Imbalance Included - include volume imbalance as part of FVG which is part of BPR
- FVG Size Filter (x LTF ATR) - limit the size of LTF FVG that is used to create valid BPR. Use 0 to ignore this limit.
- Bull/Bear Average Line - BPR decoration settings
- Mitigated BPR - select what happens when BPR is fully mitigated (the price closes through it).
-----------------
Disclaimer
The content provided in this script is for educational and informational purposes only. It does not constitute financial advice, investment recommendations, or a solicitation to buy or sell any financial instruments. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs. Indicador

Liquidity Sweep SequenceThis indicator marks stop-hunt sweeps and, more importantly, counts how many
consecutive sweeps have occurred on the same side.
WHAT A SWEEP IS
Traders cluster their stops in predictable places: longs put theirs below the
last swing low, shorts put theirs above the last swing high. Those clusters are
resting liquidity. A sweep happens when price spikes through one of those levels,
triggers the stops, and then closes back on the original side — a wick through,
not a break.
The distinction that matters:
• Close beyond the level = a real breakout, trend continuation
• Close back inside = a sweep, failed breakout, potential reversal
WHY THE SEQUENCE COUNT
A single sweep is often just noise. What I found more useful is when they stack:
the first sweep traps, price fails to reverse, then a second sweep takes out an
even lower low. The second one is where selling pressure is actually exhausted.
The indicator labels these SWEEP, SWEEP², SWEEP³ and so on. The count resets when
an opposite-side sweep appears or when too many bars pass. By default the second
sweep must take out a deeper low (or higher high) to continue the sequence —
otherwise the count restarts at 1.
HOW IT WORKS
1. Swing highs and lows are tracked as liquidity levels using pivots.
2. A level is dropped as soon as price CLOSES through it. Once price closes above
a swing high, that liquidity has already been taken and the level can no longer
produce a sweep signal. This is the single most important filter here — without
it, stale levels from far back generate false signals during trends.
3. A sweep requires: wick through an untouched level, close back inside, a minimum
wick ratio, a minimum reclaim distance, and the bar must be a genuine local
extreme (if the wick does not exceed recent bars, no stops were actually hit).
4. Next-bar confirmation requires the following candle to close in the reversal
direction before the label is drawn.
5. Significance tiering: a sweep is marked "major" only when the wick is the
extreme of the last N bars. Minor sweeps inside ranges are hidden by default.
All labels are drawn on confirmed bars only, so nothing repaints.
HOW I USE IT
My own preference is the 1H chart, entering on SWEEP² — the second sweep in a
sequence. The first sweep tells me the level is being attacked; the second one is
where I act.
This is built for short-term perpetual futures trading and works best there. The
reason is mechanical: perps run 24/7 with no gaps, they are heavily leveraged, and
liquidation clusters are dense and public. Stop hunts on perps are a real, visible
event rather than a metaphor. On instruments with overnight gaps, daily price
limits, or low leverage, a long wick often does not represent a genuine sweep at
all, and signal quality degrades noticeably.
Suggested timeframes: 15m to 4H. Lower is noisy; the daily compresses multi-hour
hunts into a single candle and loses the event.
LIMITATIONS — please read
• This is a mean-reversion tool, not a trend tool. A sweep is by definition a
FAILED breakout, while a trend start is a SUCCESSFUL one. The two are mutually
exclusive, so this indicator will not flag the beginning of a large trend, and
it is not designed to.
• It only detects double-top and double-bottom style reversals. A V-shaped top
that simply prints a new high and falls has no prior level above it to sweep,
so no signal can appear there.
• Signals occur more frequently in ranging conditions. That is inherent to the
concept, not a defect.
• Next-bar confirmation costs one bar of delay. Turn it off for immediacy at the
cost of more failed signals.
• Pivot detection needs bars on both sides, so levels are registered with a lag
equal to the swing sensitivity setting.
• Parameters need adjusting per market and timeframe. On 15m, the major-sweep
lookback should be lowered to roughly 40–60.
SETTINGS WORTH TOUCHING FIRST
• Swing sensitivity — the main tightness control
• Major sweep lookback — how significant a sweep must be to display
• Show 2nd sweep and beyond only — reduces the chart to sequence signals alone
• Show untouched liquidity levels — draws the levels currently being tracked so
you can verify the structure logic yourself
Alerts are included for major sweeps and for the second sweep in a sequence.
This indicator is a visualization and analysis tool. It does not generate buy or
sell recommendations and nothing here is financial advice. Test any approach on
your own before risking capital.
────────────────────────────────────────────────────────────────────
【繁體中文說明】
本指標標記獵殺止損的掃蕩訊號,並且會計算同方向連續掃蕩的次數。
什麼是掃蕩
交易者的停損放在可預測的位置:做多的放在前低下方,做空的放在前高上方。這些成堆
的停損就是「流動性」。當價格刺破那個價位、觸發停損,然後收盤又收回原本那一側,
就是一次掃蕩——是影線穿過,不是真正突破。
關鍵區別:
• 收盤站在價位外側 = 真突破,趨勢延續
• 收盤收回內側 = 掃蕩,假突破,可能反轉
為什麼要算連續次數
單一次掃蕩常常只是雜訊。比較有用的是它們接連出現:第一次掃蕩是陷阱,價格沒能反
轉,接著第二次掃蕩創了更低的低點——第二次才是賣壓真正耗盡的地方。
指標會標成 SWEEP、SWEEP²、SWEEP³。出現反向掃蕩或間隔過久就歸零重算。預設要求第
二次必須創更低低點(或更高高點)才算延續,否則計數從 1 重新開始。
運作方式
1. 用 pivot 追蹤前高前低作為流動性價位。
2. 價格一旦「收盤」穿過某個價位,該價位立刻作廢。收盤站上前高,代表那裡的流動性
已經被吃掉,不再是掃蕩目標。這是本指標最重要的過濾——沒有這一層,久遠以前的
死線會在趨勢中不斷產生假訊號。
3. 掃蕩成立條件:影線穿過未被吃掉的價位、收盤收回、影線佔比達標、收回幅度達標,
且該K棒必須創局部極值(影線若沒超過近期K棒,代表根本沒有停損被觸發)。
4. 隔根確認:要求下一根收盤朝反轉方向,才畫出標籤。
5. 重要度分級:影線必須是近 N 根的極值才標為「主要」。震盪區間的次要掃蕩預設隱藏。
所有標籤都在收K後才繪製,不會重繪。
我自己怎麼用
我個人偏好 1 小時線,在 SWEEP²(連續第二次掃蕩)進場。第一次告訴我這個價位正在被
攻擊,第二次才是我動手的地方。
這支是為短線永續合約設計的,在那裡效果最好。原因是機制上的:永續 24 小時不間斷、
沒有跳空、槓桿高,清算價位密集而且公開。永續上的獵殺止損是實際發生、看得見的事件,
不是比喻。在有隔夜跳空、漲跌幅限制、或低槓桿的商品上,一根長影線常常根本不代表真
正的掃蕩,訊號品質會明顯下降。
建議時框:15 分鐘到 4 小時。更低太雜;日線把數小時的獵殺壓縮成一根K棒,事件本身就
消失了。
限制(請務必閱讀)
• 這是均值回歸工具,不是趨勢工具。掃蕩的定義就是「突破失敗」,而趨勢起點是「突破
成功」,兩者互斥。所以它不會標出大趨勢的起點,也不是為此設計的。
• 只偵測得到雙頂/雙底型的反轉。直接創新高然後下跌的 V 型頂,上方根本沒有前高可
掃,不可能出現訊號。
• 震盪盤中訊號較密集。這是概念本身的性質,不是缺陷。
• 隔根確認會延遲一根。關掉可即時,但假訊號會變多。
• Pivot 需要左右兩側的K棒,所以價位登記會延遲,延遲根數等於靈敏度設定值。
• 參數需依市場與時框調整。15 分鐘線建議把主要掃蕩回看根數降到 40–60。
本指標為視覺化與分析工具,不產生買賣建議,內容不構成投資建議。任何做法請自行驗證
後再投入資金。 Indicador

Monthly & Weekly Macro KeysMonthly & Weekly Macro Keys plots completed monthly and weekly High, Low, Open, and Close levels with composite IPDA-style premium/discount context.
Monthly macros default to the last three completed months. Each level is labeled by calendar month (for example, June 2026 Monthly High). Weekly macro key levels default to the prior completed week High and Low, with optional Open and Close. Lines begin on the day the print occurred and extend to a configurable right-side buffer next to the labels.
A composite range is built from the selected months or weeks. The indicator can draw the IPDA gradient through that range: 12.5%, 25%, 37.5%, equilibrium (50%), 62.5%, 75%, and 87.5%. High and Low of the composite are not duplicated on the gradient because they are already shown as the monthly or weekly macros.
An on-chart table reports Premium or Discount relative to equilibrium, percent location within the range, whether price is inside the 25–75% zone, and the key price levels for both the monthly and weekly composites.
Style controls include color, width, and line style (Solid, Dotted, Dashed) for monthly and weekly High, Low, and Open/Close, as well as for gradient quadrant and octant levels. Table position supports all nine chart anchors. Lookback counts are adjustable (up to six months and eight weeks). Indicador

Smooths Heat Seeker Liquidity MapOverview
This indicator maps resting liquidity by detecting confirmed swing highs and lows at three independent lookback lengths, then rendering each one as a zone that visibly fades the longer it goes untouched. Instead of a static box that holds one shade until it's swept, each zone is built from small time-segments, and each segment locks in whatever color the zone's fade formula produces at the moment it's drawn — so a single zone shows a genuine gradient across its own lifetime, brightest where it formed and dimmer toward the present if nothing has happened to it since.
Concepts used
Tiered pivot detection: ta.pivothigh()/ta.pivotlow() run at three separate lookback lengths (Fast/Mid/Slow). A pivot only confirms after "Confirmation Bars" bars have passed with no higher high / lower low, which is what prevents repainting the level's location after the fact.
Age-based color decay: each level stores the bar index it was formed on. Every time a new segment is drawn, the indicator computes how many bars old the level is, runs that through a decay curve (fadeStrength input controls the curve's steepness), and converts the result into a transparency value for that segment only. Because past segments are never redrawn, the visual history of the fade is preserved rather than the whole zone jumping to one shade at once.
Mitigation vs. retest: a level is deleted the instant price crosses it (wick or close, user's choice) — that's treated as the liquidity being consumed. If price merely touches the level without crossing it, and "Refresh Fade On Retest" is on, the level's age resets to zero, so a level that keeps getting defended stays bright while one that's simply being ignored keeps fading toward removal.
Tier-priority merging: if a new pivot lands at the same price as an existing level, the indicator keeps the higher tier rather than creating a duplicate zone, so a level significant on the Slow lookback doesn't get visually diluted by a Fast-tier duplicate sitting on top of it.
How to use it
Add it to any chart/timeframe with default settings. Brighter zones are recent or actively-retested liquidity; dimmer zones are levels the market has drifted away from without touching. Use Fast/Mid/Slow tier colors to separate minor intraday levels from more structurally significant ones, and adjust Fade/Lifetime, Fade Strength, and Cell Width to control how far back the map looks and how coarse or smooth the fade appears.
Originality
This is not a combination of other publications — there's a single detection-and-rendering pipeline here (pivot detection → age tracking → per-segment decay → mitigation/retest handling), and every part of it was written for this script. No code, calculations, or visual techniques are reused from another publication.
Inputs
Fast / Mid / Slow — pivot lookback lengths for the three liquidity tiers
Confirmation Bars — bars required after a swing point before it's confirmed
Mitigate On — wick or close removes a level
Fade/Lifetime, Fade Strength, Cell Width — control how long a zone lives and how its decay curve is shaped
Refresh Fade On Retest — restarts a zone's age on an unmitigated touch
Box Height Multiplier — sets zone thickness as a multiple of ATR
Weak / Mid / Strong colors — one color per tier
This indicator has no signals, alerts, or trade markers — it's a pure visualization of where liquidity currently sits on the chart, and how fresh or stale each level is. Indicador

Equal Highs & Lows [ITA]🟠 OVERVIEW
Equal Highs & Lows marks the places where liquidity pools build, and then
tracks what happens to them.
When two swing highs form at almost the same price, the stops of everyone who
sold that level sit just above it. The same is true in reverse below two equal
lows. Those clusters are what price often reaches for before it turns, and they
are visible on the chart long before anything happens to them.
Most tools that find these draw the two swings and stop there. This one keeps
the level alive until price actually takes it, then marks it as swept rather
than deleting it, so you can look back and see whether a symbol respects its
pools at all before you trade one.
🟠 CONCEPTS
* Equal Highs (EQH) - Two swing highs within a set tolerance of each other.
Stop orders rest above them.
* Equal Lows (EQL) - Two swing lows within tolerance. Stops rest below.
* Liquidity Pool - The cluster of resting orders those stops form. It is a
reason for price to travel somewhere, not a reason for it to reverse there.
* Sweep - Price trading through the level and taking the orders. What happens
immediately after the sweep is the part that matters.
🟠 FEATURES
🔹 Equality tolerance is set as a percentage of price rather than in points, so
the same setting behaves consistently on a five dollar stock and a seven hundred
dollar index
🔹 The level is drawn at the higher of the two equal highs, and the lower of the
two equal lows, because that is where the stops actually sit. Averaging the two
puts the line underneath the liquidity it is meant to mark
🔹 Levels extend forward on every bar until they are taken, so an untouched pool
stays visible for as long as it survives
🔹 Swept pools are greyed out and labelled instead of being removed, which
leaves a record of how the symbol has treated its pools historically
🔹 A cap on active pools, so old levels retire instead of filling the chart
🔹 Separate alerts for equal highs taken and equal lows taken
🟠 HOW TO USE
Start with the tolerance. It is the setting that decides everything else. On a
daily chart 0.1 to 0.3 percent is usually right. Intraday, drop it to 0.05 to
0.15. If you are seeing almost no pools, raise it. If everything is a pool,
lower it.
Read an unswept level as a destination, not a wall. Liquidity sitting above the
current price is a reason to expect price to reach up there at some point. It is
not a reason to short it.
The information is in what follows the sweep. Price taking equal highs and then
continuing up means the pool was simply passed through. Price taking them and
immediately failing back below is the sequence that traders are usually looking
for, and the sweep alert is there so you do not have to watch for it.
Swing Lookback controls how significant a swing has to be before it counts.
Raise it for fewer and more meaningful pools.
🟠 CONCLUSION
Equal highs and lows are easy to see once someone points at them and easy to
miss while a chart is moving. This marks them as they form, keeps them until
they are taken, and leaves the record behind. Indicador

Intraday Price Action [MaximoPartners]An intraday charting toolkit that highlights volume-driven support/resistance zones, wick-based liquidity, Tokyo/London/New York opening ranges, previous day/week reference levels, VWAP, and the EMA 9 / EMA 21 trend structure.
Designed for intraday use on futures, stocks, crypto, forex, and other volume-supported markets. Signals are confirmed on candle close.
Volume-dominance zones
Green zones identify areas where buyers showed strong control; red zones identify seller-controlled areas.
A zone requires elevated volume and decisive candle positioning:
avgVol = ta.sma(volume, 12)
relVol = avgVol > 0 ? volume / avgVol : 0.0
isEvent = relVol >= 1.6
barRange = math.max(high - low, syminfo.mintick)
bodyEff = math.abs(close - open) / barRange
closePos = (close - low) / barRange
buyStrength = closePos * bodyEff
sellStrength = (1.0 - closePos) * bodyEff
isBuyDominance = isEvent and buyStrength >= 0.55 and buyStrength > sellStrength
isSellDominance = isEvent and sellStrength >= 0.55 and sellStrength > buyStrength
Each zone is centered on the candle extreme—low for buyers and high for sellers—with a total height based on 0.25 ATR. Nearby zones of the same direction are merged, reinforcing that price area. A buy zone is invalidated when a confirmed close falls below it; a sell zone is invalidated when a confirmed close closes above it. Invalidated zones can remain visible in gray.
Use these areas as confluence, not standalone entries: watch how price reacts when it returns to a zone, especially alongside liquidity, opening-range, or higher-timeframe levels.
Liquidity levels
Liquidity levels are created from two consecutive candles with matching wick extremes:
Upper wicks near the same high suggest overhead liquidity / potential resistance.
Lower wicks near the same low suggest below-price liquidity / potential support.
seqWickLen = 2
upperRange = ta.highest(high, seqWickLen) - ta.lowest(high, seqWickLen)
lowerRange = ta.highest(low, seqWickLen) - ta.lowest(low, seqWickLen)
upperSequence = upperRange <= 0.5
lowerSequence = lowerRange <= 0.5
The line stays active until a candle body trades through it. These levels can attract price for a sweep, then act as a decision point: rejection may support a reversal, while acceptance through the level may support continuation.
High-volume move bubbles
Bubbles mark moments when strong buyers or sellers may be defending a price.
Green bubbles appear below bullish buyer-dominance candles, or after a high-volume battle candle with a meaningful lower wick.
Red bubbles appear above seller-dominance candles, or after a high-volume battle candle with a meaningful upper wick.
A bubble requires at least 1.25× the 12-bar average volume.
The bubble text estimates the candle’s traded notional value:
candleDollarAmount = volume * close * syminfo.pointvalue
Treat bubbles as evidence of participation and potential defense—not a guarantee that price will hold.
Opening ranges and reference levels
The indicator plots the first 15-minute opening range and session open for:
Tokyo: 09:00–17:00 Tokyo time
London: 08:00–13:30 London time
New York: 09:30–16:00 New York time
It also plots the previous day high/low and previous week high/low.
ORB highs/lows, session opens, previous day/week highs and lows often become important resistance or support. When price reaches one, look for confirmation: rejection wicks, a bubble, a volume-dominance zone, or a liquidity sweep can strengthen a reversal idea. A clean break and hold beyond a level can instead signal continuation.
EMA 9 and EMA 21
The EMA 9 and EMA 21 provide a simple view of short-term trend and momentum:
EMA 9 crossing above EMA 21 can indicate buyers gaining control.
EMA 9 crossing below EMA 21 can indicate sellers gaining control.
Price holding above both EMAs supports bullish control; price holding below both supports bearish control.
When price moves far away from both lines, it shows strong directional dominance—but can also signal an extended move that may pull back toward the averages.
Use the EMAs for context, then use zones, liquidity, bubbles, and session/reference levels to refine timing.
Indicador

Reversal OB ZonesREVERSAL OB ZONES
Reversal OB Zones locates the first Break of Structure in a trend and marks the Order Block and rebound zone that come with it - one setup at a time, drawn the moment the break confirms, using only price structure that already exists on the chart.
THE IDEA BEHIND IT
The indicator is built on the Smart Money Concepts / ICT idea that a trend doesn't reverse randomly: it reverses at the last point where "smart money" was still positioned in the direction of the old trend before structure broke. That point is the Order Block - the last opposing candle before the move that produced the reversal - and it tends to act as support or resistance the first time price returns to it.
To find that moment, the script tracks a trailing key level: the support (in an uptrend) or resistance (in a downtrend) left behind by the most recent genuine higher high or lower low. A pullback that doesn't make a new extreme never moves this level - only an actual new high or low does. The first candle to close back through that level is the first Break of Structure (BOS). Everything else - the Order Block and the rebound zone - is already sitting in the chart's history at that exact moment, so both are drawn immediately, on the same candle as the break, with no repainting and no waiting for future bars to "confirm" anything further.
Swing highs and lows themselves come from a pure, zero-threshold structure detector (a point counts the moment the next candle confirms it was a local extreme) - there is no ATR filter or fixed lookback window involved, so the logic behaves the same in quiet and in noisy price action.
WHAT'S ON THE CHART
Each setup is made of three parts, always drawn together:
- First BOS line and label: marks the level that broke and the candle that broke it.
- Order Block zone (teal for longs, maroon for shorts): the last opposite-colored candle before the trend's real high/low, with a small ATR buffer added beyond that extreme.
- Rebound zone (gray box): the two prior structural support/resistance levels immediately behind the Order Block. This is the room price is expected to use while retracing back up (or down) into the Order Block; it is not a level to be traded on its own - see below.
Only one setup is ever active at a time: while an Order Block and its rebound zone are on the chart, the indicator will not flag a new BOS in either direction. A setup stays on the chart until it is invalidated - there is no time-based expiry.
HOW TO USE IT
The Order Block is the only zone you trade. A bearish (maroon) Order Block is a level to look for shorts; a bullish (teal) Order Block is a level to look for longs - the trade direction always matches the color of the Order Block, not the gray zone.
The gray rebound zone is not tradable. It exists purely to define how far price is allowed to retrace before the setup is considered dead: it marks the boundary between "price is still reasonably retracing toward the Order Block" and "price has gone too far and the level no longer means anything." It is a boundary, not an entry.
A setup is invalidated - and both zones disappear together - under exactly two conditions:
1. Price closes back through the far side of the Order Block (the old trend has genuinely resumed).
2. Price closes through the far side of the gray rebound zone (support/resistance failed with no bounce, so the Order Block is no longer valid either).
If neither happens, the zones simply stay on the chart - there's no bar-count expiry to worry about.
A practical read: wait for the BOS, then watch for price to retrace back into the Order Block zone. The gray zone underneath (or above, for longs) is your line in the sand - if price closes beyond it before ever tagging the Order Block, treat the setup as invalidated rather than waiting for a reaction that structurally shouldn't be expected anymore.
INPUTS
- Look for bearish / bullish setups: enable or disable each direction independently.
- Order Block lookback: how many bars back to search for the Order Block candle.
- Pivot history to remember: how many structural key levels to keep for rebound-zone lookups.
- ATR length / buffer: controls the small buffer added beyond the Order Block's originating extreme.
- Style: colors and label size for both zones and the BOS marker.
NOTES
Because everything is built from confirmed structure rather than fixed-length pivots or volatility thresholds, the indicator works the same way across instruments and timeframes without needing to be re-tuned. As with any structural/SMC tool, treat it as a way to frame where price is likely to react, not as a standalone signal - combine it with your own confirmation and risk management. Indicador

ICT Kill Zones and Session High LowICT Kill Zones and Session High Low
What it does
This indicator draws the intraday sessions as boxes with their high and low, marks the three daily opening levels, and reports which time state the chart is currently in. Its point is not the feature list, which you can find elsewhere; its point is being right at the edges. Everything is anchored to New York wall-clock time, so the sessions keep their place through every daylight-saving changeover, including the weeks when the United States and Europe have not both switched yet. On those weeks the panel says so.
How it works
Every window is resolved through the named time zone America/New York rather than a fixed offset, the chart time zone or your local time. That single choice is what makes the boxes sit correctly in March and October, and it is the reason a session cannot drift by an hour without anyone noticing.
A session starts on the first bar that falls inside its window, not on a bar whose clock reads exactly the start time. On a 45 minute chart no bar lands on 07:00, and a script that waits for one draws nothing that day.
While a session runs, its box grows and its high and low move with it. That state is drawn with a dashed border, because a level that can still change must not look like one that cannot.
When the session ends, the high and low are fixed and never move again. The border turns solid and the two levels extend to the right.
The bar that ends a session can already trade through what that session just fixed, so both things are allowed to happen on the same bar. A level that was taken immediately is never shown as untouched first.
A level is taken when price trades strictly beyond it, by wick or by close depending on the setting. A value exactly on the level is not a take, and each level changes state only once.
The New York to London offset is recalculated per trading day from the calendar itself. It is displayed, never applied: the sessions sit right because they are anchored to New York, not because anything is shifted.
Short trading days and holidays are read from the bars that exist, not from a stored calendar that would need maintenance and would eventually be wrong.
How to use it
Add the script to an intraday chart. Sessions cannot be resolved above 60 minutes, and on higher timeframes the script says so instead of drawing something misleading.
Read the dashed box as the session in progress and the solid one as finished. The two lines running to the right are the finished session's high and low.
Watch the panel in March and late October. When it reads 4h instead of 5h, the two regions are out of step and the London session sits an hour away from where it was the week before. The gap can last up to three weeks in spring and about a week in autumn, depending on the year.
If a day reads Early close or No RTH session, that day was short or closed. Both are recognised after the day is over, so the label refers to the last completed day.
Inputs
Sessions group - one row per session with a switch, its start and end time in New York wall-clock time, and its colour. London Close is off by default so the standard chart shows four boxes that do not overlap.
Session Levels group - show the fixed high and low, extend them to the right, and choose whether a wick or a close counts as taking them.
Time Markers group - Midnight Open, True Day Open and RTH Open, each switchable. The last two are hidden automatically where they have no meaning. Extend Markers Right lets the newest marker of each type run past the latest candle so its line and label stay visible in front of the price action; range 0-500, default 10. Older markers still end where the next marker of the same type begins.
Level Line Style and Marker Line Style - solid, dashed or dotted. The markers are dotted by default so they read as references rather than as structure.
Label Background - off by default, so only the label text shows. Turn it on where a label sits over the candles and the bare text is hard to read.
Days Retained - how many trading days stay drawn, the current one included. Range 1-10, default 2. Older days are deleted, not hidden. On futures the Sunday evening open counts as its own day, so on a Monday the default keeps Sunday and Monday rather than Friday and Monday.
Display group - session labels and where they sit: Above Box by default, Inside Box or Below Box, always centred on the width of the box. Plus text size in points, the time state panel and its corner.
Style group - how far the boxes fade for finished and running sessions, line widths, and one colour per time marker.
Alerts group - each of the four alert conditions can be switched off.
Signals and alerts
Session opened - fires on the first closed bar of a tracked session. Off by default, because the clock is not news.
Session closed - fires when a session has ended and its levels are fixed. Off by default for the same reason.
Session high taken and Session low taken - fire when price trades through a fixed level. On by default, because this is the one event of the four that is not predictable from a clock.
All four fire on the close of the bar that produced the change, and each level can only be taken once.
Repainting
Sessions start, end and levels are taken only on closed bars. A running session is the one thing that changes while it runs, and that is its purpose rather than a defect: its box grows with each bar and is drawn with a dashed border to say so. Once a session is finished its box and its two levels are fixed and are never rewritten, and the offset shown in the panel changes nothing that is already on the chart.
Limitations
A short trading day or a holiday is recognised only after the day is over, because it is read from the bars that exist rather than from a stored calendar. The panel therefore reports the last completed day. On futures that means a short Friday is reported during the Sunday evening session and is replaced once Monday begins.
Sessions need an intraday timeframe. Above 60 minutes the windows cannot be resolved and nothing is drawn.
On instruments without a regular trading session - spot forex, crypto and CFDs - the True Day Open and RTH Open markers are hidden because they are not defined there. The panel says so.
Only the most recent day's time markers carry a label. Older ones keep their line but would otherwise stack their labels on the same spot at the right edge.
A session with no bars inside its window produces nothing at all, which is correct but means an empty session leaves no trace to explain itself.
Days Retained set to 1 together with a window you moved across midnight keeps only the session that is still running. Its completed form is never shown, because the day it belongs to is already outside the retention. Raise Days Retained to 2 if you want to see it finished.
Only the bars of the chart timeframe are used. There is no higher timeframe layer, no intrabar data and no volume.
The script describes when things happened and whether a level was traded through. It does not compare sessions, rank them, or suggest entries, exits or targets.
This script is a charting tool for educational purposes. It does not provide financial advice and does not predict future price movement. Trading carries risk; decisions and their outcome remain yours. Indicador

The Trap IndicatorThe Trap Indicator
WHAT IT IS
The Trap Indicator is a structure-based tool that automatically detects and marks a specific market sequence known as "the trap": a Change of Character (CHoCH) that catches one side of the market off guard, followed by a Break of Structure (BOS) that catches the opposite side, before price turns to sweep the liquidity left behind by both groups. Instead of drawing every structure break on the chart, it isolates this particular chained sequence and highlights only the CHoCH, the BOS, and the liquidity pool that sits between them.
WHAT IT IS BASED ON
The indicator is built on core Smart Money Concepts (SMC) / ICT-style ideas: market structure shifts (CHoCH and BOS), and liquidity resting above and below swing points as pools of stop orders that price tends to gravitate toward. The specific sequence it looks for is a practical extension of those building blocks: a structure break in one direction traps traders who enter on it, the market then reverses and breaks structure in the other direction, trapping a second, opposite group, and only after that combined liquidity has been swept does the underlying move tend to unfold with less resistance. The individual concepts (CHoCH, BOS, liquidity) are standard SMC/ICT vocabulary; the way they are chained together here into one tracked pattern is this indicator's own interpretation of that idea.
WHAT IT IS MADE OF
The indicator works from three consecutive swing points, labeled A, B and C:
- Swing A: a confirmed pivot (high or low) taken as the starting reference.
- Swing B: the swing right after A, in the opposite direction.
- Swing C: the swing right after B, in the same direction as A, but going further than A (a lower low for a bullish resolution, a higher high for a bearish resolution). This is what confirms the CHoCH — structure breaking against the initial A-to-B move, trapping whoever entered on it.
From there:
- BOS line: plotted when price closes back beyond swing B, confirming a Break of Structure in the opposite direction and trapping a second group of traders who act on that break.
- Rebound Zone: a box drawn across the price range between swings A and C — the pool of liquidity left behind by both trapped groups. The box grows bar by bar for a set number of bars after the BOS confirms, then disappears automatically, leaving only the CHoCH and BOS marks on the chart.
Swing detection uses standard pivot highs/lows, with an optional ATR-based minimum-amplitude filter to ignore minor, noise-level swings.
HOW TO USE IT
Add the indicator to any symbol and timeframe. When a valid CHoCH forms, an orange line appears at the level that was broken, labeled "CHoCH." If price then breaks structure the other way, a second line (green for a bullish resolution, red for a bearish one) appears at that level, labeled "BOS," together with the Rebound Zone box marking the liquidity range between swings A and C. That box is the area to watch: it represents the combined liquidity from both trapped groups, which price often revisits before the larger move plays out. Once the configured number of bars has passed, the box disappears on its own, while the CHoCH and BOS lines remain as a permanent record of the structure shift.
Settings worth adjusting:
- Pivot lookback/lookahead and the amplitude filter control how sensitive swing detection is — lower values catch more (and smaller) swings, higher values focus on more significant structure.
- Rebound zone duration (bars) sets how long the liquidity box stays visible before it is removed.
- Bullish/bearish resolutions can be toggled independently, and all colors, line width and label size are configurable.
This indicator only marks structure — it does not plot entries, targets, or stop levels, and it does not predict that price will necessarily reverse inside the Rebound Zone. It is meant to help visualize where this specific liquidity-trap sequence is forming, so it can be combined with the trader's own confirmation (price action, volume, or other tools) before making any decision. It is provided for educational and analytical purposes only and does not constitute financial advice. Indicador

CRT Engine [vault]CRT Engine
CRT Engine is a complete Candle Range Theory toolkit built around one idea: the higher timeframe candle sets the range, the lower timeframe shows you how that range gets manipulated and delivered. The script tracks the HTF range, detects sweeps of the previous high or low, confirms the shift with an order block or a CISD, and follows the model until it either reaches its target or gets invalidated. Around that core it adds HTF fair value gaps, previous period highs and lows, SMT divergence, multi timeframe moving averages and a compact dashboard, all sharing one color palette so the chart stays readable.
HOW THE CRT MODEL WORKS
Every new HTF candle opens a new range. Its high and low are tracked live on the chart timeframe. When the HTF candle closes, the script compares it to the previous HTF candle:
• Sweep of the high: the candle traded above the previous high and closed back below it. Bias flips to bearish, the previous low becomes the target.
• Sweep of the low: the candle traded below the previous low and closed back above it. Bias flips to bullish, the previous high becomes the target.
• Double purge: both sides were taken in the same candle. Bias is decided by the candle direction (bullish close = bullish bias) and the sweep is labeled D-Purge.
From that point the model is Active. It becomes Success when price reaches the target side of the previous range and Invalidated when price breaks back through the swept level. Status is reflected on the range box border and on the HTF candle panel.
MODEL 1 VS MODEL 2
Model 1 is the faster version. The sweep is detected in real time on the chart timeframe, not only at HTF close. As soon as price breaches the previous high or low and closes back inside, the sweep line, the target line and an order block line are drawn. The order block is the low of the candle that set the swept high (or the high of the candle that set the swept low). If price later trades through the sweep level, everything is cleared and the model resets.
Model 2 is the confirmation version. After the sweep candle closes, the script looks back through the consecutive same-direction candles that built the manipulation leg and stores the opening price of that series. A CISD (change in state of delivery) prints when a chart timeframe candle closes through that level. The sweep candle is labeled C1 and the CISD candle is labeled C3, matching the classic three candle CRT structure.
A bias filter lets you run the model long only, short only, or neutral.
TIMEFRAME PAIRING
Auto mode picks the HTF from the chart timeframe: 1m to 15m, 3m to 30m, 5m to 1H, 15m to 4H, 1H to 1D, 4H to 1W, 1D to 1M. Presets are available for 1H-1D, 4H-1W, 1D-1M and 1W-3M, and a custom HTF can be set for anything else. The script validates that the HTF is higher than the chart timeframe and stays idle otherwise.
HTF CANDLE PANEL
On the right side of the chart the script draws the last few HTF candles as mini candles with wicks. Above them sits the HTF label with a live countdown to the next close, below them the current model bias. Sweeps between panel candles are marked with a small line and a sweep label, and the candle borders change color with the model status (neutral while active, bull color on success, bear color on invalidation). Offset, spacing, width and candle count are adjustable.
HTF FAIR VALUE GAPS
Fair value gaps are detected on a higher timeframe, either automatically chosen from the chart timeframe or set manually. Each gap is drawn as a box that starts at the close of the first candle of the three candle pattern, which is where the imbalance actually forms, and extends to the right with an optional midline and a label showing the HTF. A gap is removed once the HTF candle closes through it. You can cap how many gaps stay on the chart.
HTF LEVELS
Previous day, week, month, quarter and year highs and lows, with the previous open as an optional third line. Lines start at the bar where the level was formed and stop exactly where price first touches them, so a mitigated level is still visible but no longer projected forward. Labels use the PDH / PDL / PWH / PWL convention. Line style, width and label size are shared across all timeframes.
SMT DIVERGENCE
The script compares the chart symbol with a correlated instrument and flags divergence in two ways: at HTF close (one symbol made a higher high while the other did not, with a matching candle direction) and on chart timeframe pivots (a new higher high on the chart while the paired symbol printed a lower high, or the mirror for lows). Divergence is drawn as a line between the two swing points with the pair name as a label. Auto pairing covers index futures (NQ, ES, YM, RTY and their micros), CFD indices, major and cross forex pairs, currency futures, gold, silver, oil products and BTC/ETH. A manual pair can be set for anything else. Optionally only the latest bullish and bearish SMT are kept.
MOVING AVERAGES
Five configurable moving averages (SMA, EMA, RMA, WMA, HMA, VWMA), each with its own length and timeframe. Lines are hidden by default and can be toggled with one switch. When enabled, all lines automatically hide once the chart timeframe is higher than the highest MA timeframe in use, so a 15m EMA never gets drawn on a daily chart. The dashboard trend rows keep reading the first three MAs whether the lines are visible or not.
DASHBOARD
A small table showing the chart and HTF pairing, the active model and bias filter, the current bias, an aggregated MA trend (bullish, bearish or mixed) with per-MA arrows, the SMT pair in use and the date. Position and text size are configurable.
COLOR SCHEMES
Seven schemes, each defining the bull, bear, neutral, text and accent colors that every element on the chart uses:
• Vault Dark: teal and rose on a dark background, the default
• Light: near black text and lines with blue and red accents, made for white charts
• Midnight: blue and pink
• Neon: bright green and magenta
• Ember: orange and red
• Mono: greyscale
• Custom: set all five colors yourself
Box transparency is controlled with a single slider.
ALERTS
• Model formed: a new HTF candle closed and the model state was evaluated
• Sweep: a sweep of the previous high or low was detected
• Double purge: both sides of the previous range were taken
• Model success: the target was reached
• Model invalidated: the sweep level was broken
NOTES
The model logic does not repaint. HTF data is requested without lookahead and the Model 1 real time sweep is confirmed on candle close. Drawings such as the panel, the labels and the level extensions are repositioned on the last bar for display only.
The script is a context and structure tool. It does not generate trade signals and nothing in it should be treated as financial advice.
Indicador

NX Flow■Overview
"NX Flow" is a next-generation confluence indicator that seamlessly merges pure Price Action with Order Flow dynamics.
While many traders focus solely on the shape of price movements, it is "Volume" and "Liquidity" that truly drive the market. This script is designed to project the fundamental essence of the market—institutional intent, structural shifts, and true buying/selling pressure—directly onto your main chart intuitively, without cluttering your workspace with complex lower-pane oscillators.
■TradingView House Rules & Educational Intent
This script is built strictly for educational purposes and fully complies with TradingView's House Rules. It utilizes absolutely NO repainting functions and NO lookahead features that reference future data. To ensure signal authenticity and maintain chart performance, heavy internal calculations (such as Volume Profile processing) are highly optimized and executed only when the candle is finalized (barstate.isconfirmed).
■Core Calculation Logic & Mathematical Rationale
The script mathematically evaluates the following elements. A signal is output only when the combined score exceeds your defined sensitivity threshold.
1. SuperTrend Baseline (Trend & Volatility)
Calculation: Base = hl2. Upper/Lower Bands = Base ± (Multiplier * ATR).
Why? Simple moving averages lag and ignore volatility. By using the median price and ATR, this model dynamically adapts to market noise, tightening during consolidation and widening during high volatility to prevent premature stop-outs.
2. Fibonacci Retracements (0.5 / 0.618)
Calculation: Range = Pivot High - Pivot Low. Dynamically calculates the 50% and 61.8% retracement levels of the most recent swing.
Why? These ratios are statistically proven mean-reversion zones where institutional algorithms frequently place limit orders. Calculating these automatically removes subjective drawing errors.
3. CVD (Cumulative Volume Delta)
Calculation: Delta = +Volume (if Close > Open) or -Volume (if Close < Open). Cumulates the net difference.
Why? Total volume shows activity, but CVD reveals "Intent." By separating buying/selling volume, it exposes hidden Order Flow, allowing you to spot divergences where smart money is distributing into retail buying pressure.
4. Volume Profile POC (Point of Control)
Calculation: Scans the high/low range over the last 200 bars, divides it into equal bins, and aggregates volume into the specific bin where the typical price (hlc3) traded. Finds the bin with the max volume.
Why? POC is the exact mathematical price where the most trading occurred—the "fairest" value agreed upon by buyers and sellers. It acts as a massive gravitational wall. To keep the chart clean, this is computed strictly via background array logic.
5. FVG (Fair Value Gap) & CHoCH (Change of Character)
Calculation: Detects 3-candle liquidity voids (FVG) and structural breaks of recent pivot highs/lows (CHoCH).
Why? Identifies the exact moment a sequence of highs/lows is broken and visualizes areas of inefficient pricing that the market will naturally seek to rebalance.
6. Smart Bias (MTF & VSA - Volume Spread Analysis)
Calculation: Validates execution timeframe VSA (Spread > 20 SMA & Volume > 1.5x 20 SMA) against the Higher Timeframe (default Weekly) EMA trend.
Why? Eliminates counter-trend fake-outs. If macro trend is bullish, it mathematically filters out micro bearish traps by demanding institutional effort (high volume/spread) aligns with the macro direction.
■Visual Interface: Cyber Volume Envelope
The wavy bands rendered at the top and bottom of the SuperTrend scale the current volume's strength against its moving average using an ATR multiplier. When volume spikes, the waves expand dynamically. This provides an immediate, intuitive read of the market's injected energy right on the price action, eliminating the need to look away at a separate volume indicator.
■How to Use
Trend Identification: Assess the immediate market environment using the color of the central SuperTrend line and its surrounding Cyber Bands.
Confluence Signals: A "BUY / SELL" label is triggered only when your required number of conditions (default 5 out of 7) align, combined with strict filters requiring above-average volume and sufficient candle body size.
Customize the Confluence Sensitivity and Higher Timeframe baseline in the settings to perfectly match your trading style.
This indicator and description are provided for educational and informational purposes only and do not constitute financial advice or a recommendation to buy or sell any financial instrument. Trading in financial markets involves a high degree of risk and may result in the loss of your entire capital. The signals and analysis provided by this script are based on historical data and probabilistic modeling, and do not guarantee future profits. The author accepts no liability for any losses or damages incurred as a result of using this script. All trading decisions must be made strictly at your own discretion and at your own risk.
Indicador

ICT HTF FVGsHigher Timeframe Fair Value Gaps with CE and Quarter Levels
What it does
This script draws fair value gaps from two higher timeframes onto the chart you are already looking at, so a 4-hour or daily gap stays visible while you work on a 5-minute chart. Each gap is drawn as a zone anchored at the time the pattern actually formed, with a consequent encroachment (CE) line at its midpoint, and the script then tracks what price does with that zone afterwards: left alone, entered, reached at the CE line, or traded all the way through. Both higher timeframes are chosen by you, and every filter, colour, and lifecycle rule is a setting.
How it works
A fair value gap is a three-candle pattern where the middle candle moves far enough that the first and third candles do not overlap, leaving a price range that was passed through in one direction without trading in the other. The script evaluates that pattern on each selected higher timeframe and projects the resulting zone onto the chart's own bar index, both for its left edge and for any offset applied to its right edge, which is what keeps a weekly zone on the correct spot of an intraday chart and keeps an offset from ever landing inside a trading pause.
A bullish gap exists when the third candle's low is above the first candle's high. The zone spans that distance, and price returns into it from above.
A bearish gap exists when the third candle's high is below the first candle's low. The zone spans that distance, and price returns into it from below.
The CE line sits at the exact midpoint of the zone. The optional quarter lines sit at 25 % and 75 % of it.
Each zone moves through four states: open, touched, CE reached, and mitigated. The border style and the fill opacity show which state a zone is in.
A zone is only created once all three candles of its pattern have closed on their own timeframe. Nothing is drawn from a candle that is still forming.
Optional filters can reject a gap before it is drawn: direction, the trend of its own timeframe, the quality of the middle candle, and the time window it formed in.
How to use it
Add the script and set the two higher timeframes you follow. Both must be at or above the chart timeframe; a lower one is switched off and named on the chart.
Read the zones as areas price has left behind, not as signals. The colour tells you which timeframe and direction a zone belongs to, the label repeats it in text.
Watch the state. A solid border means untouched, a dashed border means price has been inside, a faded zone has been traded through completely. There is no legend on the chart; the colour tied to each timeframe is set in the Style group of the settings.
Require Displacement is on by default and removes gaps left by quiet candles. Turn on the remaining filters one at a time if there are still more zones than you want.
Set Extend Zones to match how you read a chart: ending a fixed number of bars right of price, freezing where a zone was traded through, or running to the right edge.
Inputs
Timeframes - two independent slots, each with an on/off switch and its own timeframe. A slot below the chart timeframe is ignored.
Direction - keep both directions, or only bullish or only bearish gaps.
Require Displacement - on by default. Demands that the middle candle's body covers at least a chosen share of its range, optionally that its range reaches a multiple of the ATR of its own timeframe. Body share 0-100 %, default 50; ATR multiple 0-10, default 0 which switches that half off.
Trend Filter - compares the close of the last completed bar of the slot timeframe with an EMA on that same timeframe, and keeps only gaps with or against that direction. EMA length 2-500, default 50.
Session Filter - keeps only gaps whose middle candle starts inside a chosen window, in a chosen timezone. A slot on a daily timeframe or higher ignores it.
Interaction Basis - whether a bar's wick or only its close counts as reaching a zone, its CE line, or its far edge.
Mitigation Basis - HTF Bar Close advances a zone only when a bar of its own timeframe closes; Chart Bar advances it on every closed chart bar.
Zones Per Timeframe - how many zones each slot keeps before the oldest is removed. Range 1-20, default 3.
Extend Zones - To Current Bar keeps open zones ending a set number of bars right of price, Until Mitigated freezes a zone where it was traded through, Always runs every zone to the right edge. Right Offset 0-200 bars, default 10.
Labels - content and text size as a number from 8 to 40, default 12. Position is fixed just outside the right edge of the zone, at CE height.
Style - a bullish and a bearish colour per slot, fill opacity, mitigated opacity, border width where zero draws no border, and the CE line style and width.
Settings that only apply under a condition are greyed out until that condition is met, so an inactive option cannot be changed by mistake.
Signals and alerts
New FVG formed - a new zone has been created on one of the two timeframes.
FVG entered - price has reached into a zone for the first time.
CE reached - price has reached the midpoint of a zone.
FVG mitigated - price has traded through an entire zone.
Every alert fires once per bar close. Each type fires at most once per bar; the message names the direction and timeframe of the zone nearest to price and, if others made the same move on the same close, how many. Require Displacement is on by default, which lowers how many gaps are drawn in the first place and therefore how often these alerts fire; turn it off to see and be alerted on every structural gap again.
Repainting
Every value used to build a zone is read from bars that have already closed on their own timeframe. The request is offset by at least one bar and paired with lookahead, which is the combination that returns the last completed higher-timeframe bar rather than the one still forming. A zone therefore appears at the close of the third candle of its pattern and never moves afterwards, and state changes are only evaluated on confirmed bars. The visible consequence is deliberate: a gap forming inside a running 4-hour candle is not drawn until that candle closes. Showing it earlier would mean drawing a zone whose edge can still move, because the low of an unfinished candle can fall further and close the gap again.
Limitations
A zone appears only when the higher-timeframe candle that completes it has closed. On a daily slot that can be hours after the move that created the gap.
On a low chart timeframe the loaded history may not reach back far enough to show older zones of a high timeframe, because the zone's left edge sits on a bar index that predates what is currently loaded.
The session filter has no meaning on a daily timeframe or higher and is skipped there, so a slot on daily will show gaps from outside the chosen window.
A timeframe below the chart timeframe cannot be projected meaningfully and is switched off rather than approximated.
The script marks where gaps are and what price has done with them. It does not judge whether a gap will be filled, and it produces no entries, exits, or directional calls.
Only chart bars and higher timeframes are used. No tick data, no volume-derived values, so nothing here depends on the data plan of the account.
This script is a charting tool for educational purposes. It does not provide
financial advice and does not predict future price movement. Trading carries
risk; decisions and their outcome remain yours. Indicador

Curved Market Structure & SMC Liquidity [ ICT ]================================================================================
CURVED MARKET STRUCTURE & SMC LIQUIDITY
================================================================================
Curved Market Structure and SMC Liquidity ICT is an all-in-one institutional trading suite designed for precision analysis across Crypto, Forex, Commodities, and Stocks. It merges smooth mathematical volatility curves with automated Smart Money Concepts (SMC) structure, body glow momentum candles, dynamic equilibrium range tracking, and a visible right-side volume profile.
--------------------------------------------------------------------------------
1. CORE FEATURES & MECHANICS
--------------------------------------------------------------------------------
• Dynamic Smooth Curve Bands
Uses double-exponential smoothing and standard deviation to generate adaptive high-probability trend curves. The lower curve marks an institutional demand/liquidity sweep zone, while the upper curve identifies overextended supply areas.
• Institutional Structure Mapping (BOS & CHoCH)
Automatically tracks key swing highs and lows. Upon structure breakout, it draws precise Break of Structure (BOS) or Change of Character (CHoCH) lines starting exactly from the broken swing level to the breakout candle.
• Filtered Sweep Signals & Cooldown Engine
Liquidity sweep signals require candle close confirmation and directional momentum alignment. An internal cooldown counter suppresses repetitive signals during tight consolidation phases.
• Body Glow Candle Dynamics
Recolors candle bodies based on directional strength and candle range. Active expansion bars highlight bright green or red, while low-volatility range candles render in neutral gray.
• Dynamic 0.5 Equilibrium & Confluence Zones
Continuously projects the 0.5 discount/premium equilibrium midpoint of the active swing range, alongside borderless demand and supply confluence zones.
• High Visibility Volume Profile
Renders a clean volume profile histogram on the right side of the chart to reveal High Volume Nodes (HVN) and Low Volume Nodes (LVN) over the selected lookback range.
--------------------------------------------------------------------------------
2. HOW TO USE FOR TRADING
--------------------------------------------------------------------------------
1. Determining Market Bias
Check whether current price action is trading above or below the 0.5 Equilibrium level and observe the direction of the latest BOS or CHoCH structural break.
2. Bullish Entry Rules
Wait for price to sweep or touch the lower green curve band. Enter long upon receiving a confirmed Buy Sweep signal accompanied by a green Body Glow candle near the demand zone.
3. Bearish Entry Rules
Wait for price to sweep or touch the upper red curve band. Enter short upon receiving a confirmed Sell Sweep signal accompanied by a red Body Glow candle near the supply zone.
4. Profit Targets & Risk Management
Set primary take-profit targets at the 0.5 Equilibrium line and secondary targets at the opposite curve band or major structural swing levels.
--------------------------------------------------------------------------------
3. SCALPING & TIMEFRAME GUIDANCE
--------------------------------------------------------------------------------
• Lower Timeframe Scalping (1m, 5m, 15m)
Lower the Swing Sensitivity setting to 3 or 5 for rapid structural tracking. Use right-side volume profile peaks to trade reversals back toward low-volume gaps.
• Higher Timeframe Bias (1H, 4H, Daily)
Use the 0.5 Equilibrium line to divide the market into Premium (favorable for shorts) and Discount (favorable for longs) zones before taking trades.
--------------------------------------------------------------------------------
4. SETTINGS BREAKDOWN
--------------------------------------------------------------------------------
• Curve Smoothing Factor: Controls band smoothness and responsiveness to price.
• Curve Multiplier: Adjusts upper/lower curve expansion based on market volatility.
• Signal Cooldown: Sets the required bar gap between signals to filter noise.
• Consolidation Threshold: Sets the body-to-range ratio for identifying neutral gray range candles.
• Swing Sensitivity: Sets pivot lookback length for validating swing highs and lows.
• Text Placement Settings: Customizes horizontal and vertical label alignments.
• Profile Lookback Range: Defines historical bar depth for the volume profile histogram.
--------------------------------------------------------------------------------
5. THINGS TO AVOID
--------------------------------------------------------------------------------
• Do not trade signals against the higher-timeframe trend direction.
• Avoid taking Buy signals during an active bearish BOS sequence without a fresh CHoCH confirmation.
• Avoid entering trades during major economic news releases or low-liquidity market sessions.
• Do not rely on printed shapes in isolation. Always combine signals with SMC structure, 0.5 Equilibrium levels, and volume confluences.
--------------------------------------------------------------------------------
DISCLAIMER
--------------------------------------------------------------------------------
This script is built exclusively for educational and chart visualization purposes. Past performance of visual signals does not guarantee future market results. Always manage risk responsibly. Indicador

FVG Intelligence - Fill Probability AI [Dots3Red]📦 FVG INTELLIGENCE - FILL PROBABILITY AI
Every Fair Value Gap tool draws the gap. None of them tell you what usually happens to it. This script keeps records instead — every gap that appears on your chart is tracked all the way to its resolution, and when a new one forms, the script reports what the most similar past gaps on this chart actually did.
✨ WHY THIS MATTERS
"Gaps get filled" is one of the most repeated assumptions in SMC trading — but it's rarely checked against the actual chart in front of you. Some instruments fill gaps quickly and reliably. Others leave them open for a long time, or never fill them at all. A gap formed on heavy volume during a strong trend behaves differently than one formed on quiet, choppy conditions.
This script doesn't assume any of that. It measures it. Every gap that resolves — filled or expired — becomes a data point: how big it was, what volume looked like when it formed, how volatile the market was, and where price sat relative to trend. When the next gap appears, the script finds the most similar historical gaps and reports their real outcomes.
📊 Fill 74% | ~6 bars | N=52
That reads as: of the 52 most similar gaps this chart has produced, 74% filled, taking about 6 bars on average. Measured history, not an assumption that "gaps always fill."
⚙️ HOW IT WORKS
📦 Detection — the standard 3-bar imbalance definition: a bullish gap exists when the current low sits above the high from two bars back, leaving an untraded price zone between them. Bearish gaps are the mirror. A minimum size filter (in ATR) discards micro-imbalances too small to carry real information.
🧠 The KNN engine — every gap is stored as five measurements the moment it forms: direction, size relative to ATR, volume behavior, volatility context, and position relative to the trend. When the gap resolves, the actual outcome — filled or not, and how many bars it took — is recorded against those five measurements. A brand-new gap is compared against this stored history, and the K most similar past gaps vote on fill probability and expected duration.
🎯 Fill definition — a gap counts as filled when price fully traverses it, reaching the far edge. This is the strictest standard (some traders count a midpoint touch as "filled" too) — deliberately conservative so the statistics mean exactly what they say.
📐 Near edge vs. far edge — each gap is drawn with two distinct boundaries. The edge price actually returns to first (the "near" edge) is shown with a solid line; the origin edge (the "far" edge, the one that defines a full fill) is shown dashed and dimmer. The fill inside fades from strongest near the solid edge to faintest near the dashed one, visually encoding which boundary carries more weight.
🔒 Non-repainting — detection, fill-checking, and outcome grading all happen strictly on confirmed bars. A gap's KNN read is calculated once, at the moment it forms, and its label stays fixed at that spot — it does not shift, recalculate, or repaint as the chart moves forward.
🧭 HOW TO USE
1️⃣ Check the sample count before trusting the percentage. "Fill 74% | N=52" is a real pattern; "Fill 74% | N=6" could easily be noise. The label always shows N so you can judge for yourself — the script won't display a probability at all until enough history exists ("Training…" appears instead).
2️⃣ Use the average bars figure as a timing expectation, not a countdown. "~6 bars" is the mean of gaps that did fill — it tells you the typical pace, not a guaranteed deadline for this specific gap.
3️⃣ Read the near/far edge distinction on the chart itself. The solid line is the boundary price will most likely interact with first; the dashed line is what a genuine full fill requires. A gap that's touched its solid edge but not yet reached the dashed one is still open, by this script's strict definition.
4️⃣ Watch the dashboard's global fill rate for chart-level context. Beyond any single gap, it tracks what percentage of every recorded gap on this chart has filled overall — useful for gauging whether this instrument tends to leave gaps open or close them reliably.
5️⃣ Adjust the fill window to the timeframe. A 30-bar window means something very different on a 1-minute chart versus a daily chart — tune it so "expired unfilled" reflects a genuinely meaningful amount of time for what you're trading.
🛠️ SETTINGS
📦 FVG Detection
• Min Gap Size — smallest imbalance the script will bother tracking
• Fill Window — bars allowed for a gap to fill before it's graded as expired
• Max Gaps Shown — how many open/recent gaps stay on the chart at once
📊 KNN Engine
• K Neighbors — how many similar past gaps vote on the current one
• Max / Min Training Samples — memory cap and the minimum before probabilities display
• ATR Baseline Period, Trend MA Length — the context windows used in matching
🎨 Visualization
• Keep Filled Gaps Visible — leave resolved gaps on the chart as faint gray outlines, or clear them for a cleaner view
• KNN Labels on Gaps — toggle the fill-probability readout
• Box Extension — how far each gap's zone projects forward while still open
🖥️ Dashboard
• Show/hide, position — open gap count by direction, chart-wide fill rate, KNN training progress, and the active fill window
📝 NOTES
Gap frequency and fill behavior vary significantly by instrument, timeframe, and market conditions — a volatile, fast-moving asset will accumulate the sample size needed for meaningful probabilities much faster than a slow, quiet one. On a new chart, expect a number of gaps to pass before the KNN read becomes genuinely informative rather than a placeholder.
⚠️ DISCLAIMER
This is an analytical and visualization tool. It does not generate trade signals and does not constitute financial advice. Historical fill rates do not guarantee how any specific future gap will resolve. Indicador

AMD Po3 with Live Edge Stats [WillyAlgoTrader]📊 AMD Po3 with Live Edge Stats is a free overlay indicator that detects the complete Power of Three cycle — Accumulation → Manipulation → Distribution — using a strict finite-state machine, validates every liquidity sweep by its return (not its depth), projects a Fibonacci-extension target from the full manipulation leg, and then does something most pattern indicators never do: it tracks its own results bar by bar and shows you the honest walk-forward statistics right on the chart.
The core insight: in the AMD model, a "smart money" cycle starts with a quiet accumulation range, continues with a manipulation (a fake breakout that sweeps resting stop-losses beyond the range boundary), and resolves with a distribution — the real move in the opposite direction. The single detail that separates a manipulation from a genuine breakout is the return : manipulated price snaps back inside the range quickly, a real breakout does not. This indicator is built entirely around that distinction.
New to the concept? Here is the whole idea in plain language. Markets often pause in a sideways box (accumulation). Below and above that box sit thousands of stop-loss orders. Sometimes price pokes out of the box just far enough to trigger those stops (manipulation), then reverses hard and travels through the box to the other side (distribution). This indicator finds the box, waits for the poke, demands proof that it was a fake-out (the return), and only then marks the expected move with an Entry, a Stop, and a Target — while a built-in scoreboard counts how often the pattern actually reaches that target on your symbol.
Works on all markets — crypto, forex, stocks, indices, futures — and all timeframes (tuned by default for 15M). Completely free.
🧩 WHY THESE COMPONENTS WORK TOGETHER
A range detector alone draws boxes but cannot tell a fake-out from a breakout. A sweep detector alone fires on every wick beyond a level with no context of where the range came from. A fib tool alone needs you to pick the anchors by hand. And none of them ever tell you whether the pattern has been working lately.
This indicator chains them into one pipeline where each stage feeds the next:
Compression detection → Range anchoring with impulse-tail trim → Boundary breach → Return-based sweep validation → Trade-at-manipulation reference model (Entry / Stop) → Fib-extension target from the manipulation leg → Outcome tracking → Walk-forward statistics dashboard
Compression finds ranges that are statistically quiet, not just visually flat. Tail trimming keeps the leftovers of the previous impulse out of the boundaries, so the box measures real accumulation. The breach arms a candidate sweep; the return deadline decides whether it was a manipulation or a breakout. Only a confirmed return opens the reference trade — and because the sweep extreme is known at that exact bar, the stop and the fib target are fully determined with zero lookahead. Finally, every closed cycle feeds the statistics engine, so the dashboard always answers the only question that matters: does this pattern currently have an edge on this chart?
Remove any link and the chain breaks: without compression the boxes are arbitrary; without the return rule every breakout poisons the signal set; without the reference model there is nothing to measure; without the statistics you are trading a story instead of data.
🔍 WHAT MAKES IT ORIGINAL
1️⃣ The full AMD cycle as a strict finite-state machine.
Most Po3 scripts paint boxes and arrows independently. Here the cycle is a formal FSM with phases IDLE → ACCUMULATION → SWEEP? → DISTRIBUTION, where every transition fires only on a confirmed bar close. A cycle cannot skip a stage, cannot exist twice, and every cycle ends in exactly one outcome: TARGET, STOP, TIMEOUT, EXPIRED, FAILED or BREAKOUT. This is what makes honest statistics possible — each detected cycle is one countable experiment.
2️⃣ Statistical compression detection with impulse-tail trimming.
A range is anchored only when the market is measurably quiet:
— Donchian(20) width must sit in the bottom N-th percentile (default 25) of its own distribution over a 200-bar window: percentrank(high20 − low20, 200) ≤ 25
— Minimum range width filter (default 0.15% of price) rejects micro-ranges where stop and target would drown in the spread
— Impulse-tail trim (default 15%): while removing the oldest bar of the anchoring window shrinks the range width by more than 15%, that bar is dropped — so the tail of a preceding impulse leg never contaminates the boundaries. The window can never shrink below the minimum range maturity
— Boundaries come from confirmed pivots (default) or absolute extremes, and may "breathe" within a tolerance (default 10% of width) without resetting the range
3️⃣ Sweep validation by RETURN, not by depth.
A breach beyond the boundary (plus tolerance) does not make a sweep. The close must come back inside the range within a hard deadline (default 6 bars). If it does — manipulation confirmed. If it does not — the move is labeled BREAKOUT , no trade is ever opened, and the cycle is excluded from trade statistics (it is counted separately as pattern diagnostics). Optional strictness filters: sweep depth capped at a True Range percentile, required equal highs/lows (min 2 confirmed pivots within 0.1× width over 96 bars) beyond the boundary, and London / New York killzone session windows.
4️⃣ Trade-at-manipulation reference model — everything is fixed on one bar.
The reference trade opens on the very bar where the manipulation confirms (the M/D bar). All three levels are fully determined by data already printed:
— Entry = the close of that bar
— Stop = beyond the FULL sweep excursion (including that bar's wick) ± a buffer of 0.4 × ATR-anchor
— ATR-anchor is ATR(14) taken from the bar BEFORE the range started — this cures a subtle circularity where volatility measured inside the compression would shrink the buffer exactly when it matters most
— riskR = |entry − stop|, floored at one tick, so R math can never divide by zero
No waiting for extra confirmation candles, no repainting, no lookahead anywhere.
5️⃣ Fibonacci-extension target of the manipulation leg.
The target is not a fixed multiple of the range width — it scales with the manipulation itself. A fib grid is anchored from the sweep extreme (level 0) to the OPPOSITE accumulation boundary (level 1); the target sits at the extension level (default 1.5):
— Short: target = rangeLow − (fibExt − 1) × (sweepExtreme − rangeLow)
— Long: target = rangeHigh + (fibExt − 1) × (rangeHigh − sweepExtreme)
A deeper stop-hunt means a longer measured leg and a farther target — target and stop scale from the same extreme, which keeps the R:R profile consistent across cycles. Common values: 1.272, 1.5, 1.618, 2.0. Important: this level is the expected reach of the distribution , a structural projection — not a take-profit ladder.
6️⃣ Honest, conservative walk-forward statistics.
Every closed cycle is scored in R against the reference model, in strict chronological order, with three deliberately pessimistic rules:
— If one bar touches BOTH the target and the stop, the cycle counts as a STOP (−1R) and increments a separate "ambiguous" counter — intrabar order is unknowable, so the model refuses to guess in its own favor
— Percentages and Average R stay hidden until a minimum sample (default 10 cycles) is collected — a "78% win rate" built on 4 trades is noise dressed as insight
— TIMEOUT cycles (neither level within 64 bars) close at the actual R from the final close and are included in Average R, not silently dropped
7️⃣ Period statistics engine with a form strip.
The Stats section can be switched between 24 Hours, 30 Days and All-Time. Period figures come from a rolling timestamped buffer (31-day horizon); All-Time reads the full-history counters. A target-rate gauge (▰▰▰▰▱▱▱▱) and a form strip of the last 10 cycles (▰ = target, ▱ = stop, ◌ = timeout) let you read the recent behavior of the pattern in one glance.
8️⃣ Re-arm — the double-sweep scenario.
When the optional higher-timeframe bias filter (HTF close vs EMA50, fetched repaint-free from the last CLOSED HTF bar) rejects the projected direction, the range is not discarded: it re-arms and waits for a sweep of the opposite side, with a fresh time budget and a block on repeating the same side. Double-sweep cycles are tracked with their own Average R so you can see whether the second sweep carries a different edge.
9️⃣ Pattern diagnostics separated from trade results.
BREAKOUT (sweep never returned) and FAILED (returned, but the HTF filter rejected it with no re-arm left) are counted outside the trade statistics — no trade was opened, so there is nothing to score. The Failed / Breakout row answers a different question than the Target rate: not "does the trade work?" but "how often does this market actually play the manipulation game at all?"
⚙️ HOW IT WORKS — CALCULATION FLOW
Step 1 — Warm-up: the indicator waits for the statistics window (default 200 bars) before detecting anything.
Step 2 — Compression: on each confirmed bar in IDLE, the Donchian width percentile and minimum-width checks decide whether a range is born; the impulse tail is trimmed and boundaries are anchored (pivot or absolute mode). A 10-bar cooldown separates cycles.
Step 3 — Accumulation: the range ages, boundaries may breathe within tolerance. A breach of both boundaries on one bar (news spike) resets the cycle; exceeding the max age (default 96 bars) expires it; a breach before minimum maturity (default 12 bars) is an early break, not a sweep.
Step 4 — Sweep candidate: a qualifying breach starts the return countdown. The excursion extreme keeps updating with every wick.
Step 5 — Resolution: close back inside within the deadline → manipulation confirmed → the M and D labels print, the reference trade opens (Entry / Stop / Target drawn, DIST alert fires). No return in time → BREAKOUT. HTF filter rejection → re-arm or FAILED.
Step 6 — Outcome: from the next bar, each confirmed bar is checked against target and stop (conservative ambiguity rule) until TARGET, STOP or TIMEOUT closes the cycle, prints the outcome label with its R value, fires the outcome alert and updates every statistic.
📖 HOW TO USE
🎯 Quick start:
1. Add the indicator to a 15M chart (any symbol; other timeframes work too)
2. Let it load history — the dashboard starts collecting cycles immediately
3. Watch the phases: blue box = accumulation, orange box = sweep in progress, M = manipulation confirmed, D ▲/▼ = distribution direction with Entry / Stop / Target lines
4. Do nothing until the Stats section reaches the minimum sample (default 10 cycles)
5. Then read Target rate and Avg R — that is the measured edge of the pattern on THIS symbol and timeframe
👁️ Reading the chart:
— 🔵 Dashed blue box = accumulation range (boundaries + fill)
— 🟠 Orange box = manipulation excursion beyond the boundary; solid when the sweep is confirmed
— M label = manipulation confirmed at the sweep extreme (M ↻ = re-armed, M ✗ = failed)
— D ▲ / D ▼ = distribution direction, below the bar for longs, above for shorts; hover it for a tooltip with sweep side, all levels and R:R
— 📏 Level lines: subtle dotted Entry, solid Stop, dashed Target — each with a price label and % distance from entry
— 🟢 Target line turns solid teal with "Target ✓" when reached; it dims gray on timeout
— 🏷️ Outcome labels: ✓ +xR (target), ✗ −1R (stop), AMB ✗ (ambiguous bar), ◌ xR (timeout), plus EXPIRED / NEWS BAR / BREAKOUT markers
— Older cycles fade to outlines (or hide) — configurable history depth
📊 Dashboard fields:
— Header : current phase, colored green/red during a live distribution
— Market : Phase (+ bars in it), Compression percentile with a tightness gauge, active Range boundaries, HTF Bias, timeframe (with a ⚠ hint when off 15M)
— Cycle : Long/Short @ Entry, Stop, Target, R:R, Risk %, Age — or a one-line status when no cycle is live
— Stats : Cycles (with double-sweep count), Target / Stop / Timeout with percentages, Target rate gauge, Avg R, Form strip, Failed / Breakout diagnostics — all switchable between 24H / 30D / All-Time
— Every row has a hover tooltip explaining exactly what it measures
🔧 Tuning guide:
— Too few cycles: raise the compression percentile (25 → 35) or lower minimum range width
— Too many breakouts: your market resolves ranges by trending — raise "Max bars until return" (6 → 8-12) to admit slower manipulations, or enable the sweep depth cap to reject wide breaches early
— Targets rarely reached: lower the fib extension (1.5 → 1.272); targets too easy — raise it (1.618 / 2.0)
— Stopped by wick retests: increase the stop buffer (0.4 → 0.6 × ATR-anchor)
— Only trade with the trend: enable HTF bias — rejected directions will re-arm for the opposite sweep
⚙️ KEY SETTINGS
⚙️ Range (Accumulation):
— Min range maturity (default 12 bars): breaches before this = reset, not sweep
— Max range age (default 96): time budget before EXPIRED
— Compression threshold (default 25): width percentile ceiling
— Distribution window (default 200): statistical lookback for percentiles
— Boundary tolerance (default 0.10), Min range width % (default 0.15), Boundary method (pivot / absolute), Impulse-tail trim (default 15%)
🌀 Manipulation (Sweep):
— Max bars until return (default 6): the manipulation deadline
— Require liquidity beyond boundary (off): EQH/EQL confirmation
— Soft depth cap (100 = off): True Range percentile ceiling for the excursion
— Allow re-arm (on): double-sweep second chance under the HTF filter
🎯 Reference Model & Stats:
— Stop buffer (default 0.4 × ATR-anchor), Fib extension target (default 1.5)
— Level lines / price labels / % distance toggles, line styles per level
— Distribution timeout (default 64 bars)
🔍 Filters: Killzones (London / New York sessions, any timezone), HTF bias (EMA50, any higher timeframe, validated at load)
🎨 Visual: Auto / Dark / Light theme, per-layer toggles (boxes, event labels, killzone highlight, watermark), event and level label font sizes, history depth and style, Min sample for % and Avg R (default 10)
📊 Dashboard: position, font size, per-section toggles (Market / Cycle / Stats), stats period (24 Hours / 30 Days / All-Time)
🔔 ALERTS
— 🌀 SWEEP — boundary swept: side, ticker, TF, price, time, cycle id
— 🟢/🔴 DIST — manipulation confirmed and the reference trade opened: direction, sweep side, Entry, Stop, Target, R:R
— 🎯/🛑/⏱ OUTCOME — cycle closed: result (target / stop / ambiguous / timeout), R value, reference entry
All alerts fire once per bar close, support plain text and JSON webhook payloads, and are wired via a single "Any alert() function call" condition. A master switch disables everything at once.
⚠️ IMPORTANT NOTES
— 🚫 No repainting. Every FSM transition, signal and outcome is evaluated strictly on confirmed bar closes (barstate.isconfirmed). Higher-timeframe data uses the last CLOSED HTF bar via the + lookahead idiom. Alerts fire once per bar close. Boundaries use confirmed pivots with equal left/right lookback — delayed confirmation, not repainting of future values.
— 📐 The statistics measure a reference model , not your execution: fills at bar close, no commissions, no slippage, no position sizing. Real results will differ. Past performance does not guarantee future results.
— 📐 The ambiguity rule is intentionally pessimistic: same-bar target+stop counts as a stop. Your live numbers can only be equal or better than this assumption, never worse because of it.
— ⚖️ Statistics reset when the chart reloads and depend on the loaded history depth. The period stats buffer covers a rolling 31 days.
— ⚖️ This is a cycle DETECTOR with an embedded measurement model — it does not manage positions, trail stops or scale out. The target is a structural projection, not trade advice.
— 🛠️ This is an analysis tool, not an automated trading bot. It detects AMD cycles, projects levels and reports honest statistics — trade decisions remain yours.
— 🌐 Works on all markets and timeframes; defaults are tuned for 15M charts (the dashboard reminds you when you are on a different timeframe). Indicador

Order Block (OB) Statistics: Real Win Rate vs Random LevelsOn real price data, a 54% win rate can be worse than random, and a 46% win
rate can be better. Whether a level "works" depends on the number it is
compared with. That comparison number is called the baseline, and for levels
on a chart it is almost never exactly 50%.
An order-block arrow is therefore not evidence of an edge. The practical
question is simple: does price behave differently after touching an order
block than after touching a similar level with no order-block event behind
it?
This script performs that comparison. It does not generate buy or sell
signals; it measures the entry logic that such signals rely on.
The measurements behind this publication were made on a forex pair
(EURUSD), a crypto pair (BTCUSDT) and an equity index future (ES1!). The
script itself runs on any symbol and timeframe.
What to Use It For
Evaluating what already exists. Whatever tool draws your order
blocks, set this script's inputs to match the same rules. The panel then
shows how those zones performed against matched comparison levels. The
comparison levels are measured on the same chart, in the same direction,
with the same size and distance from price.
Evaluating something before you build it. Entry, exit, sizing and
filters are normally backtested together. Because of this, even a profitable
backtest may not show which part produced the result. This script isolates
the entry and asks one question: after price reaches the zone, does it
behave differently than after reaching a similar level where nothing
happened? If not, exit rules may change the size of wins and losses, but
they cannot add information that the entry does not have. You can learn that
before writing the full strategy.
Generalizing beyond order blocks. Supply and demand zones, breaker
blocks, support and resistance, session highs and lows, and other
level-based signals can be evaluated with the same test. The rule that
builds the level changes; the baseline problem does not.
Order blocks are widely taught and rarely measured.
Order blocks on BTCUSDT 30m. Open zones extend to the right until price
reaches them. Once reached, they freeze and change to dotted lines, showing
how long each zone lasted. Triangles mark the break of structure - a close
beyond the most recent swing - that confirmed each zone as an order block.
The panel in the corner is the measurement. It scores every zone in the
selected date range - 1,854 of them here, not just the dozen visible -
against matched control levels.
The Result in Plain Language
The study contains 31 runs. They cover the three instruments named above,
timeframes, periods, barrier widths (target and stop distances) and
order-block definitions. No tested configuration showed a reliable
difference between real order blocks and their placebo levels, and no
configuration repeated such a difference on other instruments. A placebo
level is a matched comparison zone with no order-block event behind it.
The combined estimates were slightly below zero, but the uncertainty range
still included zero.
This does not prove that all order-block concepts fail. It only reports what
this definition, this measurement method and this sample showed - and did
not show. The value of the script is the method. The sections below explain
each term before it is used and show how to apply the same measurement to
your own rules.
Terms Used in the Panel
Hit rate. The percentage of counted outcomes in which the target was
reached before the stop. This is the raw result that a simple backtest would
usually report.
Placebo or control level. A comparison zone with no order-block
event, but matched to the real zone by height, direction and distance from
price. It estimates the hit rate that price movement, general trend and
level placement produce on their own, without any order-block information.
Edge estimate: "real - placebo." The real-zone hit rate minus the
control-zone hit rate. A positive value means the real zones performed
better than the controls; a negative value means they performed worse.
Percentage point (pp). An absolute difference between percentages.
For example, 54% minus 50% equals +4 percentage points, not +4% relative
growth.
z score. The edge estimate divided by a measure of its statistical
noise (the standard error). It shows how large the observed difference is
compared with normal random variation. As a widely used threshold, an
absolute z score near 2 is treated as a first sign of a real effect. This
study also requires the result to repeat before drawing a conclusion.
95% confidence interval (95% CI). A range around the estimate that
shows how uncertain it is. When the range includes zero, the data do not
clearly show a positive or a negative difference.
Ambiguous outcome. A bar whose high and low contain both the target
and the stop. Open-high-low-close data cannot show which one price reached
first. The script counts such cases against the hit rate, which is the safe
choice.
Censored outcome. A zone that reaches neither barrier before the time
limit. It is reported separately and not counted in the hit rate.
Why 50% Is the Wrong Baseline
Any rule that enters when price reaches a level already has some hit rate
before any real signal is involved. That hit rate comes from how price moves
and drifts on its own. Intuition says that with equal target and stop
distances, price should reach each side half the time. On real price data
this is often not true, and the size of the difference varies by instrument,
direction and period.
Across the runs behind this publication, the baseline for levels with no
special meaning ranged from 47.3% to 52.3% overall, and from 43.3% to 54.6%
after splitting by direction. This is the source of the numbers at the top
of this description: a 54% long hit rate can be below its baseline, while a
46% short hit rate can be above its baseline.
The script measures both sides at once. For every confirmed order block, it
also places control zones of the same height, direction and distance from
price, at bars where no order-block event occurred. Real and control zones
are then measured in exactly the same way.
The "real - placebo" row is therefore the primary result. It subtracts the
part of the performance that the baseline alone explains. It is more
informative than the raw hit rate. The control does not remove every
possible difference, however; those limits are listed below.
What Counts as an Order Block
A swing high or swing low is confirmed a fixed number of bars after it
forms. A break of structure is a close beyond the most recent unbroken
swing. The break is tested on the closing price only, never inside a bar.
The order block is the source candle: the last candle before the break
that moved the other way. An upward break points back at the last down
candle; a downward break points back at the last up candle.
The close is used rather than the high or the low because a bar's extreme
has no known timing. OHLC data records that price reached a level during
the bar, not when, and every measurement here has to start from a defined
moment. A close supplies one. It also means a break that is reversed
before the bar ends does not count as a break.
The important question is: when does the zone become visible in real time?
An order block is not visible when its source candle forms. The candle
becomes a zone only after a later break of structure points back to it. Two
bars are therefore involved: the source bar on which the zone is drawn and
the confirmation bar on which the break closes.
Every measurement starts from the confirmation bar forward. Price that
reached the source candle before the zone became visible is not a trade and
is not counted. Because confirmation occurs at a close, the first touch test
is performed on the following bar. Control zones use the same one-bar delay
so the comparison stays fair.
A single order block, zoomed in. The source candle is where the zone is
drawn. The triangle several bars later marks the close that confirmed the
break of structure - the first moment the zone existed for a user in real
time. The bars between the two were not tradeable, and nothing in that
interval is counted.
How the Measurement Works
A risk unit, or R, is selected in the settings as either average true range
(ATR) or zone height. It sets the scale of the measurement: for example, a
barrier size of 2R places both the target and the stop two selected risk
units from entry.
Average true range is the average size of a bar's full range over a set
number of bars, including any gap from the previous close - in effect, how
far price typically travels in one bar. Setting barriers in ATR rather than
in points means a 2R barrier is twice the recent typical bar range, so the
same setting means the same thing on a volatile instrument and a quiet one.
The ATR used for a zone's barriers is read once, at the bar where that
zone is created - the confirmation bar for a real zone, the placement
bar for a control zone - and stays fixed for that zone.
The near edge of a zone is the side facing price after the break: the top of
a bullish zone, the bottom of a bearish one. It is the side price has to come
back to.
When price returns to the near edge of a zone, the entry is recorded at that
bar's close. A target and a stop are placed the selected number of risk
units away, one in each direction. For a bullish zone the target is above
the entry and the stop below it; for a bearish zone, the reverse. The
script then records which barrier price reaches first, starting from the
next bar.
Entry is recorded at the close rather than at the zone edge for a specific
reason. A touch is triggered when price crosses the edge, not only when
price equals it, so the touching bar may cross the edge by an unknown
amount. Suppose the entry were recorded at the edge price while the
measurement started on the next bar. Then the measurement would begin after
price had already moved away from the assumed entry. The entry price and the
price from which the barriers are measured must be the same.
Sometimes a single bar contains both the target and the stop.
Open-high-low-close (OHLC) data alone cannot show which one price reached
first inside that bar. Such outcomes are marked ambiguous and counted
against the hit rate, which is the safe choice.
Zones that reach neither barrier inside the time limit are censored.
Censoring is the statistical term for an observation whose outcome was
never seen: the zone was still running when the limit expired, which is
known, and nothing more. Counting it as a win or a loss would mean
inventing the missing outcome, so it is dropped from the hit rate and
reported separately.
Ambiguous and censored counts are reported for real and control zones
separately. They cancel out of the difference only when both sides show them
at similar rates.
One measurement from beginning to end: the confirming break, price
returning to the near edge, entry at that bar's close, and the barrier
that was reached first - here, the stop. On this instrument the aggregate
ran negative over the test window; the result did not replicate on the
other two instruments and is recorded as unresolved in the limitations
section. The panel reports what it measures.
Where the Method Comes From
None of the statistics here are new, and it is worth being clear about that.
A standard way to test a method is to apply it where the signal does not
exist, then check that no effect appears. In statistics this is called a
placebo test, and it is a common tool in causal inference - the field that
studies cause and effect. The placebo zones in this script apply that idea
to price bars instead of people.
The trading application is not new either. David Aronson's
Evidence-Based Technical Analysis (2006) argues that a trading rule
should be compared with random entry signals rather than with zero. His book
uses Monte Carlo permutation and White's Reality Check for this purpose.
The scoring rule - a target, a stop and a time limit, whichever is reached
first - is the triple-barrier method described by Marcos López de Prado.
What this script adds is not the method but its availability. The control is
created and scored automatically next to the real zones, on any chart and
any symbol. The baseline arrives together with the result, instead of
requiring a separate study that most people will never run.
How to Use It
1. Match the definition. Set the order-block inputs to reproduce the
rules used by the indicator, strategy or idea you want to evaluate. A
statistical result only applies to the definition that produced it.
2. Run the built-in validation first. Enable synthetic mode before
interpreting live-market results. Synthetic mode replaces price internally
with a random walk - artificial price data that moves randomly and contains
no real signal - whose correct answer is known. If the measurement does not
recover that answer, the market result should not be trusted.
3. Check the sample funnel. The funnel accounts for every break of
structure: how many found no source candle, fell below the displacement
filter (a minimum move size, set in the settings), had price already inside
the zone at confirmation, or became measurable zones. If the categories
do not add up to the break count, the panel reports the mismatch.
4. Check measurement quality. A barrier size of 1R often resolves
within a few bars. It may then only measure price noise right at the entry
rather than what happens afterward; the panel flags it as TOO TIGHT. Set the
time limit long enough to keep the number of censored zones small, and
compare the real and control ambiguous and censored rates.
5. Read the three core rows. "Hit rate" is the raw real-zone result
and sample size. "Placebo" is the matched baseline. "Real - placebo" is the
edge estimate. Read its size first, then its z score and confidence
interval. Do not treat a high raw hit rate as evidence of an edge unless it
also exceeds the matched baseline.
6. Look for repetition, not the best single result. Repeat the same
configuration on other instruments and independent periods. A result that
appears on only one chart can be random variation rather than a reusable
signal.
Results
The study contains 31 runs and 23 distinct estimates. They span three
instruments from three asset classes - BTCUSDT (crypto), EURUSD (FX) and
ES1! (an equity index future) - plus four timeframes, three time periods,
three barrier widths and eight definition variants.
In the table, Estimate means "real - placebo" in percentage points. A
negative estimate means the placebo levels performed better. The z score
compares that estimate with its statistical noise, and the 95% CI shows the
uncertainty range.
Pool Estimate z 95% CI
30m, 3 instruments, 2025-26 -1.18pp -1.19 -3.1 to +0.8
1h, 3 instruments, 2025-26 -1.90pp -1.35 -4.7 to +0.9
1h, 3 instruments, 2024 -2.39pp -1.36 -5.8 to +1.1
1h, 7 runs, all periods -1.73pp -1.66 -3.8 to +0.3
Every pooled row combines the same three instruments: BTCUSDT, EURUSD and
ES1!. They are one crypto pair, one FX pair and one equity index future
sharing the same calendar window, chosen so that a result holding on all
three cannot come from the structure of a single market.
The decision rule was fixed before the runs: a single configuration had to
reach an absolute z score above 2 (|z| > 2) and then repeat on two other
instruments. One result crossed the single-run threshold: EURUSD 30m at
-4.9pp and z -2.69. It failed both repetitions. The same configuration
returned +0.1pp on BTCUSDT and +0.8pp on ES1!. Its two independent EURUSD
periods combined to -1.23pp at z -0.55, and the sign flipped between the
two periods.
No tested configuration met the full decision rule. The most precise
combined estimate was -1.73pp, and its confidence interval included zero.
The balanced pool - the same three instruments over the two periods that
share no data, before adding the third EURUSD year - gave -2.10pp at
z -1.91, the largest combined deviation in the study; its interval of
-4.3 to +0.1 also included zero, by a small margin. The study therefore
did not detect a reliable positive or negative order-block effect under
the tested conditions.
None of the tested refinements changed the conclusion. A displacement
filter that discarded 56% of breaks, body-only zones, the mitigation
requirement (the Require price outside setting: it discards a zone if price
was already inside it when the break of structure closed), and swing length
across a 3.3x range all moved the estimate by less than the measurement
noise.
Using 50% as the comparison point can create a false conclusion in either
direction. Order blocks filtered to 2 ATR of displacement produced a
46.7% hit rate and z -1.83 against a 50% comparison, which could be
presented as evidence that the setup loses. Against the matched control, the
same runs produced -0.6pp at z -0.29. The apparent result came mostly from
the wrong baseline, not from the order blocks.
To reproduce the published figures: The script defaults match the
configuration used for these estimates. Set the date range to 2025-01-01
through 2026-08-01 for rows labelled 2025-26, or use the matching calendar
year for the other rows. Disable compact panel mode to display the funnel
counts. The three instruments are BTCUSDT, EURUSD and ES1!.
A final note on direction. The mean of all 23 estimates is -0.87pp,
while the same statistic on data built to contain no edge returned -0.44pp.
Fifteen estimates are negative, seven are positive and one is exactly zero.
The estimates share data, so this count is not a formal statistical test.
The data do not establish an exact zero effect, but they do limit how large
any real effect could be within this design and sample.
Validation
Driftless random-walk check. On a driftless random walk, an entry
with equal barriers reaches either side with equal probability. Synthetic
mode replaces price with such a walk, so the combined real and control hit
rates should stay close to 50%, within normal statistical variation.
Eight seeds were tested - starting values for the random generator, each
producing a different artificial price series. The combined real hit rate
was 49.83% and the combined control hit rate was 50.26%, both within 1.5
standard deviations of 50% - that is, well inside normal random variation.
Two of the eight individual runs fell outside the expected range, on
opposite sides of the test and in opposite directions. That pattern
matches ordinary random variation, not a systematic measurement error.
Resolution check. Combined across all eight seeds, the difference
statistic was -0.44pp even though the synthetic data contained no edge. This
shows the smallest difference the design can detect in practice: at this
sample size, differences smaller than about 1.2 percentage points cannot be
separated from measurement noise.
Drift stress test. The same validation was then repeated after adding
drift, while the data was still built to contain no signal edge.
Synthetic mode with drift, where no edge exists by construction. Against the
50% comparison the long side reads 59.6% at z +5.33 and the short side 38.8%
at z -5.89. Both look statistically significant, and both are false signals
created by the wrong baseline. Against the matched control the same two sides
read -0.59 and -0.16 percentage points, at z -0.27 and -0.07, and the
aggregate difference is 0.0%. Synthetic mode replaces price internally, so
the chart behind the panel does not show the tested data.
Settings
Order-block definition. Swing length sets how many bars on each side
are required to confirm a swing point. Search depth sets how far back from
the break the script looks for the source candle. Zone bounds selects either
the full candle range or the candle body. Minimum displacement can require
the move from the source candle to the break to span a selected number of
ATR. Require price outside excludes zones that price had already traded into
by the time of confirmation.
Measurement. Risk unit selects ATR or zone height. Barrier size sets
the target and stop distance in risk units. Time limit removes zones that
have not reached either barrier in time (censoring). Entry price offers the
bar close or the zone edge; the zone-edge option is included for comparison
but is labelled biased. Minimum zone height and the overlap filter determine
which zones enter the sample, while the overlap window sets how far back the
filter compares.
Sample. The range uses explicit year, month and day fields rather
than a date picker. The built-in picker can silently snap to the loaded data
and change the dates, which would make a published result hard to reproduce.
Placebo control. Sets the number of control zones generated for each
real zone and the bar offset used to place them.
Validation. Controls synthetic mode, seed, step size and drift per
bar.
Display. Controls compact panel mode, zone drawing and break markers.
Limitations
The control does not match every feature. It matches zone size,
direction and distance from price, but it does not match the fact that a
strong move in that direction has just happened. In trending markets this
gap matters for direction: control long and short hit rates differed by as
much as 10.9 percentage points. Treat long/short splits as unreliable in
trends. The combined result is also affected, to a degree this study does
not measure.
One instrument remains unresolved. EURUSD 30m returned -4.9pp at
z -2.69. The result failed repetition on both other instruments, and its two
independent EURUSD periods combined to -1.23pp at z -0.55 with opposite
signs. The available history cannot fully separate a real
instrument-specific effect from a random outlier.
Single runs are not precise enough to support the conclusion on their
own. An order block requires a break of structure, so observations are
rarer than for many gap-based patterns. A single instrument-timeframe run
can only detect differences of about 3 percentage points or larger. The
combined estimates therefore carry more weight than any single run.
Loaded chart history limits the sample. The number of bars loaded by
the chart, not only the selected calendar dates, determines how much data a
run can use. The 5-minute cell reaches only a few months, so the effects of
its period and its timeframe cannot be separated.
Historical measurement is not a forecast. The script reports what
happened under the specified rules and sample. Past behavior of a level does
not guarantee or predict future behavior.
Disclaimer
This script and its description are provided for educational and research
purposes only. They do not constitute financial, investment, trading or
other professional advice, and they do not recommend buying, selling or
holding any asset. Historical and simulated results do not guarantee future
performance. Trading involves risk, including the possible loss of capital.
You are solely responsible for your trading and investment decisions and
should conduct your own research and, where appropriate, consult a
qualified financial professional.
Indicador

Sattam | Smart Money ToolkitSattam Smart Money Toolkit
English
SATTAM Smart Money Toolkit is an open-source Smart Money Concepts toolkit designed to bring several market-structure and price-action components into one configurable TradingView indicator.
The goal of the toolkit is not to generate automatic buy or sell recommendations. Instead, it provides a structured visual framework for analyzing market structure, liquidity, order blocks, imbalances, and price location from multiple perspectives.
What the indicator includes
The toolkit combines the following components:
* Swing Market Structure
* Internal Market Structure
* Break of Structure (BoS)
* Change of Character (ChoCh)
* Enhanced Change of Character (ChoCh+)
* Internal and Swing Order Blocks
* Volumetric Order Block metrics
* Order Block mitigation
* Equal Highs (EQH)
* Equal Lows (EQL)
* Multi-timeframe Order Block Scanner
* Higher-timeframe Order Blocks
* Accumulation and Distribution ranges
* Premium, Equilibrium, and Discount zones
* Fair Value Gaps (FVG)
* Volume Imbalances (VI)
* Opening Gaps / One-bar gaps (OG)
* Inverted Fair Value Gaps (iFVG)
* Liquidity Sweeps
* Configurable alerts
The components can be enabled, disabled, filtered, and visually customized from the indicator settings.
Market Structure
The market-structure engine is divided into two layers:
1. Swing structure
2. Internal structure
Swing structure uses a larger adaptive pivot length, while internal structure uses a fixed shorter pivot length.
The Swing structure can operate in:
* Manual mode
* Dynamic mode
In Manual mode, the swing length is fixed at 50 bars.
In Dynamic mode, the swing length adapts to the current volatility regime using the relationship between ATR(14) and ATR(200), while remaining bounded between 20 and 100 bars.
A structure level is considered broken when the candle closes beyond the corresponding confirmed pivot level.
The indicator classifies structural breaks as:
* BoS: a break occurring in the current structural trend direction.
* ChoCh: a break against the current structural trend.
* ChoCh+: a counter-trend break associated with the preceding swing relationship.
Both swing and internal structure can independently display All, ChoCh, ChoCh+, BoS, or None.
Structure state changes are processed on confirmed bars, helping keep the structural state from changing intrabar.
Order Blocks
The Order Block engine identifies the most recent opposite-direction candle before a structural break and associates it with the impulse that produced the break.
Bullish Order Blocks are created from bullish structural breaks, while bearish Order Blocks are created from bearish structural breaks.
The toolkit supports two structural layers:
* Internal Order Blocks
* Swing Order Blocks
Order Blocks can be filtered by:
* None
* BoS
* ChoCh
* ChoCh+
Each Order Block can also be managed using a mitigation rule:
* Absolute: the zone is considered invalid when price closes beyond the opposite edge.
* Middle: the zone is considered invalid when price reaches the midpoint.
The indicator can keep a configurable number of recent Order Blocks and can manage overlapping zones using the selected overlap method.
Volumetric Order Block Metrics
The Order Block engine also calculates volume distribution across the impulse that produced the zone.
Volume is separated into bullish and bearish candle volume and displayed visually inside the Order Block.
The indicator can display:
* Total volume associated with the impulse
* Approximate bullish volume percentage
* Buy-side and sell-side volume proportions
* A midpoint line
* Bar coloring while price is inside an active Order Block
These values are descriptive volume metrics associated with the detected structure; they are not presented as institutional order-flow data or exchange-level bid/ask volume.
Equal Highs and Equal Lows
The toolkit detects Equal Highs and Equal Lows by comparing consecutive confirmed swing pivots.
Two swing highs or lows are considered equal when their price difference is within 0.1 ATR(14).
Detected levels are marked with:
* EQH for Equal High
* EQL for Equal Low
These levels can be used as visual references for potential liquidity areas.
Multi-Timeframe Order Block Scanner
The built-in scanner evaluates internal Order Block state across several predefined timeframes:
* 15 minutes
* 1 hour
* 4 hours
* 1 day
The scanner reports whether price is currently inside:
* A Buy Order Block
* A Sell Order Block
* Both
* No detected Order Block
Timeframes lower than the active chart timeframe are ignored by the scanner.
Higher-Timeframe Order Blocks
The toolkit can also project the latest unmitigated Order Blocks from a selected higher timeframe onto the current chart.
The selected timeframe is evaluated independently and its latest Buy and Sell Order Blocks are displayed on the lower-timeframe chart.
The higher-timeframe data is requested with lookahead disabled, and the feature only becomes active when the selected timeframe is actually higher than the chart timeframe.
Each projected zone is labeled with its source timeframe, such as:
* 4H Buy OB
* 4H Sell OB
Accumulation and Distribution
The optional Accumulation and Distribution module searches for compressed price ranges.
The detection window can be:
* Fast: 20 bars
* Slow: 40 bars
The range is compared with ATR(200) using a window-scaled compression threshold.
When price eventually breaks the detected range:
* An upside breakout classifies the range as Accumulation.
* A downside breakout classifies the range as Distribution.
This module is disabled by default and can be enabled independently.
Premium, Equilibrium and Discount
The High and Low module uses the current confirmed swing range to divide price into three visual areas:
* Premium
* Equilibrium
* Discount
Equilibrium is the midpoint between the active swing high and swing low.
The zones are intended as a price-location framework rather than standalone trading signals.
Fair Value Gaps and Imbalances
The toolkit supports three gap models:
FVG
A three-candle imbalance is detected when the current candle creates a gap relative to the candle two bars earlier, with an additional displacement condition from the middle candle.
VI
Volume Imbalance mode uses candle-body separation while allowing wick overlap.
OG
Opening Gap mode detects a direct gap between consecutive candles.
The FVG module can operate on:
* The current chart timeframe
* A selected timeframe
The number of displayed recent gaps and their extension length are configurable.
FVG Mitigation and iFVG
Detected gaps can be mitigated using:
* Close
* Wick
Close mitigation requires price to close through the relevant far side of the gap.
Wick mitigation uses a wick penetration of the relevant boundary.
The optional iFVG feature converts a gap into an inverted zone when price closes through it.
The inverted zone represents the directional role reversal of the original imbalance and remains visible until price closes back through its opposite boundary.
Liquidity Sweeps
The Sweep module identifies raids of internal pivot liquidity.
A bearish sweep occurs when price:
1. Trades above an active internal high.
2. Closes back below that high.
3. Has not already swept the same pivot.
4. Meets the configured cooldown requirement.
A bullish sweep follows the opposite logic:
1. Price trades below an active internal low.
2. Closes back above that low.
3. The same pivot has not already been swept.
4. The cooldown requirement is satisfied.
Sweeps are displayed with a horizontal level and an "x" marker.
The cooldown period is configurable.
Alerts
The toolkit provides alert conditions for major events, including:
* Swing Bullish BoS
* Swing Bearish BoS
* Swing Bullish ChoCh
* Swing Bearish ChoCh
* Swing Bullish ChoCh+
* Swing Bearish ChoCh+
* Internal Bullish BoS
* Internal Bearish BoS
* Internal Bullish ChoCh
* Internal Bearish ChoCh
* Internal Bullish ChoCh+
* Internal Bearish ChoCh+
* Buy Order Block Touched
* Sell Order Block Touched
* Bullish Gap Formed
* Bearish Gap Formed
* Bullish iFVG Formed
* Bearish iFVG Formed
* EQH Formed
* EQL Formed
* Bullish Sweep
* Bearish Sweep
These alerts are event-based and are intended to notify the user when the corresponding condition is detected.
Repainting and Data Handling
The structural state, Order Block mitigation, EQH/EQL detection, FVG mitigation, and sweep events are processed using confirmed bars where applicable.
Higher-timeframe requests use lookahead_off to avoid intentionally requesting future higher-timeframe data.
However, users should understand that pivot-based market-structure concepts inherently require bars to form before a pivot can be confirmed. A pivot is therefore identified only after the required confirmation window has elapsed.
The indicator is designed for analytical visualization and does not guarantee that every historical drawing represents a real-time signal that would have been known at the exact beginning of that historical bar.
Important Notes
SATTAM Smart Money Toolkit is an analytical tool, not an automated trading system.
It does not guarantee profitable trades, future price direction, or any specific win rate.
BoS, ChoCh, Order Blocks, FVGs, liquidity sweeps, Premium/Discount zones, and other Smart Money Concepts are interpretive market-analysis frameworks. Their usefulness depends on the market, timeframe, instrument, and the user's methodology.
Volume displayed inside Order Blocks represents aggregated candle volume classified by candle direction. It should not be interpreted as exchange-level bid/ask order-flow data.
The indicator is intended to be used as a decision-support and market-structure visualization tool. Users should combine its information with their own analysis and risk-management process.
Open Source
This script is published open-source so users can inspect and understand how the calculations are performed, and contribute improvements.
The source code is intentionally available for transparency and educational value.
Please review the source code and settings before relying on any component in live market analysis.
العربية
ما هو Sattam Smart Money Toolkit؟
SATTAM Smart Money Toolkit هو مؤشر مفتوح المصدر يجمع مجموعة من أدوات تحليل حركة السعر ومفاهيم Smart Money Concepts في مؤشر واحد قابل للتخصيص.
الهدف من المؤشر ليس إعطاء توصيات شراء وبيع آلية، وإنما توفير إطار بصري منظم يساعد المتداول على دراسة:
* هيكل السوق
* السيولة
* مناطق Order Blocks
* الاختلالات السعرية
* مناطق Premium وDiscount
* سلوك السعر على أكثر من إطار زمني
هيكل السوق
المؤشر يقسم Market Structure إلى مستويين:
* Swing Structure
* Internal Structure
الـ Swing Structure يستخدم نطاقًا أكبر لتحديد القمم والقيعان، بينما يستخدم الـ Internal Structure نطاقًا أصغر.
يوجد وضعان للـ Swing Structure:
* Manual
* Dynamic
في الوضع اليدوي يتم استخدام طول ثابت قدره 50 شمعة.
أما الوضع الديناميكي فيقوم بتعديل طول Swing بناءً على حالة التذبذب من خلال العلاقة بين ATR(14) وATR(200)، مع إبقاء الطول بين 20 و100 شمعة.
يتم اعتبار الكسر هيكليًا عندما يغلق السعر خلف مستوى Pivot مؤكد.
ويصنف المؤشر الكسر إلى:
* BoS: كسر في اتجاه الهيكل الحالي.
* ChoCh: كسر عكسي لاتجاه الهيكل الحالي.
* ChoCh+: كسر عكسي مرتبط بعلاقة القمم والقيعان السابقة.
ويمكن التحكم بشكل مستقل في عرض Swing وInternal Structure.
Order Blocks
يقوم المؤشر بتحديد آخر شمعة في الاتجاه المعاكس قبل حدوث الكسر الهيكلي وربطها بالحركة السعرية التي أدت إلى الكسر.
يدعم:
* Internal Order Blocks
* Swing Order Blocks
كما يمكن فلترة المناطق حسب:
* None
* BoS
* ChoCh
* ChoCh+
وبالنسبة لإلغاء أو Mitigation المنطقة يوجد خياران:
* Absolute: يتم إلغاء المنطقة عند إغلاق السعر خلف الحافة المقابلة.
* Middle: يتم اعتبار المنطقة متأثرة عند وصول السعر إلى منتصفها.
كما يمكن تحديد عدد المناطق الأخيرة التي تريد الاحتفاظ بها وإدارة المناطق المتداخلة حسب الإعداد المختار.
Volumetric Order Blocks
يحسب المؤشر توزيع حجم التداول المرتبط بالحركة التي نتج عنها الـ Order Block.
ويتم تقسيم الحجم إلى:
* حجم الشموع الصاعدة
* حجم الشموع الهابطة
ثم يتم تمثيل هذه النسب بصريًا داخل المنطقة.
ويمكن إظهار:
* إجمالي الحجم
* نسبة الحجم الصاعد
* نسبة الحجم الهابط
* خط المنتصف
* تلوين الشموع أثناء وجود السعر داخل المنطقة
مهم: هذه البيانات تمثل تجميعًا لحجم الشموع وتصنيفها حسب اتجاه الإغلاق، وليست بيانات Bid/Ask أو Order Flow حقيقية من دفتر أوامر البورصة.
EQH / EQL
يقوم المؤشر باكتشاف:
* EQH = Equal High
* EQL = Equal Low
ويتم اعتبار قمتين أو قاعين متساويين عندما يكون الفرق السعري بينهما ضمن 0.1 من ATR(14).
ويمكن استخدام هذه المستويات بصريًا لتحديد مناطق قد ترتبط بالسيولة.
Multi-Timeframe Order Block Scanner
يوجد داخل المؤشر Scanner لمناطق الـ Order Blocks على:
* 15 دقيقة
* ساعة
* 4 ساعات
* يوم
ويبين ما إذا كان السعر داخل:
* Buy OB
* Sell OB
* Buy + Sell
* لا توجد منطقة
ولا يعرض الـ Scanner الإطارات الزمنية الأقل من الإطار المستخدم على الشارت.
Higher-Timeframe Order Blocks
يمكن إسقاط آخر Order Blocks غير المتأثرة من إطار زمني أعلى على الشارت الحالي.
مثلًا يمكن عرض:
* 4H Buy OB
* 4H Sell OB
على شارت أقل زمنيًا.
ويتم استخدام lookahead_off في طلب بيانات الإطار الأعلى لتجنب طلب بيانات مستقبلية بشكل متعمد.
Accumulation / Distribution
هذه الخاصية اختيارية وتبحث عن مناطق يحدث فيها انكماش نسبي في نطاق السعر.
يوجد وضعان:
* Fast = 20 شمعة
* Slow = 40 شمعة
بعد اكتشاف نطاق مضغوط، إذا حدث كسر للأعلى يتم تصنيفه كـ Accumulation، وإذا حدث كسر للأسفل يتم تصنيفه كـ Distribution.
Premium / Equilibrium / Discount
يقسم المؤشر النطاق السعري الحالي بين Swing High وSwing Low إلى:
* Premium
* Equilibrium
* Discount
ويتم حساب Equilibrium باعتباره منتصف المسافة بين القمة والقاع.
هذه المناطق تستخدم لتحديد موقع السعر داخل النطاق وليست إشارة دخول مستقلة.
FVG / VI / OG
يدعم المؤشر ثلاثة أنواع من الاختلالات:
FVG
يبحث عن اختلال ثلاثي الشموع مع شرط إضافي يتعلق بحركة الشمعة الوسطى.
VI
يعتمد على انفصال أجسام الشموع مع السماح بوجود تداخل بين الـ Wicks.
OG
يبحث عن Gap مباشر بين شمعتين متتاليتين.
ويمكن تشغيل البحث على الإطار الحالي أو اختيار إطار زمني آخر.
iFVG
يمكن للمؤشر تحويل الـ FVG إلى Inverted FVG عندما يغلق السعر من خلال المنطقة.
أي أن المنطقة الأصلية يتم التعامل معها كمنطقة معكوسة في الاتجاه.
وتستمر منطقة iFVG حتى يغلق السعر من الجهة المقابلة.
Liquidity Sweeps
يقوم المؤشر برصد عمليات Sweep للقمم والقيعان الداخلية.
الـ Bearish Sweep يحدث عندما:
1. يخترق الـ Wick قمة داخلية.
2. يغلق السعر أسفل القمة.
3. لم يتم Sweep لنفس الـ Pivot سابقًا.
4. يتم احترام فترة الـ Cooldown المحددة.
والـ Bullish Sweep يعمل بالعكس.
ويظهر الـ Sweep بخط أفقي وعلامة x.
Alerts
المؤشر يحتوي على Alerts للأحداث الرئيسية مثل:
* Swing BoS
* Swing ChoCh
* Swing ChoCh+
* Internal BoS
* Internal ChoCh
* Internal ChoCh+
* دخول السعر إلى Buy/Sell OB
* تكوّن Bullish/Bearish FVG
* تكوّن iFVG
* EQH / EQL
* Bullish / Bearish Sweep
هل المؤشر يعيد الرسم؟
المؤشر يستخدم Pivot-based structure، ولذلك يجب أن تمر فترة التأكيد المطلوبة قبل معرفة أن Pivot معين أصبح مؤكدًا.
تغييرات حالة الهيكل، Mitigation الخاصة بالـ Order Blocks، اكتشاف EQH/EQL، معالجة FVG، وعمليات Sweep يتم التعامل معها باستخدام الشموع المؤكدة حيثما ينطبق ذلك.
كما أن طلبات بيانات الفريمات الأعلى تستخدم lookahead_off.
لذلك يجب التفريق بين تأخر تأكيد الـ Pivot وبين مفهوم repainting التقليدي. فالـ Pivot لا يمكن معرفته لحظة تكوّنه لأنه يحتاج شموعًا لاحقة لتأكيده.
تنبيه مهم
المؤشر أداة تحليلية وليس نظام تداول آليًا.
لا يضمن المؤشر اتجاه السعر المستقبلي أو الأرباح أو نسبة نجاح محددة.
مفاهيم مثل:
BoS، ChoCh، Order Blocks، FVG، Liquidity Sweeps، Premium وDiscount
هي أطر تحليلية وليست ضمانًا لحدوث حركة سعرية معينة.
كما أن Volume Metrics داخل الـ Order Blocks هي أحجام شموع مجمعة ومصنفة حسب اتجاه الشمعة، وليست قراءة مباشرة لـ Bid/Ask أو دفتر أوامر البورصة.
ينبغي استخدام المؤشر كأداة مساعدة في التحليل مع إدارة المخاطر ومنهجية المتداول الخاصة.
المصدر المفتوح
تم نشر المؤشر كمصدر مفتوح بهدف الشفافية وإتاحة الكود للمستخدمين والمطورين لفهم طريقة الحساب ومراجعة التنفيذ وتطويره.
يمكن للمستخدم مراجعة الكود والإعدادات لفهم كيفية عمل كل مكوّن قبل استخدامه في التحليل الفعلي.
Indicador

Smart Money Structure & Dynamic Equilibrium Suite [ICT Pro]Smart Money Structure & Dynamic Equilibrium Suite
Overview & Purpose
Smart Money Structure & Dynamic Equilibrium Suite is an advanced, high-precision technical analysis visual tool engineered for Pine Script v6. Designed specifically for modern Price Action, Smart Money Concepts (SMC), and Inner Circle Trader (ICT) analysts, this script provides clean visual overlays for key liquidity boundaries, trend momentum, and range midpoints without cluttering chart aesthetics.
Instead of displaying unnecessary lines or repainting historical indicators, this suite focuses purely on real-time structural clarity, dynamic range evaluation, and institutional volume tracking.
Key Features & Technical Components
1. Auto-Swept Previous Day High & Low (PDH / PDL)
- Institutional Liquidity Levels: Automatically tracks and plots the Previous Day High (PDH) and Previous Day Low (PDL) as horizontal daily boundaries.
- Dynamic Disappear / Swept Logic: Once price crosses or sweeps a daily liquidity level during an active trading session, the swept level automatically vanishes from the chart. This ensures your view remains clean and focused only on active, unmitigated daily liquidity targets.
- Full Visual Customization: Adjust line colors, text colors, line thickness, and stroke style (Solid, Dashed, or Dotted) directly from the inputs menu.
2. Connected Dynamic Equilibrium Range
- 50% Midpoint Calculation: Continuously calculates the real-time 50% Equilibrium price zone based on customizable local swing lookback periods.
- Connected Line Extension: Features an extended horizontal line that connects seamlessly to the "EQUILIBRIUM" text label on the right margin, eliminating visual gaps or confusion about range boundaries.
3. Smart Volume Spike & Trend Candle Glow Engine
- Directional Candle Glow: Color-codes chart candles based on dual Moving Average alignments—Neon Green during bullish momentum and Neon Red during bearish momentum.
- Golden Volume Spike Highlighting: Dynamically overlays high-volume institutional candles in a distinct Glowing Gold color whenever current bar volume exceeds customizable moving average multipliers. This makes it effortless to spot institutional expansion bars.
4. Major Intermediate Term Swing Badges (ITH / ITL)
- Structural Pivot Badges: Automatically flags confirmed major high and low points using clear ITH (Intermediate Term High) and ITL (Intermediate Term Low) badges.
- Customizable Sensitivity: Adjust the pivot lookback sensitivity to tailor the detector for scalp, intraday, or higher-timeframe swing trading.
Full Inputs & Parameter Configuration Guide
1. Moving Average & Ribbon Controls
- Show MAs: Enables or disables the visibility of the two core Moving Averages on the chart.
- MA Type: Choose between EMA (Exponential), SMA (Simple), or WMA (Weighted) calculation methods.
- Fast MA Length: Defines the lookback period for the fast directional moving average (Default: 9).
- Slow MA Length: Defines the lookback period for the baseline moving average (Default: 21).
- MA Line Thickness: Adjusts stroke width for both moving averages (1 to 4 pixels).
- Show MA Ribbon Glow: Toggles the background color fill between the Fast and Slow MAs on or off.
2. Smart Candle Glow Settings
- Enable Trend Candle Coloring: Toggles custom candle coloring based on MA trend direction.
- Highlight Volume Spikes: Turns on or off the special Golden Candle overlay for high-volume bars.
- Volume Spike Threshold: Set the volume multiplier relative to the 20-period volume average (Default: 1.8x).
3. Equilibrium Settings
- Show Equilibrium Level: Turns the 50% range midpoint line on or off.
- Equilibrium Lookback Period: Sets the number of historical bars evaluated to compute the local range midpoint.
- Line Style & Thickness: Customize whether the line appears Solid, Dashed, or Dotted, as well as its thickness and color.
4. Daily Liquidity Settings (PDH / PDL)
- Show PDH & PDL: Toggles display of Previous Day High and Low levels.
- PDH/PDL Line Style & Thickness: Select custom visual preferences for daily boundaries.
- Color Pickers: Separate line and text color options for both High and Low daily levels.
Step-by-Step Guide: How to Use This Tool Effectively
Step 1: Determine Structural Bias
Use the Trend Ribbon Cloud and candle coloring to establish current market bias. Green candles and ribbons indicate bullish control, while Red candles signify bearish dominance.
Step 2: Monitor Daily Liquidity Targets
Observe active PDH and PDL lines as primary liquidity pools. When a line disappears from your chart, it confirms that liquidity at that level has been swept by price.
Step 3: Evaluate Value Zones
Refer to the Equilibrium step-line to determine whether current price trades above 50% (Premium territory) or below 50% (Discount territory) relative to recent market swings.
Step 4: Identify Institutional Volume Expansion
Pay close attention to Glowing Gold candles. Volume spikes often coincide with smart money entries, order block mitigations, or explosive range breakouts.
Trading Disclaimer & Risk Warning (House Rules Compliance)
Educational Disclaimer:
This script is strictly a visual analysis and charting utility designed for technical educational purposes. It does NOT offer financial advice, trade signals, investment recommendations, or automated buy/sell algorithms.
Risk Acknowledgment:
Financial trading carries inherent risk, and historical market behavior depicted by visual indicators does not guarantee future results. Users are fully responsible for their own trading decisions and risk management strategies. Indicador
