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。
本指標為視覺化與分析工具,不產生買賣建議,內容不構成投資建議。任何做法請自行驗證
後再投入資金。 مؤشر

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). مؤشر

Minimalistic Po3 (M1D)Minimalistic Po3 (M1D)
Draws the current higher timeframe candle once to the right of price, so the accumulation, manipulation and distribution taking place inside it can be read against your execution chart without switching timeframes.
One candle only — the live one. It is rebuilt on every tick of the last bar and never left behind as history, so the chart never accumulates old projections. Four dotted reference lines carry its open, high, low and close back to the bar that opened it, and each price is named at the candle's right edge, so the levels that candle is building from are on your chart at the prices they actually sit at.
Why one candle
A higher-timeframe candle is a whole session of intent compressed into one shape. On a low timeframe that shape is what you are trading inside of, but you cannot see it — you either flip timeframes and lose your place, or you keep a second chart and split your attention. Drawing the one candle you are inside of, beside live price, puts that context on the chart you are already executing on. It is deliberately one candle and no history: a chart full of past projections is a chart you stop reading.
What it draws
THE CANDLE — the forming higher-timeframe candle, body and wick, projected clear of live price with an adjustable gap and width. Up and down bodies take their own colours and the outline and wick are drawn separately, so it reads cleanly on a light or a dark chart.
OPEN / HIGH / LOW / CLOSE LINES — one dotted line per price, running from the bar that opened the candle out to the drawn one. These are the levels the candle is dealing between while it forms.
OPEN DIVIDER — a dotted vertical at the bar that opened the candle, joining the high and low lines so the whole period reads as one zone. It can run the full height of the pane like a session divider, or stop at the candle's high and low.
PRICE TAGS — the four prices named at the right edge of the drawn candle, so you can read the level without hovering.
CONSOLE — the timeframe in use, the time left in the candle, and its range so far. It also tells you when nothing is being drawn and why.
How to use it
Pick the timeframe you take your bias from and leave it there — the candle is context, not a signal, and changing it mid-session changes the story you are reading.
The open line is the reference the period is being measured from: price above it and price below it are two different days. The high and low are the extremes taken so far, and the divider marks where the period began, so a sweep of one side and a return inside the body is visible as it happens rather than after the candle closes.
The countdown tells you how much of the period is left. The same displacement means something different with five hours to run than it does with ten minutes.
Settings worth knowing
Timeframe is 4H by default, with 15m, 1H, 4H, 1D and 1W available.
The chart timeframe must be below the chosen candle timeframe. If it is not, nothing is drawn and the console says so rather than leaving you looking at an empty chart wondering.
Gap from live price, candle width, body and outline colours, line colour, divider height, price tags, text size and console corner are all adjustable. Every element can be turned off on its own.
How it differs from a plain higher-timeframe overlay
The candle is built from your chart's own bars as they print, not requested as a finished higher-timeframe bar, so it is the candle in progress from the first bar of the load rather than the last closed one. Its levels are carried back to the bar that opened the period instead of only being drawn beside it, so they are usable as levels on the chart you are executing on. And it draws exactly one, always the live one, with no history retained.
Notes
The drawn candle is the FORMING one and updates live, which is the point of it — you are watching that timeframe build. Its history is not kept: this shows you the candle in progress, not a record of previous ones.
The countdown reads --:-- when there is no live tick to count against, such as a closed market.
Everything drawn is context. There are no entries, no exits, no directional calls and no performance claims.
This is a market-analysis tool, not financial advice. Past market behaviour does not indicate future results. Test any tool thoroughly and trade your own plan. مؤشر

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. مؤشر

IPDA Year Map (M1D)IPDA Year Map draws the window the Interbank Price Delivery Algorithm is said to reference — the 20, 40 and 60 day look-back highs and lows — and puts it on a year of quarterly dividers rather than on a rolling snapshot. Every level carries how many sessions it has left before the candle that set it ages out of that window and stops being a reference at all.
The idea it implements is simple and it is the reason for every design decision below. The algorithm does not see a chart. It references days as data points inside a fixed look-back, and once a level falls outside 60 trading days it is purged. So the useful questions are which levels are still inside the window, where in the window they sit, and when each one leaves. Most range tools answer the first. This one answers all three.
The data range
Three nested look-backs, computed on daily closes: 20 days for the near-term read, 40 for the intermediate, 60 as the outer edge of what is still referenced. Each contributes its high and its low, drawn from the candle that actually set it and running forward to the current bar. Six extremes, and that is the whole object — the script does not go hunting for additional pools, order blocks or gaps to decorate it with.
The levels come from the daily timeframe regardless of what the chart is showing, so a 60-day window exists on a 1 minute chart where only a fortnight of chart candles is loaded.
Each level's origin is found from the offset back to the extreme candle, not from watching the value change. Those are different things and the difference is visible. A rolling minimum moves for two reasons: a lower low prints, or an older and deeper low ages out of the window and the minimum steps up to whatever is left. Only the first is a candle forming a level. Anchoring on "the value changed" attaches the line to the day the old low expired, which can be months after the candle that actually set the price.
One price is one line
A high made inside the last 20 sessions is simultaneously the 20, 40 and 60 day high. Drawn as three separate levels that is three lines and three captions stacked on a single row of pixels, and the top of the chart reads as one anonymous level while the lows — which genuinely differ — read as three.
Levels at the same price are drawn once, captioned with every window that shares them, as in 20·40·60d high. Each side of the range then shows exactly as many lines as it has distinct prices. The caption also tells you when a level stops being the tightest one: a shared high loses the 20 from the front of its name the day the 20-day window moves on without it.
Levels that are merely close rather than identical still collide on screen, so each caption steps out to its own lane along the right of the chart until it is clear of the ones above it. No two captions share a row at any zoom.
Equilibrium
Each window can carry the midpoint of its own high and low — the premium and discount divide of that range. Three switches, one per window.
They are drawn dotted and neutral. Dotted because an equilibrium is a calculated reference and not a price that traded, and neutral because a midpoint is neither bullish nor bearish. Each runs from its own window's left edge rather than from a candle, since no single candle sets a midpoint.
The roll-out countdown
Every level and every equilibrium carries the sessions it has left inside its window, printed on its caption as out 12d. When the count reaches its last session the caption reads out next instead.
The arithmetic is the window length less the level's age, both in trading days. A high set yesterday sits in the 20-day window for 19 more sessions; one set 19 sessions ago leaves at the next close. This is also why a 60-day level can date back around 83 calendar days — 60 trading days is twelve weeks, and 24 of those days are weekend.
Two things it states rather than glosses over. The count is measured from the last completed daily close, so today's session is one of them. And it is the origin candle leaving that is counted — the printed level only actually moves if nothing else still inside the window matches that price.
For a level shared by several windows the countdown belongs to the widest one, because that is when it stops being referenced at all. An equilibrium's countdown is the sooner of its two extremes, since it moves the moment either side of it ages out.
The shift, and the sixty day budget
A market structure shift here is a liquidity raid: a day taking out the highest high, or the lowest low, of the days before it. The look-back is an input. Raise it to ignore the smaller shifts inside a range and find only the major one — in ICT's framing the real shift can sit two or three months back, so a reading of no shift found is an instruction to widen the search before concluding there isn't one.
A confirmed shift stands for its full 60-day budget. A later raid in the same direction inside that budget is a mini shift within the range and does not restart the clock; only a raid in the opposite direction, or one arriving after the budget is spent, places a new anchor. Without that rule a trending market would reset the count every few sessions and the budget would never be seen counting down.
The raid is marked with a vertical, and three more are projected forward from it at 20, 40 and 60 trading days, weekends skipped. The last is the point at which the 60-day budget from that shift is spent. The projection counts weekdays; the panel counts sessions the symbol actually traded, so a weekday the exchange was closed puts the chart marker one session ahead of the panel's count, and the panel says so.
The panel reports the same thing in numbers: when the shift happened, sessions elapsed, and sessions left of the 60. Its header reads IN BUDGET while the count runs, DUE SOON at five or fewer sessions left, and BUDGET SPENT past 60 — at which point the projections come off the chart rather than being extended into a window that no longer exists.
There is only one forward boundary and the arithmetic is worth seeing, because it looks like two:
today + (60 − elapsed) = (shift + elapsed) + (60 − elapsed) = shift + 60
The cast-forward target and the budget expiry are the same date. Drawing both would be drawing one fact twice.
Anchored to the minute
A raid found on chart candles lands on the chart's own grid, so on a 1 hour chart the shift marker can sit up to 59 minutes away from where the level was actually taken. The raid candle is re-read at 1 minute resolution and the marker placed at the first minute the prior extreme was genuinely exceeded.
TradingView only serves intrabar data for recent history. Where it is not available the marker falls back to chart-candle resolution, the tag carries a ~ mark, and the panel says which of the two it used. It never claims a precision it did not get.
Open interest
Where the instrument publishes an open interest series, the panel reports its change over a set window — 20 trading days by default, matching the innermost look-back — against price over the same window, and states a reading only where the arithmetic supports one: a fall of 15% or more on flat price, both falling together, both rising together, or no clear read. Open interest is a daily series whatever the chart shows, so the reading is the same on a 1 minute chart and a daily one.
The two sign readings compare only the direction of two changes, so they sit behind a floor: the open interest change must be abnormal and price must not be flat. The default floor of 10% was measured rather than chosen. Over 400 sessions with the quarterly roll weeks removed, the 90th percentile of the 20-day open interest change was about 14% on NQ and about 7% on ES; 10% sits between them. NQ's open interest runs roughly twice as noisy as ES's, so a chart dedicated to one instrument may want the floor moved.
The contract roll is refused outright. A continuous contract's open interest collapses by a third to a half in a session as the front month is abandoned, then rebuilds over the following week, and a window that spans one cannot be read for positioning. The panel fetches the largest one-day jump inside the window and, above 12%, reads contract roll instead of a signal until the window has cleared it.
Most instruments publish nothing. On those the panel names the symbol it looked for and says the reading is unavailable. It does not print a zero, and it does not infer open interest from volume or anything else.
The year map
Quarterly dividers run across the loaded history and project forward, so the year reads as quadrants rather than as one rolling window. Two spacings are offered — three month and four month — because ICT's IPDA material carries both as worked examples anchored at different points. They are the same rule applied from different places, not rival calendars, which is why this is a choice of grid rather than a claim about which one is correct. The 60-day look-back and look-forward is measured from wherever a shift actually sits, independently of the grid.
Keeping it readable
The vertical tags ride two rails outside the range — budget markers on the inner rail, the calendar on the outer — offset by a fraction of the 60-day range rather than by ATR. On a chart spanning a year an ATR cushion is a rounding error, which puts the tags inside the candles and on the same row as the level captions.
Because the range is the unit of measurement throughout, the spacing holds on any instrument and any timeframe without tuning.
By default every extreme is drawn black. The six levels are liquidity, and liquidity is neither bullish nor bearish — a level tinted by the direction of the last shift would be a bias call the script has no basis for. Which window a level belongs to is in its caption.
Each line family carries its own colour and width: the 60, 40 and 20 day levels, the equilibriums, the shift verticals and the calendar dividers. The defaults are set for a grey chart, where the usual light-grey neutral is the background itself and vanishes, so the secondary families use a dark slate instead. A level shared by several windows takes the colour and width of its tightest one. The panel header field has its own colour.
Non-repainting
Every daily figure is read from confirmed candles. Nothing is revised once its candle has closed, and no level, count or projection moves in hindsight. The lines extend rightward to the current bar while they are live — that is the drawing tracking the present, not its history changing.
Alerts
Three: a new shift confirmed and the 60-day budget restarted, fired on the close of the bar that placed the anchor; five or fewer sessions left of the budget; and the budget spent. The last two are evaluated once per day.
What it will not do
It places no entries, exits, stops or targets, and it does not size a position. It draws no bias, no trend and no projection of where price is going. A shift marker says a level was taken on that day; it does not say what happens next.
It does not rank the levels against each other or tell you which one price is drawn to. Whether a level inside the window is worth trading is a judgement about context this script does not have — session, higher timeframe draw, and what the day has already done.
It has no opinion on open interest where none is published, and no opinion on direction where the arithmetic does not support one. Both are stated as unavailable rather than filled in.
Settings
Quarterly dividers with their spacing and how far forward they project; the 20, 40 and 60 day bands each on their own switch; equilibrium on its own switch per window; the shift clock panel with its raid look-back and its minute-anchoring toggle; open interest with its comparison window and abnormal-move floor; and label size, tag rail offset, whether tags sit above or below the candles, right offset, the panel header colour, and a colour and width for each line family.
Attribution
IPDA, the 20/40/60 day look-back and the market structure shift are concepts from ICT's public teaching material. This is an original implementation of them. No third-party code is used.
Disclaimer
This is a decision-support tool for discretionary ICT trading. It is not financial advice, and no market's past behaviour is indicative of future results. مؤشر

HTF BPR (Balanced Price Range)Introduction
Within Inner Circle Trader (ICT) concepts, the Balanced Price Range (BPR) is especially important, 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 higher (or current) timeframe.
How is this script different from other similar tools:
- Unique way of presenting BPR zones with focus on clarity and simplicity
- Highly configurable and customizable
- Automatic timeframe selection which always uses next higher timeframe (can be manually overridden)
- It marks BPRs on either higher or current timeframe providing more flexibility
- Uses side box markers which can help to navigate busy charts (can be turned off)
- Option to wait for higher timeframe close before removing BPR from the chart which should eliminate any repainting during mitigation
- Markers are highlighted when price touches BPRs, giving clear indication the price interacts with this BPR
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 BPR
BPR entries remain one of the most underrated setup models in ICT trading:
- The Setup: Locate overlapping bullish and bearish FVGs, ideally on the 1-hour to 4-hour timeframes.
- Execution: Wait for price to revisit this overlap following a confirmed Market Structure Shift (MSS). The reaction inside this confluence is usually immediate and sharp.
- The Edge: While average retail traders trade single FVGs in isolation, entering at the intersection captures the compound liquidity of both imbalances.
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 HTF BPRs - enable displaying of BPR zones on higher (or current) timeframe
- Looback - how many previous bars are used to find BPRs
- Auto Higher timeframe (one step up) - when enabled, the script works using data from the next higher timeframe above the chart's timeframe
- Manual HTF - when the previous option is not enabled, you can select manualy any higher timeframe (or chart TF)
- Wait for HTF Close (no repainting) - BPR is removed from the chart after higher timeframe close (this may take some time on higher timeframes)
- Max BPR Length - 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
- Fill & Border - BPR decorations settings
- Side Marker & Border - apart from displaying factual BPRs as they are created, the script can also display box side markers
- Marker Position - define where the markers should be displayed (and their width)
- Mitigated BPR Boxes - select what happens when BPR is fully mitigated (the price closes through it). When "Remove" is selected, the corresponding Marker is removed as well. "Highlight" and "Display" options don't apply to the Markers.
-----------------
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. مؤشر

Sweep Reversal Map+ [Herman]Sweep Reversal Map
Sweep Reversal Map is an open-source price-action indicator designed to identify potential reversal areas that develop after price sweeps previously confirmed swing liquidity.
The concept is inspired by liquidity-sweep and reversal principles taught within ICT methodology, including the idea that price can trade beyond a prior swing high or swing low, reclaim that liquidity level, and subsequently confirm a reversal through a break of nearby market structure.
This script provides an independent Pine Script implementation of that general concept with configurable swing detection, sweep penetration, structure confirmation, displacement filtering, developing zones, and historical reversal mapping.
HOW IT WORKS
The indicator follows a multi-stage process rather than marking every wick through a previous high or low.
1. Confirmed Swing Liquidity
The script first identifies confirmed swing highs and swing lows using the selected Swing Length.
These levels represent previously established areas of liquidity that price may later sweep.
2. Liquidity Sweep
A bearish reversal candidate begins when price trades above a confirmed swing high.
A bullish reversal candidate begins when price trades below a confirmed swing low.
The Minimum Sweep Penetration setting can optionally require price to move a specified ATR-based distance beyond the liquidity level before the event qualifies as a sweep.
3. Reclaim
After the sweep occurs, the script tracks whether price closes back through the swept liquidity level.
For a bearish setup, price must reclaim below the swept swing high.
For a bullish setup, price must reclaim above the swept swing low.
4. Local Structure Confirmation
A sweep alone does not create a confirmed reversal.
The script records nearby structure preceding the sweep and waits for price to break that structure in the opposite direction.
A bearish reversal requires a close below the relevant local structure level.
A bullish reversal requires a close above the relevant local structure level.
5. Displacement Filter
The confirmation candle can also be required to show a minimum body size relative to ATR.
This provides an optional displacement requirement and helps distinguish stronger confirmation candles from very small structure breaks.
Setting Minimum Displacement Body to 0 disables this filter.
REVERSAL ZONES
When Show Developing Reversals is enabled, a faint zone represents a sweep that has occurred but has not yet completed the full confirmation process.
The zone expands if price creates a more extreme price during the developing setup.
Once all confirmation conditions are satisfied, the zone becomes visually stronger and is retained as a historical confirmed sweep-reversal area.
If confirmation does not occur within the selected Maximum Confirmation Bars, the developing setup expires and is removed.
HOW TO INTERPRET THE MAP
A zone above price represents a confirmed bearish sweep-reversal event originating from liquidity above a previous swing high.
A zone below price represents a confirmed bullish sweep-reversal event originating from liquidity below a previous swing low.
The horizontal line identifies the liquidity level associated with the sweep.
The marker identifies the original confirmed swing from which that liquidity level was derived.
These areas are intended to provide additional price-action context. They are not automatic long or short entries and should not be interpreted as guaranteed reversal points.
SETTINGS
Swing Length
Controls how many bars on each side are required to confirm a swing. Higher values generally identify less frequent but more significant swing points.
ATR Length
Defines the ATR period used by the penetration and displacement filters.
Minimum Sweep Penetration
Determines how far beyond the swing level price must trade for the event to qualify as a sweep. A value of 0 accepts any breach.
Local Structure Length
Controls the number of preceding bars used to determine the local structure level required for reversal confirmation.
Maximum Confirmation Bars
Defines how long a developing sweep can remain active while waiting for confirmation.
Minimum Displacement Body
Requires the confirmation candle body to reach a selected fraction of ATR. A value of 0 disables the displacement requirement.
Show Developing Reversals
Displays or hides unconfirmed sweep zones while they are developing.
Confirmed Box Extension
Controls how far confirmed reversal zones extend to the right.
Historical Setups
Controls the maximum number of confirmed historical setups retained on the chart.
IMPORTANT BEHAVIOR OF SWING DETECTION
Swing highs and swing lows are confirmed only after the required number of bars has formed to the right of the potential pivot.
For example, with a Swing Length of 5, a potential swing requires five subsequent bars before it can become a confirmed liquidity level.
Once confirmed, the level is visually anchored to the bar where the swing originally occurred. This historical placement should not be interpreted as the indicator having known the swing in real time on that original bar.
A sweep can only be detected after the corresponding swing has already been confirmed.
Signals and confirmation logic are evaluated on confirmed bars.
LIMITATIONS
Liquidity sweeps and structure breaks are price-action events, not guarantees that price will continue reversing.
Different markets and timeframes can produce very different amounts of noise and therefore may require different Swing Length, structure, penetration, and displacement settings.
A developing reversal can disappear if the required confirmation does not occur before the confirmation window expires.
The indicator does not calculate expected returns, win rates, profit targets, stop-loss levels, or strategy performance.
It should therefore be used as a market-structure visualization and research tool rather than as a standalone trading system.
ORIGINAL IMPLEMENTATION
The underlying liquidity-sweep/reversal concept is an established price-action concept and is associated here with ICT educational methodology.
The original contribution of this script is its programmatic implementation and visualization workflow: confirmed swing-liquidity tracking, optional ATR-normalized sweep penetration, reclaim state tracking, local-structure confirmation, ATR-normalized displacement confirmation, developing setup management, expiration logic, configurable historical reversal zones, and confirmation alerts.
The source code is published openly so users can inspect how each condition is calculated and modify the implementation for their own research. مؤشر

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. مؤشر

Premium + Discount Ranges (M1D)Premium + Discount Ranges
Measures the range you are trading inside, the way it is read by eye from the newest swing point on a chosen timeframe across to the swing of the opposite kind, split into premium and discount either side of an equilibrium. Three ranges can run at once, each on its own timeframe, so an execution range can be read inside the higher one that frames it.
Two ways to bound a range
Period takes the timeframe's own high and low so far: one month is one range, it starts empty at the open and is gone at the rollover. It answers where price sits in the month.
Swing takes the newest confirmed swing high across to the newest swing low on that same timeframe, which owes nothing to the calendar and can run across many periods. It answers which structural range price is inside right now.
Each range picks its own mode, and the chart says which: "1M High" is this month's high, "1M Swing High" is the monthly swing high.
What counts as a swing
A swing is a level price actually turned at, not merely a high that sits above its neighbours while price kept running the same way. The candle has to hold the extreme against a chosen number of candles either side of it, and by default it also has to mark the change of direction — a swing high on the turn from an up candle to a down one, a swing low on the turn from down to up. That second condition can be switched off to accept any candle holding the extreme, regardless of what it turned into.
Every swing is read from candles already closed on its own timeframe, one bar clear of the newest bar, so nothing on a forming higher-timeframe candle can confirm or unconfirm it.
The raided edge
A confirmed swing is the last level price turned at, which is not always the edge of the range being traded right now — the moment a boundary is taken, the real range is already wider than the swings describe. Each boundary is carried out to the extreme price has actually reached since its swing confirmed, and draws dotted while it is out there: a level price has not yet turned at is a raid in progress, not structure. It settles back to solid the moment a new swing confirms behind it. This can be switched off to pin both boundaries to confirmed swings only, with price free to trade outside the range.
Direction and shading
The range is read from whichever swing formed most recently. A new swing low means price has already turned up away from it, so the leg is bullish and discount is the side being worked from; a new swing high reads the other way. The first range is shaded premium and discount by default; the shading can optionally lean toward the side being worked from, fading the other side back. Ranges two and three draw as bare levels by default so a bias range never muddies the range being traded.
Anchoring and labels
Every boundary starts at the candle that set it, never drawn back across bars that closed before that price existed. The equilibrium and the shading begin at the later of the two swings, because a range has no midpoint until both ends exist.
Each range's names can follow the global label settings or override them: centred over the range's own span, to the left, to the right, at the swing that set the level, or off. Two names landing on the same price are merged into one label rather than left stacked; two that land close together without being the same level are separated by a blank line rather than overlapping.
The readout
One panel, two blocks. The first names each active range's timeframe, whether it fits under the chart's own timeframe, which way it is working, which half of it price is trading in, and how far through it price has travelled. The second is a calendar statistic rather than a swing one: the average daily, weekly and monthly range over a chosen number of completed periods, how much of that average the current period has already used, and a countdown to the period's close.
Alerts
Six. Price crossing into premium, price crossing into discount, price trading the equilibrium, the range high taken, the range low taken, and a new swing redrawing the range. All six read the range being traded — range one.
Method and repainting
Swings on ranges two and three are read on their own timeframe via a higher-timeframe request; range one's swing test is likewise timeframe-bound to whichever timeframe is chosen for it. Every swing reads only candles already closed, one bar back, so nothing about it depends on lookahead revealing an unclosed bar.
A confirmed boundary moves only when a genuinely new swing prints. The one part of the drawing that is live by design is a boundary carried out to a raid in progress, and it draws dotted so that is visible rather than implied.
What it will not do
It places no entries, exits, stops or targets, and it does not size a position. It draws no trend line, no bias score and no target projection beyond the range itself. It does not identify order blocks, fair value gaps or liquidity pools — only the swing highs and lows that bound the range and the equilibrium between them.
Settings
Per range: on/off, timeframe, Period or Swing, label placement override, swing strength, premium/discount shading, boundary width. Swing definition: whether a direction turn is required, whether a raided boundary is carried out to price. Shading: premium and discount colours, transparency, whether the shading leans with direction and by how much. Lines: boundary and equilibrium colour and width, how far boundaries extend past the last bar. Labels: side and nudge for the high, low and equilibrium of each range, whether premium/discount get their own names, the collision distance that separates two close labels, whether price is shown in the label, label size and colour. Readout: show/hide, position, size. Average ranges: show/hide, lookback length for each of daily, weekly and monthly, and whether the close countdown is shown.
Disclaimer
This is a decision-support tool for discretionary ICT trading. It is not financial advice, and no market's past behaviour is indicative of future results. مؤشر

XauLabs BOS / CHoCHENGLISH
What it does
A market either keeps doing what it was doing, or it stops. This indicator marks the exact bar where that question gets answered: a BOS when structure continues in the same direction, a CHoCH when it breaks against it. Two scales are read in parallel — a swing structure for the major turns, an internal structure for the detail inside them — so the chart shows both the shape of the move and its texture.
Where this one differs
Most tools flip the bias to the opposite direction the moment a CHoCH prints. This one does not. A bullish CHoCH inside a downtrend cancels the downtrend and returns the state to RANGE — nothing more. The upside then has to prove its own sequence with a first BOS in its direction before an uptrend is declared. That is a deliberate choice: a change of character is evidence that the previous story ended, not evidence that the opposite story has begun. It is less flattering to read and closer to what actually happens.
How it works (full method)
Confirmed pivots, two widths. Swing pivots use 20 bars on each side by default, internal pivots use 5. A pivot is only registered once the right-hand bars have closed, which is what makes the tool non-repainting — and what makes a level appear with a delay rather than being revised later.
Breaks are judged on the close. A wick beyond a pivot changes nothing. The candle has to close beyond the level for the structure to be considered broken. This is the same rule used across the whole XauLabs set, and it is what separates a break from a sweep.
One level, one break. Each pivot carries a flag. Once it has produced a break it is retired, so a single level cannot trigger a cascade of marks as price oscillates around it.
State machine. Three states per scale: bullish, bearish, range. A break with the trend increments the BOS counter. A break against it sets the state to range and resets the counter to zero. From range, the first break in either direction establishes that direction with one BOS.
Optional shape filter. On the internal scale, breaks can be filtered by candle shape — a bullish break is kept only when the upper wick is shorter than the lower one, and conversely. Off by default.
Dashboard. Two columns, swing and internal, each showing the current state and the number of BOS in the running sequence, plus the exact level whose close would trigger the next CHoCH. When both columns agree, the move is aligned; when the internal scale drops to range while the swing scale still reads bullish, that divergence is the first sign of tiring.
No repainting
Pivots are confirmed by the right-hand bars and never revised. Breaks are evaluated on confirmed bars only. A mark printed in history is exactly what would have been printed live, with the same delay.
Settings
Swing and internal pivot width, either structure on or off, shape filter, which marks to display (all, BOS only, CHoCH only), number of marks kept on screen, level lines, colours, theme, dashboard and text size. Eight alert conditions, four per scale.
Educational structural tool. It gives no buy or sell signals and makes no performance claim. Trading involves substantial risk of loss.
FRANÇAIS
Ce que fait l'indicateur
Un marché continue ce qu'il faisait, ou il s'arrête. Cet indicateur marque la bougie exacte où la question est tranchée : un BOS quand la structure continue dans le même sens, un CHoCH quand elle casse à contresens. Deux échelles sont lues en parallèle — une structure swing pour les tournants majeurs, une structure interne pour le détail à l'intérieur — de sorte que le graphique montre à la fois la forme du mouvement et sa texture.
Ce qui distingue celui-ci
La plupart des outils basculent le biais dans la direction opposée dès qu'un CHoCH apparaît. Pas celui-ci. Un CHoCH haussier dans une tendance baissière annule la tendance baissière et ramène l'état à RANGE — rien de plus. La hausse devra ensuite prouver sa propre séquence par un premier BOS dans son sens avant qu'une tendance haussière soit déclarée. C'est un choix délibéré : un changement de caractère prouve que l'histoire précédente est terminée, pas que l'histoire inverse a commencé. C'est moins flatteur à lire, et plus proche de ce qui se passe réellement.
Comment il fonctionne (méthode complète)
Pivots confirmés, deux largeurs. Les pivots swing utilisent 20 bougies de chaque côté par défaut, les pivots internes 5. Un pivot n'est enregistré qu'une fois les bougies de droite clôturées : c'est ce qui rend l'outil non-repainting, et ce qui fait qu'un niveau apparaît avec un délai plutôt que d'être révisé après coup.
Les cassures se jugent en clôture. Une mèche au-delà d'un pivot ne change rien. La bougie doit clôturer au-delà du niveau pour que la structure soit considérée comme cassée. C'est la règle appliquée dans toute la série XauLabs, et c'est elle qui sépare une cassure d'un balayage.
Un niveau, une cassure. Chaque pivot porte un drapeau. Une fois qu'il a produit une cassure, il est retiré : un même niveau ne peut donc pas déclencher une cascade de marquages pendant que le prix oscille autour.
Machine à états. Trois états par échelle : haussière, baissière, range. Une cassure dans le sens de la tendance incrémente le compteur de BOS. Une cassure à contresens ramène l'état à range et remet le compteur à zéro. Depuis le range, la première cassure dans un sens établit ce sens avec un BOS.
Filtre de forme, optionnel. Sur l'échelle interne, les cassures peuvent être filtrées selon la forme de la bougie : une cassure haussière n'est retenue que si la mèche haute est plus courte que la basse, et inversement. Désactivé par défaut.
Tableau de bord. Deux colonnes, swing et interne, chacune affichant l'état courant et le nombre de BOS de la séquence en cours, plus le niveau exact dont la clôture au-delà déclencherait le prochain CHoCH. Quand les deux colonnes concordent, le mouvement est aligné ; quand l'échelle interne repasse en range alors que le swing reste haussier, cette divergence est le premier signe d'essoufflement.
Aucun repaint
Les pivots sont confirmés par les bougies de droite et ne sont jamais révisés. Les cassures ne sont évaluées que sur bougies confirmées. Un marquage visible dans l'historique est exactement celui qui serait apparu en direct, avec le même délai.
Réglages
Largeur des pivots swing et internes, activation de chaque structure, filtre de forme, marquages affichés (tout, BOS seulement, CHoCH seulement), nombre de marquages conservés, lignes de niveau, couleurs, thème, tableau de bord et taille du texte. Huit conditions d'alerte, quatre par échelle.
Outil structurel à but éducatif. Il ne donne aucun signal d'achat ou de vente et ne formule aucune promesse de performance. Le trading comporte un risque de perte important. مؤشر

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.
مؤشر

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. مؤشر

ICT Combined Venom Silver Bullet Displacement LiquidityThirteen switchable ICT modules in one overlay, built to replace several separate scripts on one chart. Nothing here predicts price — every module is a mechanical description of something that already happened.
MODULES
1-3 SESSION MODEL. Three independent instances of one CISD engine: Venom NY plus two Silver Bullet windows (10:00-11:00 and 14:00-15:00 NY, London preset included). Each builds an opening range, waits for a directional raid, locates the change-in-state-of-delivery level at the last opposing candle's open, and confirms when a candle CLOSES back through it — body close, not wick. On confirmation the order block and most recent unmitigated FVG are drawn.
4 DISPLACEMENT. Candles whose range is a standard-deviation outlier and that leave a gap behind. Confirmed bars only.
5 LIQUIDITY. Prior day/week/month, Asia and London highs and lows. A sweep requires raid AND rejection — through the level and closing back within the same candle. A close beyond is acceptance, not a sweep.
6 FIRST PRESENTED FVG. The first gap of the AM and PM sessions with its 50% (consequent encroachment). Always sourced from 1-minute data whatever the chart timeframe, and tested against the middle candle so the opening candle cannot form it. Retained across days.
7 OPENING RANGE GAP. Prior regular-session close to today's open, with 50% and quadrants.
8 PREMARKET DEALING RANGE. The 07:00-09:00 NY range graded into quadrants and octants, locked at 09:00 and carried forward. Premium and discount are measured against THIS range, not the session or daily range.
9 BODY / WICK LAW. A demand zone holds while bodies stay in its upper half, supply while they stay in the lower half. Wicks may cross the 50% freely; only a closed body is a violation. Runs against modules 6, 7 and 8. A filter, not a signal.
10 AM REGIME CLASSIFIER. Scores how likely the morning is to consolidate. READ THIS BEFORE ENABLING: it encodes a claim that is not established fact, ships with untested default thresholds as a measurement instrument, and its gate over other modules' alerts is off by default and should stay off until the calibration record earns it.
12 SUSPENSION BLOCKS. An FVG carrying a volume imbalance at BOTH ends — three stacked spans with no body trade across any of them. Read from the chart timeframe.
13 NDOG / NWOG. Settlement print to the next session's open, drawn as solid blocks and deliberately not retired when filled, because price returns to them for weeks. A settlement window that never prints yields no gap rather than one measured against a stale close.
DASHBOARD. The premarket range and which side of equilibrium price sits on, plus a calibration summary: logged sessions split by premarket classification, reporting median realised morning efficiency per group with sample sizes, flagged when thin.
FVG GEOMETRY. An FVG edge is a wick; where the neighbouring candle's body does not reach it, that space is a volume imbalance belonging to the same inefficiency. Edges widen to include it, never narrow. Extending this to the library-drawn zones in modules 1-3 is a separate switch, off by default, with a diagnostic counter so it can be verified rather than assumed.
USING IT
Switch modules off and add them back one at a time. Modules 5, 8 and 6 together are a complete framework and a reasonable place to stop. Zones mark where a reaction is plausible — they are not entries, and nothing here manages risk or sizes a position.
CREDITS
Reuses open-source work under the Mozilla Public License 2.0.
TFlab, from "ICT Venom Trading Model" and "Silver Bullet ICT Strategy": the CISD detection routine, the opening-range state machine, and the order block and FVG handling. This script also calls TFlab's libraries OrderBlockRefiner_TradingFinder, OrderBlockDrawing_TradingFinder and FVGDetectorLibrary. The engine behind modules 1-3 is substantially TFlab's work.
tradeforopp (TFO): the displacement measure in module 4.
fadizeidan, from "ICT Open Range Gap & 1st FVG": the volume-imbalance FVG geometry, sourcing the first presented gap from one minute, the middle-candle session test, and the opening range gap definition.
Original here: parameterising TFlab's engine so three overlapping windows run independently; the whole liquidity module; multi-day retention and carry rules for the first presented gap; the premarket dealing range and grid; the body/wick test; suspension blocks; NDOG/NWOG; the verified-coordinate approach to unifying FVG geometry; and the regime classifier shipped with the means of checking it. Several source defects are also fixed — the opening range absorbed the first bar of the trading window, a Bar Back Check input was overridden by a hardcoded value, four colour inputs were never referenced, box count was left at the library default, and the displacement module repainted intrabar.
The concepts themselves — fair value gaps, consequent encroachment, displacement, liquidity raids, premium and discount, the first presented gap — are ICT's (Michael J. Huddleston) and are not claimed as original.
LIMITATIONS
Intraday only; session windows cannot resolve on daily and above. Module 6 needs a minute chart and stops populating silently beyond the available one-minute history, so an empty older day may mean missing data rather than no setup. NDOG/NWOG approximate the settlement print on daily and above. Drawings are subject to TradingView's 500-object limits. Signals confirm on bar close, one bar after the move that caused them. Module 10's thresholds are untested defaults.
Published under the Mozilla Public License 2.0, consistent with the sources.
مؤشر

Inducement Sweep Strategy [algotim]Inducement Sweep Strategy enters trades only after the classic ICT inducement sequence has fully played out: an external liquidity pool is identified, an internal swing (the inducement) forms in front of it, that inducement is swept with genuine displacement, and price then confirms a Market Structure Shift back in the real direction. Every qualifying setup is scored by the Inducement Quality Index (IQI), a 0-to-100 composite that ranks how convincing the engineered move actually was before an entry signal is ever shown.
Problem Statement
Most public inducement or "sweep and BOS" scripts fire a signal the instant any minor swing is tagged and broken. They do not distinguish between an inducement that formed in front of a meaningful liquidity pool with a violent, high-conviction reversal, and a shallow internal wiggle that happened to get tapped during normal noise. Traders end up manually filtering every alert, checking chart context by hand, which defeats the purpose of automating inducement detection in the first place. This script instead separates structure identification from signal display: the full pipeline runs on every bar, but only setups that pass the quality bar are shown as entries.
Methodology
Two pivot lengths run in parallel. A longer length confirms External Structure — the major swing highs and lows that represent the real liquidity pool the market is engineered toward. A shorter length confirms Internal Structure — the minor swings that sit closer to current price. When a confirmed internal low forms above the most recent confirmed external low (or, for shorts, an internal high forms below the most recent external high), that internal point is flagged as an Inducement Candidate: a level structurally positioned to attract retail stops in front of the real liquidity pool.
The candidate remains active until price wicks through it and closes back on the correct side with a reversal body at least a user-defined ATR multiple in size — this is the Sweep, and the ATR displacement requirement filters out shallow wicks that reflect noise rather than an engineered stop run. Once swept, the script watches for a Market Structure Shift: a close beyond the internal high or low that sat between the external level and the inducement. Only this break confirms the real directional move is underway, and only then does the entry logic activate.
Each confirmed setup is scored by the IQI engine across four factors — displacement strength, sweep freshness, liquidity depth, and rejection wick quality — combined into a single 0-to-100 score. An entry signal is only displayed on the chart when the score meets the user's configured minimum, so lower-quality setups are tracked internally but never clutter the chart or trigger alerts.
If price fails to sweep the inducement within a maximum bar window, breaks the external level before the sweep, fails to confirm the MSS within its own bar window, or fails an optional retest, the setup is invalidated and the pipeline resets automatically. All structure is derived from confirmed pivots only, so nothing in the detection logic repaints.
Signal Workflow
1. Confirm a major external swing high or low using the External Structure Length.
2. Confirm a minor internal swing forming on the inducing side of that external level — this becomes the active Inducement Candidate.
3. Wait for price to wick through the inducement level and close back on the correct side with a reversal body meeting the ATR displacement threshold — this is the Sweep.
4. Wait for a confirmed close beyond the internal high/low recorded between the external level and the inducement — this is the Market Structure Shift.
5. Calculate the Inducement Quality Index from displacement, freshness, depth, and rejection wick quality.
6. If Require Retest is enabled, wait for price to pull back and hold the broken MSS level before confirming.
7. Display the entry signal with its IQI score only if the score meets the configured minimum, and fire the corresponding alert.
Why This Indicator Is Different
Standard inducement or liquidity-sweep-plus-BOS scripts treat every sweep-and-break sequence identically, regardless of how convincing the move actually was.
The Inducement Quality Index is a composite score built specifically around the mechanics of an engineered inducement move rather than a generic volatility or volume filter — it weighs how fresh the sweep was relative to the inducement, how deep the underlying liquidity pool is in ATR terms, how strong the displacement candle was, and how decisively the sweep bar rejected its extreme.
Because setups below the quality threshold are still tracked internally and simply not displayed, the pipeline status label can show a user exactly where an unfolding setup stands without forcing premature signals onto the chart.
The optional retest requirement gives discretionary traders a way to demand confirmation of the broken structure as new support or resistance before treating the setup as valid, without changing the core detection logic.
Inputs
Structure Settings
External Structure Length — pivot length confirming the major swing that anchors the real liquidity pool
Internal Structure Length — pivot length confirming the minor swing used as the inducement candidate
Inducement Settings
Max Bars to Sweep — maximum age allowed for an inducement candidate before it is discarded as stale
Max Bars to Confirm MSS — maximum age allowed between the sweep and the structure shift confirmation
Displacement Filter
ATR Length — period for the ATR used in the displacement requirement
Min Displacement (x ATR) — minimum reversal candle body, as an ATR multiple, required to validate a sweep
Signal Quality
Minimum IQI to Show Signal — setups scoring below this 0-100 threshold are tracked but not displayed
Entry Options
Require Retest Before Entry — waits for a pullback that holds the broken MSS level before confirming the signal
Trade Levels
Show Entry / Stop / Target Lines — visual-only projected levels, not a managed strategy
Reward : Risk Ratio — target distance as a multiple of the stop distance
Level Projection Length — how far right the projected lines extend
Visual Settings
Show Inducement Level, Show Sweep Marker, Show MSS Break Line, Show Pipeline Status Label
Bullish / Bearish / Inducement / MSS / Sweep Marker colors
Alert Settings
Alert: Inducement Identified, Alert: Inducement Swept, Alert: Entry Signal, Alert: Setup Invalidated
Alerts
Alerts are available for:
Bullish Inducement Identified
Bearish Inducement Identified
Bullish Inducement Swept
Bearish Inducement Swept
Long Entry Signal (with IQI score, entry, and stop level)
Short Entry Signal (with IQI score, entry, and stop level)
Setup Invalidated (bullish and bearish, optional)
Practical Usage
Raise the Minimum IQI threshold on lower timeframes or noisy instruments to surface only the most convincing engineered moves.
Enable Require Retest for a more conservative entry style that waits for the broken structure to hold before committing.
Use the pipeline status label to monitor an unfolding setup in real time without needing a signal to already have fired.
The projected trade levels are a visual reference only — position sizing and trade management remain the trader's responsibility.
Combine with a higher timeframe bias tool to only act on Inducement Sweep signals that align with the broader directional context.
Limitations
Structure confirmation requires the full pivot look-right period to elapse before a swing is confirmed, so entries occur after price has already moved past the exact reversal point. This is standard confirmed-pivot behavior and is not repainting.
The IQI score is a relative ranking based on the four factors described above and does not guarantee trade outcomes. It should be used as a filtering aid, not a standalone trading signal.
The displacement filter is ATR-relative; on instruments with unusually low volatility, the ATR multiple may need to be reduced to detect qualifying sweeps.
The indicator does not manage open positions, calculate position size, or provide exits beyond the single visual target line. It identifies potential inducement-based entries only.
Notes
All structure levels and signals are drawn at the bar index of the actual pivot or event, not the confirmation bar, ensuring accurate visual placement.
The state machine for bullish and bearish setups runs independently and concurrently, so both directions can be tracked at the same time on ranging instruments.
For best results combine with Market Structure Break BOS/CHoCH Tracker to cross-check the higher timeframe structural context before acting on a signal. مؤشر

Sweep IFVG (M1D)Sweep IFVG
Marks one sequence and refuses to mark anything else.
Liquidity is taken, a fair value gap opens away from it, and that gap then fails and inverts.
Each stage has to happen in order and inside a window you set, or the zone is never drawn.
Most gap indicators draw every imbalance on the chart and let you sort out which ones matter. This one starts from the liquidity event and works forward, so a gap that opened without a raid in front of it is not a candidate and never appears. What survives to the chart is a small number of zones with a reason behind each one.
The sweep
A swing is the three-candle structure; one candle each side of the middle one, the middle holding the high or the low. That is the default, and it can be widened when you want only larger structure tracked. A sweep is that level being wicked through and rejected on the same candle: price trades beyond the swing extreme and the candle closes back inside it. A raided high is a buyside sweep, a raided low is a sellside sweep.
Each sweep is marked with a small arrow set clear of the bar — above a swept high, below a swept low — and the level that was taken is drawn as a solid line back to the candle that formed it, so the origin of the raid stays visible rather than being implied.
Sweeps are capped at a number you choose. Past it, the oldest arrow and its level line are removed together, so a sweep never half-disappears.
The candidate gap
A sweep stays live for a set number of bars afterwards. Only inside that window can a fair value gap be adopted as its displacement, which is what stops an unrelated gap forty bars later being attributed to a raid it had nothing to do with.
The displacement itself is read over three candles and has to clear a minimum size in ticks to count. It must also run the same way as the reaction the sweep implies: a raided low can only qualify a bullish leg, a raided high only a bearish one. Two things qualify — a fair value gap, and a suspension block — and the section below covers how they differ.
A qualifying gap is drawn as a dashed box named BISI or SIBI. That is a candidate — a gap on watch, nothing more.
Volume imbalance and suspension blocks
A fair value gap is measured wick to wick, and on a fast leg that understates the region. Where the candle bodies also gap but the wicks still bridge the space, there is a volume imbalance sitting on the seam, and it is part of the same imbalance rather than a separate object. The zone absorbs it: the edge extends from the wick out to the body it should have reached. Each gap has two seams, one either side of the displacement candle, and each is tested on its own.
A suspension block is what happens when both joins gap at once. Three candles run the same way and each one opens beyond the previous one's close, so the bodies never trade back through the leg at any point in it. The zone is then the whole suspended span, from the first candle's close to the last candle's open, and it is named SB+ or SB- rather than BISI or SIBI.
It qualifies on its own terms and does not need a fair value gap to be present. A leg can be stacked tightly enough that every wick overlaps the one before it — no wick gap anywhere — while the bodies still never trade back. That is the case a wick-measured gap cannot see at all. Where a wick gap is present as well, the block's span is drawn instead, and it always contains the gap it replaces: the first candle's close sits at or below that gap's high, and the last candle's open at or above its low.
A block goes on to fail and invert on exactly the same terms as any other candidate. The resolved edges — absorbed or suspended — are what the midpoint line, the overlap rule and the failure test are all measured against.
One exclusion is built in. A body gap across a session or weekend break is a calendar artefact rather than displacement, so a join spanning more than one bar's worth of time is rejected. Without it a daily session break would manufacture a block every day. The rule applies to blocks, which is where that would happen.
Absorption and block detection each have their own switch. With both off, every zone is the plain wick-to-wick gap.
The inversion
A candidate has a limited number of bars to fail. Failure means a candle body closing clean through the gap, not a wick into it: a wick is a probe, and probes are not delivery.
When that close happens the box turns solid, changes colour, and is renamed IFVG+ or IFVG-. The names describe how the gap was built and which way it now trades — a bullish gap that gets closed through becomes a bearish inversion. Both directions share one confirmed colour, because at that point the useful distinction is confirmed against candidate, and direction is already stated in the name.
A candidate that never fails inside its window is deleted rather than left on the chart. Nothing that did not complete the sequence stays drawn.
Consequent encroachment
Each zone can carry its midpoint — the consequent encroachment of that gap, which is a different object from the equilibrium of a range. It is off by default and has its own colour, width and line style.
Zone names sit beside the box, on its centre line, just past the right edge. The midpoint line stops at that edge and the text starts there, so neither ever crosses the other, and a name stays readable when the zone it belongs to is only a few pixels tall.
Keeping the chart readable
Four limits, all yours to set. Candidates are capped per side and confirmed inversions are capped per side, oldest dropped first. A new zone can optionally be refused when it overlaps one already on the chart, which is what stops a run of gaps stacking into a single unreadable block on a fast leg.
The fourth is distance. A zone left hanging far from the candles forces the price scale to keep reaching for it, so the candles end up squashed into part of the pane and the whole thing rescales every time you touch the chart. Confirmed zones past a set distance are dropped, measured from the nearer edge of the zone to the current close and expressed in chart-timeframe ATR so it carries across instruments and timeframes. A zone price is trading inside reads as near zero and can never be dropped from under the candles.
Candidates are never dropped this way — one has to stay in play to be able to invert at all — and they expire on their own grace window regardless.
Colours, border width, label text, label size and every name string are settings, including the words BISI, SIBI, SB+, SB-, IFVG+ and IFVG- themselves.
Alerts
Four. Buyside sweep, sellside sweep, bullish IFVG confirmed, bearish IFVG confirmed. The two sweep alerts fire on the raid itself; the two inversion alerts fire on the close that completes the failure.
Method & repainting
Everything is read from the chart timeframe. There are no higher-timeframe requests anywhere in the script, so there is no lookahead to get wrong and no future data to leak.
Every detection is gated to a confirmed bar close. A sweep, a gap and an inversion are all judged on closed candles, so nothing appears mid-bar and then withdraws.
One characteristic is worth stating plainly, because it is inherent to pivots rather than a fault: a swing is only confirmed once the bars to its right have printed. On the three-candle default that is one bar, and a sweep can only be measured against a swing that has been confirmed. Widening the swing setting widens that delay by the same amount. It is lag, not repainting — the marks do not move once drawn.
Zones and midpoint lines extend rightward to the current bar while they are live. That is the boxes tracking the present, not their history changing.
What it will not do
It places no entries, exits, stops or targets, and it does not size a position. It draws no trend, no bias and no target projection.
It does not read structure beyond the pivots it uses to find swings, and it does not label market phases. Whether a completed inversion is worth trading is a judgement about context this script does not have — session, higher-timeframe draw, and what the day has already done.
A sweep alone draws nothing but its arrow and its level. Displacement alone, with no raid in front of it, draws nothing at all. Only the finished sequence produces a zone, so an empty chart in a range is the tool working, not failing.
Settings
Swing lookback, sweep validity window, sweep markers and their size, the swept-level line and its width, and the cap on sweeps shown; minimum gap size, volume imbalance absorption, suspension block detection, inversion grace window, the per-side caps on candidates and confirmed inversions, the overlap rule and the distance gate with its ATR multiple; candidate and confirmed colours, sweep colour and zone border width; the midpoint line with its colour, width and style; and zone labels with their six name strings, size and text colour.
Disclaimer
This is a decision-support tool for discretionary ICT trading. It is not financial advice, and no market's past behaviour is indicative of future results. It draws where a level failed, a candidate imbalance and leaves the decision to you. مؤشر

Daily High & Low Time Map (HOD / LOD)Daily High & Low Time Map
What it does
This indicator counts, across the completed trading days that your chart has loaded, which time window of the day produced the daily high and which produced the daily low. The result is a two-row heat strip in its own pane, lined up in time under the running day, plus a dashboard that answers the one question that actually matters intraday: at this hour, in how many of the past days was the final high still ahead? Every number carries its sample size, so you can see when a bright cell stands on three days instead of three hundred.
How it works
The script walks the chart bar by bar, never leaves the timeframe you are on and never requests data from a higher timeframe. A day is a span between two anchor points that you choose; inside that span each confirmed bar can move the running high and low. The time bucket of an extreme is taken from the opening time of the bar that produced it, so a later part of the day can never move an earlier reading.
A day is closed on the first bar of the next day and written once into a ring buffer; the running day is never part of the statistics.
The bucket index comes from the bar opening time in the anchor timezone, which follows daylight saving. The repeated hour of the autumn change stays inside the same day, which is capped at 100 % coverage instead of counting as an error.
Days below the coverage threshold - half days, data gaps, the clipped first day of a replay - are dropped and reported as skipped instead of silently diluting the counts.
Filters for weekday, day type and sample window are applied while counting; stored days are never modified. Shares carry a Wilson score interval, which stays inside 0 to 100 % even when a bucket holds no hits or every hit.
How to use it
Add the script. It opens in its own pane below the chart.
Pick the day definition that matches the instrument: midnight New York for index and FX charts, the 18:00 anchor for CME futures, the 09:30 anchor when only the cash session interests you, midnight UTC for symbols that trade around the clock.
Read the upper row of the strip as "how often the daily high was made here" and the lower row as the same for the daily low. Brighter means more often.
Read the dashboard line "High still ahead" as a conditional share over completed days, never as a statement about today.
If the cells look pale and the note says the sample is small, widen the slot or load more history before you read anything into them.
What makes it original
Time-of-day statistics for highs and lows exist, and so do session boxes; what this script does differently is refuse to hand out a number without the evidence behind it. Every share is printed with the sample it came from and with a Wilson confidence interval, so a bucket built from eleven days does not read like one built from two hundred. Days are admitted only when they carry enough bars to be comparable, and the dropped ones are counted in plain sight. The map is a strip of buckets rather than a table, because the question is a shape. The conditional row extends the same idea forward: given the time of day, how much of the day's high-making is still ahead - again with the sample attached.
Inputs
Behaviour:
Day definition - where a trading day starts: Midnight New York, Futures 18:00 NY, RTH 09:30 NY or Midnight UTC. Session windows use the same timezone, and an evening session is labelled by the calendar day it ends on.
Slot width - 15, 30 or 60 minutes. A bucket narrower than one chart bar is raised automatically and the dashboard says so.
Min day coverage % - a day counts only with at least this share of the bars of the fullest day on the chart. Range 10-100, default 60.
Last N days - size of the ring buffer. Range 5-1000, default 250.
Tie rule - which occurrence wins when the same price is reached twice in a day.
Use start date and Start date - restrict the sample to days after a fixed date. Off by default.
Mon , Tue , Wed , Thu , Fri - on by default. Sat and Sun - off by default. Auto-include weekends for 24/7 symbols - on by default; crypto includes both anyway.
Day type - all days, or only those that closed above or below their open.
Asia , London KZ , NY AM KZ , Lunch , NY PM KZ - session windows, one dashboard row each; a bucket counts when any part of it falls inside. NY AM KZ drives the session-start alert.
Show Silver Bullet rows - three fixed one-hour rows. Off by default.
Count current slot as still open - whether a day whose extreme fell into the current bucket counts as ahead. On by default.
Ahead alert threshold % - level at which the ahead alert fires. Range 1-99, default 25.
Ramp scaling - relative to the busiest bucket, or a fixed scale so two symbols can be compared.
Strip mode - both rows, high only, low only, or one combined row counting either extreme.
Presentation: whether the strip, dashboard, live row, Wilson bounds, sparkline, session rows and the H and L markers are drawn, the dashboard corner and text size, the marker size and background, the two colour ramps and the theme.
Signals and alerts
Entering high-frequency high slot - fires on bar close when price enters the bucket that held the daily high most often in the current sample.
Entering high-frequency low slot - the same for the daily low.
Ahead alert - fires on bar close the first time the share of days with a later high falls below the threshold.
Session start - fires on the first bar inside the NY AM window.
New running day extreme - fires on bar close when the running high or low of the day has moved.
The first three depend on the aggregation, which is evaluated on the most recent bar. They are meant for live use; on historical bars they stay silent.
Repainting
Every state change happens on a confirmed bar. The running day is written into the sample only on the first bar of the next day, so the current day never influences a count. The bucket of an extreme is taken from the opening time of the bar that made it and is stored once; nothing rewrites it later. There is no request for a higher timeframe and no lookahead, so a reload and a bar replay produce the same numbers.
Limitations
The map is suppressed above a certain timeframe and whenever the chart bar does not divide the bucket width - on a daily chart every day is one bar, and on a 45-minute chart with 60-minute buckets some buckets get twice as many bars. The strip stays empty and the note line says why. Use a minute timeframe that divides the bucket width.
The sample is the loaded chart history, nothing more: at 20 000 bars roughly 14 days on 1-minute futures, 51 on a 1-minute regular-hours stock chart, 72 on 5-minute futures, 256 on 5-minute regular hours, 217 on 15-minute futures, 430 on 30-minute and 870 on hourly. The dashboard prints the number it has.
Small samples move. Below 30 days the cells are dimmed on purpose, and a share out of ten days is a number, not a finding.
Buckets the chart has no bars for - the night hours of a regular-hours stock chart - stay dark. That is missing data, not a measurement.
On a 1-minute chart the strip cannot be drawn more than 500 bars into the future; the dashboard reports how many buckets were left out.
It describes the past of one symbol on one chart and says nothing about where today's high will be.
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. مؤشر

Unicorn Model Unicorn Model
Finds the ICT Unicorn and frames its context. A Unicorn forms where a displacement leaves a Breaker behind and the Fair Value Gap that displacement traded through inverts onto it — the same-direction Inversion FVG overlapping the Breaker is what confirms it. Two arrays reinforcing each other at one price, which ICT teaches as a tight, high-probability zone. This tool detects that overlap, marks the Breaker that qualifies, always shows the inversion FVG that makes it one, tracks the liquidity that engineered it, and keeps the HTF bias and the draw on a clean dashboard. It maps structure. It does not fire trades.
The sequence it looks for
The Unicorn is a confluence, not a standalone trigger. Bullish below; bearish mirrors.
Liquidity is taken — price sweeps a sellside low, engineering the reversal.
A swing is broken — displacement closes through the last swing high. The candles immediately before that leg are left behind as an order block, and it becomes a Breaker only once price later closes back through it, the block failing and flipping exactly as an FVG inverts into an IFVG.
The FVG inverts onto the Breaker — a candle body closes through the gap, so it fails and flips polarity into an Inversion FVG. A Breaker that a same-direction IFVG overlaps IS the Unicorn; with no overlapping IFVG it stays a plain Breaker.
Bias frames it — the model needs a clear higher-timeframe read, so a bullish Unicorn shows in a bullish or discount context and a bearish one in premium.
The draw — engineered liquidity in the direction of bias is the target the setup delivers toward.
Because the Unicorn is only as good as its narrative, bias is first-class: qualification is gated to the HTF read by default, and the dashboard keeps the read, the raid and the draw in front of you.
These are established Inner Circle Trader concepts — the Fair Value Gap, the Breaker, market structure shift, liquidity, the Midnight Open and premium/discount. This script is an original implementation of them, and what makes it its own thing is that it resolves the Breaker and the Inversion FVG that confirms it into a single zone rather than plotting each array in isolation.
What it draws
The Unicorn. When a live same-direction IFVG overlaps a Breaker, that box is relabelled Unicorn + or Unicorn -, drawn in purple or magenta with a distinct dashed border so the setup reads at a glance against the solid-bordered arrays around it. It is confirmed once and holds — it does not flicker bar to bar — and the confirming IFVG is kept alive with it. The two live and die together, so a Unicorn always shows the inversion that makes it one.
The ingredients. Drawn faintly beneath: FVGs in blue for bullish and red for bearish, Breakers in a neutral black, each tagged with the chart timeframe. A gap that sits inside the Unicorn or its inversion hides its own box, so the zone is never buried under the ingredient it is built from. Everything invalidates by candle body only — a wick through a zone never counts. A plain FVG inverts the moment one body closes through it; the Breaker and the inversion take a configurable number of body closes to retire, two by default.
The inversion. When a body closes through an FVG it does not vanish, it inverts — flipping polarity to deliver from the other side. The same-direction inversion overlapping a Breaker is what confirms the Unicorn. It is shaded orange, carries no label because orange reads as IFVG on its own, and sits behind the Unicorn so the zone stays in front.
Liquidity. Swing highs are buyside, swing lows are sellside, plus prior-day and prior-week levels as external-range reference, each anchored to the candle that formed it. The outermost live swing each side is tagged Buyside or Sellside Liquidity; inner swings carry Minor tags; prior-period levels keep a dated one. A level that is also an Asia, London or New York session extreme carries that tag too. Every level is removed the instant it is taken — no dotted stub, no lingering line — and an un-taken level that price trends a full range past without returning also clears. Tags that share a price merge into one rather than stacking.
Midnight Open. The 00:00 New York open, a core daily reference and a bias input. Below it leans bullish, above it leans bearish.
The draw. The target the setup delivers toward. It stays hidden until a Unicorn has set up AND its setup-side liquidity has been swept; only then is the opposing draw tagged on that level. That ordering is deliberate — the marker can never read as a standalone entry signal.
Dashboard
HTF bias, bullish or bearish or mixed, auto or manual. Whether a Unicorn is live and which way, falling back to the last one's direction rather than a bare dash. Which side of liquidity was most recently raided. The current draw with its price. Prior-day high and low, tracked even when the lines are hidden. Price against the Midnight Open. And where price sits in the dealing range, discount or premium against the equilibrium.
Reading it in practice
Trade with the dashboard bias. A Unicorn marks the Breaker whose overlapping inversion FVG makes it one; the orange IFVG shows the imbalance it sits within. ICT guidance waits for price to tap the FVG side, places the stop beyond the combined Breaker and FVG extreme — whichever is furthest — and targets the engineered liquidity the draw tag names. A gap left open below a bullish Unicorn range is intended: it shows intent and speed, and is not meant to be filled.
Method and repainting
All detection evaluates on closed bars. Swings, the structure break, the Breaker flip, the FVGs, the inversion and the Unicorn overlap are confirmed on candle close, never intrabar. Once a Unicorn is confirmed it is locked — it does not re-evaluate or flip state bar to bar — and invalidation counts only confirmed body closes, so an in-progress candle, wick included, never removes it. The Midnight Open fixes on its forming bar, and every level anchors to the candle that formed it.
Live zones and levels extend to the right edge for readability. That projection is cosmetic and changes no confirmed level, tap or raid.
Settings
Session timezone, right-side offset and label sizes. Bias mode and whether Unicorns are gated to it. Pivot strength. Liquidity display, per-side level caps, prior day and week levels with their lookbacks, and the raid-relevance window. Session tagging and the three session windows. FVG minimum height and displacement size, both in ATR, the declutter, the cap on live gaps, the framing IFVG, and how many body closes retire a zone. Unicorn colours. Dashboard position, including middle right, and text size.
Analytics only
This is a decision-support tool for discretionary ICT study. It maps zones, structure and context. It contains no alerts and no buy or sell signals, and it does not tell you when to enter or exit. The draw marker is a text label that appears only after a Unicorn has set up and liquidity has been swept, pointing at a liquidity target — not a trade instruction.
Disclaimer
This is a decision-support tool for discretionary ICT trading. It is not financial advice, and no market's past behaviour is indicative of future results. مؤشر

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. مؤشر

HTF FVGs (UDT) [CantoLab]A multi-timeframe extension of the FVG Detector (UDT) — plots Fair Value Gaps across up to 6 timeframes at once, still built the same way: using User-Defined Types (UDTs) so the detection, drawing, mitigation, and state-tracking logic are all just function/method calls instead of repeated inline logic.
What's different from the single-timeframe version
Instead of writing a separate request.security call for each timeframe, t his uses a single reusable function that takes a timeframe as a parameter and is looped through for all 6 timeframes .
It also adds a getBar function , this solves a specific problem with HTF FVGs: the gap is detected on the higher timeframe, but if you just use the HTF bar's open time to place the box, it doesn't line up with the actual candle that created the high or low. getBar walks forward through the lower-timeframe bars to find the exact candle that produced that price, so the FVG box is drawn precisely where the gap actually formed.
Everything else is the same as the FVG Detector :
Standard 3-candle FVG detection
Boxes with optional border, mid-line, and labels
Mitigated FVGs are removed automatically, with an option to keep them visible in a muted state
Settings
- Universal FVG Color — one color for all timeframes, or a separate color per timeframe
- Labels — toggle, size, color
- Border — toggle, color
- Mid Line — toggle, color, style, width
- Timeframe 1–6 — individually toggle, set timeframe, set color
Notes
- Open source — feel free to study, reuse, or build on this
- This indicator does not provide financial advice. You are responsible for how you build around and execute on this information مؤشر

مؤشر

Overnight Range & Trend-Day Probability Overnight Range & Trend-Day Probability
Grades the coming cash session before it opens. It measures the overnight block, compares it to the instrument's average daily range, and answers one question: has today's expansion already happened overnight, or is it statistically still ahead?
The bias read
The overnight block runs from the Asia open to the cash open and freezes there. Its height is compared against the average daily range (ADR) to produce a trend-day grade:
A small overnight range relative to ADR means the day's expansion is statistically still ahead — graded HIGH.
A mid-sized overnight range grades MEDIUM.
A large overnight range means the move may have already been spent overnight, favouring range-bound or reversal conditions — graded LOW.
The grade always prints with the number that produced it, so the read is verifiable at a glance rather than a bare word. A directional lean accompanies it, taken from where price trades relative to the open anchors — all above reads bullish, all below reads bearish, split reads mixed, with the vote count shown. An optional modifier flags when the week has already consumed most of its average weekly range.
What it draws
The overnight range block — grows through the night, freezes at the cash open.
Open-anchor lines — Midnight Open, News Open, Cash Open — each on its own custom time, extending to the cash close.
AR projection lines — the anchor open ± ADR, with optional 1/3 and 2/3 ADR levels and optional ± AWR lines. The anchor is selectable: Midnight Open, Cash Open, or Asia Open.
An on-chart bias label with the full read in one line.
A compact table: the trend-day verdict first, then the lean, the overnight range, and the Asia share of the overnight block. Threshold arithmetic lives in the cell tooltips.
The chart carries one day at a time — the previous day's drawings clear the moment a new session begins.
Asia decomposition
The overnight block merges Asia, the dead zone, London, and pre-NY. This engine isolates the Asia kill zone portion and reports it as a share of the whole block, classified as Normal, Elevated, or Inverted against adjustable thresholds. An inverted reading — Asia doing the expansion leg instead of accumulating — is readable directly from the table. The verdict resolves at the cash-open freeze, since the share is undefined while Asia still is the whole block.
Settings
Every session time is a custom input: the overnight block bounds, each open anchor, the Asia kill zone clock, and four optional session range boxes (Asia, London KZ, dead zone, NY AM KZ) — each drawn only across its own session high-low with its name on top, never as a full-height background tint. All off by default, each with its own colour.
ADR and AWR lookbacks are adjustable.
The probability thresholds, the Asia decomposition thresholds, and the exhaustion alert level are all adjustable.
Alerts
Trend-day probability finalised at the cash-open freeze.
Price crossing the Midnight Open or the Cash Open.
Overnight range exhaustion against ADR.
All session logic runs on New York time with daylight saving handled automatically. Detection runs on confirmed bars only, so nothing repaints. Works across all instruments and timeframes — designed for price delivery analysis on MNQ, MES, MYM, XAU/USD, and related markets.
Disclaimer
This indicator is a chart analysis tool, not financial advice. It identifies price levels and statistical tendencies; it does not predict the market or generate trade signals. Always do your own analysis and manage your own risk. مؤشر

Order Blocks Graded [ITA]🟠 OVERVIEW
Order Blocks Graded marks order blocks and then does the part most scripts
skip: it tells you which ones are worth looking at.
A block only survives if the move that left it actually broke structure. What
survives is then graded A, B or C from two things that can be measured rather
than argued about - how far the impulse travelled relative to normal range,
and how much volume traded on the candle that produced it.
A-grade blocks are drawn solid. C-grade blocks are drawn faint. The grade sits
on the block itself, so a glance is enough.
🟠 CONCEPTS
* Order Block - The last opposite-colour candle before the move that broke
structure. The bullish version is the final down candle before price broke a
swing high, and the bearish version is its mirror.
* Break of Structure - A close beyond the last confirmed swing point. Without
one there is no block, because nothing was displaced.
* Impulse - The distance from the block to the close that broke structure,
measured in ATR multiples so it means the same thing on any symbol and any
timeframe.
* Grade - A when the impulse cleared the A threshold, B when it cleared the B
threshold, C otherwise. An origin candle on above-average volume lifts the
block one grade.
* Mitigation - Price trading back into the block. Mitigated blocks grey out,
or are removed entirely if you would rather only see what is still untouched.
🟠 FEATURES
🔹 Structure filter - a block is only kept when the move that left it broke a
swing point, so consolidation noise never produces one
🔹 A/B/C grading from impulse size in ATR terms and volume on the origin candle,
with the thresholds exposed as inputs
🔹 Opacity follows the grade, so the strongest blocks are the ones that stand
out without reading anything
🔹 Minimum block height, which stops a doji from leaving a flat line where a
zone should be
🔹 Staleness cutoff - a block price never returned to eventually stops being
useful and is dropped, instead of stretching across the whole chart
🔹 Mitigated blocks either grey out or disappear, your choice
🔹 Lowest grade to draw, so you can hide C blocks entirely and keep only the
strong ones
🔹 Alerts on both bullish and bearish blocks
🟠 HOW TO USE
Start with everything visible and see which grades your symbol actually
produces. Then raise the lowest grade to draw until the chart shows only what
you would act on.
Treat A blocks as the ones worth waiting for. They come from a move that
travelled several times normal range, which is what displacement is supposed to
mean in the first place.
Grey blocks are history, not signals. They show where blocks formed and how
they graded, which is the fastest way to see whether this symbol respects them
at all before you trade one.
Swing Lookback controls everything upstream. Lower values find more structure
and therefore more blocks, higher values find fewer and larger ones.
On a volatile symbol the blocks are wide and easy to read. On an index they can
be thin, so raise Minimum Block Height if the chart starts to look like lines
rather than zones.
🟠 CONCLUSION
Finding order blocks is easy and most scripts already do it. Knowing which of
them earned their place is the part that decides whether the chart helps you or
just fills up. That is what the grade is for. مؤشر

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. مؤشر
