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

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

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). Wskaźnik

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. Wskaźnik

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. Wskaźnik

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.
Wskaźnik

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. Wskaźnik

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. Wskaźnik

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

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

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

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. Wskaźnik

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

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

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

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

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

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

Fair Value Gap (FVG) Statistics with Placebo Control█ OVERVIEW
On the same instrument, measured against a 50% baseline, fair value gaps looked significantly profitable in one period and significantly unprofitable in another. Both readings were artifacts of a baseline that was never 50%.
This indicator measures what actually happens after price returns to a gap, then compares the result against fake, or placebo, zones of the same size placed at bars where no gap occurred. Because a hit rate tells you nothing until you know what a meaningless zone scores on the same chart.
The following description consists of two parts. Part 1 is written in plain English and covers everything most readers need. Part 2 contains the full methodology and results for anyone who wants to examine the numbers in detail.
═══════════════════════════════════════
PART 1 — WHAT THIS IS AND WHY
═══════════════════════════════════════
█ THE PROBLEM
Zone-based tools are everywhere: fair value gaps, order blocks, breakers, imbalances. Yet almost none of them tell you how often a zone actually led anywhere. And when a number is quoted, it is often built on one of three flawed foundations.
1. The zone is counted before it could have been known.
This problem is easiest to see with order blocks. An order block is commonly defined as the last opposite candle before a move that breaks structure. That means the block cannot be identified until the structure break occurs, often several bars later. Yet it is drawn back on the earlier candle as though it had been known at the time.
Any hit rate measured from that earlier candle therefore counts a zone that nobody could actually have traded.
Fair value gaps suffer less from this problem because their three-bar pattern completes quickly, but the same principle applies: a zone becomes active only when it becomes knowable, and nothing before that bar should be counted.
2. Failed zones disappear.
Many tools remove a zone from the chart once price has passed through it. That makes sense for keeping a chart clean. It is disastrous for statistics, because the zones being removed are disproportionately the ones that failed.
Count only what remains on the chart and you are counting the survivors.
3. The hit rate is compared with 50%.
This is the most important problem, and it is extremely common.
The reasoning seems straightforward: if the target and stop are equally far from the entry, then no edge should mean a 50/50 outcome.
But a rule that enters when price reaches a level inherits a baseline from the way price moves. That baseline is not necessarily 50%. It changes with the instrument, direction, and market conditions. Across the three markets tested here, it ranged from roughly 45% to 55%.
A hit rate by itself therefore tells you very little.
What matters is how the same measurement performs on zones that have no informational meaning at all.
█ WHAT THIS INDICATOR DOES
For every real fair value gap the indicator identifies, it also generates placebo zones of the same height, direction, and distance from price, anchored at bars where no fair value gap occurred.
Real and placebo zones are then measured by exactly the same rules.
The difference between them — real minus placebo — is the result that matters.
If real gaps perform like the placebo zones, then the pattern is not adding anything, regardless of how attractive the raw hit rate may look.
The placebo comparison does not ask whether fair value gaps win more than 50% of the time.
It asks a harder question:
Do fair value gaps perform better than comparable zones that carry no fair value gap information at all?
█ HOW THE COMPARISON IS KEPT FAIR
Statistical libraries for Pine already exist, and many indicators will draw fair value gaps. What is not otherwise available is a matched control built into the measurement itself, so that every figure the indicator reports arrives together with the baseline it should be judged against.
Three design choices make that possible, and they only work together.
A matched placebo control. Each placebo zone has the same height, the same direction, and the same distance from price as the real zone it is meant to compare with. Both are scored by identical rules.
Confirmation-honest timing. A zone enters the sample only when it becomes knowable, never earlier. Every confirmed zone remains in the sample from that point onward, including zones that fail immediately.
Bias controls that are reported rather than hidden. Cases that are genuinely difficult to score — such as bars that touch both exits and trades that never resolve — are counted and displayed for real and placebo zones side by side. Ambiguous cases are treated conservatively rather than silently discarded.
The combination matters. A matched control is useful only if both sides are measured under the same timing and scoring rules.
█ WHAT THE TESTS FOUND
Across three asset classes, three timeframes, and two separate periods — fourteen measurements in total — fair value gaps showed no detectable advantage over size-matched zones placed at meaningless bars.
The difference remained below about one percentage point of hit rate, and none of the fourteen individual measurements reached conventional statistical significance.
That is a bound on what was observed, not a claim that the true effect is exactly zero.
A different market or a different period could produce a different result. That is precisely why the comparison is built into the tool rather than left as an assumption or a footnote.
The broader conclusion is more useful:
A hit rate quoted without its baseline does not tell you whether something works. On the same instrument, measured against 50%, this pattern looked significantly profitable in one period and significantly unprofitable in another. Both readings were created by the baseline, not by the gaps.
That lesson applies to zone-based tools generally, not only to fair value gaps.
If you take one thing from this script, take that.
█ HOW IT WAS TESTED
A single result on a single chart is easy to produce and easy to overinterpret. Before publication, the same measurement was therefore repeated while changing one assumption at a time.
Three asset classes — crypto, currencies, and equity index futures
Three timeframes — 5 minutes, 30 minutes, and 1 hour
Two separate, non-overlapping time periods
Three different target and stop distances
Two different limits on how long a trade could remain open
Each of these choices is partly arbitrary. If a finding appears only under one particular setting, it may belong to the setting rather than to the market.
Fourteen separate measurements were made in total.
Two standard statistical tools are used. A confidence interval shows the range in which the underlying value plausibly lies, which is more informative than a single headline estimate. Results from independent markets are also combined so that their evidence can be considered together rather than one chart at a time.
The measurement procedure was additionally checked against artificial data for which the correct answer was known in advance. This allowed the method itself to be tested independently of any market result.
█ HOW TO READ AND USE THE INDICATOR
Add the indicator to any chart. It works on any symbol and any timeframe and needs no configuration to produce a result.
The panel
By default, the panel shows a compact view: the number of zones found, the number revisited by price, the hit rate with its confidence interval, the placebo baseline, and the difference between real and placebo.
Turn off Compact panel for the full breakdown: wins, losses, unresolved cases, the direction split, and side-by-side rates for the cases that are hardest to score.
Everything used to produce the headline result is available for inspection.
Reading the result
Check the sample size first. Below roughly 1000 resolved zones, the confidence interval is usually too wide to conclude much. Recognizing that the sample is inconclusive is a valid result, not a failure of the indicator. Lower timeframes and longer histories both increase the sample.
Then read real − placebo . That is the headline result.
A positive number means the gaps outperformed the placebo zones. A negative number means they underperformed them.
The z-score beside it indicates how far the observed difference sits from what chance alone can produce. As a rough guide, an absolute z-score below 2 is not conventionally distinguishable from noise.
The raw hit rate is shown for context, not as the answer. Judging the pattern from that number alone is the mistake this indicator is designed to expose.
Setting up a measurement
To measure a specific period, turn on Limit to date range and set the dates.
The panel reports the sample actually achieved. This can be shorter than the requested period if the chart has not loaded enough historical data, so scroll left when necessary to load more history.
To check whether a result depends on your choice of exits, change Barrier size and run the measurement again. A finding that appears only at one setting may belong to the setting rather than to the pattern.
As a chart indicator
Zones are drawn as they form and can also be used in the usual visual way.
A zone that price has not yet returned to is drawn solid and continues extending to the right while it remains open.
When price reaches the zone, the box stops extending and fades to a dotted outline. The width of a completed box therefore shows how long that gap survived before price returned to it, while the chart makes it easy to see which zones remain active.
Turning off Draw real zones leaves only the statistics panel.
█ SETTINGS
Measurement — Risk unit selects whether exit distance scales with ATR or with the zone's own height. Barrier size sets that distance. Time limit controls how many bars a trade may remain open before being recorded as unresolved.
Entry price and Evaluate exits on the entry bar provide alternative scoring conventions so their effect can be measured rather than assumed. Both are labeled where they introduce a known bias.
Minimum zone height filters out small gaps. Exclude overlapping zones and Overlap lookback prevent several gaps created by the same move from being treated as independent observations.
Sample — restricts the measurement to a date range, entered as year, month, and day so the sample remains reproducible.
Placebo control — Placebos per zone sets how many comparison zones each real zone generates; more placebos produce a tighter estimate of the baseline. Placebo offset controls how far from the original bar the comparison zones are anchored.
Validation — replaces market price with a random walk so the measurement can be checked against data whose correct answer is known in advance rather than only against real markets.
Display — Compact panel shows the headline rows only; turning it off reveals the full breakdown. Draw real zones toggles the boxes on the chart.
═══════════════════════════════════════
PART 2 — DETAILED ANALYSIS
═══════════════════════════════════════
█ HOW A ZONE IS SCORED
A gap becomes active on the bar after its three-bar pattern closes. From that point onward, every confirmed zone remains in the sample, including zones that fail immediately.
When price returns to a zone, the entry is recorded at that bar's close , not at the zone edge.
This matters more than it may appear.
A touch condition means that price reached or passed the edge, so the bar may have overshot it by an unknown amount. Assuming a fill at the edge while beginning the measurement only from the following bar would start the trade from an artificial price and can systematically distort the result.
Two exits are then placed at equal distances on either side of the entry. Because the exits are symmetric, real and placebo zones can be compared directly.
If one bar touches both exits, its open, high, low, and close do not reveal which level was reached first. Those cases are shown separately and counted as losses, making the published result the conservative one.
Zones that reach neither exit within the time limit are excluded from the hit-rate calculation. They did not resolve, so they provide no evidence for either outcome.
█ RESULTS
Results below use the following settings. The sample ends 1 August 2026.
SETTING VALUE
Risk unit (R) ATR(14) at confirmation
Barrier 2.0 R each side
Time limit 100 bars after entry
Entry close of the touch bar
Overlapping zones excluded
Placebos per zone 3
Three markets, 30-minute charts, 2025-01-01 to 2026-08-01:
INSTRUMENT RAW NAIVE z PLACEBO REAL-PLAC
BTCUSDT 49.5% -0.67 49.0% +0.5
EURUSD 51.4% +1.65 51.7% -0.2
ES1! 49.2% -0.92 49.9% -0.7
POOLED -0.04
The panel on the chart above is not restricted to that fixed window — it runs to the most recent bar — so its figures differ slightly from the table. That is expected: it is a different sample, not a different result.
Read the raw column alone and the markets appear different: 49.5% for crypto versus 51.4% for currencies, a spread of 1.9 percentage points.
Now look at the placebo column. Its spread is 2.7 points.
The apparent difference between markets is therefore better explained by the baseline than by the fair value gaps themselves.
One example makes the problem especially clear:
BTCUSDT, 1 hour, calendar year 2024
Raw hit rate 54.0% (n = 1390)
Naive z vs 50% +2.95 "significant"
Placebo baseline 51.5%
Real minus placebo +2.5% z 1.49, not sig.
Against an assumed 50% baseline, a 54% hit rate gives a p-value near 0.003 — exactly the kind of number that can look compelling when published in isolation.
Against its observed control baseline, however, the evidence is not statistically significant.
The same indicator, on the same instrument, over a different period and with a tighter target, produced a raw hit rate of 48.4% with a z-score of -2.25 — apparently significant in the opposite direction.
Both apparent conclusions arise from comparing with an assumed 50% baseline rather than the observed control baseline.
█ ROBUSTNESS
DIMENSION TESTED RESULT
Barrier size 1R / 2R / 3R no change
Time limit 50 / 100 bars no change
Asset class crypto / FX / index no change
Timeframe 5m / 30m / 1h no change
Period 2024 / 2025-26 no change
Across fourteen separate estimates of real minus placebo, the largest result was 1.49 standard errors from zero.
With fourteen estimates, even if the true effect were zero, the largest absolute result would be expected to reach roughly 1.9 standard errors by chance alone.
Pooled across three independent markets, the estimate was -0.04 percentage points, with a 95% interval of approximately -1.2 to +1.1 points.
█ LIMITATIONS
One symbol and one timeframe can be analyzed per chart. Pine cannot pool results across markets, so each chart represents one sample rather than proof by itself. The pooled figures reported above were combined separately.
Trading costs are not included. Entries assume execution at the bar close with no spread, commission, or slippage. Real-world trading costs would make absolute performance worse.
Ambiguous bars are counted as losses. This lowers both real and placebo hit rates by roughly the ambiguous-case rate and therefore tends to cancel when the difference between them is calculated.
The bull and bear rows should not be interpreted independently in a trending market.
The placebo control matches zone size, direction, and distance from price, but it cannot match the fact that a real gap forms immediately after a strong move in the same direction.
For example, in an uptrend, a fake bearish zone is more likely to be run over by the prevailing trend, whereas a real bearish gap can only form after an actual downward move. These effects work in opposite directions and largely cancel in the combined result.
For that reason, the total should be treated as the primary statistic rather than the directional split.
This limitation was identified during testing and is the main known weakness of the methodology.
Finally, all results come from a sample. Another market or another period may produce a different estimate. That uncertainty is the reason the placebo comparison is built into the indicator rather than assumed away.
█ METHOD AND PRIOR WORK
None of the statistics here are new, and it is worth being clear about that.
Assigning a treatment to units or moments where it did not actually occur, then checking that no effect appears, is a standard falsification test in causal inference, where it is usually called a placebo test. The placebo zones in this indicator are that idea applied to bars instead of subjects.
The trading application is not new either. David Aronson's Evidence-Based Technical Analysis (2006) argues that a rule should be judged against the returns of random entry signals rather than against zero, and uses Monte Carlo permutation and White's Reality Check to do it.
The scoring rule — a target, a stop, and a time limit, whichever is reached first — is the triple-barrier method described by Marcos López de Prado.
What this script adds is not the method but its availability. The control is generated and scored automatically alongside the real zones, on any chart and any symbol, so the baseline arrives together with the number instead of requiring a separate study that most people will never run.
█ OPEN SOURCE
The source is open. Every figure above can be reproduced — or shown to be wrong — by anyone who wants to check it.
Order blocks are next, measured by the same rule: from the bar that breaks structure, not from the earlier candle on which the block is drawn.
Wskaźnik

SMC Analytics Pro Hey traders! 👋
Finding a clean, non-lagging Smart Money Concepts (SMC) indicator on TradingView can be frustrating. Most public scripts end up squishing your chart scale , lagging your browser, or cluttering your screen with hundreds of overlapping boxes. 😩
So I decided to code a complete, ultra-precise Smart Money Concepts engine in Pine Script v5—rebuilt from the ground up to keep your charts smooth, clean, and 100% accurate! 🚀✨
The Core Idea: Institutional trading isn't about guessing where price is going—it's about tracking where bank liquidity lives. This indicator maps out market structure, institutional order blocks, and imbalance gaps without crowding your price action.
🔥 Key Features That Make This Unique
Dual Structure Architecture: Automatically plots both Internal Structure (micro scalp breaks) and Swing Structure (macro trend breaks) so you never trade against the major market trend.
Structure-Triggered Order Blocks (OB): No more clutter! OBs are drawn only when a real Break of Structure (BOS) or Change of Character (CHoCH) occurs at the origin of the impulse move.
Real-Time Mitigation Engine: When price retraces and touches an Order Block or fills a Fair Value Gap (FVG), the zone automatically vanishes in Present Mode to keep your chart tidy.
Fixed Chart Scale Guarantee: Unlike other SMC scripts that distort your vertical price scale and make candles look flat, this indicator keeps your chart scaling perfectly proportioned on every single timeframe! 📈
Fair Value Gaps (FVG): Identifies genuine 3-candle imbalance gaps where big money stepped in with aggressive market orders.
Liquidity Pools (EQH / EQL): Highlights Equal Highs and Equal Lows where retail stop losses are sitting waiting to be swept.
Dynamic Equilibrium (50%) Level: Displays the exact 50% midpoint of the active swing range so you always know if you're buying in Discount or selling in Premium .
🛠️ How to Use This in Your Trading Setup
Identify the Macro Trend: Look for solid green/red BOS lines and check if swing points are making Higher Highs (HH) or Lower Lows (LL).
Wait for Price to Enter a Zone: Look for price to retrace back down into an unmitigated Bullish Order Block or fill a Bullish FVG below the Equilibrium (50%) line.
Look for Internal Confirmation: Drop down to a lower timeframe and wait for a dashed iBOS / CHoCH break in your direction before taking the trade! 🎯
⚡ Multi-Timeframe Compatibility
Whether you are scalping the 1-minute chart on CAPITALCOM:NAS100 , day trading Forex on the 15-minute, or swing trading Crypto on the Daily, the logic adapts dynamically to any market and timeframe! 🌍
Inputs can be customized in the settings panel—feel free to tweak the pivot lookbacks to match your personal trading style.
If you find this indicator helpful for your daily analysis, please hit the Boost button 🚀 and leave a comment below! Happy trading! 🙌 Wskaźnik

SMC Swing Structure + Order Blocks + CHoCH VolumeOrderBlock Radar — SMC Swing & Volume CHoCH
A Smart Money Concepts (SMC) toolkit that maps market structure and order blocks the way institutional order flow is typically read — without drowning your chart in noise from minor pivots.
What it does:
📊 Swing Structure (BOS / CHoCH) — Tracks the market's real trend using major swing highs and lows, not every small wiggle. A break with the trend is marked BOS (Break of Structure); a break against the trend is marked CHoCH (Change of Character) — the earliest, most reliable signal that momentum may be shifting.
📦 Order Blocks — Automatically plots the last opposing candle before each structural break — the classic "footprint" of where smart money likely entered before the move. Boxes extend forward and auto-delete once price mitigates them, so your chart only shows blocks that are still relevant.
🔊 Volume-Confirmed CHoCH — Not all character changes are equal. This indicator checks volume against its recent average at the moment of a CHoCH — when a break comes with a volume spike, it's tagged separately ("CHoCH ⚡Vol") and fires its own dedicated alert, helping you filter high-conviction reversals from low-volume fakeouts.
🔔 Built-in Alerts — Six alert conditions ready to go: bullish/bearish CHoCH, bullish/bearish CHoCH with volume confirmation, and bullish/bearish BOS. Set them once and get pinged the moment structure shifts.
Customizable settings:
Swing pivot sensitivity (how "major" a swing needs to be to count)
Optional internal (minor) structure overlay for extra context
Order block count limits, lookback range, and mitigation method (wick vs. close)
Volume average length and spike threshold
Full color and label control
How to use it: Best used as a structural context tool — combine CHoCH signals with your own entry confirmation (order block retest, FVG fill, liquidity sweep, etc.) rather than trading the label in isolation. Works on any timeframe and asset class; higher timeframes and liquid instruments tend to give the cleanest structure.
This is a technical analysis tool, not financial advice — always manage risk and confirm signals with your own strategy. Wskaźnik

MTF Daily Bias DashboardOverview
The "MTF Daily Bias Dashboard" is a streamlined, non-intrusive utility designed specifically for Smart Money Concepts (SMC) and Inner Circle Trader (ICT) methodologies. Multi-timeframe analysis is the backbone of finding high-probability setups, but constantly switching between charts to check the higher-timeframe narrative can lead to missed lower-timeframe entries.
This indicator solves that problem by providing a clean, customizable on-chart dashboard that displays real-time, objective market bias across three different timeframes simultaneously.
Core Features
Objective Bias Detection: Bias is determined mechanically using a customizable Exponential Moving Average (EMA) and price action closes, removing emotion and guesswork from your directional bias.
Multi-Timeframe Synchronization: By default, it tracks the Daily (1D), 4-Hour (4H), and 15-Minute (15m) timeframes, giving you a complete top-down narrative at a glance.
Non-Repainting Logic: The multi-timeframe data is pulled securely, ensuring that historical signals remain accurate and current data does not repaint past the current candle formation.
Dynamic Visual Dashboard: A color-coded table (Green for Bullish, Red for Bearish) provides immediate visual confirmation of market alignment.
How It Works
The indicator evaluates the current price action against your chosen baseline (EMA).
Bullish (Green):Price closes above the EMA, and the current candle closes higher than the previous candle.
Bearish (Red): Price closes below the EMA, and the current candle closes lower than the previous candle.
Confluence: When all three timeframes show the same color, you have high-probability directional alignment, perfect for looking for lower-timeframe sweeps, order blocks, or fair value gaps in the direction of the trend.
Customization & Settings
Timeframes: Fully adjustable inputs allow you to change the three monitored timeframes to fit your specific trading model (e.g., Weekly/Daily/1H or 4H/1H/5m).
Dashboard Positioning: You can move the dashboard to any corner of your chart to ensure it never obstructs current price action.
Trend Logic: Adjust the EMA length used to calculate the bias to make the indicator more or less sensitive to recent price action.
Who is this for?
This tool is ideal for SMC, ICT, and pure price action traders who rely on the daily narrative but execute on intraday timeframes. It keeps you aligned with the macro trend while you focus on micro executions. Wskaźnik

Strong MTF Liquidity Matrix | ProjectSyndicateStrong MTF Liquidity Matrix
Strong MTF Liquidity Matrix puts four higher-timeframe charts on one screen and reads the same institutional map on every one of them — order blocks, fair value gaps, and resting liquidity — then ranks each zone by strength so you know which level actually matters. It's a command deck: your main chart stays clean while four live mini-panels track the structure above you, and the liquidity pools that price is really hunting sit directly on your candles.
Most multi-timeframe tools make you flip between charts. This one stops the flipping.
🔲 Four-Panel MTF Engine — the core. Four independent mini-charts render right on your pane — M30 · H1 · H2 · H4 by default, each one fully configurable to any timeframe (drop to seconds or push to Daily). Every panel fetches its own higher-timeframe candles, keyed on the HTF bar's own time, so the zones are invariant to your master chart timeframe — switch your main chart from M30 to H1 to D1 and the panels don't move. The last candle in each panel tracks the live, forming HTF bar tick by tick.
🟩 Order Block Detection — real ICT logic, per timeframe. Each panel runs a swing-pivot + displacement scan: the last opposing candle before an impulsive move that clears your displacement multiple becomes the order block. Bull OBs from swing-low reversals, bear OBs from swing-high reversals — detected natively on every one of the four timeframes at once.
🟥 Fair Value Gap Detection — the imbalance map. True three-candle FVGs on each timeframe, with an optional ATR gap filter so only gaps worth trading survive. Bullish and bearish gaps rendered in the original green/red palette, distinct from the order blocks, on all four panels simultaneously.
🧲 Universal Zone Height — the accuracy differentiator. Raw OB/FVG zones come in wildly different sizes and clutter the read. Every zone is normalized to one clean height — ATR-based or a fixed percentage of price — so the panels stay legible and every zone carries equal visual weight. Fair value framed; noise removed.
🔢 0–10 Strength Ranking — the power-ranking. Every zone earns a live grade, printed inside the shaded box (OB 8.5, FVG 6.0). Order blocks score on displacement force, zone height and age; fair value gaps score on gap size versus ATR. Set a minimum strength floor and the weak zones simply don't draw — only the levels that earned attention survive.
🌊 Liquidity Heatmap — resting pools on your main chart. Buy-side and sell-side liquidity, seeded from fractal swing highs and lows across two pivot passes, drawn as heat-weighted boxes whose opacity scales with liquidity weight (volume × range). Strong pools glow, weak ones stay faint. When price trades through a pool it's consumed — the zone freezes and fades to show exactly what's already been taken. Colours locked 100% to the OB/FVG palette: buy-side green, sell-side red.
🏷️ Clean Liquidity Labels — above the zone, never in the way. Each resting pool is tagged with its side (BSL/SSL), price, weight and distance from current price — anchored above the zone at its left edge so labels never overlap the fills and never protrude past the level. Read the map without the mess.
🧹 Clean-Chart Discipline — dashboard off by default. No stat panel competing with price. The liquidity dashboard exists — nearest SSL/BSL, hottest level, pool counts, consumed tally — but it's switched off out of the box. Turn it on only if you want it.
🎨 Fully Themed & Configurable. Neutral-gray candles that let the coloured zones pop, custom OB/FVG/liquidity colours, panel size and spacing, right-offset from live price, 2× timeframe labels, per-panel OB/FVG toggles, adjustable swing length, displacement, mitigation type (Touch / Full Fill / 50% Fill), gap filter, zone-height method, strength floor, pivot lengths, heat contrast, pool extension and cap.
🔒 Honest, Non-Repainting Core. Panel history is built from confirmed higher-timeframe bars only; the live forming candle refreshes as it builds — inherent to showing a real-time HTF candle, not a defect — while every closed bar is fixed. Liquidity pools consume on confirmed interaction and don't un-consume to flatter the chart. The 0–10 strength score is a descriptive ranking framework for directing attention, not a backtested edge.
🔔 Native Alerts — new sell-side pool and new buy-side pool formation.
🎯 Why this is different. MTF tools make you tab between charts and reconcile the structure in your head. Profile tools show you liquidity and leave the map disconnected from your entries. Strong MTF Liquidity Matrix holds all four higher timeframes in view at once, marks the order blocks and fair value gaps on every one of them, grades each so you know which to trust, and lays the liquidity price is actually hunting directly on your candles — so you read where structure sits, how strong it is, and where price is being pulled, at a glance.
🚀 Apply to Gold (XAUUSD), Silver, Forex, Crypto, Indices and Futures on any timeframe (liquidity heat requires a volume-bearing symbol).
💡 Cleanest setup: give the four panels room — nudge Right Offset and the panels sit clear of live price to the right, while liquidity zones map onto the candles on the left.
🎯 How To Trade It — Two Approaches
Everything hinges on one read the Matrix gives you at a glance: is higher-timeframe structure lining up, and is price being pulled toward unfilled liquidity?
◾ 1) Trade into confluence toward liquidity (the core thesis)
Use when a high-strength zone on a higher panel lines up with a resting liquidity pool in the same direction.
▪️ Scan the four panels for a strong OB or FVG (7+) on H1/H2/H4 sitting where price is heading.
▪️ Confirm a naked liquidity pool (BSL below / SSL above) as the magnet — the untested pools are where price is drawn.
▪️ Entry: as price reaches the higher-timeframe zone, in the direction of the unfilled liquidity beyond it.
▪️ Stop: beyond the zone; if price closes through and accepts, the level failed — stand aside.
▪️ Target: the nearest resting pool in your direction; the opposite-side pool if the move extends.
⚖️ The cleanest version: H1 and H2 panels both print a strong bull OB at the same area, a fat buy-side pool sits just below unconsumed, and the M30 panel shows price rotating down into it. Structure, strength and liquidity all point the same way. That confluence is the exact setup this tool was built to frame.
◾ 2) Stand down — the map says wait
The Matrix also tells you when there's nothing to do.
▪️ Panels disagree — a bull OB on H1 against a bear FVG on H4 is conflict, not confluence. Wait for alignment.
▪️ Liquidity already consumed on your side — the magnet's gone; the pull is spent.
▪️ No strong zone in range — low scores everywhere means no level worth risking on. Let it develop.
Rule of thumb: ⭐ Aligned high-strength zones + an unfilled pool in the same direction → trade into the confluence toward the liquidity. ⭐ Conflicting panels, consumed pools, or weak scores → stand down until the map agrees.
⚠️ IMPORTANT NOTICE: Strong MTF Liquidity Matrix is a structure-and-liquidity mapping tool. Order blocks, fair value gaps and liquidity pools are drawn from swing-pivot and gap logic — a model of institutional behaviour, not exchange order-book data. Liquidity weight is inferred from volume × range and requires a volume-bearing symbol. The 0–10 strength score is a descriptive ranking framework for directing attention — NOT a backtested signal and NOT a standalone trade trigger. Trading into higher-timeframe structure still carries real risk of failed levels and stop-outs. Always combine it with your own strategy, price-action analysis and risk management. Past behaviour does not guarantee future results. Wskaźnik
