Breaker Block Detector [algotim]Overview
Breaker Block Detector is a structure-based indicator designed to identify Breaker Block formations only after a defined swing sequence and structural break have occurred.
The purpose of the script is to make Breaker Block analysis more systematic. Instead of marking every visually similar candle formation, it first establishes confirmed swing structure, waits for a qualifying Break of Structure, validates the displacement of the breakout candle relative to ATR, and then derives the relevant zone from the preceding Order Block structure.
This creates a sequential workflow in which a breaker is the result of a structural event rather than an isolated candle pattern.
Problem Statement
Basic Breaker Block indicators can produce large numbers of zones because the underlying concept is often reduced to simple swing relationships.
The difficulty is determining which structural events are significant enough to retain.
This script addresses that problem by adding confirmation layers around the Breaker Block formation:
1. Confirm the relevant swing structure.
2. Detect the structural break.
3. Test the breakout candle for sufficient displacement.
4. Identify the originating Order Block candle.
5. Create the Breaker Block zone.
6. Filter near-duplicate zones and manage the number of active zones.
The result is intended to provide a more structured representation of breaker formations while reducing some of the visual noise created by treating every local pattern equally.
Methodology
1. Confirmed Swing Structure
The script uses configurable pivot length to identify swing highs and swing lows.
A pivot is only available after the required bars on both sides have formed. Consequently, the swing itself is confirmed retrospectively rather than being treated as known at the original pivot bar.
This confirmation process is important because the subsequent Break of Structure calculation depends on established swing levels.
2. Break of Structure
Once a confirmed swing level is available, price is monitored for a structural break.
For bullish structure, price must move above the relevant confirmed swing high.
For bearish structure, price must move below the relevant confirmed swing low.
The BOS confirmation method can be configured to use either the candle close or the candle wick.
Using Close requires the candle to finish beyond the structural level. Using Wick allows the structural event to be recognized from an intrabar excursion beyond that level.
3. Displacement Validation
A structural break alone does not automatically qualify as a breaker event.
The BOS candle is measured using its complete high-to-low range.
That range is compared with the current ATR:
Displacement requirement = ATR × Displacement Multiplier
Only when the BOS candle exceeds the configured ATR threshold does the displacement filter pass.
This provides a volatility-adjusted way to distinguish larger structural moves from relatively small breaks.
4. Originating Order Block
After a qualifying structural event, the script examines the configurable number of candles preceding the BOS impulse.
The relevant opposite-direction candle is used to define the originating Order Block region.
This means the Breaker Block is not selected independently from the structural event. The zone is derived from the candle structure associated with the move that produced the qualifying break.
5. Breaker Formation
The script evaluates the relationship between confirmed swing points to determine whether the required structural sequence has occurred.
Bearish formations are based on a high-low-high relationship followed by a close or wick break through the intervening structure, depending on the selected confirmation mode.
Bullish formations use the corresponding low-high-low relationship followed by a break through the intervening structure.
This structural sequence is what determines whether a region is treated as a Breaker Block.
6. Zone Management
Once created, breaker zones are maintained as chart objects and extended to the right for the configured number of bars.
The script can limit the number of active breaker zones displayed on each side.
ATR-relative duplicate filtering is also used so that closely overlapping breaker formations are not unnecessarily repeated on the chart.
Signal Workflow
The complete analytical workflow is:
1. Detect and confirm swing highs/lows.
2. Store the relevant structural levels.
3. Monitor price for a Break of Structure.
4. Determine whether the BOS candle satisfies the ATR displacement threshold.
5. Evaluate the associated structural sequence.
6. Locate the originating Order Block candle.
7. Create the corresponding bullish or bearish Breaker Block.
8. Reject sufficiently similar duplicate zones.
9. Extend and maintain the active zone.
10. Monitor subsequent interaction with the zone and its validity state.
The indicator therefore treats a Breaker Block as the output of a sequence of structural conditions rather than as a standalone visual pattern.
Why This Indicator Is Different
A conventional Breaker Block script can simply identify a swing pattern and draw a box around it.
This implementation adds a validation layer between structure and zone creation.
The important distinction is the sequence:
**Confirmed Structure -> Break of Structure -> ATR Displacement Validation -> Originating Order Block -> Breaker Zone**
The ATR component is not included as a separate volatility indicator. Its purpose is specifically to determine whether the structural break has sufficient range relative to the current market volatility.
Likewise, the Order Block component is not intended to create an unrelated collection of zones. It provides the price region from which the qualifying structural move originated.
This interaction is the central design of the indicator.
Inputs
Structure Detection
**Swing Length**
Controls the number of bars used on each side to confirm swing highs and swing lows. Larger values produce fewer, more significant structural points.
**BOS Confirmation**
Choose between Close and Wick confirmation for structural breaks.
**Max Active Breakers**
Controls the maximum number of active breaker zones retained on each side.
Breaker Validity Engine
**ATR Length**
Determines the ATR calculation used for displacement validation.
**Displacement Multiplier**
Sets the minimum BOS candle range relative to ATR required for the displacement filter.
**OB Candle Lookback**
Controls how many candles preceding the BOS impulse are examined when identifying the originating Order Block.
Visual Settings
Users can configure bullish and bearish zone colors, borders, midline width, right-side extension length, mitigation labels, and BOS lines.
Alerts
The script provides alert conditions for:
* New Bullish Breaker
* New Bearish Breaker
* Bullish Breaker Retest
* Bearish Breaker Retest
* Bullish Breaker Invalidation
* Bearish Breaker Invalidation
These alerts allow users to monitor newly created zones and subsequent interactions without continuously watching the chart.
Practical Usage
The indicator is intended primarily as a structural analysis tool.
A typical workflow is to first use the confirmed swing structure to understand the current market context, then examine newly created breaker zones only after the structural break and displacement conditions have been satisfied.
Users may then monitor a breaker for a later retest or invalidation and combine that information with their own price-action, trend, volatility, or risk-management framework.
The configurable swing length and displacement threshold can be adjusted according to the instrument and timeframe. More restrictive settings generally produce fewer qualifying formations, while less restrictive settings can produce more zones.
Limitations
Breaker Block terminology represents a market-structure interpretation rather than a directly observable measurement of institutional orders.
The script does not measure actual institutional order flow, market participant identity, or future price direction.
Confirmed pivots require subsequent bars before the swing is established, so historical swing points become available only after confirmation.
Wick-based BOS confirmation is less restrictive than close-based confirmation and can therefore recognize structural breaks that do not persist through the candle close.
ATR displacement is a volatility-relative filter; it does not determine whether a move will continue.
Breaker zones and alerts should therefore be treated as analytical references rather than standalone trading signals.
Notes
This indicator is designed to provide a systematic framework for studying Breaker Block formations through confirmed swing structure, structural breaks, volatility-adjusted displacement, and originating candle analysis.
The calculations describe price behavior observable in the chart. Terms such as Break of Structure, Order Block, and Breaker Block are used as technical-analysis concepts and should not be interpreted as evidence of specific institutional activity.
Users should validate the resulting zones within their own market analysis and risk-management process. อินดิเคเตอร์

MSnR Double Breakout LevelMSnR Double Breakout Level
A staircase of turning points, and the level that matters once price finally runs out the top or
the bottom of it.
Support and resistance tools usually mark a level the moment it forms, which is why a chart ends up carrying dozens of lines that never meant anything. This one marks nothing when a level appears. It holds two of them, waits to see whether price runs past the pair, and only then draws the one that was left behind.
The result is that a level is never drawn on hope. By the time it is on the chart, price has
already proved it was willing to go through everything above or below it.
THE TWO BUILDING BLOCKS
A candle is green when close is above open, red when close is below. A doji, where they are
equal, is neither and takes no part.
A Level a green candle followed immediately by a red one.
The GREEN candle's CLOSE is the level.
Buyers pushed, sellers took it straight back.
V Level a red candle followed immediately by a green one.
The RED candle's CLOSE is the level.
Sellers pushed, buyers took it straight back.
These are not the output. They are the raw material.
DOUBLE BREAKOUT
Two same-side levels are held as a rolling pair. On the A side that is a descending pair - A1
above, A2 below:
A1 a close above this confirms it
A2 this is the level that gets marked
When a candle CLOSES above A1, the staircase has been run out, and A2 - the innermost step, the last place sellers stepped in before price left - is marked as the level.
The V side is the exact mirror. An ascending pair, V1 below and V2 above, a candle closing below V1, and V2 is marked.
It is always a DOUBLE. However long the staircase runs, only the latest two steps are ever held.
When a new same-side level appears while the pair is still waiting, one question decides what
happens to it:
the new level did NOT break the inner step -> the pair SLIDES one along
(old inner becomes the new outer)
the new level DID break the inner step -> the pair RESTARTS from that level
That single question is the whole bookkeeping, and it is the part most easily got wrong. Throwing the pair away every time another step appears loses the long staircases, which are exactly the ones worth waiting for. Never throwing it away means the pair drifts away from price and stops describing anything. Sliding keeps it anchored to the two most recent steps for as long as the move keeps going the same way, and restarts it the moment the move stops.
The breakout is always checked before any new level is. Reaching the outer step IS the breakout, so a level beyond it can only ever belong to the next search, never interrupt the current one.
DOUBLE BREAKOUT TO DOUBLE BREAKOUT
A completed Double Breakout can itself be taken out - by a completed Double Breakout running the other way.
a Double A Breakout confirms, marking A2
a Double V Breakout then confirms, marking V2
a candle CLOSES below that old A2
-> V2 becomes a DBO to DBO V level
The bullish case is the mirror: a Double V, then a Double A, then a close above the old V2, and
A2 becomes a DBO to DBO A level.
The cross break may land on the very same candle that confirmed the second Double Breakout, or on any candle after it. What it says is that the level which had just been established as the place price wanted to leave from has now been given up in the other direction, by a move built the same strict way.
The level is UPGRADED, not duplicated. A DBO to DBO A sits at exactly the price its Double A
Breakout already marked - it is the same level with more behind it - so the line already on the
chart changes its name and thickens rather than a second line being drawn on top of the first.
WHAT MAKES THIS DIFFERENT
1. Nothing is marked when it forms.
An A Level or a V Level on its own is never drawn. Two of them together are never drawn either.
Only the breakout puts something on the chart, which is why a whole session can pass with nothing new on it.
2. The pair rolls instead of resetting.
This is the piece that separates it from a plain two-level check. A staircase that keeps stepping
the same way keeps its pair alive, sliding one step at a time. A staircase that turns back on
itself starts again. Both cases are handled by the same rule.
3. The inner step is the level, not the outer one.
The outer step is what price had to close through to prove anything, so it has already been
consumed by the time the pattern completes. The inner step is the last one price never came back to, and that is what is drawn.
4. Breakout has priority over everything else.
Because reaching the outer step is itself the breakout, the order in which the two checks run
changes the result. Checking for new levels first would let a level that is really the start of
the next search interrupt the current one. Here the breakout is always resolved first.
5. The chain is a real state, not a coincidence.
A DBO to DBO level requires a full Double Breakout, then a full opposite Double Breakout, then
the first one's level being closed through. All three are tracked as one sequence, and any part
of it ageing out of the window cancels it.
6. The search itself can be watched.
The pair currently waiting for its breakout can be drawn, so the staircase can be seen sliding
before anything confirms. It is the working state, not a signal, and it is off by default.
READING THE CHART
Green line, "DBO A" Double A Breakout, label below
Red line, "DBO V" Double V Breakout, label above
Thick green, "DBO to DBO A" the bullish chain completed
Thick red, "DBO to DBO V" the bearish chain completed
Every line starts at the candle the level was read from and runs to the right, so the distance
from its origin to price shows how long it has been standing.
Labels are parked clear of that origin candle rather than on the level itself - under its low on a
bullish level, over its high on a bearish one. The level price is a candle CLOSE, so it sits
inside the candle, and a label placed there would be buried in the price action.
A chain level is always drawn one step thicker than a plain one. That is the only styling
difference, because it is the same kind of level, reached by a longer road.
With the working pair switched on, dotted lines labelled A1, A2, V1 and V2 show what is currently being tracked. A1 and A2 are the descending pair waiting for a close above A1; V1 and V2 are the ascending pair waiting for a close below V1. Watch A2 slide down as the staircase extends. If only A1 or only V1 is drawn, the search has one step and is waiting for its second.
Only the most recent few levels are drawn, so the chart stays readable. Older ones are still
counted in the corner table, which reports Double Breakout and DBO to DBO levels split into bull and bear. If the table reads higher than what you can see, the display limit is doing its job.
SETTINGS
Double Breakout
- Scan Length: how far back the search reaches. A pair that has been waiting longer than this is
abandoned, and a confirmed level is dropped once the candle it came from is older than this. It
also bounds how long a chain can stay open.
- Max Levels Shown: how many of the most recent levels are drawn. Switching a type off frees its slots for the others.
Level Types
- A switch for each of the four: Double A Breakout, Double V Breakout, DBO to DBO A, DBO to DBO V.
- Show Working Pair: draws the pair currently waiting for its breakout.
Level Style
- Bullish, bearish and working pair colours, line width, and whether levels extend to the right
edge. With extending off, a level stops at the candle that confirmed it.
Labels
- Show Labels, Label Size, and Label Distance from Candle as a percentage of ATR(14), so the gap scales with whatever instrument and timeframe you are on. The distance is measured from the origin candle's high or low, not from the level.
Summary Table
- Show, position and size of the corner table.
ALERTS
Four alert conditions:
Double A Breakout a descending pair was run out to the upside
Double V Breakout an ascending pair was run out to the downside
DBO to DBO A a bullish chain completed
DBO to DBO V a bearish chain completed
Each message carries the event, the symbol, the timeframe and the closing price. The same
messages are also sent through the alert function, so the "Any alert() function call" alert type
can deliver all four through a single alert.
Every alert is evaluated only after a candle has fully closed.
REPAINTING
This script does not repaint.
- The whole engine runs once per closed candle. Price moving inside an open candle cannot create, change or remove a level, and cannot make a signal appear and then disappear.
- Both building blocks need a candle AFTER them to exist at all. An A Level is only an A Level
once the red candle behind it has closed, so nothing is ever read from a candle still forming.
- Levels are built forward, one candle at a time, in the same order they would have been built live. A line that has been drawn never moves. The only thing that can change about it is its
name and thickness, when a later chain upgrades it, and that is a record of what price did
afterwards rather than a revision of what it did before.
- Nothing is read from a higher timeframe, so there is no higher timeframe lookahead to get
wrong.
When you create an alert, TradingView may show a caution banner saying the indicator can repaint. That banner appears automatically for any script that uses the built in bar state variables, no matter how they are used, because the platform cannot check the intent behind them. This script uses one of them for the opposite purpose: it is what restricts the entire engine to bar close.Choosing "Once Per Bar Close" when creating the alert is still recommended.
NOTES AND LIMITATIONS
- Levels are deliberately infrequent. Two same-side reversals have to line up and then be run
through by a close, and a DBO to DBO level needs that to happen twice in opposite directions.
Long stretches with nothing new are normal.
- Scan Length is not only cosmetic here. It decides when a waiting pair is abandoned and when a chain expires, so changing it changes what is found, not just what is drawn. Max Levels Shown
is the cosmetic one.
- A doji takes no part. An A Level or V Level needs one candle of each colour, so a pair
containing a doji is not one.
- DBO to DBO upgrades the existing level in place. The count of plain Double Breakouts therefore goes down by one each time a chain completes, because that level has become
something else.
- An internal cap of 120 stored levels keeps the drawing count inside TradingView's limits. On a
very long history the oldest are dropped.
- Detection is purely structural. It reports where these sequences occurred and nothing more. It
does not rank levels by quality, measure what happened next, or produce entries, targets or
stops.
HOW TO USE IT
A Double Breakout level marks the last place the other side stepped in before price left the
area. Traders commonly watch these for:
- A reaction on the first return, since price has not been back to that step since the breakout
- Direction from the side, where a bullish level below price and a bearish level above it frame
the range price is currently working in
- Confirmation against a higher timeframe read, where a level that agrees with the larger picture carries more weight than one that fights it
A DBO to DBO level is the same level after the market has argued about it twice. The road to it
was longer, and it sits where a completed move in one direction was undone by a completed move in the other.
The working pair is worth turning on while learning the tool. Watching A2 slide down step by step makes it obvious what the breakout is waiting for, and where it would have to close for anything to be drawn.
These are reference areas, not entry signals on their own. Use them alongside your own support
and resistance mapping, your own entry method and proper risk management.
DISCLAIMER
This indicator is a pattern detection tool. It is not financial advice and it makes no claim
about profitability. Trading involves risk. Always apply your own analysis and risk management. อินดิเคเตอร์

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

Precision PushBack [MohaveTrader]WHAT PUSHBACK IS
PushBack is a support-and-resistance overlay whose levels are built from a dual Williams %R engine, paired with a rail-based trend layer that runs on its own detection. Where the source oscillator treats a %R extreme as exhaustion — a spent move likely to reverse — PushBack reads that same condition as sustained directional pressure: the side in control pushing price to an extreme.
Two terms carry the whole design. Every completed pressure run is an EVENT. An event that clears qualification earns a LEVEL. Events that do not qualify are marked, but no level is built. When an event does qualify, PushBack takes the price extreme reached by that push and stamps it as a structural zone, then carries that zone through its own lifecycle of resistance, support, reclaim and testing. The panel counts both, so how selective the current settings are running on this instrument is readable at a glance.
It is intended for traders who want structure that emerges from qualifying pressure events rather than levels drawn on a fixed schedule, with a separate trend read layered on the same chart.
WHAT'S ORIGINAL
PushBack retains the dual fast and slow %R detection from upslidedown's open-source "%R Trend Exhaustion" (credited below and in the source code) and uses it only as the raw event source. Everything built on top is original: the reinterpretation of the extreme as directional pressure; event qualification by price range and, when enabled, sustained duration; the Event Mode presets that set how selective that qualification is; event-derived zone geometry, where a zone's depth is taken from the run's own candles; the support and resistance lifecycle with reclaim and testing states; role-flip management and retirement; ATR relevance hiding; optional same-state merging; the live run ribbon; the candle coloring modes; the trend layer with its fast and structure rails, defended-level state machine and rail-assisted transitions; and the information panel. The following image illustrates upslidedown's "%R Trend Exhaustion," the open-source indicator PushBack's detection comes from. Each filled box is one %R run — red where both fast and slow %R are overbought, blue where both are oversold — with a triangle where the run ended. PushBack reads these same runs as pressure rather than exhaustion, and keeps the price extreme each one reached as a structural level. For comparison the second image renders PushBack and %R Trend Exhaustion on the same chart.
WHAT MAKES IT DIFFERENT
The structure is emergent, not scheduled. No structural zone is created without a completed qualifying pressure run, so the absence of nearby zones is itself information rather than a missing calculation.
Structure and events are kept separate. The zones are the structural layer and carry the role-based color set. The pressure marks and run ribbon are a distinct event layer in a single neutral color, held off the price and clear of the zones, so a mark is never mistaken for a directional signal.
The run ribbon reads live. It sketches in real time across the pressure run and settles into the completion triangle, so a developing run is visible on price as it happens rather than only after it ends.
The trend line is the rail, not a separate object. The plotted line is the fast adaptive rail itself rather than an average derived from it, so the drawn line and the value the engine reads are the same series and cannot disagree.
%R PRESSURE
Pressure is read from a dual fast and slow Williams %R with independent smoothing. Both periods and the threshold are fixed internally at settled values rather than exposed as inputs. A shared threshold defines the overbought condition (bullish pressure) and the oversold condition (bearish pressure), and a run is the span in which that condition holds. The single event PushBack acts on is the run's completion — the bar the condition is lost.
Not every run qualifies. A completed run must clear a size test — its price range as a multiple of ATR — and, when duration filtering is on, a duration test as well: it must have persisted for the required number of bars. Both conditions must be met, and a larger or faster move does not waive the duration requirement. An Event Mode control — Responsive, Balanced, Strict, or Manual — sets how demanding that qualification is; in Manual, the Advanced values are read instead and the duration test can be turned off to gate on range alone. The duration test is not scaled by timeframe.
ZONES
When a qualifying run completes, its price extreme seeds a zone: a bullish pressure run's high becomes resistance, a bearish pressure run's low becomes support — the rail where the push stalled. Zone depth is set at birth from the run's own candles: the mean or the median of the run's bar ranges, median by default so a single outlier bar does not distort the level. Neither method applies a multiplier, so depth comes from the same bars that produced the level and there is no width setting to tune. Depth is frozen at birth. An optional merge step, off by default, can consolidate same-state zones that overlap or fall within a configurable price gap; with it off, distinct qualified levels stay separate.
A level holds until price closes through it. A close through flips it to a reclaim, which can firm back into support or resistance as price tests and holds. Red is resistance, green is support, cyan is reclaim, yellow is testing. A level keeps flipping between roles until it reaches its Max Role Flips limit — three by default — after which it is retired rather than reclaimed again; fresh pressure re-seeds it if it matters again.
Zones persist as structural objects and can change role as price interacts with them. A zone originally created as support or resistance may later become reclaim, enter testing, and resolve back into support or resistance. Its displayed color and label represent its current state, not necessarily the state in which it originated.
Previously established zones can remain stored after the pressure event that created them has passed. A zone outside the configured ATR relevance distance is hidden rather than deleted and can reappear when price returns. Because a zone can persist through multiple state changes, a currently visible zone may have originated much earlier, in a different role, and its original completion mark may no longer be visible on the chart. A fresh reclaim is held visible for a short grace period regardless of distance. A per-side cap limits the number of native support and resistance zones retained; reclaim zones are exempt from that cap.
PRESSURE MARKS AND RUN RIBBON
A triangle marks where each run completed — a down triangle where a bullish run ended, an up triangle where a bearish run ended. The run ribbon traces the run into that completion, one bar short of the triangle. Both use a single neutral color and float off the price in ATR-scaled offset space, so side is read from triangle direction and ribbon position rather than color. They show the duration and completion of a pressure run and are not buy or sell signals. By default every completed run is marked with a triangle. A qualified event also carries a ribbon into its triangle and seeds a zone; a filtered turn — one that did not clear qualification — is marked identically but with no ribbon and no zone, so the triangle shows that an event occurred while the ribbon and zone show whether it earned a level. Show All Event Marks turns the filtered triangles on or off.
TREND LAYER
A second engine runs alongside the zones, with its own dual %R detection independent of the one above. Its pressure runs do not create zones; they set rails. A completed bullish run leaves a lower rail at its low, a completed bearish run leaves an upper rail at its high, and one of those rails is held as the defended level that owns the current trend state. A close beyond the defended level flips the campaign, but only when an opposing rail exists and price has cleared it; otherwise the campaign continues.
Two adaptive followers of the body-weighted midpoint support that state machine. The fast rail shortens its own averaging length as a bar's body sits further from it, so a displaced bar moves it most of the way in one bar. The structure rail uses the same formula with a longer base and sits inside a hysteresis channel scaled to a long-period ATR, so its direction holds through ordinary pullbacks and only turns when price crosses the far edge of that channel.
Between them these supply two transitions the defended level alone cannot make. Once a bullish event has set a campaign ceiling, a failure of the fast rail can end the campaign early at that ceiling. In the other direction, both rails turning up together can start a bullish campaign with no completed %R event at all. These rail-assisted transitions print a diamond alongside the flip triangle so they are distinguishable from a defended-level flip. A campaign entered by the rails alone carries no defended level and exits late by construction.
The plotted trend line is the fast rail, drawn in the campaign color rather than the rail's own direction, so the line's shape comes from the follower and its color from the campaign. An optional two-tier fill runs from price to the fast rail and from the fast rail out to the structure rail, each tier colored by its own source, so a disagreement between the two renders as a two-tone band. Optional sequence marks compare each completed rail event's extreme to the previous event on the same side and print HH, LH, HL or LL; these are instrumentation only and drive nothing.
CANDLE COLORS
Candles can optionally be recolored, in one of two modes.
Pressure mode carries the bar's own direction as hue and whether a %R pressure run is active as brightness, so a bearish bar inside a buying-pressure run stays a bright bearish candle and a developing push is visible on the candles themselves.
Wave mode drops bar direction and paints the campaign instead, reusing the trend line's own two colors so the candles and the line always agree. Three independent sources are then readable at once on the same bars: campaign state sets the candle's hue, an active %R pressure run sets its brightness, and the inner fill follows the fast rail's own direction. Because the fill is the only one of the three tied to the fast rail, a pullback inside a campaign renders as candle color standing against fill color, while an actual campaign flip changes the candles themselves. That is the distinction Wave exists to make. Wave draws nothing before the first campaign is established, since no trend state exists yet to color.
Both modes dim between pressure runs and brighten during them. This uses plotcandle, so native candles should be hidden in chart settings to avoid overlap. Turned off, it draws nothing and leaves the native candles untouched.
INFO PANEL
An optional corner panel reports three rows. RSI is colored relative to the current campaign rather than against fixed bands, since RSI ranges differently in an advance than in a decline; the color meaning is constant — one color when buyers hold RSI control, another when sellers do, and a neutral shade in between — while the bands themselves shift with the campaign. EVENTS counts every completed pressure run for the session. LEVELS counts how many of those earned structure, with the percentage being that earned share. That percentage largely reflects how demanding the current Event Mode is rather than a property of the instrument, so it reads as feedback on whether the mode suits what is being traded: a very low share suggests qualification is tighter than the instrument supports, and a very high one suggests it is filtering little. The panel frame carries the RSI color so the state reads from across the screen. The session count can include extended hours or regular hours only.
ALERTS
Two alert conditions are provided, one for a qualified bullish pressure event and one for a qualified bearish pressure event. Alerts fire only when a completed run clears PushBack's active qualification requirements and earns structure; filtered event marks do not alert. The trend layer does not carry its own alerts.
HOW TO READ IT
Read the zones as structure and the marks as events: every triangle is an event, and only the ones carrying a ribbon and a zone earned a level. PushBack keeps four things distinct: the pressure event is where a zone came from; price interaction is what has since happened to it; the current color and label are what the level means now; and ATR relevance decides whether it is shown at all. A currently visible zone may have originated much earlier, in a different role, than the state now displayed. Treat a blank area as the absence of currently relevant qualifying pressure structure, not a missing calculation. Use the live ribbon to watch a qualifying run develop. The completion triangle identifies where a pressure run ended; when that completion also qualifies, its ribbon remains, a structural zone is established, and the corresponding alert can fire.
The two layers are independent and can disagree. The zones and the trend campaign are computed from separate detections and neither gates the other, so a level forming against the prevailing campaign is a normal reading rather than a conflict to resolve.
LIMITATIONS
A zone is not created until its run completes, so the level is confirmed after the move that produced it, not during. The %R condition can persist for a long time in a strong trend, so a run's duration is not itself a timing signal. PushBack is most expressive on instruments that produce qualifying pressure events and is quiet on orderly price.
The trend layer's rail events carry no qualification of their own, so a very short pressure run can set a rail. Because two of its transitions are driven by the rails rather than by a completed event, the campaign can change direction with no %R event involved, and a campaign entered that way holds no defended level. Zone role changes are driven by subsequent price interaction, so a zone's displayed state reflects the bar being evaluated and changes as price develops. On very low-priced instruments a run whose bar ranges are near the minimum tick can produce a zone thin enough to render as a line rather than a band.
PushBack does not predict future prices, does not manage risk, and does not guarantee any outcome.
ATTRIBUTION AND LICENSE
PushBack's dual-period Williams %R detection is derived from the open-source "%R Trend Exhaustion" indicator by upslidedown, who is credited here and in the source code. That indicator reads the %R extreme as exhaustion; PushBack uses the same detection only as a raw event source and reinterprets the extreme as sustained directional pressure. The pressure-event qualification, the persistent zone construction and event-derived geometry, the support and resistance interpretation, the reclaim and testing lifecycle, flip management and retirement, relevance behavior, merging, the run ribbon, the candle coloring modes, the trend layer and its rails and transitions, and the price-overlay presentation are original to PushBack. PushBack is published open-source under the Mozilla Public License 2.0.
DISCLAIMER
PushBack's zones, marks and trend state are analytical structures derived from the rules described above, not recommendations to buy or sell any instrument. You remain solely responsible for every trading decision. อินดิเคเตอร์

ICT & SMC Guide [JPT]🔷 OVERVIEW
ICT & SMC Guide is an educational price-action indicator designed to organize key ICT (Inner Circle Trader) and SMC (Smart Money Concepts) ideas into a clear visual framework.
The indicator focuses on liquidity, session behavior, market structure, displacement, and Fair Value Gaps (FVGs), helping traders analyze potential setups through a structured top-down process.
🔷 HOW IT WORKS
The indicator continuously evaluates price action and highlights important ICT/SMC conditions.
When qualifying conditions appear, it can:
• Identify Asia, London & New York sessions
• Track important session highs and lows
• Detect potential Buy-Side Liquidity (BSL) and Sell-Side Liquidity (SSL) sweeps
• Identify Market Structure Shifts (MSS)
• Detect bullish and bearish displacement
• Highlight Fair Value Gaps (FVGs)
• Identify potential 2022 Model conditions
• Highlight potential FVG + $$$ Model setups
🔷 CORE CONCEPTS
The indicator brings several concepts together:
• Session Liquidity
• Liquidity Sweeps
• Buy-Side / Sell-Side Liquidity
• Market Structure
• Market Structure Shift
• Displacement
• Fair Value Gaps
• 2022 Model
• FVG + $$$ Model
• Trend Bias
🔷 VISUAL FEATURES
• Asia session range
• London session range
• New York session range
• Liquidity sweep markers
• Bullish and bearish FVG zones
• Market structure signals
• Bullish/Bearish setup labels
• Entry, Stop Loss & Target framework
• ICT & SMC information dashboard
• Optional EMA 50 / EMA 200 trend context
• Historical signals for chart review
🔷 ICT & SMC WORKFLOW
A common workflow is:
Liquidity → Sweep → Displacement → Structure Shift → FVG → Confirmation
Rather than treating every liquidity sweep or FVG as a trade, users can wait for multiple conditions to align before considering a setup.
🔷 USAGE
Identify the relevant session and liquidity range.
Watch for a liquidity sweep.
Look for displacement and a structure shift.
Check for a relevant FVG or model formation.
Review the potential trade framework.
Combine the indicator's information with your own market analysis and risk management.
🔷 MARKETS
The indicator can be applied to:
• Forex
• Cryptocurrency
• Indices
• Commodities
• Stocks
It can be used across multiple timeframes depending on the trader's analysis and strategy.
🔷 IMPORTANT NOTE
ICT & SMC Guide is designed as an educational market-structure and price-action tool. ICT/SMC concepts can be interpreted differently by traders, and no indicator can guarantee the outcome of a trade.
Always perform your own analysis, use appropriate risk management, and avoid relying on any single signal or model.
🔷 DISCLAIMER
This indicator is provided for educational and informational purposes only. It does not constitute financial, investment, or trading advice. Signals and levels are algorithmically generated and may be inaccurate or unsuitable for individual trading decisions. Past performance does not guarantee future results. Trade responsibly and manage your risk. อินดิเคเตอร์

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

Multi-Timeframe Structure Overlay [ITA]🟠 OVERVIEW
Multi-Timeframe Structure Overlay draws the structure of two higher timeframes
onto the chart you are actually trading.
Most multi-timeframe tools put the answer in a corner table: one hour bullish,
four hour bearish. That tells you the state but not where it sits, and price
does not trade against a table. Here the swing highs and lows those timeframes
are working with become lines on your chart, so you can see how far price is
from the level that would flip them.
Breaks are marked at the price where they happened, not in a corner.
🟠 CONCEPTS
* Higher Timeframe Structure - The swing highs and lows a larger timeframe has
confirmed. They are the levels that decide its direction, and they usually sit
somewhere your own timeframe never draws.
* Break of Structure - A close beyond the last confirmed swing in the direction
the timeframe was already going. Continuation.
* Change of Character - A break in the opposite direction to the previous one.
The first sign that the higher timeframe has turned, and marked separately
because it means something different.
* Bias - Which way each timeframe is currently pointing, based on its last
confirmed break. Shown as a small tag at the right edge rather than a panel.
* Alignment - Both higher timeframes pointing the same way. It has its own
alert, because that is usually the condition people are waiting for.
🟠 FEATURES
🔹 Two higher timeframes at once, each with its own colour, drawn as levels on
your chart rather than listed in a table
🔹 BOS and CHoCH labelled at the price where the break occurred, tagged with
which timeframe produced it
🔹 Bias tags at the right edge, offset from each other so they never overlap
🔹 A warning on the chart if a selected timeframe is lower than the one you are
viewing, instead of quietly drawing values that look plausible and mean nothing
🔹 Alignment alert for when both higher timeframes agree
🔹 Levels are requested with lookahead off and read from confirmed bars only,
so nothing shifts after the fact
🔹 Independent swing sensitivity, applied on each higher timeframe rather than
on your chart
🟠 HOW TO USE
Pick two timeframes above the one you are on. Working a 15 minute chart, one
hour and four hour is the usual pair. On a daily chart, use weekly and monthly.
Read the lines first. A higher timeframe level sitting just above price is the
level that flips its bias, and it is often nowhere near anything your own
timeframe would have drawn.
A CHoCH tag matters more than a BOS tag. Continuation is expected, a change of
character is the first evidence the larger move is turning.
When both bias tags point the same way, the higher timeframes agree. That is
the alignment alert, and it is usually a better filter than either timeframe on
its own.
Swing Lookback controls sensitivity on the higher timeframes. Raise it for
fewer and more significant levels.
🟠 CONCLUSION
Knowing the higher timeframe is bullish is not the same as knowing what price
has to do for that to change. This puts the second thing on the chart, where it
can actually be used. อินดิเคเตอร์

Breaker Block Identifier [algotim]Breaker Block Identifier is a market structure indicator that converts failed order block retests into scored, non-repainting breaker zones. Rather than flagging every order block that gets invalidated, the script requires a complete sequence of confirmed price events — order block formation, an opposing structure break, a retracement into the invalidated zone, and a failed retest of that zone — before a breaker is created, and then ranks the result with a transparent quality score.
Problem Statement
Order blocks are frequently invalidated by a structure break and later retested, but a retest failing to continue in the original direction is not automatically a tradable breaker block. Many public scripts draw a zone as soon as an order block is broken, without verifying that the subsequent retest actually failed, how deep that retest penetrated, or how convincingly price rejected the zone. This produces a high volume of low-quality zones that require manual filtering by the trader.
This indicator addresses that gap by treating breaker formation as a multi-stage state machine rather than a single condition, and by scoring every candidate that completes the sequence so weak retests can be filtered out programmatically instead of visually.
Methodology
Swing highs and lows are identified with ta.pivothigh/ta.pivotlow using a user-defined bar count on each side, so every structural level referenced by the script is a confirmed pivot, never a forming one.
An order block source candle is located as the last opposite-colored candle at or immediately before each confirmed swing pivot, within a fixed lookback. The candle must exceed a minimum size expressed as a multiple of ATR, and can optionally be required to close on above-average volume. Zone boundaries can be set to the candle body (open/close) or the full wick range (high/low).
Every order block candidate then moves through three internal states. In the Pending state the script waits for an opposing structure break (a close beyond the relevant swing high or low, optionally required to clear the level by a minimum ATR multiple). Once that break occurs the candidate becomes Flipped, and the script waits for price to retrace back into the now-invalidated zone. On entry into the zone the candidate becomes Retesting, and the script tracks the deepest penetration price reaches inside the zone on a bar-by-bar basis.
A Retesting candidate resolves in one of two ways. If price closes back through the zone in its original direction by the confirmation displacement threshold, the retest is judged to have held and the candidate is discarded with no breaker created. If price instead closes through the opposite edge of the zone by the same displacement threshold, and the tracked penetration depth met a minimum percentage of the zone's height (the Retest Qualification Filter), the retest is judged to have failed and the order block is converted into a breaker in the opposite direction of its original bias.
Each confirmed breaker is then scored from 0 to 100 using six independent, user-weighted factors: the displacement strength of the invalidating structure break, the ATR-relative size of the original order block candle, how closely the retest penetration matched a user-defined ideal depth (scored on a curve, so both shallow touches and near-total breaches score lower than a clean mid-zone tag), the wick-rejection ratio of the confirming candle, how quickly the retest resolved relative to the retest window, and the ATR-normalized distance price traveled before returning to retest. The six sub-scores are combined using auto-normalized weights, so a breaker only appears on the chart, gets drawn, and triggers alerts if it clears the configured minimum quality threshold.
Confirmed breakers remain in an Active/Touched state until price closes through the far edge of the zone by the invalidation displacement threshold, at which point the zone is marked invalidated, visually dimmed, and removed after a configurable linger period. A hard maximum-age limit and a per-direction cap on active zone count prevent unbounded object growth.
Signal Workflow
Step 1 — a confirmed swing pivot forms and an order block candidate is registered from the qualifying source candle behind it.
Step 2 — the candidate waits in a Pending state until an opposing structure break (BOS/CHoCH) closes beyond the originating swing level.
Step 3 — once flipped, the candidate waits for price to re-enter the invalidated zone, entering the Retesting state and tracking maximum penetration depth.
Step 4 — the retest resolves: a displacement close back through the zone in the original direction discards the candidate, while a displacement close through the opposite edge with sufficient penetration confirms a breaker.
Step 5 — the confirmed breaker is scored across six weighted factors and only drawn, labeled, and alerted on if it meets the minimum quality threshold.
Step 6 — the active breaker zone extends forward until price closes through its far edge by the invalidation displacement threshold, at which point it dims and is scheduled for removal.
Why This Indicator Is Different
Most public order block or breaker scripts draw a zone the moment an order block is invalidated by a structure break, without separately validating whether the ensuing retest actually failed.
This script models breaker formation as an explicit four-state pipeline (source candle, pending, flipped, retesting) and only creates a zone after the retest resolves against its original direction with a minimum measured penetration depth.
The Breaker Quality Score converts six independently disclosed factors, including retest penetration depth scored on a curve around a configurable ideal value rather than a simple threshold, into a single adjustable ranking rather than a cosmetic label.
Quality-score weighting is fully exposed, allowing the ranking to be tuned toward structure strength, retest precision, wick rejection, confirmation speed, or impulse distance depending on the trader's approach.
Zone fill transparency scales with the quality score, so higher-ranked breakers render more opaque and lower-ranked ones fade into the background without adding separate visual elements.
An optional formation preview renders the retest phase of a candidate before it resolves, giving visibility into why a breaker did or did not form without permanently cluttering the chart.
Inputs
Structure Settings
Swing Pivot Length
Displacement Filter on Structure Break
Structure Break Displacement (x ATR)
ATR Length
Order Block Detection
Use Candle Body for Zone Boundaries
Min Order Block Size (x ATR)
Candidate Expiry (bars)
Volume Confirmation Filter
Volume MA Length
Volume Multiplier Threshold
Breaker Conversion Rules
Retest Window (bars)
Confirmation Displacement (x ATR)
Min Retest Penetration (%)
Quality Score
Filter Breakers by Quality Score
Minimum Quality Score
Ideal Retest Penetration Ratio
Advanced weight sliders for structure break strength, impulse size, retest precision, wick rejection, confirmation speed, and distance traveled
Visual Settings
Bullish/Bearish Breaker Colors
Min/Max Fill Transparency
Show Zone Midline
Show Quality Label
Label Size
Formation Preview toggle and color
Lifecycle & Cleanup
Max Active Breakers (per side)
Invalidation Displacement (x ATR)
Invalidated Linger (bars)
Max Breaker Age (bars)
Info Panel
Show Info Panel
Panel Position
Alerts
Alerts are available for:
Bullish Breaker Block formed
Bearish Breaker Block formed
Structure confirmation on breaker conversion
Price entering an active breaker zone
Breaker invalidated
Practical Usage
Use the info panel's structure bias reading as directional context before evaluating individual breaker zones.
Treat a fresh, high-quality breaker aligned with the prevailing structure bias as a potential continuation zone rather than a standalone entry signal.
Raise the minimum quality threshold on lower timeframes or noisy instruments to reduce the number of marginal zones drawn.
Use the retest penetration and displacement settings together to control how strict the failed-retest qualification is for your instrument and timeframe.
Combine the alert feed with a broader trade plan, since each alert marks a structural event, not an execution signal.
Limitations
Swing pivots require bars to form on both sides before they confirm, so structure breaks and order block placement are inherently delayed by the swing pivot length.
The order block source candle is located within a fixed lookback behind each pivot; if no qualifying candle exists in that window, no candidate is created for that pivot.
Quality scoring is a relative ranking based on disclosed, adjustable factors and does not predict the outcome of any individual breaker zone.
Volume-based filtering depends on the data provider's reported volume and may behave inconsistently on instruments with limited or unreliable volume data.
As with any structure-based tool, results will vary across instruments, timeframes, and market regimes.
Notes
This indicator is a market structure analysis tool intended to organize and rank breaker block formation through a disclosed, multi-stage validation process.
All structure breaks, state transitions, breaker confirmations, and invalidations are evaluated on confirmed bar closes only, so no element of the script repaints once drawn.
The output is intended to support structural analysis and is not a standalone buy or sell recommendation. อินดิเคเตอร์

Buy/Sell ZonesBuy/Sell Zones
Overview
Buy/Sell Zones is a market structure indicator designed to identify potential shifts in directional order flow through Change of Character (CHOCH) events.
When a confirmed swing level is broken in the opposite direction of the previous structural break, the indicator creates a new:
BUY ZONE after a bullish CHOCH.
SELL ZONE after a bearish CHOCH.
Each zone includes a structure-break line, a directional range box, an entry level, projected range targets, optional confirmation filters, deviation markers, alerts, and a reference-asset HUD.
The indicator is not designed to predict every market reversal. Its purpose is to provide a structured visual framework for analyzing transitions between bullish and bearish market conditions.
Market Structure Detection
Swing highs and lows are detected using a configurable fractal length.
The default Fractal Length is 12. A higher value produces fewer but more significant structural levels, while a lower value reacts more quickly to short-term price action.
A structure break can be confirmed in two ways:
Close Beyond Level: The candle must close beyond the swing level.
Wick Beyond Level: The candle only needs to trade beyond the swing level.
Requiring a candle close generally produces fewer and more conservative signals.
CHOCH Logic
The indicator tracks the direction of the most recent structural break.
A bullish break following a bearish structural state creates a BUY ZONE.
A bearish break following a bullish structural state creates a SELL ZONE.
Repeated breaks in the same direction update the structural state but do not automatically create another CHOCH zone.
BUY and SELL Zone Boxes
The directional boxes are designed to display the complete price range between the originating structure level and the candle that breaks it.
BUY ZONE Box
For a bullish structure break:
The left edge begins at the pivot-high candle.
The right edge ends after the candle that breaks the pivot high.
The upper boundary is the broken pivot-high level.
The lower boundary is the lowest wick formed between the pivot and the breakout candle.
The box uses the bullish color scheme.
SELL ZONE Box
For a bearish structure break:
The left edge begins at the pivot-low candle.
The right edge ends after the candle that breaks the pivot low.
The lower boundary is the broken pivot-low level.
The upper boundary is the highest wick formed between the pivot and the breakdown candle.
The box uses the bearish color scheme.
The box borders use a dotted style to keep the zones visible without making the chart excessively heavy.
Structure Lines and Zone Labels
Every accepted zone includes a directional line connecting the originating pivot to the structure-breaking candle.
BUY ZONE: Green structure line with the label positioned above it.
SELL ZONE: Red structure line with the label positioned below it.
The label is placed near the time-based midpoint of the structure line.
The Zone Label Distance (ATR) setting controls the vertical distance between the label and the line. Because the distance is normalized with ATR, the label placement adapts to different assets, prices, and volatility conditions.
Entry Level
The midpoint of the CHOCH signal candle’s range is treated as a potential entry reference.
Bullish CHOCH midpoint: LONG ENTRY LEVEL
Bearish CHOCH midpoint: SHORT ENTRY LEVEL
This is a reference level rather than an automatic trade signal. Traders may combine it with retests, lower-timeframe confirmation, volume behavior, candle structure, or their own risk-management model.
Range Projection Levels
The signal candle’s full high-to-low range is used as the projection unit.
The indicator initially displays:
+0.5
+1
+1.5
+2
+3
+4
-0.5
-1
-1.5
-2
-3
-4
These levels can be used as potential reaction areas, expansion targets, profit-management references, or invalidation zones.
Automatic Long-Trend Expansion
To support extended directional moves, additional levels are activated automatically:
When price trades above +4, the indicator reveals +5, +6, +7, and +8.
When price trades below -4, the indicator reveals -5, -6, -7, and -8.
The additional levels remain hidden until the corresponding +4 or -4 boundary is crossed.
Optional Filters
All filters are optional and can be enabled independently.
VWAP Direction Filter
When enabled:
BUY ZONE creation requires price to close above the session VWAP.
SELL ZONE creation requires price to close below the session VWAP.
The VWAP line can be displayed separately.
EMA Trend Filter
The EMA filter is disabled by default, with a default length of 20.
When enabled:
BUY ZONE creation requires price to be above the EMA.
SELL ZONE creation requires price to be below the EMA.
Relative Volume Filter
This filter compares current volume with average volume.
A zone is rejected when current volume is below the selected multiple of its moving average.
This can help remove structure breaks that occur during relatively weak participation. It may be less useful on instruments that do not provide reliable centralized volume data.
ATR Zone-Size Filter
The signal candle’s range is normalized against ATR.
Zones can be rejected when their signal candles are:
Too small relative to current volatility.
Excessively large relative to current volatility.
This helps prevent unusually narrow or highly extended candles from generating unwanted zones.
Confirmed-Bar Filter
When enabled, a zone is created only after the structure-breaking candle has closed.
This reduces intrabar signal changes and is particularly useful for alerts.
Minimum Bars Between Zones
A configurable cooldown can be applied between accepted CHOCH zones.
This is useful for reducing clustered signals during sideways or highly volatile conditions.
Return-to-Range Detection
The indicator can monitor price movement beyond the outer +4 and -4 boundaries.
If price trades above +4 and later closes back inside the active range, a bearish return-to-range event is detected.
If price trades below -4 and later closes back inside the active range, a bullish return-to-range event is detected.
The visual marker is disabled by default and can be enabled from the Deviation Marker settings.
Return-to-range detection does not automatically imply a reversal. It identifies a possible failed expansion or deviation that may require additional confirmation.
Reference Asset Zone HUD
The indicator includes a configurable HUD that tracks the latest structural zone of another asset on the current chart timeframe.
The HUD displays:
Selected reference asset.
Reference asset’s current BUY or SELL zone.
Mapped signal for the chart.
Current timeframe.
Direct or inverse mapping mode.
The HUD size can be set to:
Tiny
Small
Normal
Large
The default size is Normal.
Why Is USDT Dominance the Default Reference?
The default reference symbol is:
CRYPTOCAP:USDT.D
USDT Dominance represents the percentage of the total cryptocurrency market capitalization held in Tether.
It is commonly monitored as a broad crypto risk-flow reference:
Rising USDT.D can indicate that capital is moving toward stablecoins and away from risk assets.
Falling USDT.D can indicate that capital is rotating from stablecoins into cryptocurrencies.
For this reason, the HUD uses inverse mapping by default:
USDT.D BUY ZONE → Chart SELL ZONE
USDT.D SELL ZONE → Chart BUY ZONE
For example, when analyzing BTC, ETH, or another cryptocurrency, a bullish structural state in USDT.D may represent defensive capital flow and therefore map to a bearish signal for the crypto chart.
This relationship is not constant and can weaken or temporarily reverse. The reference HUD should be used as contextual confirmation rather than as an independent entry system.
Reference Ideas for Other Markets
Any TradingView-supported symbol can be selected as the HUD reference asset.
Gold Traders
Gold traders may consider monitoring:
TVC:DXY — U.S. Dollar Index
TVC:US10Y — U.S. 10-Year Treasury Yield
A directly related gold instrument or futures contract
Gold frequently has an inverse relationship with the U.S. dollar. Therefore, traders using DXY as the reference may prefer inverse mapping:
DXY BUY ZONE → Gold SELL bias
DXY SELL ZONE → Gold BUY bias
Treasury yields can also affect gold, but the relationship may change depending on inflation expectations, real yields, monetary policy, and risk sentiment.
Nasdaq Traders
Nasdaq traders may consider:
CBOE:VIX — Volatility Index
TVC:US10Y — U.S. 10-Year Treasury Yield
TVC:DXY — U.S. Dollar Index
NASDAQ:QQQ or a related Nasdaq futures symbol for direct confirmation
The VIX is generally used with inverse mapping:
VIX BUY ZONE → Nasdaq SELL bias
VIX SELL ZONE → Nasdaq BUY bias
Higher Treasury yields can pressure growth and technology stocks, but this relationship is regime-dependent. DXY may also influence risk assets and multinational technology companies, although it should not be treated as a fixed inverse signal.
When using a positively correlated reference asset, disable Invert Reference Signal to use direct mapping.
Alerts
The indicator provides three optional alert conditions:
BUY Zone Created
Triggered when a new BUY ZONE passes all enabled filters and is created.
SELL Zone Created
Triggered when a new SELL ZONE passes all enabled filters and is created.
Price Returning to Range
Triggered when price trades beyond +4 or -4 and subsequently closes back inside the active range.
Each alert can be enabled or disabled independently from the indicator settings.
After enabling an alert option, create the corresponding alert through TradingView’s alert dialog. Using Once Per Bar Close is recommended when confirmed signals are preferred.
Important Usage Notes
Pivot-based market structure requires future bars to confirm a swing. Signals are therefore intentionally delayed by the selected pivot strength.
Confirmed historical pivots do not change after confirmation.
Break conditions can change during a live candle when the confirmed-bar filter is disabled.
The reference HUD uses the chart timeframe.
Relationships between markets are dynamic and may change across volatility, liquidity, macroeconomic, and monetary-policy regimes.
Enabling multiple strict filters can significantly reduce the number of zones.
The indicator does not calculate position size, stop loss, risk-to-reward, commission, slippage, or portfolio exposure.
Disclaimer
This indicator is provided for informational and educational purposes only. It does not constitute financial, investment, trading, or legal advice and should not be interpreted as a recommendation to buy or sell any asset. Market structure signals, projected levels, reference-asset relationships, and inverse correlations can fail or change without warning. Historical performance and visual examples do not guarantee future results. Always perform your own research, confirm signals independently, use appropriate risk management, and consult a qualified financial professional before making trading or investment decisions. The user assumes full responsibility for all trading decisions, profits, and losses. อินดิเคเตอร์

Pivot MA StructurePivot MA Structure— Complete User Guide
1. General Purpose
This indicator combines several independent market-reading components into one framework:
Pivot-controlled directional moving averages
Bullish and Bearish market-structure shifts
Pre-break structure candidates
Trend-continuation markers
Shift-direction MA retests
Anchored VWAP equilibrium
RSI 50 equilibrium
Fair Value Gaps and breakers
Long/Short health scores
A real-time information dashboard
Selectable alerts
It is an indicator, not an automated strategy. It does not place orders, calculate position size, or automatically manage stop-loss and take-profit orders.
Its primary objective is to answer five questions:
What is the latest structural direction?
Which directional Pivot MA is currently active?
Do structure and the active MA agree?
Do VWAP and RSI support the same direction?
Is there a suitable continuation or retest location for entry?
2. The Core Reading Model
The indicator separates market information into three layers.
Structural layer
This layer detects:
Bullish Shift
Bearish Shift
Bullish continuation
Bearish continuation
Unbroken bullish and bearish candidates
A Shift represents a change in the direction of confirmed structure breaks.
Directional MA layer
This layer determines whether the active moving-average condition is:
Bullish
Bearish
Ghost/inactive
Still waiting for a valid pivot
Only one directional MA can be active at a time.
Confirmation layer
The following secondary filters measure the quality of the directional condition:
Anchored VWAP
RSI relative to 50
Fair Value Gaps
Directional MA retests
Health score
A structural signal does not automatically imply that all confirmation filters agree.
3. Pivot Moving Average System
Default settings
MA type: EMA
MA length: 50
Pivot strength: 5
Pivot qualification: All Confirmed Pivots
Source: Pivot Side
The MA type can be changed to:
EMA
SMA
WMA
RMA
HMA
Pivot Side source
When MA Source = Pivot Side:
The bullish MA is calculated from low.
The bearish MA is calculated from high.
This creates two distinct directional averages:
Green MA for bullish conditions
Red MA for bearish conditions
If Close or HL2 is selected, both averages use the selected common source.
How a Pivot MA is created
A bullish Pivot MA becomes available after a qualifying confirmed low pivot.
A bearish Pivot MA becomes available after a qualifying confirmed high pivot.
The pivot does not become known immediately. With Pivot Strength set to 5, the system requires five bars on the right side of the pivot before confirming it.
Therefore, pivot activation is intentionally delayed.
Pivot Qualification
All Confirmed Pivots
This is the default mode.
Every confirmed low pivot can refresh the bullish MA state.
Every confirmed high pivot can refresh the bearish MA state.
This allows higher lows in an uptrend to reactivate the bullish side and lower highs in a downtrend to refresh the bearish side.
HH / LL Only
This is a more selective mode.
A bearish MA trigger requires a pivot high above the previous pivot high.
A bullish MA trigger requires a pivot low below the previous pivot low.
This mode generates fewer MA refresh events and may leave an MA in ghost mode for longer.
4. Active and Ghost MA Logic
Active bullish MA
The bullish MA is eligible to become active when:
The bullish MA exists.
It has not remained locked by an unresolved break.
Price is at or above the bullish MA.
The bullish MA is rising.
Active bearish MA
The bearish MA is eligible when:
The bearish MA exists.
It has not remained locked by an unresolved break.
Price is at or below the bearish MA.
The bearish MA is falling.
One active MA at a time
The indicator does not allow both MAs to be active simultaneously.
If only the bullish side is eligible:
Bullish MA becomes active.
Bearish MA becomes ghost.
If only the bearish side is eligible:
Bearish MA becomes active.
Bullish MA becomes ghost.
If neither side is eligible:
Both lines can appear as ghost lines.
If both sides are technically eligible during compression:
A new bearish pivot or downward bar movement gives priority to the bearish MA.
Otherwise, the bullish MA receives priority.
Active line thickness
The active directional MA is always displayed one step thicker than a ghost MA.
This allows the currently accepted directional condition to be identified visually without relying only on color.
Ghost lines
A ghost line is a faded directional MA.
Ghost status means that the MA still exists and is still calculated, but it is not currently accepted as the active directional condition.
A ghost line is not frozen. Its value continues to move because the underlying MA calculation continues.
MA break behavior
The bullish MA is broken when price crosses below it according to the selected break confirmation.
The bearish MA is broken when price crosses above it.
The break method can be:
Close: requires the closing price to cross the MA.
Wick: reacts to the bar’s low or high crossing the MA.
After a genuine break, the line becomes ghosted. A new qualifying same-side pivot can reset its broken state.
5. Market Structure Engine
Default structure length
Structure Length: 12
The engine uses an odd-length fractal model. An even input is internally advanced to the next odd number.
Therefore:
Input 12 becomes an internal 13-bar fractal.
Pivot strength becomes 6 bars on each side.
This is different from using 12 left bars and 12 right bars. It is a full fractal-window interpretation.
Confirmed structure pivots
The engine continuously tracks:
Latest confirmed fractal high
Latest confirmed fractal low
These become potential break candidates.
A structure pivot appears only after its required right-side bars have completed.
6. Candidate Lines
Bullish Break Candidate
A confirmed fractal high creates a bullish break candidate.
It is displayed as:
Green dotted line
Bullish Break Candidate text above the line
This level represents the price that must be exceeded for an upward structure break.
Bearish Break Candidate
A confirmed fractal low creates a bearish break candidate.
It is displayed as:
Red dotted line
Bearish Break Candidate text below the line
This level represents the price that must be broken for a downward structure break.
Candidate projection
The default projection is five bars to the right.
The candidate does not extend infinitely. On every new bar:
Its right endpoint moves forward.
It remains five bars ahead of the current bar.
It stops when broken or replaced by a newer same-side pivot.
Candidate replacement
When a newer confirmed pivot of the same side appears:
The previous unbroken candidate is deleted.
A new candidate begins from the newer pivot.
This ensures that the chart emphasizes the latest actionable structure level.
7. Bullish and Bearish Shift Logic
The internal logic follows a CHoCH-style direction-change model, but the chart does not display the word “CHoCH.”
It uses:
Bullish Shift
Bearish Shift
Bullish Shift
A Bullish Shift occurs when:
The last confirmed structure break was downward.
Price subsequently breaks the latest unbroken fractal high.
The break can be confirmed by:
Close above the level, or
Wick above the level
depending on the selected Break Confirmation.
When confirmed:
The candidate line ends at the breakout bar.
The line becomes a stronger green dotted shift segment.
Bullish Shift appears above the middle of the segment.
The dashboard’s Latest Shift changes to Bullish Shift.
The bullish retest detector becomes armed.
Bearish Shift
A Bearish Shift occurs when:
The last confirmed structure break was upward.
Price subsequently breaks the latest unbroken fractal low.
When confirmed:
The candidate line ends at the breakdown bar.
It becomes a stronger red dotted shift segment.
Bearish Shift appears below the middle of the line.
The dashboard changes to Bearish Shift.
The bearish retest detector becomes armed.
First structure break
The first break establishes the initial direction.
Because no previous opposite break exists, it is not classified as a Shift.
It is treated as a continuation break and receives a directional triangle.
8. Trend-Continuation Triangles
The indicator does not draw BOS lines.
Instead, a same-direction continuation break is marked directly on the breaking candle.
Bullish continuation
A bullish continuation is shown as:
Green upward triangle
Located below the breakout candle
It means that an upward break occurred without reversing the previous break direction.
Bearish continuation
A bearish continuation is shown as:
Red downward triangle
Located above the breakdown candle
It means that a downward break occurred without reversing the previous break direction.
How to interpret continuation marks
Continuation triangles are not fresh reversal signals.
They are better interpreted as confirmation that the existing structural direction is continuing.
A continuation marker is generally more useful when:
The matching directional MA is active.
Price is on the correct side of VWAP.
RSI supports the same direction.
The breakout is not entering directly into an opposing FVG or major swing level.
Avoid treating every continuation triangle as an automatic market entry. Entering immediately after an extended breakout can create poor risk-to-reward.
9. Directional MA Retest — “R” Marker
Important definition
In the current version, the R marker detects a retest of the same-direction Pivot MA, not the horizontal dotted shift line.
After a Bullish Shift:
The indicator monitors the green bullish Pivot MA.
After a Bearish Shift:
It monitors the red bearish Pivot MA.
Bullish retest
After a Bullish Shift, the retest detector waits for a later candle whose range intersects the green bullish MA:
Candle low is at or below the MA.
Candle high is at or above the MA.
When the first valid touch occurs:
A green R appears below the candle.
The bullish retest alert can trigger.
The retest detector stops waiting until a new Shift occurs.
The green line can be active or ghost. The retest detector only requires the corresponding bullish MA to exist.
Bearish retest
After a Bearish Shift, the first later candle that intersects the red bearish MA produces:
A red R
Located above the candle
A bearish retest alert opportunity
Why an R may not appear
An R will not appear when:
No valid Bullish or Bearish Shift has occurred.
The contact happens on the Shift candle itself.
The candle does not actually intersect the MA value.
The first retest after that Shift has already been marked.
A new opposite Shift replaced the previous retest direction.
The corresponding directional MA does not yet exist.
Show Directional MA Retests is disabled.
The visual toggle does not disable the underlying alert calculation.
10. Anchored VWAP Equilibrium
Default status
The VWAP line is enabled by default.
Available anchors
Session
Week
Month
Session
The VWAP resets with the daily/session boundary.
Week
The VWAP resets at the beginning of each week.
Month
The VWAP resets at the beginning of each month.
Horizontal VWAP presentation
The indicator does not plot the entire conventional curved VWAP history.
Instead, it takes the latest anchored VWAP value and displays it as a horizontal equilibrium reference.
Default presentation:
100 bars to the left
10 bars to the right
VWAP label on the right
Dashed neutral-colored line
The right-side length and label offset are adjustable.
Bullish interpretation
Price above VWAP suggests that current price is trading above the volume-weighted equilibrium.
This supports a bullish setup.
Bearish interpretation
Price below VWAP suggests that price is trading below the volume-weighted equilibrium.
This supports a bearish setup.
VWAP as a trade-management filter
For an existing long:
Remaining above VWAP supports the health of the position.
Losing VWAP removes one bullish health point.
Reclaiming VWAP can restore that point.
For an existing short:
Remaining below VWAP supports the bearish condition.
Moving above VWAP weakens the short health score.
VWAP alone is not an entry or exit signal. It is an equilibrium filter.
11. RSI 50 Price Equilibrium
Default settings
RSI Length: 14
RSI line: enabled
Midpoint: 50
HUD interpretation
RSI at or above 50 is bullish.
RSI below 50 is bearish.
Horizontal RSI 50 price line
A literal RSI value of 50 cannot be plotted meaningfully on the same price scale as BTC, forex, or commodities.
Therefore, the indicator stores the closing price where RSI most recently crossed 50.
That price becomes the RSI 50 horizontal equilibrium level.
It represents the latest price associated with a momentum-regime transition.
The line:
Is green when the current RSI is above 50.
Is red when the current RSI is below 50.
Extends a configurable number of bars left and right.
Has an offset label on the right.
Practical use
For a long position:
RSI above 50 supports positive momentum.
RSI falling below 50 reduces long health.
For a short position:
RSI below 50 supports negative momentum.
RSI reclaiming 50 reduces short health.
RSI 50 should be used as confirmation, not as a standalone trigger.
12. Fair Value Gap Engine
The FVG engine is enabled by default.
It supports:
Standard FVG mode
Breaker mode
Bullish and bearish zones
ATR threshold filtering
Multiple mitigation methods
Overlap filtering
Midlines
Optional right extension
Optional raid tracking
Bullish FVG
A bullish FVG is created when the current low is above the high from two bars earlier, producing a three-candle imbalance.
The engine also applies the selected ATR threshold to filter insignificant gaps.
A bullish FVG is normally interpreted as:
An imbalance below price
A possible pullback support area
A potential location for bullish continuation or mitigation
Bearish FVG
A bearish FVG is created when the current high is below the low from two bars earlier.
It is generally interpreted as:
An imbalance above price
A possible resistance area
A potential bearish pullback or mitigation location
Show Last
Show Last determines how many recent bullish and bearish FVGs are displayed.
With a value of 5, the engine can show:
Five recent bullish zones
Five recent bearish zones
subject to mitigation and overlap removal.
Threshold
The threshold applies an ATR-based significance filter.
A value of 0 accepts all qualifying gaps.
Higher values require a stronger displacement relative to ATR.
Increasing the threshold generally produces fewer but more significant FVGs.
Mitigation modes
Close
Uses the candle body boundary as the mitigation trigger.
For a bullish FVG, the body must penetrate below the relevant lower boundary.
For a bearish FVG, the body must penetrate above the relevant upper boundary.
Wick
Uses the candle’s full high/low range.
This is the most sensitive mitigation method.
Avg
Uses the midpoint of the gap.
This treats a move through the FVG’s average price as mitigation.
FVG mode
In standard FVG mode:
The zone remains visible while active.
It is removed when the selected mitigation condition is satisfied.
Breakers mode
In Breakers mode:
The original FVG is tracked.
When mitigated, it becomes a breaker.
Its directional display changes to the opposite-side color.
It remains until the breaker’s opposite invalidation condition occurs.
Hide Overlap
When enabled, overlapping FVGs are filtered.
The newest FVG is compared against:
Older FVGs in the same direction
FVGs in the opposite direction
Overlapping stored zones can be removed to reduce visual clutter.
Midline
When enabled, the midpoint of each FVG is displayed.
The midpoint can be useful as:
A partial mitigation level
A mean-reversion reference
A refined entry or invalidation location
Extend FVG
When disabled, FVG drawings end at the current bar.
When enabled, active FVG zones extend to the right.
Display Raids
Raid tracking looks for liquidity interactions around an active FVG.
For a bullish FVG, it can track a move below the upper FVG boundary followed by a close back above it.
For a bearish FVG, it can track a move above the lower boundary followed by a close back below it.
Raid locations are displayed with a line and an x marker.
13. Information HUD
The information table summarizes the indicator’s current state.
Latest Shift
Possible values:
Bullish Shift
Bearish Shift
Waiting
This row stores the most recent genuine opposite-direction structure break.
It does not reset to neutral after a few bars. It remains bullish or bearish until an opposite Shift occurs.
Bullish Pivot MA
Possible values:
Waiting
Active
Ghost
Waiting
No qualifying bullish pivot has created the bullish MA state yet.
Active
The bullish MA currently satisfies the directional activation logic.
Ghost
The bullish MA exists but is not currently accepted as active.
Bearish Pivot MA
Uses the same status definitions for the red bearish MA.
Shift + MA
Possible values:
Bullish Match
Bearish Match
No Match
Bullish Match
Requires:
Latest Shift is bullish.
Bullish Pivot MA is active.
Bearish Match
Requires:
Latest Shift is bearish.
Bearish Pivot MA is active.
No Match
Structure and the active directional MA do not currently agree.
This is a warning that the setup lacks core confluence.
VWAP
Possible values:
Price Above
Price Below
Unavailable
This reports the current price’s relationship with the selected anchored VWAP.
RSI
Displays:
Current RSI value
Above 50 or Below 50
Example:
56.4 / Above 50
Long Health
The long score counts currently satisfied bullish conditions.
Short Health
The short score counts currently satisfied bearish conditions.
Composite Bias
Possible values:
Bullish
Bearish
Balanced
The result is determined by comparing Long Health with Short Health.
Long Health greater than Short Health → Bullish
Short Health greater than Long Health → Bearish
Equal values → Balanced
Composite Bias is a comparison of rule counts, not a forecast.
14. Health Score Calculation
With all default score filters enabled, each side has four factors.
Long Health factors
One point is awarded for each condition:
Latest Shift is Bullish.
Bullish Pivot MA is active.
Price is above VWAP.
RSI is at or above 50.
Short Health factors
One point is awarded for each condition:
Latest Shift is Bearish.
Bearish Pivot MA is active.
Price is below VWAP.
RSI is below 50.
Score examples
100% — 4/4
All directional conditions agree.
This is the strongest confluence state produced by the dashboard.
It does not mean the trade has a 100% probability of success.
75% — 3/4
The setup is directionally favorable, but one filter disagrees.
Examples:
Bullish Shift and bullish MA are aligned, but RSI is below 50.
Bearish structure is aligned, but price is still above VWAP.
50% — 2/4
The condition is mixed.
This often occurs during:
Transition
Consolidation
Pullback
Delayed confirmation
Conflict between structure and momentum
25% — 1/4
Only one filter supports the direction.
This is generally a weak environment for initiating a new position.
0% — 0/4
None of the directional filters support that side.
Disabling score filters
If VWAP is removed from the score, the denominator decreases.
If RSI is also removed, only two core factors remain:
Shift direction
Active directional MA
The displayed percentage automatically adjusts to the number of enabled factors.
Important limitation
Health is a confluence percentage, not a statistically measured win probability.
A 100% Long Health reading means four out of four programmed bullish conditions are true. It does not mean the market has a 100% chance of rising.
15. Suggested Long Entry Framework
Core long condition
The preferred long environment is:
Latest Shift = Bullish Shift
Bullish Pivot MA = Active
Shift + MA = Bullish Match
This is the minimum structural and directional agreement.
Additional confirmation
A higher-quality long condition may also include:
Price above VWAP
RSI above 50
Long Health at 75% or 100%
Bullish FVG below or around the entry
No large bearish FVG immediately above
A green R retest marker
Aggressive long entry
An aggressive trader may enter near the Bullish Shift breakout.
Risks:
The breakout may be extended.
Stop distance may be large.
Price may return to the broken structure or MA before continuing.
Conservative long entry
A more conservative sequence is:
Bullish Shift appears.
Bullish MA becomes active or remains directionally valid.
Price stays above or reclaims VWAP.
RSI remains above or reclaims 50.
Price pulls back into the green MA.
A green R appears.
The retest candle shows rejection or closes constructively.
This avoids chasing the initial breakout.
Continuation entry
A green triangle can support a continuation entry when:
The dashboard already has bullish alignment.
Price is not excessively extended above the MA.
The continuation break has room before the next bearish FVG or swing resistance.
A triangle by itself is not enough.
16. Suggested Short Entry Framework
Core short condition
The preferred short environment is:
Latest Shift = Bearish Shift
Bearish Pivot MA = Active
Shift + MA = Bearish Match
Additional confirmation
A higher-quality short may include:
Price below VWAP
RSI below 50
Short Health at 75% or 100%
Bearish FVG above or near the entry
No major bullish FVG immediately below
A red R retest marker
Conservative short entry
A conservative bearish sequence is:
Bearish Shift appears.
Bearish Pivot MA becomes active.
Price remains below or rejects VWAP.
RSI remains below 50.
Price rallies back into the red MA.
A red R appears.
The retest candle rejects the MA or closes bearishly.
17. How to Stay in a Position
Staying in a long
A long remains structurally healthier while:
Latest Shift remains bullish.
Bullish Pivot MA remains active.
Price remains above VWAP.
RSI remains above 50.
Long Health remains at 75% or 100%.
Bullish FVGs below price continue to act as support.
No Bearish Shift is created.
Early long weakness
Potential deterioration begins when:
RSI falls below 50.
Price falls below VWAP.
Bullish MA becomes ghost.
Long Health falls from 100% to 75% or 50%.
One lost factor is not necessarily an exit. It is a warning that confluence is decreasing.
Strong long invalidation
More serious invalidation can include:
Bearish Shift
Bearish Match
Bullish MA break
Price remaining below VWAP
RSI remaining below 50
Bullish FVG support being fully mitigated
Staying in a short
A short remains healthier while:
Latest Shift remains bearish.
Bearish MA remains active.
Price remains below VWAP.
RSI remains below 50.
Short Health remains high.
Bearish FVGs above price act as resistance.
No Bullish Shift appears.
Strong short invalidation
Potential invalidation includes:
Bullish Shift
Bullish Match
Bearish MA break
Sustained price above VWAP
RSI above 50
Bearish FVG resistance being invalidated
18. Stop-Loss and Profit Management
The indicator does not place stops or targets.
Possible stop references include:
For long trades
Below the retest candle low
Below the latest confirmed swing low
Below the bullish FVG
Below the bullish MA with an ATR buffer
Below the structure level that would invalidate the setup
For short trades
Above the retest candle high
Above the latest swing high
Above the bearish FVG
Above the bearish MA with an ATR buffer
Possible profit references
Previous swing high/low
Opposing FVG
Major VWAP deviation area
Fixed risk-to-reward target
Partial exit at 1R and trailing remainder
Opposite Shift
Health score deterioration
Stops should not be moved farther away simply to avoid accepting a loss.
19. Alerts
The script provides selectable conditions for:
Bullish Shift Created
Bearish Shift Created
Bullish Directional MA Retest
Bearish Directional MA Retest
Bullish Pivot MA Broken
Bearish Pivot MA Broken
Bullish Shift + Bullish MA alignment
Bearish Shift + Bearish MA alignment
Alert toggles
The shift and retest alerts have individual enable/disable inputs.
These settings control whether the corresponding alert condition can trigger.
Important TradingView behavior
Enabling an alert condition in the indicator settings does not automatically create a TradingView alert.
You must still:
Open TradingView’s alert dialog.
Select the indicator.
Select the desired alert condition.
Choose the frequency.
Create the alert.
For confirmed signals, using Once Per Bar Close is generally the most consistent choice.
20. Repainting and Confirmation Considerations
Pivot delay
Confirmed pivots require future right-side bars.
This means:
Pivot signals are delayed.
Once confirmed, the historical pivot itself is stable.
The indicator does not know a pivot at the exact moment the pivot bar first forms.
Bar-close confirmation
Confirm Signals On Bar Close is enabled by default.
This reduces intrabar signal changes for:
MA breaks
Structure breaks
Shift creation
Retests
Intrabar movement
The current MA, VWAP, RSI, and live candidate values may still visually move while the current candle is forming.
Using bar-close confirmation does not freeze the current bar’s underlying price calculations.
FVG evolution
FVGs can disappear when:
Mitigated
Invalidated
Removed by overlap filtering
Excluded by the Show Last setting
This is normal lifecycle behavior, not necessarily historical repainting.
21. Practical Decision Hierarchy
A disciplined way to use the indicator is:
Step 1 — Identify structure
Check Latest Shift.
Bullish Shift → prioritize long ideas.
Bearish Shift → prioritize short ideas.
Waiting → insufficient shift history.
Step 2 — Confirm the directional MA
Check Shift + MA.
Bullish Match → bullish structure and MA agree.
Bearish Match → bearish structure and MA agree.
No Match → wait or reduce conviction.
Step 3 — Check equilibrium
For longs:
Prefer price above VWAP.
Prefer RSI above 50.
For shorts:
Prefer price below VWAP.
Prefer RSI below 50.
Step 4 — Check location
Use:
Directional MA retest
FVG support/resistance
Recent swing levels
VWAP
A good directional idea entered at a poor location can still have poor risk-to-reward.
Step 5 — Check health
75–100%: favorable confluence
50%: mixed
0–25%: weak for that direction
Step 6 — Define invalidation before entry
Determine:
Stop level
Position size
Maximum acceptable loss
First target
Conditions for partial or full exit
Disclaimer
This indicator is provided for informational, educational, and analytical purposes only. It does not constitute financial advice, investment advice, trading advice, a solicitation, or a recommendation to buy or sell any financial instrument.
Market-structure shifts, moving averages, VWAP, RSI, Fair Value Gaps, retest markers, continuation symbols, health scores, and alerts are mathematical interpretations of historical and real-time market data. They do not guarantee future price movement or profitable outcomes.
The Health Score is a count of aligned indicator conditions. It is not a probability of success, an expected return, or a measure of actual trade risk.
Trading cryptocurrencies, forex, commodities, futures, CFDs, and other leveraged products involves substantial risk and may result in the loss of some or all invested capital. Historical performance does not guarantee future results. Signals may be delayed because of pivot confirmation, and real-time values may change before a candle closes.
Always perform independent analysis, use appropriate position sizing, define a stop-loss before entering a trade, account for fees and slippage, and never risk capital you cannot afford to lose. The user remains solely responsible for all trading and investment decisions. อินดิเคเตอร์

Order Block & Breaker Block ZoneOrder Block & Breaker Block Zone
A strict Order Block detector, and the Breaker Block that a failed Order Block turns into.
Most Order Block tools mark the last opposite coloured candle before a strong move. That
description fits almost any pullback, which is why those tools cover a chart in boxes. This one
asks for four independent pieces of evidence on the same candle before it will draw anything, and then it keeps following the zone for the rest of its life instead of drawing it once and walking away.
The candle's own colour is never checked. Colour is a description of a candle, not evidence about what happened at that price.
WHAT HAS TO HAPPEN
Bullish Order Block
1 The block candle trades BELOW the previous candle's low the sweep
2 That same candle is Candle 1 of a valid three candle bullish imbalance, so Candle 3's low sits above the block candle's high the gap
3 Price does not trade back into the block's high to low range while it is still waiting the zone stays clean
4 A candle CLOSES above the last unbroken swing high the structure break
Bearish Order Block is the same read upside down: the block candle trades above the previous
candle's high, the imbalance runs the other way, and a candle closes below the last unbroken
swing low.
The zone drawn is the block candle's full high to low range.
The structure break also has to land inside a wait window, counted forward from Candle 3. A block that needs fifty candles to break structure is no longer the same story, so the wait is limited and the block is dropped when it expires.
BOS OR CHoCH - A TAG, NOT A GRADE
Market structure is tracked separately, from swing pivots. Each new swing is compared with the
one before it, which gives the familiar higher high, higher low, lower high, lower low reading,
and from that the structure is either bullish or bearish.
A break that runs WITH the structure is a Break of Structure. A break that runs AGAINST it is a
Change of Character, and that is what flips the structure the other way. Mechanically they are
the same event - a close beyond a swing level. Only the direction relative to the current
structure decides the name.
So a Bullish Order Block can arrive in two very different situations, and the label says which:
Bull OB (CHoCH) the market was bearish and this block flipped it a reversal block
Bull OB (BOS) the market was already bullish and carried on a continuation block
Neither ranks above the other. They are different stories, not different quality levels, and the
tag exists so you can tell them apart at a glance instead of reconstructing it from the chart.
THE LIFE CYCLE
A zone is not finished when it is drawn. It is followed until it resolves.
Fresh confirmed and untouched. Drawn in the bullish or bearish colour.
Mitigated price has traded back into the zone. It is no longer a fresh Order Block, so it
is repainted in grey. It is kept because it is what a Breaker grows from.
Breaker Block the zone has failed, with a candle CLOSING through its far side. It flips polarity and is redrawn in the opposite colour. A wick through does not count.
The entry and the failure can land on the same candle. One candle that trades into the zone and closes through the other side takes the block from fresh to Breaker in a single step, and that is treated exactly like a slower failure.
No reaction inside the zone is asked for before a Breaker is drawn, and that is a deliberate
departure from how this is usually done. Where an Order Block is only "the last opposite candle
before a move", a Breaker built on it needs a second proof, because the block itself proved
nothing. That weakness is not present here. A zone only becomes an Order Block after a sweep, and imbalance and a structure break, and a displacement that broke structure IS the evidence that orders were resting at that price. Asking for a reaction on top of it is asking for a second
receipt for the same purchase.
It is also worth being clear about what actually traps a trader. Limit orders fill the moment
price trades into the zone. They are trapped the moment a candle closes through the far side. A reaction candle in between never created that trap - it was only a witness to it, and the absence of a witness does not mean the event did not happen. A proven zone that is overrun without even being allowed to answer is not the weaker case. It is the more one sided one.
WHAT MAKES THIS DIFFERENT
1. Four conditions, not one.
Sweep, imbalance, clean zone and structure break each test something different: that liquidity
was taken, that the move away was violent enough to leave a gap, that nobody has been back, and that the move changed something. Any one of them on its own is common. All four on the same candle is not.
2. Colour is ignored on purpose.
The classic "last opposite candle" case still gets caught, because the candle that sweeps the
previous extreme is usually that candle anyway. It is caught as a consequence of the evidence
rather than as the rule, and the blocks that only ever qualified on colour are left out.
3. The zone is followed, not just marked.
Fresh, mitigated and breaker are three different states, and a zone moves between them as price does its work. What is on the chart is the zone's current condition, not the condition it was in on the day it formed.
4. The Breaker inherits the block's proof instead of asking for a new one.
Because the Order Block had to earn its place, a Breaker built on it does not need a reaction
close to be believed. What is asked for is the one thing that actually matters: a candle body
closing through the far side. That keeps the rule honest in both directions - it does not throw
away a violent one candle break, and it still refuses a wick.
5. Structure is measured, not assumed.
BOS and CHoCH come from confirmed swing pivots that have to be paid for with right hand candles. Nothing is read from a moving average or a fixed lookback window.
6. The evidence is on the chart, not just the claim.
Each block can show the imbalance that qualified it and the swing level whose break confirmed it. You are not asked to take the label's word for it - the gap and the broken level are drawn where they happened, so the block can be checked in a couple of seconds.
READING THE CHART
Green box, "Bull OB (BOS)" or "Bull OB (CHoCH)" fresh bullish Order Block, label below
Red box, "Bear OB (BOS)" or "Bear OB (CHoCH)" fresh bearish Order Block, label above
Grey box, "... mitigated" tapped, waiting to resolve
Green box, "Bullish Breaker" a failed bearish block, polarity flipped
Red box, "Bearish Breaker" a failed bullish block, polarity flipped
Each box spans the Order Block candle's full high to low range, and runs to the right edge while
the zone is still drawn so you can see where price sits against it now.
Two extras are drawn alongside each block:
Dotted yellow box the imbalance that qualified the block. It covers the three candles it formed on and sits directly ON TOP of a bullish zone or directly BELOW a bearish one, because the gap starts where the block candle ends.
Dashed line the swing level whose break confirmed the block. It runs from the swing itself across to the candle that closed through it, so you can see which high or low was taken and how far the move travelled to take it.
Between them these two say why the block exists: the gap is the imbalance test, the dashed line is the structure test. Both are the Order Block's credentials, so both disappear once the zone flips to a Breaker. By then its Order Block life is over and only the level still matters.
A Breaker's box can begin either at the candle that broke the zone or at the original Order Block
candle. The price levels are identical either way - only the left edge moves. Starting at the
breakout is the default, because a Breaker only becomes a Breaker when it flips, and drawing it
from its birth stretches old ones across the entire chart.
A chart can only stay readable if it is not covered in boxes, so only the most recent few zones
of each kind are drawn. Order Blocks - fresh and mitigated together - have their own limit, and
Breaker Blocks have theirs. Everything older is still tracked and can still turn into a Breaker
later, it is simply not on screen.
The corner table counts everything still being tracked: fresh Order Blocks, mitigated zones and
Breaker Blocks, split into bull and bear. It counts zones whose type is switched off and zones
sitting outside the display limits too, so the table describes the record while the chart shows
the recent part of it. If the table reads higher than what you can see, that is the display limit
doing its job.
Two more optional overlays are available for checking the structure engine directly. Swing labels put HH, HL, LH and LL on the pivots, and the structure break markers name every BOS and CHoCH on the chart rather than only the ones that confirmed a block. Both are off by default.
SETTINGS
Market Structure
- Swing Left and Swing Right: how many candles must confirm a pivot on each side. The default of 5 and 5 reads ordinary swing structure. Lower it to 3 and 3 for minor structure and many more breaks; raise it for major structure only. Swing Right is also the confirmation delay - a swing does not exist until that many candles have closed.
- Show Swing Labels (HH / HL / LH / LL): names each confirmed pivot.
- Show Every Structure Break (BOS / CHoCH): draws and names every break on the chart, not only the ones that confirmed a zone.
Order Block
- Scan Length: how many closed candles back the search for new blocks reaches. The running candle is always excluded. This bounds the search, not the structure engine - swings and the bullish or bearish structure state are read from the whole chart, so a block found right at the edge of the window is still measured against everything that came before it.
- Max Order Blocks Shown: how many of the most recent Order Blocks are drawn. Fresh and mitigated zones share this limit. This is the setting to reach for when the chart feels crowded.
- Max Breaker Blocks Shown: the same limit for Breaker Blocks, counted separately.
- Structure Break Wait: how many candles a block may wait for its structure break, counted from Candle 3 of the imbalance. The zone has to stay clean for the whole wait. If the wait runs out the block is dropped.
Zone Types
- A switch for each of the five things that can be on screen: bullish and bearish Order Blocks,
mitigated zones, and bullish and bearish Breaker Blocks.
- Show Order Block FVG: draws the imbalance that qualified each block.
- Show Confirming Swing: draws the swing level whose break confirmed each block.
Zone Style
- Bullish, bearish, mitigated and imbalance colours, fill transparency, and whether drawn zones
extend right. The imbalance is always filled a little lighter than the zone it belongs to, and
neither the imbalance nor the confirming swing is ever extended - both mark where something
happened, not where price is now.
- Breaker Zone Starts At: whether a Breaker's box begins at the Breakout Candle, where the zone actually flipped, or at the Order Block Candle it grew from. Breakout Candle is the default and keeps old Breakers from stretching across the whole chart. The price levels do not change.
Labels
- Show Labels, Label Size, and Label Distance from Zone as a percentage of the zone height.
Increase the distance on noisy charts so labels clear the candles.
Summary Table
- Show, position and size of the corner table.
ALERTS
Six alert conditions:
Bullish Order Block a bullish block has confirmed its structure break
Bearish Order Block a bearish block has confirmed its structure break
Bullish OB Mitigated price has traded back into a fresh bullish block
Bearish OB Mitigated price has traded back into a fresh bearish block
Bullish Breaker Block a failed bearish block has become a bullish Breaker
Bearish Breaker Block a failed bullish block has become a bearish Breaker
Each message carries the event, the symbol, the timeframe and the closing price. The same
messages are also sent through the alert function, so the "Any alert() function call" alert type
can deliver all six through a single alert.
Every alert is evaluated only after a candle has fully closed.
REPAINTING
This script does not repaint.
- The whole engine runs once per closed candle. Price moving inside an open candle cannot create, change or remove anything, and cannot make a signal appear and then disappear.
- Swings are only usable after their right hand candles have closed. That delay is deliberate: it
is what makes a swing a fact rather than a guess. A swing high therefore appears Swing Right candles after the candle it belongs to, and a structure break can only be measured against a
swing that already existed.
- Zones are built forward, one candle at a time, in the same order they would have been built
live. A zone that has been drawn is never moved. Its colour changes when its state changes, and
that is a record of what price did afterwards, not a revision of what it did before.
- Nothing is read from a higher timeframe, so there is no higher timeframe lookahead to get
wrong.
When you create an alert, TradingView may show a caution banner saying the indicator can repaint. That banner appears automatically for any script that uses the built in bar state variables, no matter how they are used, because the platform cannot check the intent behind them. This script uses one of them for the opposite purpose: it is what restricts the entire engine to bar close. Choosing "Once Per Bar Close" when creating the alert is still recommended.
NOTES AND LIMITATIONS
- The pattern is rare by design. Four conditions have to line up on the same candle, so long
stretches with nothing new on the chart are normal. If you want to see more, look at a faster
timeframe rather than loosening the settings.
- A block that is tapped before its structure break lands is dropped rather than confirmed. This
is strict on purpose: an Order Block that has already been traded back into was not untouched
when it confirmed, whatever happened afterwards.
- Swing Right is a real delay. On a very slow timeframe the confirmation of a swing can take a
meaningful amount of time, and a structure break cannot be recognised before the swing it breaks has been confirmed.
- Scan Length and the display limits do two different jobs. Scan Length decides how far back
blocks are looked for at all, so raising it can find older blocks. The display limits only
decide how many of what was found is drawn; raising them shows more of the same set, lowering them hides zones that are still being tracked. Nothing about how a block is detected or how it resolves depends on whether it happens to be drawn.
- An internal cap of 200 tracked zones keeps memory and the drawing count inside TradingView's limits. On a very long history the oldest tracked zones are dropped, so the table describes the recent record rather than the entire chart.
- Detection is purely structural. It reports where these sequences occurred and what state each
zone is in. It does not rank zones by quality, measure follow through, or produce entries,targets or stops.
HOW TO USE IT
A fresh Order Block marks a price where liquidity was taken, the move away left a gap, nobody has been back, and structure changed. Traders commonly watch these areas for:
- A reaction on the first return, since the zone is untouched until then
- Context from the tag, where a CHoCH block sits at a possible turn and a BOS block sits inside
an existing move
- Confirmation against a higher timeframe read, where a block that agrees with the larger picture carries more weight than one that fights it
A grey mitigated zone is a zone that has already been used once. It is worth less as an entry
area and worth more as a warning: it either holds from here, or it becomes a Breaker.
A Breaker Block is the opposite side of the same level. Traders commonly watch the far edge - the low of a broken bullish block, the high of a broken bearish block - on the first return after the flip.
These are reference areas, not entry signals on their own. Use them alongside your own structure read, your own entry method and proper risk management.
DISCLAIMER
This indicator is a pattern detection tool. It is not financial advice and it makes no claim
about profitability. Trading involves risk. Always apply your own analysis and risk management. อินดิเคเตอร์

Multi-Timeframe Candles HTF P03 — Multi-Timeframe Higher Timeframe Candle Projection with Volume Delta
Project higher timeframe candles onto your lower timeframe chart — with live intrabar tracking, volume delta, and precise LTF↔HTF mapping lines.
🎯 What It Does
This indicator pulls a higher timeframe (HTF) candle structure and projects it onto your current chart as a horizontal sequence of boxes (bodies) and lines (wicks) to the right of price action. It tracks one live forming HTF candle in real time — updating its high, low, and volume delta intrabar — while optionally displaying up to 10 completed historical HTF candles.
Key innovation: The live HTF candle draws dashed connector lines from the exact lower-timeframe bars that created its open, high, low, and current close — so you see precisely where each HTF level originated on your execution timeframe.
✨ Core Features
Feature Description
🕐 Single HTF Selection Any timeframe ≥ current chart (e.g., 1H on 5m, 4H on 15m, 1D on 1H)
📊 1–10 Candles Display Show 1 live candle, or 1 live + up to 9 completed history candles
🔴🟢 Live Intrabar Updates High/low/delta update tick-by-tick as the HTF candle forms
📈 Volume Delta Tracking Running buy/sell volume delta (+vol / ‑vol) on the live candle
🔗 LTF→HTF Mapping Lines Dashed lines from LTF open/high/low/close bars → projected HTF levels (live candle only)
🏷️ Price & Time Labels OHL labels + HTF timestamp (on history candles) + delta label (live)
🎨 Full Style Control Bull/bear colors, live/history transparency, label toggles, right offset
⚙️ Input Groups
Higher Timeframe Settings
Input Default Description
HTF Timeframe 60 (1H) Target higher timeframe (must be ≥ chart TF)
Candles to Show 1 1 = live only; 2–10 = live + N history
Right Offset (Bars) 15 Horizontal gap from current bar to first projected candle
Visual Style
Input Default Description
Bullish Color #089981 Body/wick/label color for bullish HTF candles
Bearish Color #F23645 Body/wick/label color for bearish HTF candles
Live Body Transparency 0 0–100% transparency for the forming candle
Show Price Labels On OHL labels on live candle
Show Running Delta On Volume delta label below live candle low
🧠 How to Use
Open a lower timeframe chart (1m, 3m, 5m, 15m — your execution TF).
Add the indicator and set HTF Timeframe to your analysis timeframe (e.g., 240 for 4H, D for daily).
Set Candles to Show:
1 → clean live projection only (best for real-time bias)
3–6 → live + recent context (swing structure, PO3 zones)
Watch the live candle build: high/low extend, delta accumulates, mapping lines trace back to the exact LTF bars that printed each level.
Use for: HTF bias confirmation, PO3/CHoCH/BOS projection, delta divergence on the forming HTF bar, precise entry timing at HTF extremes.
📐 Visual Guide
text
Live HTF Candle (updating intrabar)
┌─────────────────────────┐
│ ████████████████████ │ ← Body (transparency controlled)
│ │ │ │ │ ← Wick
│ │ Δ +1.2K │ │ ← Volume delta (live only)
└─────────────────────────┘
▲ ▲ ▲
│ │ │
▼ ▼ ▼
LTF Open LTF High LTF Low (dashed lines to source bars)
⚡ Performance Notes
max_boxes_count = 500, max_lines_count = 500, max_labels_count = 500 — supports up to 10 candles × full drawing set without cleanup issues.
Runs entirely on barstate.islast — zero overhead during historical bar processing.
Uses ta.change(time(htfInput)) for reliable HTF boundary detection (no request.security repaint risk).
Volume delta uses tick volume (volume built-in) — works on all markets (crypto, forex, futures, stocks).
🏷️ Credits & Attribution
Original Concept & Base Logic: LuxAlgo — HTF PO3 (Price–Orderflow–Projection) framework
Pine Script v6 Implementation: Quantum Edge
Inspired by: Institutional orderflow analysis, multi-timeframe candle projection, and delta-based HTF confirmation techniques
This is a derivative implementation for educational and analytical purposes. LuxAlgo retains credit for the core PO3 methodology.
📋 Suggested Tags (TradingView)
multi-timeframe htf candle-projection volume-delta orderflow price-action swing-trading scalping luxalgo po3 market-structure
💡 Pro Tip
Pair with a lower-timeframe structure/CHOCH/BOS indicator (e.g., LuxAlgo Premium, Smart Money Concepts, or your own SMC tool). Use the HTF PO3 live candle’s high/low as macro invalidation levels and the delta flip as early momentum shift signal before the HTF candle closes.
อินดิเคเตอร์

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

MSnR Classic StoryLine MTFMSnR Classic StoryLine MTF
A dashboard that reads the trend of five higher timeframes at once, and reports each one as
Bullish or Bearish.
What makes each reading is not an indicator applied to five timeframes. It is a two timeframe
process. The higher timeframe decides WHERE to look: it finds the support or resistance level
that price has just rejected. The lower timeframe then decides WHICH WAY: it waits for price to
break the last structural level standing in the way. Only when both halves complete does that
row change.
Nothing is calculated from the chart you are on, so the table reads the same on every timeframe.
You can sit on M5 and still read the Monthly trend.
THE FIVE PAIRS
Monthly decided on Daily
Weekly decided on H4
Daily decided on H1
H4 decided on M30
H1 decided on M15
Each row is completely independent. They share no state and can disagree with each other, which
is the point: agreement across rows is information, and so is conflict.
WHAT MAKES THIS DIFFERENT
1. Two timeframes decide one reading.
Most multi timeframe tools run the same calculation on several timeframes and stack the results.
Here the two timeframes have different jobs. The higher one supplies the context and never
decides direction on its own. The lower one supplies the proof and is never consulted without a
context. Neither half means anything alone.
2. Levels are tracked, not drawn.
A level is not a line that is placed once and left there. Every level created inside the window
is followed forward, candle by candle, and its state is updated: it can be rejected, it can be
broken, it can flip sides and come back to life. A rejection only counts when it happens on a
level that is still Fresh. This is what stops the same tired level from producing a signal over
and over.
3. Several setups wait at the same time.
Every rejection opens its own setup, and a newer one never cancels an older one. Two, five, a
dozen can be waiting together, each with its own level and its own breakout target. Whichever
one breaks out FIRST is the one that turns the trend. A tool that tracks only the latest
rejection is late whenever the older one was closer to completing.
4. Both directions are always watched.
A single higher timeframe candle can reject a resistance and a support at the same time. Both
open a setup. The one that completes first turns the trend, and the other stays alive and can
turn it back afterwards. Nothing is switched off because of what the trend already says.
5. It shows its own reasoning.
The dashboard alone would be a black box. So for one row of your choosing the script draws the
whole chain on the chart: the level that was rejected, the candle that rejected it, the lower
timeframe candle that touched it, the level that was locked, and the candle that broke it. You
can check every reading against the candles yourself.
THE LEVELS
Every pair of consecutive candles leaves a level behind, priced at the CLOSE of the first candle
of the pair. Closes are used rather than wicks because a close is where the market actually
agreed on a price.
A candle is Green when close is greater than open and Red when close is less than open. A Doji,
where close equals open, is neither and forms no level.
A Level Green then Red sits above as resistance
V Level Red then Green sits below as support
Bullish Gap Green then Green sits below as support
Bearish Gap Red then Red sits above as resistance
From there each level lives on one of two sides, and every close through it flips it:
RBS Resistance Become Support a resistance a candle CLOSED above
SBR Support Become Resistance a support a candle CLOSED below
A level can flip any number of times. Each flip also makes it Fresh again, because in its new
role it has never been tested.
Fresh and Unfresh
Fresh newly created, or just flipped. Untested on the side it now sits on.
Unfresh price has already come back, touched it, and been turned away.
Only a Fresh level can produce a rejection. Once it turns Unfresh it stays quiet until a
breakout flips it and makes it Fresh again.
HOW ONE ROW DECIDES ITS TREND
Step 1 - the higher timeframe rejection
A higher timeframe candle reaches a Fresh level and fails to close through it.
Support side the LOW touches the level and the CLOSE stays above it
Resistance side the HIGH touches the level and the CLOSE stays below it
The level turns Unfresh, and that is the event the row acts on.
A close THROUGH the level is not a rejection. It is a breakout, it flips the level, and it
produces nothing. Breakout is always checked before rejection.
If one candle rejects several Fresh levels at once, the LOWEST is taken on the support side and
the HIGHEST on the resistance side - the level price actually reached.
Step 2 - the reference line
The rejection candle's OPEN becomes the reference point. On the lower timeframe this lands on
the candle that opens at the same moment, and that candle is the first one examined. Nothing to
the left of it is ever looked at again.
Step 3 - the touch candle
Moving forward from the reference point, the first lower timeframe candle that reaches the
rejected level is the touch candle. Reaching it is enough; it does not matter whether price
bounces or cuts through.
The touch candle splits the chart in two: everything left of it is External, everything right of
it is Internal.
Step 4 - lock the level to be broken
On the External side, take the nearest level of the opposite kind:
Buy side context the nearest A Level to the left, for an upward break
Sell side context the nearest V Level to the left, for a downward break
It does not need to be Fresh. Any A or V will do. Only A and V are used here - Gap, RBS and SBR
are not.
Step 5 - the breakout
On the Internal side, wait for a lower timeframe candle to CLOSE through the locked level.
Close above the locked A Level the row turns Bullish
Close below the locked V Level the row turns Bearish
A wick through it is not enough, and the touch candle can never confirm itself - the earliest a
row can turn is the candle after the touch.
There is no time limit on the wait.
WHEN SEVERAL SETUPS ARE WAITING
Each open setup carries its own rejected level, its own reference line, its own touch candle and
its own locked level. They all run at the same time.
Setup A rejected 4050, waiting for a close below 4000
Setup B rejected 4040, waiting for a close below 4010
Price reaches 4010 first, so setup B turns the row Bearish. The instant that happens the row is
Bearish, and setup A never gets its turn.
A setup ends in one of three ways: it confirms, the higher timeframe closes through the level it
came from - which flips that level and makes the rejection meaningless - or it is pushed out by
the pending cap.
TREND PERSISTENCE
Once a row is Bullish it stays Bullish until a Bearish confirmation completes, and the other way
round. There is no sideways or neutral state in between, and no expiry.
Before the very first confirmation on a symbol a row reads No Trend. After that it is always one
or the other.
READING THE CHART
The dashboard
Five rows, each with a coloured dot, the timeframe name and its current trend. Hovering a row
name shows which lower timeframe confirms it. Rows can be hidden individually.
The setup visualiser
For the row you select, the chain that produced its current trend is drawn in the trend colour:
a horizontal line the higher timeframe level that was rejected, labelled with the timeframe,
the level type and its price, starting at the candle whose close created it.
a vertical line the higher timeframe rejection candle.
a vertical line the lower timeframe touch candle.
a horizontal line the locked A or V level, labelled with its timeframe and price.
a vertical line the lower timeframe candle that broke it.
If a setup is still waiting, it is drawn the same way in the opposite colour with dashed lines,
so you can see what the row is waiting for next. Everything can be switched off if you only want
the table.
SETTINGS
Dashboard Settings
- Table Position and Table Size.
Engine Settings
- Max Stored Levels (per HTF): how many levels each timeframe keeps in memory. Older ones are
forgotten, so a rejection from a very old level is only seen while it is still inside this
window.
- Max Pending Setups (per side): how many setups may wait at once. When full, the oldest is
dropped.
- History Depth (bars per timeframe): how far back each engine runs. Bars older than this are
skipped, because the levels they create would have been pushed out of the level window long
before reaching the present. Lower it if the script is slow on a heavy symbol.
Dashboard Rows
- An individual switch for each of the five rows.
Colors
- Bullish, Bearish and No Trend colours, used by both the table and the visualiser.
Setup Visualiser
- Show Active Setup On Chart, the row to draw, and whether to also draw the setup still waiting.
ALERTS
Ten alert conditions, one per row per direction:
Monthly Trend Bullish / Bearish, Weekly Trend Bullish / Bearish, Daily Trend Bullish / Bearish,
H4 Trend Bullish / Bearish, H1 Trend Bullish / Bearish.
Each fires only when a row actually FLIPS, not on every bar. Each message carries the row, the
direction, the symbol and the closing price. The same messages are sent through the alert
function, so the "Any alert() function call" alert type delivers every flip through one alert.
One thing worth knowing: an alert can only fire on a bar of the chart it was created on. If you
create it on a Weekly chart, a row that flips twice inside that week produces one alert, not two.
Create alerts on a chart timeframe at or below M15 and nothing is missed.
REPAINTING
The values do not repaint.
- Every engine reads confirmed candles only. It works on the previous, already closed candle of
its own timeframe, so the candle still forming can never enter the calculation and cannot
change what has already been decided.
- Each candle is processed exactly once. A timestamp guard makes a second pass over the same
candle impossible.
- No request uses lookahead, so no calculation can see data that had not happened yet.
- A row's value changes only when a candle of the timeframe that decides it closes. Once a row
has turned, that reading does not change afterwards.
- Because the calculation is independent of the chart, the table reads the same whichever
timeframe you are on.
When you create an alert, TradingView may show a caution banner saying the indicator can repaint.
That banner appears automatically for any script that requests data from other timeframes, no
matter how carefully it is done, because the platform cannot check the intent behind the request.
NOTES AND LIMITATIONS
- Intended for intraday charts, roughly M1 up to H4. On Daily and higher, the M15 and M30
requests have to cover a very long range and TradingView may refuse them with a memory
error on symbols with deep history. There is nothing to gain from a high chart timeframe
anyway, as the table reads the same everywhere.
- The far left of the chart reads No Trend. Each engine starts from a fixed depth, so it needs a
stretch of candles before the first confirmation completes. This never affects the current
reading.
- Levels older than the Max Stored Levels window are forgotten. A rejection from a very old
level will not be seen once it has aged out.
- Detection is purely structural. It reports which way a timeframe has turned and why. It does
not rank readings by quality, measure what happened afterwards, or produce entries, targets
or stops.
HOW TO USE IT
Read the rows as a stack. When the slow rows agree, the market has one direction and the faster
rows tend to give pullbacks inside it. When they disagree, the faster rows are usually working
against the slower ones, and that is normally where the choppy trading is.
The visualiser is there so you never have to take a reading on faith. Point it at the row you
care about and the whole chain is on the chart: which level was rejected, when, where price
touched it, and exactly which level had to break. If a reading looks wrong, the drawing shows you
why it is what it is.
These are structural readings, not entry signals. Use them as direction and context alongside
your own levels, your own entry method and proper risk management.
DISCLAIMER
This indicator is a market structure analysis tool. It is not financial advice and it makes no
claim about profitability. Trading involves risk. Always apply your own analysis and risk
management. อินดิเคเตอร์

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.
อินดิเคเตอร์

ICT Market Structure [JPT] ICT Market Structure is an educational market structure indicator that automatically identifies Higher Highs, Higher Lows, Lower Highs, Lower Lows, Break of Structure (BOS), and Change of Character (CHOCH) using confirmed swing points. The indicator also highlights potential Demand and Supply Order Blocks to help traders analyze structural continuation and potential market reversals.
The indicator is designed to help traders visualize market structure and identify important price reaction zones. It does not predict future price movement or guarantee profitable trades.
🔷 FEATURES
Automatic market structure detection
Higher High (HH) and Higher Low (HL) identification
Lower High (LH) and Lower Low (LL) identification
Bullish and bearish Break of Structure (BOS)
Bullish and bearish Change of Character (CHOCH)
Automatic Demand Order Block detection
Automatic Supply Order Block detection
Confirmed swing-based structure
Optional Order Block retest analysis
Automatic broken/invalidated zone removal
Customizable swing and Order Block settings
Clean chart layout with minimal clutter
🔷 HOW IT WORKS
Detects confirmed swing highs and swing lows.
Classifies market structure into HH, HL, LH, and LL.
Monitors important swing levels for structural breaks.
Identifies potential BOS events when price breaks established structure.
Identifies potential CHOCH events when market structure shifts.
Searches for relevant bullish and bearish candles around structural breaks to create potential Order Blocks.
Displays Demand and Supply zones directly on the chart for market structure analysis.
🔷 HOW TO USE
Start by observing the current HH / HL / LH / LL structure.
Use BOS to identify potential continuation of the existing market structure.
Use CHOCH to monitor potential changes in market direction.
Watch how price reacts when returning to a Demand or Supply Order Block.
Use Order Blocks as areas of interest rather than automatic entry signals.
Combine the structure information with your own confirmation methods and risk management rules.
🔷 MARKET STRUCTURE GUIDE
Bullish Structure:
HH → HL → BOS → continuation
Bearish Structure:
LH → LL → BOS → continuation
Potential Structural Shift:
Existing Structure → CHOCH → New Direction → New BOS
🔷 NOTES
Structure is based on confirmed swing points.
Historical structure may appear only after the required swing confirmation period.
Order Blocks are analytical zones and should not be considered guaranteed reversal areas.
BOS and CHOCH are designed to help visualize structural changes, not predict future price movement.
The indicator is intended as an educational and analytical tool.
No indicator can guarantee successful trades, and this script should not be used as the sole basis for investment or trading decisions. อินดิเคเตอร์

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 أو دفتر أوامر البورصة.
ينبغي استخدام المؤشر كأداة مساعدة في التحليل مع إدارة المخاطر ومنهجية المتداول الخاصة.
المصدر المفتوح
تم نشر المؤشر كمصدر مفتوح بهدف الشفافية وإتاحة الكود للمستخدمين والمطورين لفهم طريقة الحساب ومراجعة التنفيذ وتطويره.
يمكن للمستخدم مراجعة الكود والإعدادات لفهم كيفية عمل كل مكوّن قبل استخدامه في التحليل الفعلي.
อินดิเคเตอร์

All-Markets Movement Extremes ToolA causal all-markets movement tool for identifying retained terminal PEAK/TROUGH extremes and exposing the earliest available confirmation of those extrema after the required price structure develops.
Name:
All-Markets Movement Extremes Tool
Searchable Name:
All-Markets Movement Extremes Tool
Technical Name:
All-Markets Non-Repainting Terminal-to-Causal Directional Movement Extremes Tool
Short title:
Movement Extremes
Summary
All-Markets Movement Extremes Tool identifies terminal peaks and troughs within developing directional movement and preserves the causal confirmation that makes each retained extreme available.
The central difficulty is that a completed extreme and the generated signal capable of establishing that extreme are not necessarily available at the same time.
A trough can already exist before enough upward structure has developed to confirm that the downward movement terminated there.
A peak can already exist before enough downward structure has developed to confirm that the upward movement terminated there.
Price can therefore move meaningfully away from the terminal before the corresponding confirmation becomes available.
The tool is built around that separation.
During an active directional leg, the current extreme remains provisional and can be replaced by a newer same-side high or low.
Once the required opposite structure confirms, the retained extreme becomes:
TROUGH for the completed low of the prior downward movement
PEAK for the completed high of the prior upward movement
The terminal marker remains attached to the retained movement extreme.
The causal confirmation remains attached to the later bar where that extreme became confirmable.
This keeps two important references visible at the same time:
where the directional movement terminated
and
where the corresponding confirmation became available
The confirmed PEAK/TROUGH stream can therefore provide context for directional-movement trading, filtering, confirmation, and broader trading decisions, while the stream itself represents confirmed movement extremes and their causal availability rather than a complete standalone buy/sell signal.
The result is a directional-movement tool that provides:
movement direction and transition context
terminal peak/trough identification
directional-movement trading context
confirmation and filtering context
entry/exit context
movement-cycle review
and comparison of completed movement with what became causally available
Terminal extremes
The script follows an active directional leg and retains its strongest extreme.
During an upward leg, the highest retained high remains the potential terminal PEAK.
During a downward leg, the lowest retained low remains the potential terminal TROUGH.
A newer same-side extreme can replace the previous candidate while that directional movement remains active.
The extreme becomes confirmed only after the required opposite structure develops.
This prevents a temporary move away from a high or low from automatically being treated as the completed terminal.
Causal confirmation
Every confirmed terminal has two important locations.
Terminal
The retained PEAK or TROUGH belonging to the completed directional movement.
Causal confirmation
The later confirmed-bar event where enough completed structure exists to establish that terminal.
The terminal shows where the completed movement ended.
The causal confirmation shows when the script could establish that terminal through its forward process.
Those two points can be close together or separated by several bars.
The optional Causal Confirmation Comparison makes that difference visible directly on the chart.
Earliest available confirmation
The tool attempts to expose a retained terminal on the first confirmed transition that satisfies its active structural requirements.
That does not move the historical terminal forward.
The PEAK or TROUGH remains attached to the completed movement extreme, while the causal marker remains attached to the later confirmation event.
This is what allows the tool to preserve both the final movement location and its actual causal availability.
Directional movement
The PEAK/TROUGH sequence forms a continuing directional structure.
A confirmed TROUGH establishes the completed low of the preceding downward movement.
A confirmed PEAK establishes the completed high of the preceding upward movement.
Consecutive opposite terminals describe the completed movement between retained extrema.
The tool can display those relationships with HOLD paths and directional backgrounds so the broader directional movement remains visible rather than reducing the chart to isolated labels.
Directional-movement trading context
The confirmed extremes and their causal transitions provide directional-movement context that can be examined alongside confirmation rules, filtering, entry/exit context, or other market-state methods.
The value of the output is the movement structure it establishes:
terminal extreme → causal confirmation → directional movement context
That structure remains available for broader trading-related evaluation without changing what the PEAK/TROUGH stream itself represents.
Movement cycles
Consecutive opposite confirmed extrema form completed directional cycles.
The tool keeps two reference systems available.
Terminal-to-terminal
The completed movement between retained extrema.
Confirmation-to-confirmation
The corresponding directional movement between the causal confirmation points.
These measurements can differ substantially because part of the terminal movement can occur before confirmation becomes available.
Last capture / confirm gap
The Movement Cycle page shows Last capture / confirm gap for the most recent completed cycle.
The capture value compares the latest completed terminal-to-terminal directional result with the corresponding confirmation-to-confirmation result when the terminal movement is positive.
The confirm gap shows the difference between those two completed-cycle results.
Together, they provide a compact comparison between the retained movement extremes and the corresponding causal confirmation references.
Unconfirmed context
Not every developing extreme becomes the retained terminal.
An earlier high can be superseded by a higher high.
An earlier low can be superseded by a lower low.
When enabled, the tool can expose this context separately from the confirmed PEAK/TROUGH sequence.
The optional Minimum Reversal Filter can also reject structural transitions that do not meet the selected movement requirement.
Current movement
For the latest confirmed extreme, the tool can compare:
terminal price
confirmation close
current price
terminal-to-confirm move
price change from confirmation to current
directional move from confirmation to current
best move after confirmation
and bars since confirmation
This provides a current directional reference after the extreme has been established.
Status pages
The tool includes four compact status pages:
Summary
Movement Cycle
Timing
Guide
Summary provides the broad state of confirmed extrema and completed movement cycles.
Movement Cycle focuses on the latest terminal, its confirmation, current movement, and the previous completed cycle.
Timing focuses on terminal-to-confirmation separation and structural timing.
Guide provides a compact interpretation of the active PEAK/TROUGH framework.
Alerts
Optional alerts are available for confirmed PEAK and TROUGH events.
The alert occurs when the causal confirmation becomes available.
The terminal remains attached to the retained movement extreme, while the alert reflects the later confirmation event.
This preserves the difference between terminal location and causal availability.
Features
all-markets directional movement framework
retained terminal PEAK identification
retained terminal TROUGH identification
causal confirmed-bar operation
terminal-versus-confirmation separation
Causal Confirmation Comparison
Confirmed Hold Path
Confirmed Hold Background
movement-cycle tracking
terminal-to-current directional movement
confirm-to-current directional movement
best move after confirm
Last capture / confirm gap
Unconfirmed Extreme Context
Minimum Reversal Filter
compact Summary, Movement Cycle, Timing, and Guide pages
confirmed PEAK/TROUGH alerts
Strengths
Terminal Extreme Preservation — the completed PEAK/TROUGH remains anchored to the retained movement endpoint.
Causal Availability — the corresponding confirmation remains separately visible where it actually became available.
Directional Context — the output describes continuing directional movement rather than isolated bar labels.
All-Markets Use — the framework can be applied across different markets because it is based on directional price structure.
Early Causal Exposure — the tool attempts to establish the retained terminal on the first qualifying confirmed transition.
Terminal-versus-Causal Comparison — completed movement and causally available movement remain directly comparable.
Broader Trading Context — the confirmed extrema provide directional, confirmation, filtering, and entry/exit context while retaining their underlying movement-extreme meaning.
Weaknesses
Confirmation Delay — the terminal can exist before enough opposite structure develops to confirm it.
Movement Before Confirmation — part of the next directional movement can occur before the causal confirmation becomes available.
Superseded Extremes — developing terminal candidates can be replaced by newer same-side extremes.
Standalone Trade Outcome Variability — confirmed PEAK/TROUGH extremes can remain structurally reliable movement references while the result of directly trading every confirmation as its own buy/sell action can vary substantially across market conditions.
Structural Dependence — confirmation timing depends on the selected structural requirements.
No Complete Trade Management — position sizing, risk management, stop placement, profit targets, and wider trade-management logic are separate from the movement-extreme output.
Who it’s for
This tool is suited for users interested in:
terminal market peaks and troughs
directional movement trading
movement-transition confirmation
structural filtering
entry/exit context
causal versus completed movement
terminal-to-terminal cycles
confirmation timing
Last capture / confirm gap
and incorporating confirmed extrema into broader trading methods
It is especially relevant when the question is not only:
“Where did the movement terminate?”
but also:
“When did that terminal become causally available?”
Known limitations
The final retained extreme cannot be confirmed until enough opposite structure has developed.
Some movement can therefore occur before confirmation.
Some developing terminal candidates can be superseded.
Some confirmation-to-confirmation cycles can be non-positive.
The distinction between the terminal and the causal confirmation is therefore explicitly preserved as part of the tool's output.
Final note
All-Markets Movement Extremes Tool identifies retained terminal PEAK/TROUGH extremes and exposes the causal confirmation of those extrema.
The terminal remains attached to the completed movement extreme.
The causal confirmation remains attached to the point where the required structure becomes available.
The relationship between those two references provides directional movement context for confirmation, filtering, cycle comparison, and broader trading-related evaluation. อินดิเคเตอร์

Precedent [ThrowMaster]===============================================================
WHAT IT IS
===============================================================
Precedent does not predict. It measures.
Every time a defined market event confirms on your chart, Precedent
records what price actually did over the following N bars. Once enough
comparable records have accumulated, it displays the empirical
distribution of those recorded outcomes: how far price travelled, how
often it reached a given distance, and how many bars that took.
The question it answers is narrow and deliberately so:
"On this symbol, on this timeframe, when this kind of event happened
at this kind of price level in this kind of market condition, what
followed afterwards, and across how many cases?"
Every number shown is measured from the visible history of the chart you
are looking at. Nothing is imported from another market, no outcome
percentages are hard-coded, and no distribution shape is assumed. If the
chart has not yet produced enough comparable cases, the indicator stays
silent and tells you how many it has.
This is a context tool. It produces no buy or sell signals, no entry
prices, and no stop levels, and it is not designed to be used as one.
Please read the section titled THE MOST IMPORTANT WARNING before using
it on a live chart.
===============================================================
HOW IT WORKS
===============================================================
1. LEVEL MAP
A running inventory of prices that carry structural meaning is
maintained bar by bar:
- Swing pivots confirmed with a symmetrical left/right lookback
(default 21 bars each side for external structure, 5 for internal).
- Equal highs and equal lows: when a new pivot lands within the merge
tolerance of an existing level, that level's touch count increases
rather than a second level being created.
- Unfilled fair value gaps: a three-bar imbalance where the current
bar's low is above the high from two bars ago (or the mirror for
the bearish case). Each additional gap overlapping the same price
adds to that level's weight, so three gaps stacked at one price
are recorded as one level carrying three factors.
- Order blocks: the extreme of the last opposite-coloured candle
immediately before a displacement bar, where displacement means a
body in the top 15 percent of the last 100 bodies AND the move
takes out the most recent internal pivot. Displacement alone is not
enough; it must be tied to a structural break.
- Previous day and previous week high and low, requested with a
one-bar offset so no unclosed higher-timeframe data is used.
Each level accumulates a WEIGHT equal to the number of independent
factors coinciding there, plus a bonus for repeated touches and for age
beyond 200 bars. Two factors closer together than the merge tolerance
(default 0.25 x ATR) are treated as one level with two factors, never as
two levels. This prevents an order block that naturally sits inside a
fair value gap from being counted twice.
A level whose weight reaches the MAJOR threshold (default 4) is
classified MAJOR; weight 1 to 3 is MINOR; anything else is NONE.
Note on interpretation: a heavily touched level is treated as more
SIGNIFICANT, not as stronger. Repeatedly tested highs and lows are
exactly the prices that attract sweeps. The indicator does not assume
which way that resolves; it measures what actually followed.
2. EVENT CLASSES
Six event types are detected. Every one of them locks its state at bar
close.
SWP Sweep Price trades beyond a mapped level and closes back
inside it, with a wick in the top quartile of the
last 100 wicks on that side.
SHF Shift A close beyond the most recent confirmed external
swing, in either direction (break of structure or
change of character).
SQZ Squeeze Bollinger Bands (20, 2.0) contract entirely inside
Keltner Channels (20, 1.5 x ATR) for at least five
consecutive bars, then expand back out.
CLX Climax Volume in the top 5 percent of the last 200 bars
combined with a bar range in the top 10 percent.
Where volume is unavailable, range plus body size is
used instead and the dashboard states which.
REJ Reject A bullish or bearish engulfing bar, or a pin bar with
a wick in the top quartile of the last 100, but only
when it occurs at a mapped level. A rejection candle
floating in empty space is not recorded at all.
DIV Divergence Price makes a lower low while cumulative flow makes a
higher low, or the mirror case, measured at confirmed
pivots. Flow is signed by body position within the
bar range and scaled by volume where volume exists.
Divergence is measured against volume-weighted flow, not against an
oscillator. An oscillator derived from price and then compared back to
price adds no independent information; volume is a separate data source.
Two events of the same class are never recorded closer together than the
full horizon. This is a deliberate statistical constraint: it costs
sample size, and it buys the guarantee that no two stored outcomes share
an overlapping future.
3. CONTEXT SCORE
Three voices contribute to an additive score from 0 to 100. Nothing
gates. No voice can block a signal; each only adds weight.
STRUCTURE 35 Whether the recent sequence of confirmed swing highs
and lows agrees with the event's direction.
FLOW 30 The percentile rank of the bar's signed flow over the
last 200 bars, cut to one fifth when its sign
disagrees with the event direction.
HTF 35 Whether the higher timeframe close sits above or below
its own 50-period EMA, in agreement with the event.
The score is then discounted by regime and renormalised back to a 0-100
scale, so scores remain comparable across regimes:
RANGE structure x 0.70 (structure breaks constantly and means
little inside a range)
TRANSITION higher tf x 0.80 (higher timeframe bias is least
reliable while it is turning)
TREND flow x 0.85 (large volume is ordinary in a trend
and therefore less informative)
One correction is applied automatically: Climax and Divergence are
themselves defined from flow, so for those two classes the flow weight
is halved and the freed weight is split evenly between structure and
higher timeframe. Without this, the flow voice would confirm an event
that flow itself created.
The score is converted into a two-level tier by comparing it to the 60th
percentile of past scores for the same event class on this chart. There
is no fixed cut-off number.
4. SIGNATURE AND BACKOFF
Each recorded event is filed under a discrete key:
event class x location class x regime x direction x score tier
Direction is never merged at any level, because upward and downward
outcomes are not symmetrical.
When a new event confirms, the engine looks for stored outcomes sharing
that key. If fewer than the minimum sample (default 20) exist, it drops
the finest component and looks again:
L3 event + location + regime + direction + tier
L2 event + location + regime + direction
L1 event + regime + direction
L0 event + direction
The first level with a sufficient sample is used, and the dashboard
always states which level was used and how many records it contained.
If even L0 is short, nothing is drawn and the dashboard shows
CALIBRATING with the current count.
Seeing L1 or L0 rather than L3 is normal, not a fault. Non-overlapping
sampling produces a limited number of independent cases per chart, and
the backoff exists precisely to handle that honestly rather than
displaying a percentage built on four observations.
5. OUTCOME STORE
For each recorded event the engine tracks, for the following H bars
(default 24):
- excursion at H/4, H/2, 3H/4 and H, expressed in R where R is the
ATR(14) value at the event bar
- maximum favourable and maximum adverse excursion
- the bar number at which the move first reached +1R, +2R and +3R,
or zero if it never did
The record is written to the store only after H bars have fully elapsed.
A projection displayed today is therefore built exclusively from events
that had already finished before it was issued. This is a structural
property of the design, not a discipline that has to be maintained.
6. WHAT IS DRAWN
- An empirical quantile fan. The outer envelope traces the 5th and
95th percentiles of the matched outcomes at each of the four
checkpoints; the inner envelope traces the 25th and 75th; the
dashed centre line traces the 50th. The shape is asymmetric and
heavy-tailed whenever the underlying data is, because the values
are measured percentiles rather than a fitted curve.
- A target line. The median maximum favourable excursion of the
matched set is converted to a price, then snapped to a mapped
structural level if one lies within half an ATR. Statistics choose
the zone; structure chooses the exact price. The label states
"level" when a snap occurred and "stat" when it did not.
- Hit rate and expected bars. Both are read at the nearest whole R
ring (+1R, +2R or +3R) to the target distance, and the ring is
named on the label. Hit rate is the share of matched records that
reached that ring within H bars. The bar count is the median
first-passage time among those records that reached it.
7. RUN TRACKER
A run begins at a confirmed structure shift and ends at the next
confirmed shift in the opposite direction. Within a run, occurrences of
each event class and direction are counted. When the run closes, one
record per class is stored: how many had occurred before the reversal.
The observation unit is therefore the run, not the event. This matters:
counting events directly would produce heavily overlapping samples,
since several events inside one run share the same future. Counting runs
does not.
The panel answers a question most tools ignore entirely: given that a
third bearish divergence has now printed in this uptrend, in what
fraction of past runs on this chart did the reversal arrive by the
third, and in what fraction did the run extend to a fourth or beyond.
8. SELF-AUDIT
Every displayed projection resolves into exactly one of four states, and
these are never merged:
HIT the target was reached first
ADV the -1R reference was reached first
AMB both were touched inside the same bar, so the order is
unknowable from bar data and the case is discarded rather
than claimed
EXP H bars elapsed with neither touched
The dashboard reports the running counts, and separately compares the
average hit rate the tool projected against the hit rate it actually
realised. If those two numbers diverge, the tool is telling you its own
estimates are miscalibrated on this chart.
Two further panels report whether the classification axes carry any
information at all: median outcome for tier A versus tier B, and median
outcome for MAJOR versus MINOR versus NONE locations. If a pair does not
separate, that axis is not contributing, and you are meant to see that.
===============================================================
WHAT MAKES IT ORIGINAL
===============================================================
- Outcome statistics are conditioned on a discrete event signature
and computed from the chart's own history, rather than assumed from
a parametric distribution or imported as fixed percentages.
- Projection targets are snapped onto mapped structural levels, so
the displayed price is a real level rather than a quantile value
floating in empty space.
- The hierarchical backoff makes sparse conditioning explicit: the
display always names the level of specificity that was achievable
and the sample size behind it.
- Sequence statistics use the completed run as the observation unit,
which removes the sample overlap that direct event counting creates.
- The indicator scores its own past projections against outcomes and
displays projected versus realised hit rate on the chart.
===============================================================
HOW TO READ THE CHART
===============================================================
HORIZONTAL LINES
The image below shows the level map alone, with the projection layer
switched off, so the two grades of level can be compared directly: gold
solid lines mark MAJOR levels, thin dotted lines mark MINOR ones.
Two families of horizontal line exist, and they are drawn so that they
can never be confused with each other.
THE LEVEL MAP owns thin dotted lines and gold:
Gold, solid, width 2 A MAJOR level: four or more independent
structural factors coincide at this price.
Washed white, DOTTED, A MINOR level: one to three factors.
width 1
THE TARGET FAMILY owns solid width-2 lines in mint, coral and slate.
No target line is ever drawn dotted or at width 1.
Mint, solid, width 2, The target of the live projection.
full opacity Extends to the right. Only one is live at
a time.
Coral, dotted, width 1 The -1R adverse reference of the live
projection. Removed the moment the
projection resolves. This is a measurement
boundary used to classify the outcome. It
is NOT a stop loss and must not be used as
one.
Once a projection resolves, its target line keeps its full width and
stays solid. Only its colour and opacity change:
Mint, faded HIT: price reached it within the horizon.
Coral, faded ADV: price reached the -1R reference
first.
Slate blue-grey, faded EXP or AMB: the horizon elapsed with
neither touched, or both were touched in
the same bar and the case was discarded.
Resolved lines are retained deliberately. A price that the statistics
selected, and that was then snapped onto a structural level, often
remains structurally relevant afterwards, and it is useful to see where
those prices were. The number retained is configurable and defaults to
six.
Read the fade as expiry of a claim, not as expiry of the price. The
faded line is a record that this price was once selected as a target and
of what happened next. It is not a live target and carries no ongoing
claim about the future.
The image below shows several resolved projections on one chart, so the
three outcome colours can be compared side by side: a faded mint line
where price reached the target, a faded coral line where it reached the
adverse reference first, and a faded slate line where the horizon
elapsed without either being touched. The markers carry the matching
three-letter outcome. Projections that did not work out are shown here
deliberately; the indicator records its own failures and so should its
description.
Level lines are redrawn on each new bar and only levels within six ATR
of current price are displayed, up to fourteen at a time.
THE FAN
Outer shaded band 5th to 95th percentile of matched
historical outcomes.
Inner shaded band 25th to 75th percentile.
Dashed centre line 50th percentile, the median path.
Teal the event pointed upward.
Coral the event pointed downward.
The fan is frozen at the moment the projection is issued and is never
recalculated. It reaches forward exactly H bars.
The next image shows a single live projection close up: the two shaded
bands, the dashed median path, the mint target line, and the label
carrying hit rate, sample size and remaining bars. Note that the bands
are not symmetrical around the median, because they are measured
percentiles rather than a fitted curve.
EVENT MARKERS
A small label prints at each recorded event, below the bar for upward
events and above for downward ones. It contains a three-letter code and
a number:
SWP sweep SHF shift SQZ squeeze
CLX climax REJ rejection DIV divergence
The number is the count of that event class and direction so far inside
the current run. "DIV 3" means this is the third divergence of that
direction since the last structure shift.
When a projection resolves, its marker gains a suffix and changes
colour:
HIT green target reached first
ADV red the -1R reference reached first
AMB amber both touched in the same bar; discarded
EXP amber the horizon elapsed with neither touched
THE TARGET LABEL
Three lines at the right end of the projection:
line 1 the target price, followed by "level" if it was snapped onto
a mapped structural level or "stat" if no level was near
line 2 hit rate and sample size, for example: hit 61% n=38
line 3 while the projection is live: bars remaining and the R ring
the hit rate refers to. Once it resolves, this line is
replaced by "RESOLVED" followed by HIT, ADV, AMB or EXP, and
the whole label takes the matching colour.
The bar count was frozen when the projection was issued and only counts
down. Nothing behind it is recalculated.
THE DASHBOARD
EVENT class, direction, and sequence number in this run
LOCATION MAJOR / MINOR / NONE and the level weight
REGIME RANGE / TRANS / TREND, the context score, tier
SIGNATURE backoff level used and sample size
WITH q50 q75 q95 terminal excursion quantiles measured ALONG the
event's own direction, in R
AGAINST q25 q05 the same distribution's tail measured AGAINST the
event's direction, in R
TARGET price and hit rate
ETA bars remaining and the R ring, or "no open
projection"
RUN EXT how far the current run has extended, in R
FLOW SOURCE "volume" or "proxy"
SEQ 1 / 2 / 3 / 4+ share of past completed runs that reversed after
that many events of this class
RUNS median median count before reversal, and number of runs
TIER A / B median outcome in R for each tier, with counts
LOC MAJ/MIN/NONE median outcome in R for each location class
LEDGER running totals of hit, adv, amb and exp
CALIBRATION average projected hit rate against realised
The dashboard is reproduced below at readable size, since every claim
made in the HOW IT WORKS section is meant to be verifiable there: the
backoff level actually used, the sample size behind it, the quantiles,
the sequence distribution, the two axis-health rows, and the running
comparison of projected against realised hit rate.
WITH and AGAINST are measured relative to the event's own direction, not
relative to the chart. For a downward event, a WITH value of +1.4R means
price fell by 1.4 ATR, and an AGAINST value of -1.8R means price rose by
1.8 ATR before the horizon closed. AGAINST is the row that tells you how
violent the route can be, and it is the row most worth reading before
deciding on any position size.
===============================================================
THE MOST IMPORTANT WARNING
===============================================================
DO NOT TREAT THE GREEN LINE AS A TARGET TO TRADE TOWARD, AND DO NOT
TREAT ANY MARKER AS AN ENTRY SIGNAL.
You will observe the following, and it is the single most dangerous
thing about this indicator:
The projection expires. The bars run out. The label reads "closed". And
then, twenty or fifty bars later, price finally reaches the green line.
It is tempting to read that as the tool having been right after all. It
was not, and here is why that reading destroys accounts:
1. The green line is snapped to a structural level. Structural levels
get revisited eventually, because that is what they are. Price
arriving there after the horizon has expired is not evidence of
anything. It is what levels do.
2. The expected bar count is a median of the cases that reached the
ring. By definition, roughly half of the successful cases took
longer than that. "The estimate elapsed and it is not there yet"
is an ordinary outcome, not a malfunction.
3. Route is not measured. The indicator records where price ended up
and how far it travelled. It does not promise that the path there
was survivable. Price can travel far against you first, and still
arrive. The AGAINST row is the only place the route appears at all,
and even there it is a summary, not a guarantee.
A faded line is a closed case. It has no ETA, no live claim and no
implication that price is still heading there. If price later reaches a
faded line, that is not a delayed hit. It is a structural level being
revisited, which is what structural levels do.
That third point is what actually costs money. A leveraged position
opened on the strength of a hit rate can be liquidated by an adverse
excursion long before the target is reached. The account is closed; the
target being reached afterwards is irrelevant to it. This is not a
remote scenario. It is the ordinary case whenever leverage is applied to
a statistic that describes destinations rather than routes.
The -1R red line does not protect you either. It is a measurement
boundary chosen so outcomes can be classified consistently. It is not a
risk parameter and was never sized to be one.
Precedent is a context tool. It tells you what has typically followed
this kind of moment on this chart, with the sample size attached. Entry
timing, position size, stop placement, leverage and the decision to
trade at all remain entirely yours and must come from a method this
indicator does not contain and does not attempt to contain.
If the only thing you take from a projection is "hit 61 percent, so buy"
you have misread it. The intended reading is closer to: "in 38
comparable cases on this chart, price reached this level within 24 bars
in 61 percent of them, taking a median of 9 bars, and the adverse tail
of that distribution ran to -1.8R."
===============================================================
LIMITATIONS AND REPAINT POLICY
===============================================================
REPAINT BEHAVIOUR, ELEMENT BY ELEMENT
- Event detection, tier assignment and score sampling are locked at
bar close. They do not change afterwards.
- Swing pivots confirm with a delay equal to the pivot length in bars
(default 21). A level cannot appear before its pivot is confirmed.
That delay is the cost of not looking ahead, and it is not avoided
anywhere in this script.
- Higher timeframe values are requested with a one-bar offset, so
only completed higher timeframe bars are used. On the chart
timeframe this means the higher timeframe bias lags by one higher
timeframe bar.
- The fan, the target line and the adverse line are computed once, at
the confirmed bar that issued them, and are never recalculated.
- The dashboard and the countdown update live within the forming bar
by design. The countdown only subtracts from a number that was
frozen at issue; no statistic behind it is recomputed.
KNOWN LIMITATIONS
- The statistics are descriptive, not predictive. They summarise what
has already happened on the chart in front of you. They are not a
forecast and are not out-of-sample.
- Sample sizes are small by construction. Requiring non-overlapping
outcomes limits the number of independent cases available, which is
why the backoff and the visible sample counts exist.
- Until enough completed outcomes exist, nothing is drawn at all. The
image below shows that state: the dashboard reports CALIBRATING and
the current count against the required minimum, and no fan, target
or hit rate appears anywhere on the chart.
- Chart history is finite. On low timeframes the available bars may
cover only a matter of weeks, and possibly only one market regime.
Treat a large sample drawn from a single regime with caution.
- Outcomes are measured at bar resolution. When a bar touches both
the target and the adverse reference, the order is unknowable and
the case is marked ambiguous and discarded rather than assumed.
- Statistics apply only to events this indicator itself defined. If
you identify a setup it did not mark, no displayed percentage
describes it. Borrowing a number from a different occasion is a
misuse.
- Where a symbol provides no usable volume, flow falls back to a
body-position proxy on the same percentile scale. The dashboard
states which is in use. Mixing the two would corrupt the store, so
the fallback applies to the whole session or not at all.
- Changing the higher timeframe from Auto to Manual changes what the
signature key means. The stored outcomes are therefore cleared and
rebuilt from zero when you do it. This is intentional.
- Nothing here is tuned. There is no optimiser and no fitted weight.
Thresholds are percentiles over disclosed rolling windows. If a
parameter is changed, the level map and the statistics change with
it, and the sample must accumulate again.
===============================================================
DISCLAIMER
===============================================================
This script is published for educational and analytical purposes. It is
not financial advice, not a recommendation to buy or sell any
instrument, and not a trading system. It produces no entry signals, no
stop levels and no position sizing.
Historical measurement does not indicate future results. Markets change
regime, and a distribution measured on past bars may not describe the
next ones. Trading carries risk of loss, and leveraged trading carries
risk of total loss. Any decision taken while this indicator is on the
chart remains entirely the responsibility of the person taking it.
อินดิเคเตอร์

Minor H1 BIAS Analyse## 1. Purpose of the Script
The **Minor H1 BIAS Analyse** is designed to determine the short-term directional market BIAS.
It does not provide entries. Instead, it evaluates several trend, momentum, and structure conditions and classifies the market as:
Long
Short
Neutral
The script should therefore be used as a directional filter together with a separate entry strategy.
---
## 2. Structure of the Minor BIAS
The Minor BIAS is based on five components:
EMA Trend
Price vs EMA
Current Candle Direction
Previous H1 High / Low Break
Market Structure Break
Each bullish condition adds one point to the Bull Score.
Each bearish condition adds one point to the Bear Score.
The maximum possible score is:
5 Long
5 Short
---
## 3. EMA Trend
The script uses two exponential moving averages:
Fast EMA: 20
Slow EMA: 50
If the Fast EMA is above the Slow EMA:
+1 Long
If the Fast EMA is below the Slow EMA:
+1 Short
This represents the basic trend direction.
---
## 4. ATR Neutral Buffer
The script uses an optional ATR buffer around the EMAs.
Default settings:
ATR Length: 14
ATR Multiplier: 0.20
The buffer creates a neutral zone around the EMAs.
Price must move clearly above or below both EMAs before the condition becomes bullish or bearish.
This helps filter small movements and market noise.
---
## 5. Price vs EMA
For a bullish condition, price must close above both EMAs plus the ATR Buffer.
Result:
+1 Long
For a bearish condition, price must close below both EMAs minus the ATR Buffer.
Result:
+1 Short
If price remains inside the buffer area:
No Score
The dashboard displays:
Inside Buffer
---
## 6. Current Candle Direction
The script also evaluates the current candle.
Bullish Candle:
Close above Open
+1 Long
Bearish Candle:
Close below Open
+1 Short
Doji:
No Score
This adds a simple momentum component to the BIAS.
---
## 7. Previous H1 High / Low Break
The script checks whether price closes above or below the previous candle.
Close above Previous High:
+1 Long
Close below Previous Low:
+1 Short
No Break:
No Score
This filter can be enabled or disabled in the settings.
The script uses the candle close, not only the wick.
---
## 8. Market Structure
The script also analyzes the previous market structure.
Default Lookback:
5 candles
It calculates:
Structure High
Structure Low
If price closes above the Structure High:
Bullish Structure Break
+1 Long
If price closes below the Structure Low:
Bearish Structure Break
+1 Short
If neither level is broken:
Range
No Score
---
## 9. Score System
The final Minor BIAS is calculated from the Bull Score and Bear Score.
Possible Long points:
EMA Trend
Price vs EMA
Bullish Candle
Previous High Break
Bullish Structure Break
Possible Short points:
EMA Trend
Price vs EMA
Bearish Candle
Previous Low Break
Bearish Structure Break
A minimum of three points is required.
---
## 10. Minor LONG
The Minor BIAS becomes Long when:
Bull Score is at least 3
and
Bull Score is greater than Bear Score.
Example:
Bull Score: 4
Bear Score: 1
Result:
MINOR LONG
---
## 11. Minor SHORT
The Minor BIAS becomes Short when:
Bear Score is at least 3
and
Bear Score is greater than Bull Score.
Example:
Bull Score: 1
Bear Score: 4
Result:
MINOR SHORT
---
## 12. Neutral
If neither side reaches the required conditions, the BIAS remains Neutral.
Example:
Bull Score: 2
Bear Score: 2
Result:
NEUTRAL
Neutral therefore represents an unclear or mixed market situation.
---
## 13. Dashboard
The dashboard shows the current state of every component.
It contains:
BIAS
EMA Trend
Price vs EMA
H1 Candle
Previous H1 Break
Structure
ATR Buffer
It also displays the current:
Bull Score / Bear Score
Example:
4 / 1
This makes it possible to understand why the current BIAS is Long, Short, or Neutral.
---
## 14. Chart Visualization
The script can display:
Fast EMA
Slow EMA
Previous H1 High / Low
Structure High / Low
BIAS Background
BIAS Label
Dashboard
Each visualization can be enabled or disabled individually.
The calculations continue to work even when the corresponding chart elements are hidden.
---
## 15. Alerts
The script includes alerts for:
Minor H1 LONG
Minor H1 SHORT
Minor H1 NEUTRAL
These can be used to receive a TradingView notification when the directional BIAS changes.
---
## 16. Meaning for Trading
The Minor BIAS should not be treated as an entry signal.
A simple trading rule would be:
**MINOR LONG:** Prefer Long setups.
**MINOR SHORT:** Prefer Short setups.
**NEUTRAL:** Wait for clearer conditions.
The actual entry should come from a separate trading setup.
---
## 17. BIAS Strength
The score can also be used to estimate the strength of the current direction.
3 Points:
Valid directional confirmation
4 Points:
Strong confirmation
5 Points:
Very strong alignment
For example:
5 / 0 Long
represents stronger bullish confirmation than:
3 / 2 Long
even though both are classified as MINOR LONG.
---
## 18. Important Timeframe Note
The current script uses the timeframe of the active chart.
That means the calculations are only truly based on H1 when the indicator is used on a **1-hour chart**.
If the script is placed on M5 or M1, the calculations also use M5 or M1 data.
For a true H1 BIAS that remains identical on every chart, the calculations would need to use fixed 60-minute data.
---
## 19. Conclusion
The **Minor H1 BIAS Analyse** is a score-based directional filter.
It combines:
Trend
Price Position
Momentum
Previous Candle Break
Market Structure
At least three confirmations are required for a directional BIAS.
The final result is:
MINOR LONG
MINOR SHORT
NEUTRAL
Its purpose is to identify the stronger short-term market direction before a separate entry setup is considered.
++ This was only used on NQ ++
อินดิเคเตอร์

High Volume Rejection Zones [BOSWaves]High Volume Rejection Zones - Volume-Validated Swing Rejection Detection with Quality-Scored Dual-Layer Zones and Flip Tracking
Overview
High Volume Rejection Zones is a swing-anchored supply and demand zone system that identifies price levels where confirmed pivot highs and lows were accompanied by meaningful rejection wick structure and above-average volume participation, where zone depth, inner core sizing, and visual intensity are driven by a composite rejection quality score derived from wick magnitude, close distance from the extreme, and relative volume strength rather than arbitrary fixed zone dimensions.
Instead of marking every swing pivot regardless of the conviction behind it, each zone requires three simultaneous conditions to be satisfied: the pivot candle's volume must exceed its rolling average by the configured multiple, the rejection wick must represent a minimum fraction of the candle's total range, and the close must have moved sufficiently far from the extreme, confirming that price was decisively pushed away from the level rather than drifting. Only when all three conditions are met does a zone form, ensuring every level on the chart has measurable evidence of genuine rejection activity behind it.
This creates a zone framework that goes beyond simple level marking into active lifecycle management. Each zone tracks whether price retests and holds the level, displaying a hold signal when the interaction confirms structural defense, then converts visually when price breaks through the zone, flipping from resistance to potential support or from support to potential resistance and monitoring for a subsequent flip retest where the former opposing level is tested from the new side. Zones fade progressively with age using a cubic opacity curve, expired zones dissolve automatically, and a configurable historical limit manages the total object count across the chart history.
Price is therefore evaluated not just against levels that meet structural swing criteria but against levels with quantified rejection evidence, active hold and flip tracking, and aging-aware visual treatment that communicates zone relevance at a glance.
Conceptual Framework
High Volume Rejection Zones is founded on the principle that meaningful supply and demand zones require simultaneous evidence across three independent dimensions: the price was structurally significant enough to form a confirmed swing, the rejection from that level was decisive enough to produce a meaningful wick, and volume participation was sufficient to indicate that the rejection was driven by genuine market activity rather than low-liquidity price movement.
Traditional pivot-based zone tools mark levels from confirmed swings without filtering for the quality of the rejection at those pivots, producing charts populated with zones where price barely paused rather than zones where price was actively defended by participating volume. This framework requires all three rejection dimensions to exceed their configured thresholds simultaneously before a zone is committed, concentrating the chart on the subset of swing pivots with the strongest combined evidence of institutional rejection activity.
Three core principles guide the design:
Zone formation should require concurrent validation across wick structure, close positioning, and volume significance, ensuring each zone reflects a genuine multi-dimensional rejection event rather than a mechanical pivot detection.
Zone depth should scale with rejection quality, with the inner core zone growing proportionally as wick conviction, close distance, and volume strength increase, providing a visual quality gradient across zones of varying rejection evidence.
Zones should track their own lifecycle through hold detection, break identification, flip conversion, and age-based fading, communicating structural relevance dynamically rather than remaining static rectangles regardless of subsequent price interaction.
This shifts supply and demand zone analysis from pivot-counting into evidence-weighted rejection identification where every visible zone carries quantified conviction credentials and active interaction tracking.
Theoretical Foundation
The indicator combines confirmed pivot detection with simultaneous three-condition rejection filtering, a composite quality score derived from normalized wick, close, and volume components, dual-layer zone construction with quality-proportional inner core sizing, cubic fade curve aging, hold retest detection, break detection with visual flip conversion, and flip retest detection with independent completion tracking per zone.
Pivot confirmation uses a symmetric left-right bar requirement to identify structurally validated swing highs and lows. The rejection quality score weights the wick component at forty percent, the close distance component at thirty-five percent, and the relative volume component at twenty-five percent, each normalized to a zero-to-one scale against their respective reference values. The coreDepth variable maps this composite score to an inner zone boundary that ranges from twenty-two percent to seventy percent of the total zone height, producing inner zones that are small for borderline rejections and deep for high-conviction rejections. The cubic fade curve applies a non-linear aging effect that preserves zone visibility through most of the maximum age before accelerating the fade near expiry.
Four internal systems operate in tandem:
Rejection Validation Engine : Tests each confirmed pivot against the relative volume threshold, minimum wick ratio, and minimum close distance simultaneously, qualifying only pivots where all three conditions are met and calculating the composite rejection quality score from the normalized component values.
Zone Construction System : Creates dual-layer outer and inner zone boxes with ATR-scaled height and quality-proportional inner boundary positioning, adds a precise pivot price level line, and displays the relative volume multiple as a label when the show volume setting is enabled.
Hold and Break Tracking System : On each bar after zone creation, tests for hold retests where price touches the zone without closing through it and generates hold signals. Tests for full breaks where price closes beyond the outer zone boundary, converts zone coloring and border style to the opposing direction, and begins monitoring for flip retests.
Aging and Lifecycle Management System : Applies a cubic opacity fade curve based on zone age relative to the configured maximum, dissolves expired zones with a near-transparent final state before removing them, and enforces the historical zone count limit by removing oldest objects first.
This design ensures every zone carries its own rejection quality credentials, tracks its own lifecycle state, and communicates both structural relevance and interaction history through its visual properties at all times.
How It Works
High Volume Rejection Zones evaluates price through a sequence of pivot-aware and evidence-validated processes:
Pivot Detection : Swing highs and lows are confirmed when the configured number of bars to the left and right validate the structural significance of the pivot, providing the structural anchor for rejection testing.
Wick Ratio Measurement : The upper wick of a pivot high is measured as a fraction of the full candle range. The lower wick of a pivot low is measured similarly. Values below the configured minimum exclude the pivot from zone formation.
Close Distance Measurement : The distance between the pivot extreme and the close is expressed as a fraction of the candle range, measuring how decisively price moved away from the extreme before the bar closed. Values below the minimum threshold exclude the pivot.
Relative Volume Test : The pivot candle's volume is divided by its rolling SMA baseline. Values below the configured multiple exclude the pivot, ensuring only bars with meaningful participation qualify.
Rejection Quality Scoring : For qualifying pivots, each of the three components is normalized to a zero-to-one scale against its reference value and combined with the configured weightings to produce a composite rejection quality score.
Zone Depth Calculation : The composite quality score maps linearly to a core depth fraction that determines how far the inner zone boundary sits within the total ATR-scaled zone height, producing quality-proportional inner zones.
Dual-Layer Zone Creation : An outer zone box spans the full ATR height with a transparent fill. An inner zone box spans the quality-proportional depth with a denser fill. A level line marks the precise pivot price. A relative volume label displays the RVOL multiple when enabled.
Hold Retest Detection : After zone creation, each bar tests whether price touched the zone without closing through it in the opposing direction. A qualifying touch generates a hold signal diamond marker and brightens the zone border.
Break Detection and Flip Conversion : When price closes beyond the outer zone boundary in the opposing direction, the zone converts visually to the opposing direction color with dotted borders, indicating the former resistance or support level has been broken and may now function as the opposing structural reference.
Flip Retest Detection : After a zone break, each subsequent bar tests whether price retouched the outer boundary from the new side and closed beyond it, generating a flip signal diamond marker and brightening the converted zone's border.
Age-Based Fading : On each bar, the zone age is calculated and a cubic fade curve maps the age fraction to increasing transparency values applied to all zone visual properties, causing zones to gradually dissolve toward invisibility as they approach the maximum age.
Expiry and Cleanup : Zones reaching maximum age are set to near-transparent final state and all references are cleared. The historical object arrays are trimmed when the maximum zone count is exceeded by removing the oldest entries.
Together, these elements form a continuously updating rejection zone system where every visible level has passed a multi-condition evidence filter, carries a quality-proportional visual footprint, and reflects its current lifecycle state through color, opacity, border style, and signal markers.
Interpretation
High Volume Rejection Zones should be interpreted as an evidence-filtered structural level system with active lifecycle state communication:
Bearish Rejection Zone (Red) : Formed at a confirmed pivot high where volume, wick, and close distance thresholds were all satisfied simultaneously, identifying a price level where selling pressure was both structurally significant and volume-backed.
Bullish Rejection Zone (Green) : Formed at a confirmed pivot low where the equivalent buying pressure thresholds were satisfied, identifying a level where buying activity was structurally significant and volume-backed.
Outer Zone : The full ATR-scaled zone box with the lighter fill represents the complete rejection range anchored to the pivot extreme, serving as the primary zone boundary and the reference for break detection.
Inner Core Zone : The denser inner fill occupying a quality-proportional fraction of the outer zone height represents the highest-confidence portion of the rejection zone where price and volume evidence was strongest. Larger inner cores indicate higher composite rejection quality.
Level Line : The solid line at the precise pivot price provides a pin-point structural reference at the exact level where the rejection candle's extreme registered.
Relative Volume Label : The RVOL multiple displayed on each zone quantifies how significantly above average the pivot candle's volume was, providing an immediate conviction reading for each zone.
Zone Fading : Progressively increasing transparency as zones age reflects diminishing structural relevance over time. Fresh zones are fully opaque and most relevant; older zones are more transparent and carry reduced structural weight.
Flipped Zone (Converted Color) : When price closes through a zone's outer boundary, the zone converts to the opposing direction's color with dotted borders, indicating the former support or resistance may now function in the opposite structural role.
◆ Hold Signal : Diamond marker appearing when price retests an active unbroken zone and closes without penetrating through it, confirming that the rejection level is actively defending its structural role.
◆ Flip Signal : Diamond marker appearing when price retests a previously broken and converted zone from the new side, confirming that the former opposing level has been accepted in its new structural role.
Zone opacity, inner core depth, RVOL label, and lifecycle state collectively communicate more about each level's structural relevance than zone location alone.
Signal Logic & Visual Cues
High Volume Rejection Zones generates four distinct signal types across two lifecycle phases:
Bullish Hold Signal (◆) : Generated when price touches a bullish rejection zone from above and closes back above the pivot price level without closing through the outer zone bottom, confirming structural defense of the demand level.
Bearish Hold Signal (◆) : Generated when price touches a bearish rejection zone from below and closes back below the pivot price level without closing through the outer zone top, confirming structural defense of the supply level.
Bullish Flip Signal (◆) : Generated when price retests the top boundary of a previously broken bearish zone from above and closes above it, confirming that former resistance has been accepted as support.
Bearish Flip Signal (◆) : Generated when price retests the bottom boundary of a previously broken bullish zone from below and closes below it, confirming that former support has been accepted as resistance.
Each zone generates at most one hold signal and one flip signal across its full lifecycle, preventing repeated signals on the same level and focusing attention on the first confirming interaction of each type.
Alert generation covers bullish and bearish zone formation, bullish and bearish hold events, and bullish and bearish flip confirmations for comprehensive systematic monitoring.
Strategy Integration
High Volume Rejection Zones fits within volume-validated structural level and supply and demand zone-based trading approaches:
RVOL-Weighted Zone Prioritization : Favor zones displaying higher relative volume multiples in the label over borderline-qualifying zones, as greater volume participation at the rejection provides stronger evidence of institutional activity at that level.
Inner Core Precision Entries : Use the inner core zone as a precision entry reference rather than the full outer boundary, placing entries where the quality-weighted evidence was most concentrated rather than at the outer ATR extent of the zone.
Hold Signal Confirmation Entries : Use hold signals as lower-risk re-entry or initial entry triggers within established trends, treating a confirmed zone defense as evidence that the structural level remains operationally relevant rather than merely marked.
Flip Zone Framework : Monitor converted zones as potential support-to-resistance and resistance-to-support levels, using flip signals as confirmation that the role conversion has been accepted by subsequent price action before committing to the new directional interpretation.
Zone Age and Opacity Context : Weight fresher, more opaque zones more heavily than faded older zones in trade planning, as recent rejections formed under current market conditions carry more relevance than historical rejections formed in different volatility or volume regimes.
Multi-Timeframe Zone Hierarchy : Apply higher-timeframe rejection zones as primary directional structural context, using lower-timeframe zone interactions for entry timing precision within the structural bias established by the higher-timeframe level.
Technical Implementation Details
Pivot Detection : Symmetric left-right bar confirmation for swing highs and lows with configurable lookback
Rejection Filter : Simultaneous three-condition testing across relative volume, wick ratio, and close distance thresholds
Quality Score : Weighted composite from normalized wick, close, and RVOL components mapping to inner core depth fraction
Zone Construction : Dual-layer outer and inner ATR-scaled boxes with quality-proportional inner boundary and pivot price level line
Lifecycle System : Hold detection, break identification with flip conversion, flip retest detection with per-zone completion flags
Aging System : Cubic fade curve applied to all visual properties with automatic expiry and object cleanup
Historical Management : Array-based object tracking with configurable maximum count enforced by oldest-first removal
Performance Profile : Optimized with calc_bars_count and max_bars_back configuration for deep historical pivot detection across extended chart histories
Optimal Application Parameters
Timeframe Guidance:
1 - 5 min : Intraday rejection zone mapping for scalping with shorter pivot lookback and tighter volume threshold for responsive zone formation on fast intraday swings
15 - 60 min : Session-level supply and demand identification with balanced pivot lookback and moderate rejection thresholds for meaningful zone density across typical session structures
4H - Daily : Swing-level institutional rejection mapping with longer pivot lookback and higher volume thresholds reflecting the larger participation events that define significant higher-timeframe levels
Suggested Baseline Configuration:
Pivot Lookback Left : 12
Pivot Lookback Right : 12
Volume Average Length : 20
Minimum Relative Volume : 1.15
Minimum Rejection Wick : 0.25
Minimum Close Rejection : 0.50
ATR Length : 200
Zone ATR Width : 0.30
Maximum Zone Age : 200
Historical Zones : 60
Show Relative Volume : Enabled
Retest Signals : Enabled
These suggested parameters should be used as a baseline; their effectiveness depends on the instrument's swing frequency, volume behavior, and preferred zone density, so fine-tuning is expected for optimal performance.
Parameter Calibration Notes
Use the following adjustments to refine behavior without altering the core logic:
Too many zones forming : Increase Minimum Relative Volume to demand stronger volume participation, increase Minimum Rejection Wick to require more decisive wick structure, or increase both Pivot Lookback values to demand more structurally significant swings.
Zones not forming frequently enough : Decrease Minimum Relative Volume toward 1.0 for more inclusive volume qualification, or decrease Pivot Lookback values toward 5 for faster swing confirmation on shorter structural moves.
Zone height too large or small : Adjust Zone ATR Width to scale the vertical zone extent relative to the instrument's typical volatility, calibrating zone depth to realistic price interaction ranges at the target timeframe.
Inner cores consistently too small : The inner core scales with rejection quality. Consistently small cores indicate borderline-qualifying rejections. This is expected behavior and reflects the lower composite evidence at those levels rather than a parameter issue.
Zones fading too quickly or slowly : Adjust Maximum Zone Age to control how many bars zones remain visible before expiring. Shorter ages produce a chart showing only recent levels; longer ages retain historical structural references for extended analysis.
Too many historical zones cluttering the chart : Reduce Historical Zones to limit the total object count, focusing the chart on the most recent qualifying levels within the retained history.
Volume baseline distorted by outlier sessions : Increase Volume Average Length to smooth the SMA baseline across more history, reducing the influence of individual extreme volume sessions on the relative volume threshold calculation.
Adjustments should be incremental and evaluated across multiple session types rather than isolated market conditions.
Performance Characteristics
High Effectiveness:
Trending markets where swing pivots form at structurally significant levels and are accompanied by volume-backed rejection that creates reliable supply and demand references for subsequent pullback interactions
Liquid instruments with consistent volume participation where the SMA baseline accurately classifies above-average bars and relative volume readings reliably indicate genuine institutional activity at pivot levels
Supply and demand zone trading approaches where the multi-condition rejection filter concentrates attention on the highest-conviction structural levels rather than marking every mechanical pivot
Flip zone strategies where broken levels converting to opposing structural roles provide high-probability setups as price returns to test the former level from the new side
Reduced Effectiveness:
Choppy, low-volume markets where pivot formation is frequent but volume at each swing is consistently below average, causing the RVOL filter to suppress most zone formation and leave the chart sparse
Instruments with inconsistent volume distribution where the SMA baseline is distorted by session type variation, producing unreliable relative volume classifications across different trading periods
Very fast-moving markets where swing confirmation requires sufficient right-side bars that pivots are confirmed significantly after the actual structural event, reducing the timeliness of zone placement
Markets with extremely small bar ranges where wick ratios become unreliable as noise rather than genuine rejection structure, causing the wick filter to produce inconsistent zone qualification
Consolidation environments where price oscillates near prior rejection zones without clear directional follow-through, generating frequent hold signals without the subsequent trending behavior that validates the zone's structural significance
Integration Guidelines
Confluence : Combine with BOSWaves momentum tools, market structure indicators, or volume profile analysis to validate rejection zone interactions with broader analytical context before committing to structural level-based trades
RVOL Hierarchy : Build a priority hierarchy among active zones based on RVOL multiples. Zones with the highest relative volume readings represent the most convincing institutional rejection events and should be treated as primary structural references over borderline-qualifying zones.
Hold Signal Discipline : Treat hold signals as structural confirmation rather than automatic entries. A hold signal confirms the level defended but not the direction or magnitude of the subsequent move. Combine with trend alignment and momentum context before acting.
Flip Zone Patience : Allow converted zones to develop their flip retest naturally rather than anticipating the interaction. The flip signal requires price to retest the converted boundary and close through it from the new side, confirming role acceptance rather than mere proximity.
Age Awareness : Monitor zone opacity as a relevance indicator. Fully opaque fresh zones reflect current market conditions while heavily faded older zones may have formed under different volatility and volume regimes that are no longer representative of current structure.
Disclaimer
High Volume Rejection Zones is a professional-grade volume-validated supply and demand zone detection and lifecycle tracking tool. It uses multi-condition rejection filtering with quality-scored zone construction but does not predict future price movements. Results depend on market conditions, instrument volume characteristics, parameter selection, and disciplined execution. BOSWaves recommends deploying this indicator within a broader analytical framework that incorporates momentum context, trend structure, and comprehensive risk management. อินดิเคเตอร์

อินดิเคเตอร์

Trend Angle Momentum [MarkitTick]💡 This tool measures market structure not just as a sequence of highs and lows, but as a rate of directional change. It detects confirmed swing pivots and then calculates the geometric angle of the trendline connecting each pivot to the one before it, translating pure price action into a single, intuitive metric: degrees of trend steepness. Instead of asking traders to infer momentum from candle shape or oscillator divergence, it hands them a number — the actual angle of ascent or descent between structural turning points — along with an optional smoothed reading of how that angle is evolving over time.
✨ Originality and Utility
Most swing-detection tools stop at marking the high or low. This script goes a step further by quantifying the relationship between consecutive swings using trigonometry. Each swing-to-swing move is converted into a percentage price change, which is then run through an arctangent function to produce a true geometric angle in degrees, independent of the instrument's absolute price scale. A move on a $2 stock and a move on a $2,000 stock that share the same percentage steepness will report the same angle, making the readings comparable across symbols and timeframes in a way that raw price-based slope calculations cannot achieve.
The utility here is twofold. First, the angle itself acts as a quantified momentum proxy: a shallow angle after a strong prior swing signals decelerating momentum well before a lagging oscillator would confirm it, while a steepening angle on successive swings signals acceleration. Second, an optional Angle Momentum layer tracks a rolling average of the last several swing angles, smoothing out single-swing noise and revealing whether the broader structural rhythm of the market is strengthening or weakening. This combination — geometric normalization plus rolling angle smoothing — gives traders a structural momentum read that is not available from stock pivot tools or generic slope indicators alone.
🔬 Methodology and Concepts
• Confirmed Pivot Detection
The script identifies swing highs and swing lows using a symmetric fractal method: a bar is only confirmed as a pivot high if it is higher than a defined number of bars to its left and right, and likewise for a pivot low. The "Left Bars" and "Right Bars" inputs control how many bars on each side must confirm the extreme. Because the right-side bars must fully close before a pivot can be validated, every pivot marked on the chart is confirmed historical structure, not a live, moving estimate — the marker is deliberately plotted with a backward offset equal to the right-bar count so that its horizontal position matches where the actual swing extreme occurred, not where it was confirmed.
• Percent-to-Angle Conversion
Once two consecutive confirmed pivots of the same type (high-to-high or low-to-low) are available, the script calculates the percentage price change between them. This percentage is then optionally normalized by the number of bars separating the two pivots (via the "Normalize Angle by Bars" input), which converts the reading from "how much did price move" into "how much did price move per bar," a more useful measure of steepness when swings vary widely in duration. The resulting rate is passed through an arctangent function and converted from radians to degrees, producing a bounded, intuitive angle: values approaching plus or minus ninety degrees represent extremely steep percentage moves, while values near zero represent flat, sideways structure.
• Angle Momentum (Optional Smoothing Layer)
When enabled, the script maintains a running array of the most recent swing angles (separately for highs and lows) and reports their simple average over a user-defined lookback length. This produces a second-order reading: rather than looking at a single swing's angle in isolation, it shows whether the sequence of recent swing angles is, on average, steep or shallow, positive or negative — a way of gauging whether structural momentum is building or fading across several swings rather than just the most recent one.
• Live Dashboard
A compact on-chart table continuously summarizes the last confirmed high pivot price, the last confirmed low pivot price, the most recent high-swing angle, the most recent low-swing angle, and whether Angle Momentum smoothing is currently active, giving traders a persistent numerical snapshot without needing to hover over chart objects.
🎨 Visual Guide
Diagonal trend lines connecting consecutive swing highs (default red/green by angle sign) and consecutive swing lows are drawn directly between the two pivot points, visually representing the geometric slope being measured.
A small numeric label at the midpoint of each swing line displays the calculated angle in degrees, colored green for a positive (upward) angle and red for a negative (downward) angle by default.
When Angle Momentum is enabled, an additional label appears at the most recent pivot showing the smoothed "Mom" value in a distinct color (orange for highs, blue for lows by default), separated visually from the raw single-swing angle label.
Cross-style markers plot at each confirmed pivot high and pivot low directly on price, offset backward to align with the actual bar where the extreme occurred.
The dashboard table (position configurable) shows the symbol, timeframe, last high and low pivot prices, the latest angle readings for each, and the current on/off state of Angle Momentum.
📖 How to Use
Treat the angle label on each swing line as a normalized momentum reading for that specific leg of price action: steep angles indicate strong directional conviction, shallow angles indicate a weakening or consolidating move.
Compare the angle of the most recent swing to the angle of the swing before it. A sequence of progressively shallower high-to-high angles during an uptrend can indicate fading bullish momentum even while price is still making new highs, a structural early warning that pure price action alone may not show.
When Angle Momentum is enabled, use the smoothed "Mom" reading as a broader confirmation layer: a rising average angle across several swings supports the idea that momentum is genuinely building, rather than reacting to a single outlier swing.
Divergences between price structure and angle behavior — for example, higher swing highs paired with a declining angle momentum reading — can be used as a discretionary caution signal ahead of a potential trend deceleration.
The two alert conditions ("High Pivot Formed" and "Low Pivot Formed") can be used to build automated or semi-automated workflows that trigger only once a swing point is fully confirmed, rather than on every bar.
⚠️ Confirmation Lag Notice
All pivots and their associated angle calculations are confirmed structure. Because a pivot cannot be validated until the required number of bars on its right side have closed, every marker, line, and label is necessarily plotted a number of bars after the actual high or low occurred, equal to the "Right Bars" setting. The plotted markers are intentionally offset backward to align visually with the true location of the swing extreme — this does not mean the indicator is predicting or anticipating pivots in real time. Traders should treat swing confirmations as lagging structural events by design, not as leading signals.
⚙️ Inputs and Settings
Left Bars / Right Bars: Define the symmetric lookback and lookahead window used to validate a swing high or low. Larger values filter out minor fluctuations and confirm only more significant structural turning points, at the cost of a longer confirmation delay. Smaller values confirm pivots faster but are more sensitive to short-term noise.
Show High Swing Lines / Show Low Swing Lines: Independently toggle the diagonal trend lines connecting consecutive high or low pivots.
Show Swing Point Dots: Toggles the cross markers plotted directly at each confirmed pivot price.
Normalize Angle by Bars: When enabled, divides the percentage move between two pivots by the number of bars separating them before calculating the angle, producing a "steepness per bar" measure rather than a raw total-move angle. Useful for comparing swings of different durations on a more equal footing.
Use Angle Momentum: Enables the rolling average smoothing layer over the last several swing angles, plotted as an additional label at each new pivot.
Angle Momentum Length: Sets how many recent swing angles are averaged together for the smoothed momentum reading. Shorter lengths react faster to recent swings; longer lengths produce a smoother, slower-changing average.
Dashboard Position / Show Dashboard: Controls visibility and screen placement of the summary table.
High Pivot Action / Low Pivot Action: Custom text tags embedded into the JSON alert payload for each pivot type, useful for routing alerts to external automation systems that key off a specific action string.
Color inputs: Independently control the color of swing lines, angle text, pivot cross markers, momentum labels, and dashboard theming to match personal charting preferences.
🔍 Deconstruction of the Underlying Scientific and Academic Framework
The core of this indicator rests on classical trigonometric slope analysis rather than any single named technical analysis school. Converting a price move into an angle is mathematically equivalent to computing the arctangent of a rate of change, the same operation used broadly in engineering and physics to express a gradient as an angular measure rather than a raw ratio. Expressing the swing-to-swing move as a percentage change before applying the arctangent function normalizes the calculation across instruments of different absolute price levels, addressing a well-known limitation of naive "price-per-bar" slope measures, which are not comparable between a low-priced and high-priced instrument, or between two different timeframes without adjustment. The optional bar-normalization step draws on the same logic used in rate-of-change and momentum oscillators broadly, where a raw price delta is scaled by the time or bar interval over which it occurred to produce a comparable velocity-style reading rather than a simple magnitude.
The pivot detection mechanism itself is a fractal/symmetric extremum test, a widely used method in swing-structure analysis (related in spirit to Bill Williams' fractal indicator and to classical Dow Theory's emphasis on confirmed swing highs and lows as the building blocks of trend structure) that requires a candidate bar to dominate a defined number of bars on both sides before being accepted as a genuine local extremum. This symmetric confirmation requirement is a standard technique for filtering transient noise out of swing-point identification, at the deliberate cost of confirmation lag, a well-documented trade-off in any lookback-based extremum detection method. The Angle Momentum layer applies a simple moving average — one of the most foundational smoothing techniques in time-series analysis — to the sequence of discrete angle readings themselves rather than to price, effectively treating "swing angle" as its own derived data series and smoothing it the same way a moving average would smooth a price or oscillator series, in order to separate signal (the underlying trend in momentum) from noise (single-swing outliers).
⚠️ Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. We expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion. อินดิเคเตอร์
