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

Regime Detector [StrixEDGE]📊 WHAT IT DOES
StrixEDGE Regime Detector automatically classifies the market into four distinct states — Strong Trend, Weak Trend, Ranging, or Volatile Chop — using a proprietary four-metric analysis system. Subtle background colors make the current regime instantly visible without cluttering your chart.
🔬 WHY IT'S DIFFERENT
Most regime indicators rely solely on ADX. This indicator combines four independent dimensions: ADX for trend strength, RSI range-shift analysis for bull/bear regime identification, KAMA slope for adaptive trend direction, and ATR volatility ratio for market character assessment. The four-layer approach catches regime changes that single-metric tools miss entirely.
⚙️ HOW IT WORKS
The indicator evaluates four metrics simultaneously:
• ADX measures raw trend strength (>25 = trending)
• RSI tracks whether momentum is operating in bull mode (40-80) or bear mode (20-60)
• KAMA's normalized slope detects whether price is directional or flat
• ATR ratio reveals if volatility is above or below its historical average
These combine into a decision matrix: all four must agree for a "Strong Trend" classification. Partial agreement produces "Weak Trend." Low ADX + flat KAMA = "Ranging." High volatility without trend = "Volatile Chop."
📈 HOW TO USE
• Green background = Strong Uptrend → trade with trend, trail stops
• Red background = Strong Downtrend → look for shorts or stay flat
• Blue background = Ranging → use mean-reversion setups, avoid trend strategies
• Amber background = Volatile Chop → reduce size or sit out
• Diamond markers appear when regime shifts — these are key decision points
🎛️ INPUTS & DEFAULTS
ADX Period: 14 | RSI Period: 14 | KAMA Length: 21 | ATR Period: 14
ATR Lookback: 50 | Flat Threshold: 0.05 | Sensitivity: Normal
All inputs adjustable. Conservative mode raises thresholds for fewer signals. Aggressive lowers them.
═══════════════════════════════════════════════════════
🔧 CUSTOMIZATION
All parameters are fully adjustable through the indicator settings panel. Inputs are grouped logically:
• ⚙️ Core Parameters — main calculation settings
• 📊 Table Settings — table size (Tiny to Huge), position (4 corners), visibility toggle
• 🎨 Visual Settings — colors, show/hide elements
• 🔔 Alert Settings — threshold values for notifications
📊 DATA TABLE
A built-in data table displays all key metrics in real-time. Adjust the table size from Tiny to Huge to match your chart layout. Position it in any corner. Toggle visibility on/off.
🔔 ALERTS
Pre-built alert conditions for all major signals. Set up alerts via PulseWire's alert dialog — select this indicator and choose from the available conditions.
⏱️ RECOMMENDED TIMEFRAMES
Works on all timeframes. Recommended: 1H, 4H, Daily for best signal quality. Lower timeframes produce more signals but with higher noise. Weekly/Monthly for position trading context.
✅ COMPLIANCE
• No repainting — all signals based on confirmed bar close data
• No future data references
• Open-source code — verify the logic yourself
⚠️ DISCLAIMER
This indicator is a technical analysis tool, not financial advice. It does not predict future price movements. Past patterns and signals do not guarantee future results. Trading involves substantial risk of loss. Always use proper risk management, including stop losses and appropriate position sizing. Never risk more than you can afford to lose. Indicator

Indicator

FRK TRADES Session Opening Ranges 1m / 5m / 15m**FRK TRADES Session Opening Ranges 1m / 5m / 15m**
This indicator automatically marks the opening range highs and lows for the 1-minute, 5-minute, and 15-minute periods after the start of each trading session.
It is designed to help traders quickly identify important intraday breakout, rejection, retest, support, and resistance levels without manually drawing them every session.
**How to use it:**
Watch how price reacts around each opening range high and low. A confirmed breakout can indicate continuation, while rejection or a failed breakout can signal a possible move back inside the range.
The 1-minute range is useful for faster scalp setups, while the 5-minute and 15-minute ranges provide stronger structure and confirmation.
Best used alongside your own market structure, trend, volume, VWAP, or price-action analysis.
Built for clean charts and simple execution.
**FRK TRADES**
Indicator

HTF Swing Highs & LowsAn open-source multi-timeframe market structure indicator that automatically identifies and projects confirmed swing highs and swing lows from the Weekly, Daily, and 4-Hour timeframes onto any lower timeframe chart.
The indicator is designed to provide clean, non-repainting support and resistance levels based on confirmed market structure rather than developing pivots.
Features
- Weekly, Daily and 4H swing highs and lows
- Non-repainting confirmed pivots
- Automatic higher timeframe detection using request.security()
- Horizontal levels extended until invalidated
- Independent visibility controls for each timeframe
- Hierarchical timeframe filtering
- Custom colours and line widths for every timeframe
- Adjustable pivot strength
- Wick, Close or Never invalidation options
- Stop or Delete broken levels
- Automatic level management to prevent exceeding PulseWire object limits
How it works
The script uses confirmed pivot highs and lows from higher timeframes.
Unlike developing pivots, a swing is only confirmed after the selected number of candles has formed on both sides of the pivot. Once confirmed, a horizontal level is created at the swing price and extended to the right.
Because only confirmed pivots are used, historical levels do not repaint.
Pivot Strength
Pivot Strength controls how significant a swing must be before it becomes a level.
A strength of 3 means the pivot candle must have:
- three lower highs (or higher lows) before it
- three lower highs (or higher lows) after it
Higher values filter market noise and identify more significant market structure.
They also produce fewer levels and require longer confirmation.
Lower values detect smaller swings, produce more levels, react faster.
Level Invalidation
Choose how a level is treated once price trades through it.
Wick - Invalidates when price wicks beyond the level.
Close - Invalidates only after a candle closes beyond the level.
Never - Levels remain permanently.
Broken levels can either:
- Stop extending while remaining visible
- Be deleted completely
Hierarchical Visibility
The indicator can automatically display only relevant higher timeframe levels.
For example:
- Weekly levels appear on Weekly and all lower timeframes.
- Daily levels appear on Daily and all lower timeframes.
- 4H levels appear on 4H and lower charts.
This helps reduce clutter when analysing higher timeframe charts.
Notes
- Uses confirmed higher timeframe pivots only.
- Levels are anchored to the original swing candle.
- Designed for support and resistance, market structure, liquidity analysis, and confluence with other tools.
- Works on all symbols and asset classes supported by PulseWire. Indicator

Entry-to-Exit ToolA realtime non-repainting entry-to-exit analysis tool that retains a Provisional or Finalized BUY/SELL entry reference and resolves it through an opposite signal, confirmed terminal invalidation, minimum-profit target, or entry-terminal risk/reward target. The displayed exits are analytical reference events and are not a guarantee of profitability or future performance.
Name:
Entry-to-Exit Tool
Searchable Name:
Realtime Non-Repainting Entry Exit Target and Risk Reward Tool
Technical Name:
Realtime Non-Repainting Provisional Finalized Entry Reference Opposite Signal Terminal Break Profit Target and Risk Reward Exit Resolution Tool
Short title:
Trade Exit Tool
Summary
Entry-to-Exit Tool is an exit-resolution indicator that converts internally generated Provisional or Finalized BUY/SELL signals into retained entry references and then identifies where those references would resolve under a selected exit method.
The script does not require signals from another indicator. It contains its own causal transform-path signals, structural resolver, Provisional signal ledger, and Finalized signal ledger. The user selects which internally generated signal stage establishes the entry reference and which stage can later provide an opposite-signal exit.
Each retained entry reference stores:
direction
confirmation bar
confirmation price
retained terminal price
The reference remains active until one enabled exit condition resolves it.
Available exit conditions include:
selected opposite BUY/SELL signal
confirmed close through the retained entry terminal
fixed minimum-profit target
entry-terminal risk/reward target
Opposite-signal exits, terminal exits, fixed-profit targets, and risk/reward targets remain separate exit identities. The script records the exit bar, exit price, resolved direction, and exit reason without rewriting the completed record after later chart history arrives.
This is not a complete strategy or automated trade-management engine. It does not submit orders, calculate position quantities, reverse broker positions, calculate complete strategy profitability, manage a portfolio, or route executable instructions. Its purpose is to show structured entry-to-exit reference behavior from the script’s own causal signal records.
How it works
The script first produces two internally retained signal stages:
Provisional
Finalized
The selected Entry Reference Stage determines which signal stage opens a retained entry reference.
The selected Opposite Exit Signal Stage determines which signal stage can later resolve that reference through an opposite BUY or SELL confirmation.
These two stages can be selected independently.
For example, a user can choose:
Provisional entry with Provisional opposite exit
Provisional entry with Finalized opposite exit
Finalized entry with Provisional opposite exit
Finalized entry with Finalized opposite exit
The script then processes entry-reference events and opposite-exit events in chronological order.
When both event streams contain an event on the same bar, the exit-stage event is processed before the entry-stage event. This prevents the new same-bar entry event from being incorrectly treated as active before the earlier reference has had a chance to resolve.
Provisional entry references
A Provisional entry reference is established from an accepted causal transform-path-agreed BUY or SELL confirmation.
Provisional confirmation requires the candidate direction to agree with the stored causal transform-reference direction.
A retained transform candidate can confirm:
on its candidate bar
or on the following closed bar
The maximum signal confirmation delay is limited to zero or one bar.
When Active Path-Filtered Candidate Memory is enabled, a valid candidate that initially fails transform-path direction agreement can remain stored. It can later confirm on the first closed bar where the retained candidate terminal agrees with the active causal transform direction.
That later passing bar becomes the actual Provisional confirmation bar and entry-reference price.
A Provisional signal is earlier than a Finalized signal, but it has not yet completed structural finalization. It can still be replaced, superseded, or fail to become the retained Finalized identity of its structural swing.
Finalized entry references
A Finalized entry reference is established from a Provisional signal that survives the selected structural resolver.
Finalized identity requires structural completion of the containing swing.
The Finalized reference uses:
the retained structural BUY or SELL identity
the Finalized confirmation bar
the Finalized confirmation price
the retained structural terminal price
Finalized references generally occur later than Provisional references, but they represent the signal identity retained after structural resolution.
Structural events classify and finalize signal identity. They do not independently create the Provisional BUY/SELL signal universe.
Entry-reference behavior
Only one entry reference can remain active at a time.
When no reference is active, the next qualifying event from the selected Entry Reference Stage establishes a new reference.
The reference retains:
long or short direction
entry confirmation bar
entry confirmation price
terminal price associated with that entry identity
The script does not continuously replace an unresolved reference with later same-side entry signals.
A new entry reference is committed only after the prior reference has resolved and the script is flat at the reference-state level.
The reference is an analytical state retained by the indicator. It is not a broker position and does not contain position size or account information.
Exit Resolution Method
The user selects one of three primary exit-resolution methods:
Opposite Signal
Entry Terminal Break
Opposite Or Terminal Break
Target exits are controlled separately and can operate alongside the selected primary exit method.
Opposite Signal
Opposite Signal resolves the active entry reference when the selected opposite signal stage confirms.
For a long reference, the selected SELL signal is the opposite event.
For a short reference, the selected BUY signal is the opposite event.
The opposite event uses the stage selected under Opposite Exit Signal Stage:
Provisional
or Finalized
The exit occurs at that opposite event’s confirmation price.
An opposite signal that does not oppose the currently active direction does not resolve the reference.
Require Profit For Opposite Exit
Require Profit For Opposite Exit applies only to opposite-signal exits.
When disabled, every qualifying opposite signal can resolve the active reference.
When enabled, the opposite signal resolves the reference only when the raw-price return from the retained entry price to the opposite confirmation price is at least the selected Minimum Profit For Opposite Exit percentage.
For a long reference, profit requires the opposite exit price to be sufficiently above the entry price.
For a short reference, profit requires the opposite exit price to be sufficiently below the entry price.
This setting does not delay or block:
Entry Terminal Break
Minimum Profit Target
Risk/Reward Target
An unprofitable opposite signal can therefore be ignored while another enabled exit condition remains active.
Minimum Profit For Opposite Exit is a gate on an opposite signal. It is not the same as the independent Minimum Profit Target exit.
Entry Terminal Break
Entry Terminal Break resolves the active reference when a confirmed close invalidates the retained entry terminal.
For a long reference:
a confirmed close below the retained terminal resolves the reference
For a short reference:
a confirmed close above the retained terminal resolves the reference
The terminal is taken from the same signal identity that established the entry reference.
The terminal is not replaced by every later support, resistance, pivot, or same-side signal.
Terminal exits use confirmed closes only.
An intrabar move through the terminal that does not remain broken at the confirmed close does not create a terminal exit under this script.
Opposite Or Terminal Break
Opposite Or Terminal Break enables both primary exit conditions.
The reference resolves on whichever valid event occurs first:
a qualifying opposite signal
or a confirmed terminal invalidation
When Require Profit For Opposite Exit is enabled, an opposite signal that does not meet the profit requirement is not treated as a valid exit. The terminal condition remains active and can still resolve the reference.
Target Exit
Target Exit is independent from the selected primary Exit Resolution Method.
Available target modes are:
Off
Minimum Profit %
Risk/Reward
When Target Exit is Off, no target price is calculated and no target exit can resolve the reference.
The status table displays:
OFF when the target mode is disabled
n/a when no entry reference is active
unavailable when a Risk/Reward target cannot be formed
the calculated target price when a valid active target exists
Minimum Profit Target
Minimum Profit % creates a fixed target from the retained entry-reference price.
For a long reference:
Target Price = Entry Price × (1 + Minimum Profit Target %)
For a short reference:
Target Price = Entry Price × (1 − Minimum Profit Target %)
The reference resolves when a confirmed close reaches or passes the calculated target.
For a long reference:
the confirmed close must be at or above the target
For a short reference:
the confirmed close must be at or below the target
The exit label is recorded as:
PROFIT TARGET
This target operates independently from Require Profit For Opposite Exit.
The two settings serve different purposes:
Minimum Profit For Opposite Exit controls whether an opposite signal is allowed to exit
Minimum Profit Target creates an independent price level that can exit without an opposite signal
Risk/Reward Target
Risk/Reward creates a target from the distance between the retained entry price and the retained entry terminal.
For a long reference:
Risk Distance = Entry Price − Retained Terminal
Target Price = Entry Price + Risk Distance × Risk/Reward Multiple
For a short reference:
Risk Distance = Retained Terminal − Entry Price
Target Price = Entry Price − Risk Distance × Risk/Reward Multiple
The target is valid only when the retained terminal is on the correct defensive side of the entry price and the resulting risk distance is positive.
For a long reference, the terminal must be below the entry price.
For a short reference, the terminal must be above the entry price.
When the terminal does not produce a positive risk distance, the Risk/Reward target is unavailable. The script does not invent a target by using an absolute distance or moving the terminal to the other side of the entry.
The reference resolves when a confirmed close reaches or passes the valid calculated target.
The exit label is recorded as:
RISK/REWARD TARGET
Confirmed-close target behavior
Both target modes use confirmed closes.
The script does not assume execution at the exact target price when price crosses the target intrabar.
The recorded exit price is the confirmed close of the bar that first satisfies the target condition.
This makes target resolution consistent with the script’s confirmed-close terminal-break behavior.
When a terminal break and target hit are both visible during the same scanned bar, terminal invalidation is given resolution priority in the code and the event is recorded as:
TERMINAL EXIT
Exit identities
The script preserves four separate exit identities:
OPPOSITE EXIT
TERMINAL EXIT
PROFIT TARGET
RISK/REWARD TARGET
These identities are not merged into one generic EXIT label.
This allows the user to distinguish whether the reference resolved because:
an opposite signal confirmed
the retained terminal failed
a fixed percentage target was reached
or the selected risk/reward target was reached
Completed exit records retain:
resolved direction
exit bar
exit price
exit reason
Later chart history does not move the completed exit to a different bar or change its recorded reason.
Signal construction
The internal signal engine uses a causal transform-reference path built from loaded raw-price records.
The transform path is used as a mandatory direction-agreement source for Provisional BUY and SELL confirmation.
The script separately maintains:
raw price arrays
transform path arrays
close, high, and low replay arrays
Provisional signal ledgers
Finalized signal ledgers
structural event ledgers
The transform path and structural resolver remain separate systems.
The transform path confirms Provisional signal direction.
The structural resolver determines which Provisional identity survives into the Finalized ledger.
A structural event does not directly create an entry reference unless Finalized is selected as the Entry Reference Stage and the corresponding Finalized signal record exists.
Transform Path Capturable Segment
Transform Path Capturable Segment percentage controls the captured movement required by the internal transform-reference path.
It is used to retain broader directional legs and reject smaller path pivots.
The setting affects transform-path construction and therefore can affect which candidates pass mandatory path agreement.
It is not an exit target and does not define minimum trade profit.
Structural resolution
The script includes three structural resolver options:
Earliest Terminal
Original Grouping
Conditional Accelerated
Original Grouping is the default.
Earliest Terminal
Earliest Terminal follows the known-prefix earliest terminal chain.
It is intended to retain the earliest causally provable structural terminal under the solver’s rules.
Original Grouping
Original Grouping retains same-side structural candidates as a group.
A later same-side candidate can replace the retained group extreme before an opposite structural candidate resolves the group.
The retained extreme becomes the finalized structural identity when the opposite side completes the structural transition.
Conditional Accelerated
Conditional Accelerated uses captured-path potential after structural proof.
The Structural Capturable Segment percentage applies only to this resolver.
It does not directly filter transform BUY/SELL events or calculate exit targets.
Structural records are prefix-stable and are committed permanently after confirmation.
Structural path and signal context
The script can display:
structural change labels
structural resolution path
Finalized transform BUY/SELL labels
Provisional Candidate signals
failed or superseded Provisional signals
path-disagreed Candidate labels
current live Candidate
live transform-reference path
confirmed support and resistance
These context displays do not change the selected entry-reference stage or exit-resolution method.
Turning a display off hides the object but does not remove its underlying retained ledger.
Entry and exit displays
Entry Reference Markers
Optional Entry Reference Markers show where the selected Provisional or Finalized entry reference was established.
These markers are display-only and do not represent submitted orders.
Resolved Exit Labels
Resolved Exit Labels show completed exit events.
Each label includes the exit identity determined by the resolution condition.
The script limits retained exit labels through the Maximum Exit Labels input.
Older labels are deleted from the chart when the display limit is exceeded. Their removal from the chart does not alter the chronological exit reconstruction used to determine the current active reference.
Active entry level
When Show Active Entry / Terminal Levels is enabled, the active entry confirmation price is displayed as a blue dotted line.
The line starts from the retained entry-reference bar and extends to the right while the reference remains active.
Active terminal level
When terminal-based resolution is enabled, the retained terminal is displayed as an orange dashed line.
For a long reference, this is the price below which a confirmed close produces a terminal exit.
For a short reference, this is the price above which a confirmed close produces a terminal exit.
Active target level
When a valid target mode is enabled, the target is displayed as a green dashed line.
The line appears only when:
an entry reference is active
the selected target mode is not Off
and the target calculation produces a valid price
Minimum Profit % generally produces a target whenever a valid entry price exists.
Risk/Reward requires a valid positive entry-to-terminal risk distance.
Support and resistance
Optional support and resistance levels are derived from confirmed signal terminals.
The user can:
show or hide the levels
extend the levels right
keep or remove broken levels
change line width
control the maximum number of managed chart objects
These levels provide contextual market structure.
They do not replace the retained entry terminal used by the exit-resolution module.
Replay and chronological reconstruction
The script reconstructs the entry-to-exit state from historical Provisional and Finalized signal ledgers.
The selected entry-stage ledger and selected opposite-stage ledger are merged chronologically.
The merge is linear rather than repeatedly sorting the complete combined event list.
This allows the script to preserve event order while avoiding the unnecessary quadratic event sorting that would become increasingly expensive as the number of signal records grows.
For each historical interval, the script checks:
whether the active retained terminal was invalidated
whether an enabled target was reached
whether a qualifying opposite event occurred
whether a new entry reference should be committed after the previous reference resolved
The reconstructed active state at chart end determines:
current active direction
entry price
retained terminal
target price
last exit reason
last exit bar
last exit price
Same-bar event priority
When an entry-stage event and exit-stage event occur on the same bar, the exit-stage event is processed first.
This preserves the prior active reference’s opportunity to resolve before a new reference from the same bar is committed.
It also prevents a newly created same-bar reference from being immediately interpreted as though it existed before the opposite event that appears at the same timestamp.
Performance controls
The script includes:
Statistics-Only Replay
Maximum Replay Objects
Auto Limit Live Replay
Live Replay Bars
Statistics-Only Replay reduces historical chart-object construction while retaining internal calculations.
Maximum Replay Objects limits the number of displayed historical objects.
Auto Limit Live Replay and Live Replay Bars can reduce the amount of live historical drawing on large charts.
These settings primarily control display and replay workload. They do not change the configured exit formulas.
Status pages
The status table includes separate pages for:
Exit State
Signals
Structural
Support/Resistance
Alerts
Guide
Exit State
The Exit State page displays:
selected Entry Stage
selected Opposite Stage
selected Resolution Method
active direction
entry price
retained terminal
last resolution reason
last exit bar
last exit price
selected Target Exit mode
current target price
Target-price display behavior is:
OFF when target exits are disabled
n/a when no reference is active
unavailable when a Risk/Reward target cannot be formed
the formatted target price when the target is valid
Signals
The Signals page summarizes the internal Provisional and Finalized signal state and selected signal context.
Structural
The Structural page displays selected structural resolver information and structural event context.
Support/Resistance
The Support/Resistance page displays level configuration and retained level state.
Alerts
The Alerts page shows whether resolved exit alerts are enabled and whether the current reconstruction produced a long-reference or short-reference exit event.
Guide
The Guide page explains the main output identities and chart-line colors:
retained entry reference
selected-stage opposite exit
confirmed terminal invalidation
target resolution
blue entry line
orange terminal line
green target line
Alerts
The script contains informational alerts for:
Provisional Transform BUY
Provisional Transform SELL
Finalized Transform BUY
Finalized Transform SELL
Long Reference Exit
Short Reference Exit
Provisional alerts are generated from accepted transform-path-agreed Provisional events.
Finalized alerts are generated when structural resolution commits a Finalized BUY or SELL identity.
Exit alerts identify whether a long or short entry reference resolved.
The exit alert title does not distinguish the exact reason in separate alertconditions. The exact chart label and status-table Last Resolution field identify whether the reconstructed exit was:
OPPOSITE EXIT
TERMINAL EXIT
PROFIT TARGET
RISK/REWARD TARGET
Alerts are informational.
They do not contain:
position size
broker account information
order type
stop order
limit order
routing destination
portfolio instruction
or guaranteed execution price
Important behavior note
The script should be understood as:
causal in its signal confirmation
historically stable after closed-bar confirmation
reconstructed chronologically from retained signal ledgers
live-updating only for current open-bar signal and path context
Closed-bar Provisional signals, Finalized signals, entry references, and completed exits are not moved or reclassified by later chart history.
The current open bar can update only the existing live Candidate and transform-reference context inherited from the internal signal engine.
Terminal and target exits use confirmed closes only.
The tool identifies analytical entry-to-exit reference events. It does not confirm that a real order was filled at the displayed price.
Features
Internally generated Provisional BUY/SELL signals
Internally generated Finalized BUY/SELL signals
Selectable Provisional or Finalized Entry Reference Stage
Selectable Provisional or Finalized Opposite Exit Signal Stage
Opposite Signal exit method
Entry Terminal Break exit method
Combined Opposite Or Terminal Break method
Optional profit requirement for opposite exits
Independent Minimum Profit Target
Independent Risk/Reward Target
Entry-to-terminal risk calculation
Confirmed-close target resolution
Confirmed-close terminal invalidation
Separate opposite, terminal, profit-target, and risk/reward exit identities
One retained active entry reference
Chronological entry and exit event reconstruction
Exit-first same-bar event ordering
Linear two-ledger event merge
Permanent closed-bar entry and exit records
Active entry price line
Active retained terminal line
Active target price line
Entry-reference markers
Resolved exit labels
Maximum retained exit-label control
Three selectable structural resolvers
Mandatory causal transform-path agreement
Candidate-bar or next-bar Provisional confirmation
Stored path-filtered Candidate memory
Provisional and Finalized signal ledgers
Failed and superseded Provisional context
Optional structural path
Optional live transform-reference path
Optional support and resistance
Replay and chart-object performance controls
Multiple status-table pages
Informational signal alerts
Informational long-reference and short-reference exit alerts
Strengths
Self-Contained Signal Source — generates its own Provisional and Finalized entry references without requiring another script’s external signal input.
Entry-to-Exit Structure — converts internal BUY/SELL identities into a retained reference with a clearly defined entry price, terminal, target, and exit reason.
Stage Flexibility — allows the entry stage and opposite exit stage to be selected independently.
Exit Method Flexibility — supports opposite confirmation, terminal invalidation, or whichever valid event occurs first.
Independent Target Logic — fixed-profit and risk/reward targets can resolve the reference without waiting for an opposite signal.
Opposite Profit Gate — can prevent an unprofitable opposite signal from resolving the reference while leaving terminal and target exits active.
Identity Separation — opposite, terminal, fixed-profit, and risk/reward exits remain distinguishable.
Terminal Consistency — uses the terminal retained by the same signal identity that established the entry reference.
Confirmed-Close Stability — terminal and target exits do not depend on unfinished intrabar movement.
Chronological Reconstruction — historical state is rebuilt in event order rather than inferred only from the latest signal.
Same-Bar Ordering — exit-stage processing precedes entry-stage processing when both events occur on the same bar.
Performance-Aware Merge — merges already chronological signal ledgers directly instead of repeatedly sorting a combined event array.
Long and Short Symmetry — applies entry, opposite, terminal, and target calculations to both long and short references.
Visual Clarity — separates entry price, terminal price, and target price with distinct chart lines.
Context Availability — retains optional Provisional, Finalized, structural, path, and support/resistance displays.
Weaknesses
Signal Dependence — exit quality depends on the quality and timing of the internally generated Provisional or Finalized entry reference.
No Universal Best Stage — Provisional entries are earlier but less structurally resolved; Finalized entries are more confirmed but later.
Confirmed-Close Delay — terminal and target exits can occur later than an intrabar crossing.
Close-Price Exit Recording — the recorded exit price is the confirmation-bar close, not necessarily the exact target or terminal price touched intrabar.
No Partial Exits — each retained reference resolves as one complete analytical state rather than splitting into multiple exit quantities.
No Trailing Target — the fixed-profit and risk/reward targets do not trail favorable movement.
Static Entry Terminal — the retained terminal belongs to the entry identity and is not dynamically replaced with every later structural level.
Risk/Reward Availability — a risk/reward target cannot be formed when the retained terminal is not on the correct defensive side of the entry price.
Opposite Profit-Gate Persistence — an opposite signal that fails the profit gate is ignored rather than stored as a pending opposite exit.
No Complete Strategy Return — the tool does not calculate commissions, slippage, quantity, capital allocation, or portfolio equity.
No Broker Execution — displayed exits and alerts do not prove that a real order would fill at the same price.
One Active Reference — the script does not maintain simultaneous independent long and short references or multiple scaled entries.
Historical Reconstruction Cost — although the event merge is linear, the script still performs substantial transform, structural, replay, and chart-object work on large charts.
Parameter Sensitivity — transform capture, structural solver, entry stage, opposite stage, target percentage, and reward multiple can materially change results.
No Universal Profitability — structured exits do not guarantee that the underlying entries have sufficient predictive edge.
Who it’s for
This tool is best suited for:
PulseWire users who want an exit-focused companion to transform-based entry signals
traders comparing Provisional and Finalized entry timing
users studying opposite-signal exit timing
users testing retained-terminal invalidation
users testing fixed minimum-profit targets
users testing entry-terminal risk/reward targets
reversal and market-structure traders
users who want long and short exit references
users who want historically stable closed-bar exit labels
users who want one retained entry reference at a time
users interested in causal transform-path agreement
users developing an exit framework before integrating position sizing or routing
research-oriented users comparing multiple exit identities
users who want chart-based exit analysis without a complete strategy engine
Who it’s not for
This tool is not best suited for:
users looking for guaranteed profitable exits
users expecting the script to know the best future exit in advance
users looking for automatic broker execution
users requiring position sizing or account-risk calculations
users requiring partial profit taking
users requiring multiple simultaneous entries
users requiring dynamic trailing stops
users requiring intrabar target or stop execution
users expecting target price to guarantee actual fill price
users wanting complete strategy-equity reconstruction
users wanting commissions, slippage, leverage, or margin modeling
users expecting Provisional or Finalized signals to universally identify profitable trades
users seeking a complete operational transform engine with split quantities, portfolio state, or order routing
Known limitations
The tool is better at:
retaining a consistent entry reference
showing multiple structured exit conditions
distinguishing why an exit occurred
comparing Provisional and Finalized signal stages
visualizing entry, terminal, and target prices
and reconstructing closed-bar entry-to-exit state
than it is at:
predicting which entry will succeed
guaranteeing that a selected target will be reached
guaranteeing that a terminal exit will contain loss
finding the best possible future exit
or reproducing real broker fills
A fixed-profit target can improve consistency but can also exit before a larger move develops.
A risk/reward target can align the target with entry-terminal distance, but the retained terminal may not represent the user’s actual financial risk or intended stop placement.
An opposite signal can respond to changing structure, but it can arrive late or be ignored when Require Profit For Opposite Exit is enabled and the profit requirement is not met.
A terminal exit can preserve the entry identity’s invalidation point, but confirmed-close evaluation can exit beyond the terminal after a fast move.
These are structural exit references, not guarantees of favorable trade outcomes.
Final note
Entry-to-Exit Tool is a focused indicator for converting internally generated Provisional or Finalized BUY/SELL signals into retained entry references and resolving those references through explicitly defined exit conditions.
Its main value is not that it predicts the perfect exit. Its value is that it makes the exit framework visible and consistent:
which stage opened the reference
which stage can provide the opposite exit
which terminal belongs to the entry
whether an opposite exit requires profit
whether a fixed or risk/reward target is active
which condition actually resolved the reference
and where that resolution occurred on a confirmed close
The tool should be viewed as an entry-to-exit analysis layer, not as a complete strategy, broker-execution system, or guarantee of profitability.
It provides more structured exit information than an entry-only signal script while stopping before quantities, partial positions, portfolio state, order routing, and full operational trade management. Indicator

EVA Ai + POC, Liquidity & Smart Money 1.4.1 EN💎 EVA Ai + POC, Liquidity & Smart Money 1.4.1 PRO EN — SEE WHERE THE MARKET ACCEPTED PRICE
Volume bars below a chart tell you when activity happened. EVA Volume Profile PRO shows where it happened.
The indicator maps traded volume across price, calculates POC and the Value Area, detects HVN/LVN structure, tracks directional volume and builds confirmed BSL/SSL liquidity pools. The result is a clean auction map for traders who use Volume Profile, Smart Money concepts, market structure and liquidity analysis — without flooding the candles with heavy color.
Use it for stocks, crypto and Forex, from scalping and intraday trading to swing analysis. AUTOPILOT adapts the lower timeframe, row density, node thresholds and liquidity-quality filters to the active chart.
This is a market-reading tool, not a LONG/SHORT signal generator. Its job is to show where value sits, where price may accelerate and where confirmed liquidity remains active before you build a trade plan.
━━━━━━━━━━━━━━━━━━━━
⚡ CORE MARKET MAP
• Volume Profile — horizontal volume distribution by price.
• POC — the price row with the highest calculated volume.
• Value Area — the price range containing the selected share of total volume; 70% is the standard target.
• VAH / VAL — upper and lower Value Area boundaries.
• HVN — high-volume acceptance nodes where price may slow, balance or retest.
• LVN — low-volume rejection corridors where price can travel quickly.
• Up / Down Volume — directional volume context classified from lower-timeframe candles.
• Delta — the difference between classified Up Volume and Down Volume across the profile.
• BSL / SSL — confirmed buy-side and sell-side liquidity pools around equal swing highs and lows.
• Liquidity Quality Q — a quality score using relative volume, rejection wick and spacing between confirmations.
• Nearest Targets — closest BSL, SSL, HVN and LVN with ATR distance and live state.
━━━━━━━━━━━━━━━━━━━━
🗺 HOW TO READ THE CHART
START WITH VALUE
Price between VAL and VAH is trading inside accepted value. This is usually a two-sided auction: POC attracts price, HVNs can hold rotation and the center of the profile often produces more noise than its edges.
Holding above VAH signals price discovery above value. Holding below VAL signals price discovery below value. A single breakout is not enough on its own — watch whether the boundary survives a retest and whether directional volume supports the move.
READ THE POC
The bright magenta POC marks the highest-volume price in the selected range. It acts as the profile’s center of gravity.
Price close to POC is usually balanced. Price far from POC may be building a new area of value or preparing a rotation back toward the old one. Context decides which path is active.
READ THE PROFILE SHAPE
Long horizontal rows represent heavier participation. Short rows show low acceptance.
The main histogram uses a restrained neutral palette. A thin neon rail at the profile anchor shows row-level direction: teal for Up Volume dominance, pink for Down Volume dominance. Stronger imbalance produces a brighter rail without recoloring the entire histogram.
HVN — ACCEPTANCE
Blue HVN zones mark local volume peaks. These are areas where the market previously agreed on price. Expect slower movement, consolidation, support/resistance behavior or repeated tests.
An HVN does not disappear after a touch. It represents completed volume structure, not uncollected stops.
LVN — REJECTION AND FAST TRAVEL
Amber LVN zones mark local volume valleys. Price spent less time there, so movement may accelerate through the corridor until it reaches the next HVN, Value Area boundary or active liquidity pool.
LVNs remain part of the calculated profile and update when the selected range changes.
BSL / SSL — CONFIRMED LIQUIDITY
BSL appears above confirmed equal swing highs, where short stops and breakout liquidity can cluster. SSL appears below confirmed equal swing lows, where long stops and sell-side liquidity may sit.
A pool requires at least two comparable confirmed pivots and must pass the adaptive Q filter. The script does not print every high and low as “liquidity.”
Liquidity states:
• FRESH — confirmed and not yet tested.
• TESTED — price entered the zone without completing the full sweep; the zone fades.
• OFF — still calculated but outside the active ATR work radius, so it is hidden from the chart.
• SWEPT — price cleared the far boundary; every drawing for that pool is deleted.
━━━━━━━━━━━━━━━━━━━━
📊 THE CALCULATED DASHBOARD
AUTOPILOT
Shows whether adaptive mode is active and which lower timeframe is selected.
AUCTION
Reports whether price is inside Value Area, above VAH or below VAL.
RANGE / SOURCE
Displays Visible Range, Session HD or Fixed Range and confirms whether calculations use chart candles or lower-timeframe data.
ROWS × STEP
Shows the actual number of profile rows and price increment. You always know the resolution behind the map.
UP / DOWN AND DELTA
Displays directional volume shares and the net profile imbalance.
POC / DIST
Shows POC and the current price distance from it.
NEAREST BSL / SSL
Shows pool price, distance in ATR, Q score and FRESH, TESTED or OFF state.
NEAREST HVN / LVN
Locates the closest acceptance node and fast-travel corridor.
STRUCTURE
Classifies the profile as upper concentration, lower concentration or balanced.
STATUS
Confirms developing mode, closed-bar mode or a safe data fallback.
━━━━━━━━━━━━━━━━━━━━
⚙️ THREE VOLUME PROFILE MODES
VISIBLE RANGE
Calculates only the candles currently visible on the screen. Zoom or scroll and the profile rebuilds around the market structure you are actually studying.
SESSION HD
Creates a separate profile for each selected trading session. Useful for intraday POC, daily Value Area, opening rotations and session-based support/resistance.
FIXED RANGE
Measures one specific impulse, consolidation, breakout leg or accumulation range between two adjustable time markers.
━━━━━━━━━━━━━━━━━━━━
🎯 PRACTICAL READING SCENARIOS
BALANCED AUCTION
Price is inside Value Area and close to POC or an HVN. The market is accepting price. Chasing the middle of the profile offers less structural clarity than waiting for a reaction at VAH, VAL or a nearby liquidity zone.
BULLISH PRICE DISCOVERY
Price holds above VAH, directional volume remains constructive and BSL is active overhead. The bullish auction remains valid while price accepts above value; a return below VAH weakens that read.
BEARISH PRICE DISCOVERY
Price holds below VAL, Down Volume expands and an SSL pool remains below. The bearish auction stays active until price regains the Value Area.
LVN TRAVEL
Price enters an LVN without opposing participation. The low-volume corridor may provide a faster route toward the next HVN, POC, VA boundary or liquidity target.
LIQUIDITY SWEEP
Price clears the far edge of BSL or SSL and the pool disappears. The next question is acceptance or rejection: check candle response, volume, Delta and location relative to VAH/VAL. A sweep alone does not guarantee reversal.
━━━━━━━━━━━━━━━━━━━━
🧠 AUTOPILOT, LOWER TIMEFRAME DATA AND INTEGRITY
AUTOPILOT adjusts lower-timeframe selection, row density, HVN/LVN thresholds, pivot sensitivity, pool width, minimum Q and the visible ATR radius. The developing profile updates as new confirmed microbars arrive.
Lower-timeframe OHLCV improves price allocation inside each chart candle. If the requested intrabar history is unavailable or incomplete, EVA falls back to the complete chart-candle sample rather than silently using a truncated profile.
The script uses the volume supplied by the active symbol’s data feed. On some markets, especially Forex, that may be tick volume. Pine Script cannot access a historical exchange order book or full bid/ask footprint, so EVA does not fabricate either one. The directional rail is an order-flow-style approximation derived from lower-timeframe candle direction.
Confirmed BSL/SSL pools are created from closed pivot events and are not backfilled onto earlier bars. Visible Range and developing profiles recalculate when the viewport or incoming data changes — expected behavior for a dynamic Volume Profile, not a historical trading signal being rewritten.
━━━━━━━━━━━━━━━━━━━━
⚠️ RISK NOTICE
EVA Volume Profile PRO is an analytical PulseWire indicator. It does not execute orders and is not financial advice. Markets involve risk. Every setup requires independent validation, position sizing and risk management.
━━━━━━━━━━━━━━━━━━━━
🔥 READY TO TURN THE LIQUIDITY MAP INTO A COMPLETE TRADE SCENARIO?
EVA AI Plus combines confirmed LONG/SHORT signals, Market Structure, Liquidity Sweeps, Smart Money context, Support/Resistance, Supply/Demand, Fair Value Gaps, Whale Volume, signal-quality filters, AI Advisor explanations, TP/SL, Trail, TP+ and internal statistics in one premium PulseWire workspace.
Open EVA AI Plus, add it to your favorites and request access to the 7-day test drive:
Indicator

Inducement Sweep Strategy [algo_aakash]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.
Indicator

Price Structure RSIOverview
Price Structure RSI is a market-structure oscillator that converts confirmed structural breaks into a cumulative directional series and then applies the Relative Strength Index calculation to that series.
Unlike a traditional RSI, which is calculated directly from price changes, this indicator measures how previously identified pivot highs and pivot lows are being broken.
The oscillator includes:
- market-structure-based RSI
- configurable RSI length
- configurable overbought and oversold levels
- Close or High/Low structure-break confirmation
- optional EMA, SMA, or WMA smoothing
- confirmed bullish and bearish signals
- dark and light colour presets
- gradient oscillator visualization
- simplified bullish and bearish historical W/L panels
- configurable target and stop distances
- configurable panel positions
- bullish and bearish alerts
The indicator is intended to help users examine whether recent market-structure breaks are producing stronger bullish or bearish pressure.
It does not predict future price movement and does not provide automatic instructions to enter or exit a trade.
Open-source reuse and credits
Price Structure RSI is a modified and expanded derivative of the open-source indicator "Market Structure RSI" by ClayeWeight.
The original pivot detection, stored structure levels, broken-structure accumulation, cumulative structure total, RSI transformation, moving-average selection, threshold-crossing signals, and alert framework were adapted from ClayeWeight's work.
This version adds:
- Pine Script v6 compatibility
- dark and light colour presets
- revised oscillator colours and gradient fills
- confirmed-bar signal processing
- configurable historical target and stop measurements
- next-bar outcome evaluation
- conservative same-bar target and stop handling
- separate bullish and bearish W/L panels
- configurable panel positioning and offsets
- additional input validation
- revised alert messages
The original source was published under the Mozilla Public License 2.0.
This modified version is also published open-source under the Mozilla Public License 2.0.
Core methodology
The indicator first identifies simple confirmed pivot highs and pivot lows.
A pivot high is identified when:
- the centre candle has a higher high than the candle before it
- the centre candle has a higher high than the candle after it
A pivot low is identified when:
- the centre candle has a lower low than the candle before it
- the centre candle has a lower low than the candle after it
Because the script evaluates historical candles, the pivot is recognized only after the necessary later candle has closed.
Confirmed pivot-high prices are stored in an array.
Confirmed pivot-low prices are stored in a separate array.
Structure breaks
The indicator checks whether stored pivot levels have been broken.
Users can select one of two Structure Break Type settings:
- Close
- High/Low
When Close is selected:
- a stored pivot high is considered broken when the previous candle closes above it
- a stored pivot low is considered broken when the previous candle closes below it
When High/Low is selected:
- a stored pivot high is considered broken when the previous candle high moves above it
- a stored pivot low is considered broken when the previous candle low moves below it
When one or more stored pivot highs are broken, positive values are added to the cumulative structure total.
When one or more stored pivot lows are broken, negative values are added to the cumulative structure total.
Broken levels are removed from their respective arrays so that the same structure level is not counted repeatedly.
Cumulative structure total
Each broken pivot high contributes:
- +1
Each broken pivot low contributes:
- -1
If several stored structure levels are broken together, several values can be added during the same calculation.
The script then calculates the cumulative sum of these positive and negative structure changes.
A rising structure total indicates that more stored pivot highs are being broken.
A falling structure total indicates that more stored pivot lows are being broken.
Structure RSI
The Relative Strength Index calculation is applied to the cumulative structure total rather than directly to price.
The default RSI Length is:
- 20
The resulting oscillator is called the Structure RSI.
Higher Structure RSI values indicate that bullish structure breaks have recently had greater influence on the cumulative series.
Lower Structure RSI values indicate that bearish structure breaks have recently had greater influence.
The Structure RSI should not be interpreted as a standard price RSI because its input is the cumulative structure-break series rather than normal closing-price changes.
Overbought and oversold levels
The default levels are:
- Overbought Level: 80
- Oversold Level: 20
The Oversold Level must remain below the Overbought Level.
The script displays an error when the oversold setting is equal to or above the overbought setting.
The levels are configurable and should be treated as analytical thresholds rather than universally optimal settings.
Bullish signal
A bullish signal occurs when the Structure RSI crosses upward through the selected Oversold Level.
The signal is confirmed only after the chart candle closes.
The bullish marker appears at the bottom of the oscillator pane.
A bullish signal indicates that the structure-based oscillator has recovered above its lower threshold.
It does not guarantee that price will continue higher.
Bearish signal
A bearish signal occurs when the Structure RSI crosses downward through the selected Overbought Level.
The signal is confirmed only after the chart candle closes.
The bearish marker appears at the top of the oscillator pane.
A bearish signal indicates that the structure-based oscillator has moved back below its upper threshold.
It does not guarantee that price will continue lower.
Moving average
An optional moving average can be applied to the Structure RSI.
Available moving-average types are:
- EMA
- SMA
- WMA
The default settings are:
- Moving Average Type: EMA
- Moving Average Length: 8
The moving average can be used to observe the smoother direction of the Structure RSI.
The moving average does not directly create the bullish or bearish threshold signals.
Hiding the moving average does not change the Structure RSI calculation.
Oscillator colours
The Structure RSI line changes colour according to its current position.
- Above the Overbought Level: bearish colour
- Below the Oversold Level: bullish colour
- Between the two levels: neutral grey
The oscillator also includes:
- a dashed overbought line
- a dashed oversold line
- a dotted 50 midline
- a neutral background fill between the main levels
- bullish and bearish gradient fills
- optional dark and light colour presets
The colour settings change presentation only.
They do not alter the structure calculation or signal logic.
Confirmed signals
Bullish and bearish signals are accepted only on confirmed chart bars.
The script does not finalize a signal solely because the Structure RSI temporarily crosses a threshold while the active candle is still open.
Values may still move while the current chart candle develops.
The final marker and alert are generated only after the candle closes with the crossing condition confirmed.
Historical W/L measurements
The indicator includes simplified historical bullish and bearish outcome measurements.
These measurements are not a complete PulseWire strategy backtest.
When no measurement is currently active, a confirmed signal can begin a new historical measurement.
For a bullish signal:
- the signal candle close becomes the recorded entry price
- the target is placed above the recorded entry
- the stop is placed below the recorded entry
For a bearish signal:
- the signal candle close becomes the recorded entry price
- the target is placed below the recorded entry
- the stop is placed above the recorded entry
Only one unresolved historical measurement is tracked at a time.
Target distance
Target Distance (%) controls the percentage distance between the recorded signal close and the historical target.
The default value is:
- 1.0%
For a bullish measurement:
- Target = Entry Price × (1 + Target Percentage)
For a bearish measurement:
- Target = Entry Price × (1 - Target Percentage)
The minimum allowed target distance is 0.1%.
Stop distance
Stop Distance (%) controls the percentage distance between the recorded signal close and the historical stop.
The default value is:
- 1.0%
For a bullish measurement:
- Stop = Entry Price × (1 - Stop Percentage)
For a bearish measurement:
- Stop = Entry Price × (1 + Stop Percentage)
The minimum allowed stop distance is 0.1%.
Next-bar evaluation
Target and stop evaluation begins on the bar after the signal.
The signal candle itself is not used to determine the result.
This prevents price movement that occurred earlier during the signal candle from being counted after the entry has been recorded at that candle's close.
Wins and losses
The tables use the following labels:
- W = Win
- L = Loss
A win means that the configured target was reached before the configured stop.
A loss means that the configured stop was reached before the configured target.
The displayed percentage is:
- Wins divided by completed Wins and Losses
Bullish and bearish measurements are counted separately.
Same-bar target and stop handling
A chart candle can sometimes touch both the target and stop.
Standard OHLC chart data does not reveal which level was reached first inside that candle.
When both levels are touched during the same bar, the script records a loss.
This conservative rule avoids automatically assuming the more favourable outcome.
The script does not reconstruct lower-timeframe intrabar movement.
One active measurement at a time
Only one unresolved historical measurement can be active.
When a measurement is already active:
- later bullish or bearish signals can still appear
- later signals can still trigger alerts
- later signals do not start another W/L measurement
- the active measurement remains open until its target or stop is reached
An opposite signal does not automatically close the existing measurement.
This means that not every displayed signal is included in the W/L panels.
Bull panel
The Bull panel displays results from completed bullish measurements.
The panel contains:
- Bull
- W: number of bullish targets reached first
- L: number of bullish stops reached first
- percentage of completed bullish measurements recorded as wins
The Bull panel position can be selected from the available chart locations.
Bear panel
The Bear panel displays results from completed bearish measurements.
The panel contains:
- Bear
- W: number of bearish targets reached first
- L: number of bearish stops reached first
- percentage of completed bearish measurements recorded as wins
The Bear panel position can be selected independently from the Bull panel.
Panel positions and offsets
The Bull and Bear panels can be placed at:
- top left
- top centre
- top right
- middle left
- middle centre
- middle right
- bottom left
- bottom centre
- bottom right
Row and column offsets can be used to move each panel within the available position grid.
Negative row values move the selected panel upward.
Positive row values move it downward.
Negative column values move it to the left.
Positive column values move it to the right.
The final position is restricted to the available PulseWire table locations.
The panels can overlap when both are assigned to the same effective position.
Meaning of the displayed percentage
The percentage represents the share of completed measurements where the configured target was reached before the configured stop.
It is not:
- a guaranteed win rate
- proof of future profitability
- a complete strategy result
- a recommendation to enter a trade
- a forecast of future performance
The historical measurement does not include:
- commissions
- spread
- slippage
- liquidity
- order execution
- position sizing
- account equity
- partial exits
- trailing stops
- market gaps
- order rejection
- overlapping positions
- complete intrabar sequencing
Historical results do not guarantee future results.
Alerts
The indicator includes two alert conditions:
- Bullish Signal
- Bearish Signal
The Bullish Signal alert is triggered when the Structure RSI crosses upward through the Oversold Level on a confirmed chart bar.
The Bearish Signal alert is triggered when the Structure RSI crosses downward through the Overbought Level on a confirmed chart bar.
When creating PulseWire alerts, use:
- Once Per Bar Close
This matches the confirmed signal logic.
How to Use
1. Apply the indicator
Add Price Structure RSI to a standard PulseWire chart.
The oscillator appears in a separate pane below the main price chart.
2. Begin with the default settings
The default configuration is:
- RSI Length: 20
- Overbought Level: 80
- Oversold Level: 20
- Structure Break Type: High/Low
- Moving Average Type: EMA
- Moving Average Length: 8
- Target Distance: 1.0%
- Stop Distance: 1.0%
Review the indicator with its default configuration before changing several settings simultaneously.
3. Select the structure-break type
Choose High/Low when a stored structure level should be considered broken as soon as the previous candle's high or low passes it.
Choose Close when the previous candle must close beyond the stored structure level.
High/Low is generally more responsive.
Close is generally more restrictive.
Neither setting is automatically more accurate.
4. Read the Structure RSI
Use the oscillator to observe the balance of recent broken pivot highs and pivot lows.
A rising oscillator indicates that bullish structure breaks are having greater recent influence.
A falling oscillator indicates that bearish structure breaks are having greater recent influence.
The oscillator can remain elevated or depressed during extended directional conditions.
5. Read the overbought area
When the Structure RSI moves above the Overbought Level, bullish structure-break pressure has pushed the oscillator into its upper region.
The bearish signal does not occur merely because the oscillator is above the level.
The bearish signal occurs only when the oscillator later crosses downward through the Overbought Level on a confirmed bar.
6. Read the oversold area
When the Structure RSI moves below the Oversold Level, bearish structure-break pressure has pushed the oscillator into its lower region.
The bullish signal does not occur merely because the oscillator is below the level.
The bullish signal occurs only when the oscillator later crosses upward through the Oversold Level on a confirmed bar.
7. Wait for the candle to close
Signals are confirmed at bar close.
Do not treat a temporary intrabar threshold crossing as a finalized signal.
Wait for the marker to remain after the chart candle closes.
8. Use the moving average
Enable the moving average to observe a smoother version of the Structure RSI.
Available types are:
- EMA
- SMA
- WMA
A shorter moving-average length reacts more quickly.
A longer moving-average length responds more slowly.
The moving average can provide visual context, but it is not part of the threshold-crossing signal condition.
9. Configure the target and stop distances
Set Target Distance (%) and Stop Distance (%) according to the historical measurement you want to study.
For example:
- Target: 1.0%
- Stop: 1.0%
This creates an equal-distance historical measurement.
Another example:
- Target: 2.0%
- Stop: 1.0%
This creates a larger target than stop.
These settings are research parameters and are not recommended trading settings.
10. Read the Bull panel
The Bull panel measures completed bullish signals.
- W means the bullish target was reached first
- L means the bullish stop was reached first
- the percentage shows bullish wins divided by completed bullish outcomes
Only signals that begin while no other measurement is active are included.
11. Read the Bear panel
The Bear panel measures completed bearish signals.
- W means the bearish target was reached first
- L means the bearish stop was reached first
- the percentage shows bearish wins divided by completed bearish outcomes
Only signals that begin while no other measurement is active are included.
12. Understand same-bar outcomes
When both the target and stop are touched during the same candle, the result is counted as a loss.
This is a conservative assumption because the chart's OHLC data cannot show which level was reached first.
13. Understand skipped measurements
A signal can appear while another historical measurement is still unresolved.
That signal can still:
- display a marker
- trigger an alert
However, it does not begin another historical measurement.
This is why the total W/L count may be lower than the total number of visible signals.
14. Position the panels
Choose separate positions for the Bull and Bear panels.
The default positions are:
- Bull panel: top left
- Bear panel: top right
Use the row and column offsets when small position adjustments are needed.
Avoid assigning both panels to the same final position unless overlapping panels are intended.
15. Select the colour preset
Use Dark Background on dark chart themes.
Use Light Background on light chart themes.
The preset changes moving-average and panel text colours.
It does not change the indicator calculations.
16. Create alerts
Create separate PulseWire alerts for:
- Bullish Signal
- Bearish Signal
Use Once Per Bar Close.
Test alerts on the intended symbol and timeframe before using them operationally.
17. Review broader market context
Use Price Structure RSI together with additional analysis such as:
- trend direction
- price structure
- support and resistance
- volume
- volatility
- liquidity
- market sessions
- recent swing highs and lows
- scheduled economic or company events
- risk management
A threshold crossing alone does not guarantee a reversal or continuation.
Suggested starting process
- Apply the indicator to a standard candlestick chart
- Keep RSI Length at 20
- Keep the levels at 80 and 20
- Begin with High/Low structure breaks
- Keep the EMA smoothing line enabled
- Use a target and stop distance of 1.0%
- Wait for confirmed bar-close signals
- Compare the oscillator with visible price structure
- Review the Bull and Bear panels separately
- Remember that only one active measurement is tracked
- Test several symbols and timeframes before drawing conclusions
- Use Once Per Bar Close for alerts
Limitations
- The indicator is derived from the open-source Market Structure RSI by ClayeWeight
- The central structure-break accumulation methodology is adapted from the original work
- Pivot identification is based on a simple three-candle relationship
- Pivots are identified only after the required later candle has closed
- The oscillator measures broken stored structure levels rather than normal price momentum
- The Structure RSI can behave differently from a standard price RSI
- The indicator does not determine whether a structure break is genuine or false
- The indicator does not measure volume, volatility, liquidity, or trend strength
- Signals are confirmed at bar close and may occur later than temporary intrabar conditions
- A bullish signal does not guarantee that price will rise
- A bearish signal does not guarantee that price will fall
- Only one unresolved historical measurement is tracked at a time
- Not every visible signal is represented in the W/L panels
- Opposite signals do not close active measurements
- Target and stop evaluation begins on the bar after the signal
- Same-bar target and stop contact is recorded as a loss
- The W/L panels are simplified historical measurements
- The displayed percentages are not complete backtest results
- Commissions, spread, slippage, liquidity, position sizing, and execution are not included
- Historical outcomes do not imply future results
- The indicator should not be used as the sole basis for a trading decision
Price Structure RSI is an analytical and research tool.
It does not provide financial advice, guaranteed signals, guaranteed win rates, or guaranteed results. Indicator

PING - Regime & Style Fit [Technical-Trades]Every chart timeframe implies a trading style — sub-5-minute charts are scalping territory, 5m–1h is intraday, roughly 2h–daily is swing, weekly and above is position trading — and every market phase treats those styles differently. Many losing streaks are not bad entries; they are a style/conditions mismatch: scalping chop, swing-trading a dead base, fading a tape that is trending.
PING answers one question about whatever chart you have open: do current conditions fit the style this timeframe belongs to?
WHAT THE HUD SHOWS
- Timeframe · style band — which of the four style bands your chart timeframe belongs to (SCALP under 5m · DAY 5m–1h · SWING ~2h–1D · POSITION 1W and above; in-between timeframes round to the nearest class).
- Regime — one of four coarse market characters on this chart timeframe: TREND ↑, TREND ↓, RANGE, or VOL CHOP.
- Character — the two raw measurements behind the call: the Aroon oscillator (−100…+100) and how wide the recent high-low span is versus its own baseline (×).
- Fit — ● FAVORABLE, ◐ MIXED / STAND-BY, or ○ CAUTION for this timeframe's style, plus a one-line read explaining why. A quiet range with an unusually narrow span is additionally tagged coiled — compression that often precedes expansion.
An optional background tint and bar coloring paint the regime directly on the chart.
HOW IT WORKS (THE WHOLE ENGINE, NOTHING HIDDEN)
Two commodity measurements, both read from nothing but the rolling price extremes, computed on the chart timeframe only:
1. Trend + side — the Aroon oscillator (length 25, the indicator's original default, lightly smoothed with a 3-bar average): how recently the 25-bar high was made versus the 25-bar low, on a −100…+100 scale. Fresh highs with stale lows read strongly positive (uptrend); the reverse reads strongly negative. At or above ±70 — the conventional strong-trend line — the tape is called directional, and the sign picks the side.
2. Volatility — the high-low span of the last 40 bars as a percent of price, compared to its own 150-bar average, so "wide" and "narrow" are always relative to this market on this timeframe.
Regime resolution: oscillator magnitude at or above the threshold = trending. Not trending with the span at or above 1.6× its baseline = VOL CHOP (large, directionless swings). Everything else = RANGE, tagged coiled when the span sits at or below 0.5× — half its normal width, compression that often precedes expansion. All thresholds are inputs.
WHAT PING DELIBERATELY DOES NOT DO
No entries, no exits, no levels, no arrows, and no higher-timeframe requests — there is not a single request.security() call in the code. It diagnoses conditions; what you do with that is your process.
HONEST LIMITATIONS
The engine has no hysteresis and no state memory beyond the 3-bar smooth, so bars near a threshold can flip the read back and forth — the cost of keeping the math this simple and fully inspectable. Early chart history defaults to RANGE until the 150-bar span baseline warms up; that is expected, not a bug. The HUD updates on the developing bar like any indicator.
ALERTS (recommend "Once per bar close"; conditions are additionally gated to confirmed bars in code)
- Regime changed
- Fit turned FAVORABLE
- Fit turned CAUTION
Works on any symbol and any timeframe. Educational tool — not financial advice and not a signal service. Indicator

Market Compass - Dynamic Range FrameworkHello English readers, the English version is provided below. Please scroll down to view it.
Market Compass - Dynamic Range Framework
市场指南针 · 动态区间框架
版本:1.0 | 类型:非预测性价格结构定位工具 | 作者:
绝大多数交易亏损,根源并非方向判断错误,而是 “位置感”的缺失 。本指标旨在为您解决这一核心痛点——它不告诉您涨跌,但它告诉您 “此时此刻,价格在地图上的精确坐标” 。
---
本指标并非传统的均线或动量振荡器,而是一个 基于固定回溯周期的价格百分位区间定位系统 。它以最近 N 根 K 线(默认 252 根,对应约 1 个交易年度)的最高价与最低价为天然边界,构建出一个覆盖 0% 至 100% 的 动态箱体网格 。
该网格并非平均分割,而是采用 非对称的黄金分割与极值锚定法 ,精确定制了 9 条关键水平轨道。这些轨道以彩色矩形色带和右侧实时浮动标签的形式,干净利落地叠加于主图 K 线之上:
100% 顶部极值轨 (红色):回溯周期内的绝对天花板。
89% 超买警戒轨 (橙色):情绪极度亢奋区,多头衰竭高发带。
75% 强势分界轨 (黄色):牛熊分水岭,站上此线意味中期趋势转强。
62.5% 强界枢轴轨 (紫色):多头趋势中的次级回踩支撑位。
50% 多空中轴轨 (白色):价值均衡线,长线资金的成本密集区。
37.5% 弱界枢轴轨 (青色):空头趋势中的次级反弹阻力位。
25% 弱势分界轨 (亮蓝):跌破此线意味中期趋势正式转入空头。
11% 超卖警戒轨 (浅绿):情绪极度恐慌区,空头衰竭高发带。
0% 底部极值轨 (深蓝):回溯周期内的绝对地板。
随着新 K 线的生成,整个框架会 滚动迭代 ,始终锚定最新的价格活动范围,确保参考坐标永不失效。
---
传统价格图表存在严重的 视角局限性 ,导致交易者频繁陷入误判:
“绝对值幻觉”与锚定效应 :股价 100 元是高是低?脱离近期波动区间谈绝对价格毫无意义。本指标将价格转化为 0~100 的相对百分位数 ,消除了价格基数的干扰,让您客观评判当前价格是“相对高位”还是“相对低位”。
“区间失忆症”与近因偏好 :人类大脑天然对最近 5~10 根 K 线赋予过高权重,极易遗忘前期关键的支撑与阻力结构。本指标通过固定窗口的滚动计算,强制将 过去 N 根 K 线的价格极值 醒目地绘制在当前图表上,纠正了这种认知偏差。
均值回归与极端磁吸理论 :金融市场价格长期遵循 “极端值向中轴(50% 均衡线)回归” 的统计规律。当价格进入 89% 以上或 11% 以下的极端尾部区域时,统计概率上必然面临向 50% 中轴的牵引力。本框架为这种“牵引力”提供了精确的量化刻度。
---
本指标是 趋势过滤、盈亏比评估与动态止盈止损 的绝佳辅助工具。请勿将其视为独立入场信号,而应作为 “价格行为决策的量化底座” 。
3.1 基于市场环境的三种经典战法
【趋势跟踪战法】—— 适用于强势单边行情
当价格经过充分调整后,以放量大阳线有效突破 75% 强势分界轨 时,视为中期趋势由震荡转强的关键确认点。若后续价格回踩 75% 轨并获得支撑(收出长下影线),则为绝佳的 顺大势、逆小势 加仓机会。此时可将止损设于 62.5% 强界枢轴轨下方。
【均值回归战法】—— 适用于宽幅震荡行情
当价格快速冲高至 89% 超买轨 上方,且 K 线出现明显滞涨形态(如射击之星、看跌吞没)时,可视为短线高空机会,第一目标位看向 75% 轨,第二目标位看向 50% 中轴。反之,价格急跌至 11% 超卖轨 下方并出现止跌反转形态时,可视为短线低吸机会。
【突破回踩确认战法】—— 适用于关键阻力支撑转换
任何一条百分比轨道都具备动态支撑/阻力的属性。当价格自下而上突破某一轨道(如 62.5% 轨)后,若随后缩量回踩该轨道且未跌破,则说明该轨道已由阻力转换为支撑,此处是风险收益比极高的 “0 级入场点” (止损极小,空间极大)。
3.2 动态止盈与止损设置指南
波段多头持仓 :可将 37.5% 弱界枢轴轨 设为最终的硬性离场线。只要价格在此轨之上,多头头寸便可安心持有,避免被早期震荡洗出。
短线空头持仓 :可将 62.5% 强界枢轴轨 设为硬性止损线。一旦价格强势反抽并站上此轨,则空头逻辑被证伪,需果断离场。
3.3 参数动态调整建议(针对不同交易周期)
日线级别(中长线 / 波段) :建议保持默认 252 (约 1 年交易日),用于捕捉年度大箱体的牛熊转换。
周线级别(大趋势 / 仓位布局) :建议调整为 52 (约 1 年周线),用于识别超大周期的价格百分位极值。
小时 / 分钟级别(日内短线 / 剥头皮) :建议调整为 50 ~ 100 ,过长的周期在分钟图上会导致框架钝化,失去短线参考意义。
---
4.1 最佳适用场景
流动性充裕的权益市场 :沪深 300、中证 500、标普 500 等主流指数及成分股。
高流动性大宗商品与外汇 :黄金、原油、欧元/美元等主要交易对。
高市值加密货币 :比特币(BTC)、以太坊(ETH)等。
4.2 禁用与慎用场景(风控红线)
严禁用于上市不足 N 根 K 线的新股/次新股 :尽管代码内置了自适应缩窄逻辑,但新股价格极不稳定,高低点极易被操纵,百分位框架参考价值极低。
慎用于连续无量涨跌停的极端行情 :在极强的单边轧空或流动性枯竭的踩踏中,价格可能长期粘合在 100% 轨之上或 0% 轨之下,此时指标出现 “钝化” 现象,需立即切换至趋势跟踪指标(如 SAR 抛物线或均线系统)进行二次印证。
慎用于高度控盘的“庄股”或低成交量仙股 :稀疏的成交导致价格跳跃性极大,计算出的区间极易失真。
---
本指标严格遵循 PulseWire 最佳实践, 完全不包含未来函数 ,所有信号均基于确定性的历史数据实时滚动计算。
5.1 自适应周期核心算法
系统优先读取用户设定的 `lookbackLength`(默认 252)。然而,当图表加载的品种上市天数不足时,引擎会自动触发保护机制:
effectiveLookback = math.min(i_lookbackLength, bar_index + 1)
该行代码确保指标在上市首日即能工作,且随着新 K 线增加,窗口期自然增长,直至达到用户设定的标准周期。
5.2 九宫格线性映射(百分位分割数学)
首先确定箱体极值与范围:
periodLow = ta.lowest(low, effectiveLookback) // 底部 0%
periodHigh = ta.highest(high, effectiveLookback) // 顶部 100%
priceRange = periodHigh - periodLow
随后基于 斐波那契数列与统计学标准差启发式阈值 进行非均匀切割:
priceL89 = periodLow + priceRange * 0.89 // 极值警戒
priceL75 = periodLow + priceRange * 0.75 // 强市分界
priceL625 = periodLow + priceRange * 0.625 // 黄金分割枢轴
priceL50 = periodLow + priceRange * 0.50 // 均衡中轴
// ... 下方对称切割同理
注:62.5% 与 37.5% 的选取来源于对 0.618 黄金分割率的整数微调,旨在提供比传统 61.8% 更为清晰且易于记忆的刻度。
5.3 图形渲染引擎优化(内存与性能管理)
为了避免在大量历史 K 线上重复绘制矩形和线条导致图表卡顿,引擎采用 “惰性删除与单次实例化” 策略:
if barstate.islast
// 仅当加载完成且运行至图表最右侧时触发绘制
box.delete(boxMain) // 先销毁旧句柄
line.delete(lineL100) // 清理旧线
// ... 重新创建新对象
所有标签采用 label.style_label_left 右对齐样式,确保在图表最右侧整齐排列,绝不遮挡最新的 K 线实体,同时提供精确至交易所最小报价单位(`format.mintick`)的实时读数。
---
它不是占卜未来的水晶球,而是衡量当下的卡尺。
在充满不确定性的金融市场中, “位置感” 是纪律执行的基石。`Market Compass` 为您提供的不是圣杯,而是一张永远保持更新的 战场态势感知地图 。请将它融入您现有的交易系统中,作为过滤低质量交易机会的第一道关卡。
---
本指标及此说明文件仅供教育及技术分析参考之用,绝不构成任何形式的买入、卖出或持仓建议。金融衍生品及证券交易蕴含巨大风险,过往价格结构及百分位分布不构成对未来走势的绝对保证。您必须结合自身财务状况、风险承受能力及独立研判做出交易决策,盈亏自负。作者不承担任何因使用本指标而产生的直接或间接损失。
---
如果您认可这套价格定位逻辑,欢迎点赞、收藏并关注!
期待您在评论区分享将该框架融入实战交易后的心得体会。
Market Compass - Dynamic Range Framework
Version: 1.0 | Type: Non-Predictive Price Structure Positioning Tool | Author:
The vast majority of trading losses stem not from incorrect directional judgment, but from a lack of "positional awareness" . This indicator addresses this core pain point — it does not tell you whether price will go up or down, but it does tell you "the precise coordinates of price on the map, at this very moment" .
---
This indicator is not a traditional moving average or momentum oscillator. Instead, it is a price percentile range positioning system based on a fixed lookback period . It uses the highest high and lowest low over the most recent N bars (default 252, corresponding to approximately one trading year) as natural boundaries, constructing a dynamic box grid spanning from 0% to 100%.
The grid is not evenly divided. It employs an asymmetric golden ratio and extreme-value anchoring methodology to precisely define 9 key horizontal threshold levels. These levels are cleanly overlaid on the main price chart using colored rectangular bands and real-time right-aligned floating labels:
100% Peak Threshold (Red): The absolute ceiling within the lookback period.
89% Overbought Warning Zone (Orange): Extreme euphoria zone; high probability of bullish exhaustion.
75% Bullish Boundary (Yellow): The bull-bear dividing line; breaking above signals medium-term strength.
62.5% Bull Pivot Threshold (Purple): Secondary retracement support level within an uptrend.
50% Equilibrium Axis (White): The value equilibrium line; a dense area of long-term capital cost.
37.5% Bear Pivot Threshold (Cyan): Secondary retracement resistance level within a downtrend.
25% Bearish Boundary (Light Blue): Breaking below signals a confirmed medium-term bearish trend.
11% Oversold Warning Zone (Light Green): Extreme panic zone; high probability of bearish exhaustion.
0% Floor Threshold (Dark Blue): The absolute floor within the lookback period.
As new bars are generated, the entire framework rolls forward iteratively , always anchored to the most recent price activity range, ensuring the reference coordinates never become obsolete.
---
Traditional price charts suffer from severe perspective limitations , leading traders into frequent misjudgments:
"Absolute Value Illusion" and Anchoring Bias : Is a price of $100 high or low? Discussing absolute price without reference to the recent trading range is meaningless. This indicator converts price into a relative percentile from 0 to 100 , eliminating the distortion of price magnitude and allowing you to objectively assess whether the current price is "relatively high" or "relatively low."
"Range Amnesia" and Recency Bias : The human brain naturally assigns excessive weight to the most recent 5–10 bars, easily forgetting key prior support and resistance structures. Through rolling window calculations, this indicator forcibly and prominently plots the price extremes of the past N bars on the current chart, correcting this cognitive bias.
Mean Reversion and Extreme Magnetic Attraction Theory : Financial market prices have long exhibited a statistical tendency to "revert from extreme values toward the center (50% equilibrium line)" . When price enters the extreme tail regions above 89% or below 11%, statistical probability dictates an inevitable gravitational pull toward the 50% axis. This framework provides precise quantitative刻度 for this "magnetic force."
---
This indicator serves as an excellent auxiliary tool for trend filtering, risk-reward assessment, and dynamic stop-loss/take-profit placement . Do not treat it as an independent entry signal; instead, regard it as a "quantitative foundation for price-action decision-making."
3.1 Three Classic Strategies Based on Market Context
【Trend Following Strategy】— For Strong Directional Markets
When price, after sufficient consolidation, breaks decisively above the 75% Bullish Boundary with a high-volume bullish candle, this serves as a key confirmation that the medium-term trend is shifting from consolidation to strength. If price subsequently retests the 75% level and finds support (forming a long lower wick), it represents an excellent "go with the macro trend, counter the micro pullback" add-on opportunity. In such cases, place your stop-loss below the 62.5% Bull Pivot Threshold.
【Mean Reversion Strategy】— For Range-Bound Markets
When price spikes rapidly above the 89% Overbought Warning Zone and simultaneously exhibits clear exhaustion patterns (such as shooting stars or bearish engulfing), this can be viewed as a short-term selling opportunity. The first target is the 75% level, and the second target is the 50% Equilibrium Axis. Conversely, when price plummets below the 11% Oversold Warning Zone and shows reversal signals, a short-term buying opportunity emerges.
【Breakout-Pullback Confirmation Strategy】— For Key Support/Resistance Transitions
Every percentage threshold possesses dynamic support/resistance properties. When price breaks upward through a given level (e.g., the 62.5% level) and subsequently retests that level on diminishing volume without breaking back below, this confirms that the level has successfully transitioned from resistance to support. This represents a highly favorable "Grade-A Entry Point" (minimal stop-loss, substantial upside potential).
3.2 Dynamic Stop-Loss and Take-Profit Placement Guide
Swing Long Positions : Use the 37.5% Bear Pivot Threshold as your ultimate hard exit line. As long as price remains above this level, you can confidently hold your long position, avoiding premature exits caused by early-stage volatility.
Short-Term Short Positions : Use the 62.5% Bull Pivot Threshold as your hard stop-loss line. Should price stage a strong rally and close above this level, the bearish thesis is invalidated, and you must exit decisively.
3.3 Parameter Adjustment Recommendations (By Trading Timeframe)
Daily Chart (Swing / Medium-to-Long Term) : Keep the default 252 (approximately one trading year), ideal for capturing annual bull-bear transitions.
Weekly Chart (Macro Trend / Position Sizing) : Consider adjusting to 52 (approximately one year of weekly bars) for identifying extreme percentiles within broader cycles.
Hourly / Minute Charts (Intraday / Scalping) : Consider adjusting to 50–100 . Longer lookbacks on lower timeframes cause the framework to become overly rigid, diminishing its short-term relevance.
---
4.1 Optimal Use Cases
Highly Liquid Equity Markets : CSI 300, S&P 500, major index constituents, and liquid individual stocks.
High-Liquidity Commodities and FX : Gold, Crude Oil, EUR/USD, and other major pairs.
Large-Cap Cryptocurrencies : Bitcoin (BTC), Ethereum (ETH), and similar assets.
4.2 Scenarios to Avoid or Use with Caution (Risk Red Lines)
Strictly avoid newly listed stocks with fewer than N bars of history : Although the code includes a built-in adaptive shortening mechanism, new issues are extremely unstable, and their highs/lows are vulnerable to manipulation, rendering the percentile framework nearly worthless.
Use with caution during continuous limit-up/limit-down extreme conditions : In powerful short squeezes or liquidity-driven crashes, price may remain persistently glued above the 100% level or below the 0% level. In such cases, the indicator becomes "blunted" , and you must immediately switch to trend-following tools (such as SAR or moving average systems) for secondary confirmation.
Avoid low-float "pump-and-dump" penny stocks : Sparse trading volume leads to erratic price jumps, causing the computed range to become highly distorted.
---
This indicator strictly adheres to PulseWire best practices and contains absolutely no future functions . All signals are computed in real time based on deterministic historical data.
5.1 Adaptive Lookback Core Algorithm
The system first reads the user-defined `lookbackLength` (default 252). However, when the loaded instrument has fewer total bars on the chart than the configured period, the engine automatically triggers a protective mechanism:
effectiveLookback = math.min(i_lookbackLength, bar_index + 1)
This single line ensures the indicator functions from the very first trading day, and the window gradually expands as new bars are added until it reaches the user's desired standard period.
5.2 Nine-Level Linear Mapping (Percentile Segmentation Mathematics)
The process begins by determining the box extremes and range:
periodLow = ta.lowest(low, effectiveLookback) // Floor at 0%
periodHigh = ta.highest(high, effectiveLookback) // Peak at 100%
priceRange = periodHigh - periodLow
The range is then divided using a heuristic blend of Fibonacci ratios and statistically inspired thresholds :
priceL89 = periodLow + priceRange * 0.89 // Extreme warning
priceL75 = periodLow + priceRange * 0.75 // Bullish boundary
priceL625 = periodLow + priceRange * 0.625 // Golden ratio pivot
priceL50 = periodLow + priceRange * 0.50 // Equilibrium axis
// ... Symmetrical lower-level calculations follow the same logic
Note: The selection of 62.5% and 37.5% is derived from a slight integer adjustment to the 0.618 golden ratio, intended to provide cleaner and more memorable reference刻度 than the traditional 61.8%.
5.3 Rendering Engine Optimization (Memory & Performance Management)
To prevent chart lag caused by repeatedly drawing rectangles and lines across numerous historical bars, the engine employs a "lazy deletion with single-instantiation" strategy:
if barstate.islast
// Only triggered when loaded and running at the rightmost edge of the chart
box.delete(boxMain) // Destroy old handles first
line.delete(lineL100) // Clean up old lines
// ... Then create new objects
All labels use the label.style_label_left right-aligned format, ensuring they line up neatly on the far right of the chart without ever obscuring the most recent price bars. Prices are displayed with precision down to the exchange's minimum tick size (`format.mintick`).
---
It is not a crystal ball for predicting the future; it is a caliper for measuring the present.
In the inherently uncertain financial markets, "positional awareness" is the cornerstone of disciplined execution. `Market Compass` does not offer you a holy grail; it offers you an ever-updating situational awareness map of the battlefield . Integrate it into your existing trading system and use it as the first filter to eliminate low-probability trade setups.
---
This indicator and its accompanying description are provided for educational and technical analysis purposes only. They do not constitute, and should not be construed as, any form of investment advice or recommendation to buy, sell, or hold any financial instrument. Trading securities and derivatives involves substantial risk of loss. Past price structures and percentile distributions do not guarantee future results. You are solely responsible for your own trading decisions, taking into account your financial situation, risk tolerance, and independent judgment. Neither the author nor the hosting platform accepts any liability for losses arising from the use of this indicator.
---
If you find this price-positioning logic valuable, please like, bookmark, and follow!
I look forward to hearing how you integrate this framework into your live trading. Feel free to share your experiences and feedback in the comments section below.
Indicator

Judas Swing Detector [algo_aakash]Judas Swing Detector is a session-based reversal indicator that models the institutional Judas Swing as a complete, sequential price event rather than a single false-breakout candle. Instead of flagging every session-open wick that reverses, the script requires a full chain of confirmed conditions — a locked Initial Range, a liquidity sweep beyond it, a rejection close back inside, an optional market structure shift, institutional-grade displacement, and higher-timeframe trend agreement — before a signal is ever scored, drawn, or alerted.
Problem Statement
A Judas Swing is commonly described as "price sweeps one side of the session open and reverses," but that description alone matches an enormous number of ordinary, low-quality wicks. Scripts that flag every such wick generate far more noise than usable signal, because a sweep and a close-back-inside is only the first half of the institutional sequence — it says nothing about whether the reversal has real structural or momentum support, or whether it agrees with the underlying daily trend.
This indicator addresses that gap by treating the Judas Swing as a seven-stage sequence and only surfacing a signal once every enabled stage has been satisfied on confirmed price data, with the overall setup then ranked by a disclosed, weighted confidence score.
Methodology
A session window (London Open, New York Open, or a fully custom session and timezone) drives an Initial Range engine that locks the session's high and low once a configurable opening window (5, 10, 15 or 30 minutes) elapses. The Initial Range is drawn as a transparent box and extends for the remainder of the session.
Once the Initial Range is locked, the script watches for a liquidity sweep: a wick that pierces beyond the Initial Range high or low by at least a minimum ATR-based distance, with the same candle closing back inside the range. This closing-back-inside requirement is what separates a genuine sweep-and-reject from an ordinary breakout continuation.
A confirmed sweep becomes a pending candidate. If Market Structure Confirmation is enabled, the candidate must be followed by a genuine structure shift measured against minor swing pivots that form strictly after the sweep bar: a higher high following a low-side sweep, or a lower low following a high-side sweep. Candidates that do not produce this structure shift within a configurable bar timeout are discarded with no signal created.
A qualifying candidate is then subjected to a Displacement Filter, requiring the confirming candle's body to reach a minimum ATR multiple, and an optional Higher Timeframe Bias check, requiring a fast/slow EMA relationship on a user-selected higher timeframe (e.g. 1H, 4H, Daily) to agree with the reversal direction. Only after every enabled stage passes does the script compute the Judas Confidence Filter score.
The Judas Confidence Filter combines five independently disclosed, user-weighted factors into a single 0-100 score: sweep depth (how far price pierced beyond the Initial Range in ATR units), displacement (the confirming candle's body size in ATR units), HTF agreement (the normalized separation between the fast and slow higher-timeframe EMA, reflecting how decisively the higher-timeframe trend supports the direction), rejection quality (where the sweep candle closed within its own range), and reversal aggression (how few bars elapsed between the sweep and structure confirmation). Weights are user-adjustable and auto-normalized. A signal is only plotted and only triggers alerts if its score meets the Minimum Confidence Score threshold — this is a genuine filtering mechanism that changes what is drawn, not a cosmetic label applied afterward.
Confirmed signals optionally draw an Entry Zone between the 50% and 62% retracement of the confirming displacement candle, reflecting where institutional-style retracement entries are commonly sought after a confirmed reversal, along with a stop-reference line at the sweep extreme. Both extend forward and are visually dimmed once price closes back through the sweep extreme, marking the setup invalidated.
Signal Workflow
Step 1 — the selected session opens and the Initial Range begins building from the session's first 5-30 minutes of price action.
Step 2 — the Initial Range locks; the script now watches for a liquidity sweep beyond either side of that locked range.
Step 3 — a wick pierces beyond the range by a minimum ATR distance and the same candle closes back inside, registering a pending sweep candidate.
Step 4 — if enabled, the candidate must be followed by a market structure shift measured against post-sweep swing pivots, within a bounded bar timeout.
Step 5 — the confirming candle must clear the ATR-based displacement threshold, and if enabled, the higher-timeframe EMA bias must agree with the reversal direction.
Step 6 — the completed sequence is scored by the Judas Confidence Filter across five weighted factors; only scores at or above the minimum threshold are plotted and alerted.
Step 7 — an optional 50%-62% entry zone and stop-reference line are drawn from the confirming candle and remain active until price closes back through the original sweep extreme.
Why This Indicator Is Different
Most public "Judas Swing" or session-sweep scripts fire on the sweep-and-close-back-inside event alone, with no structural or momentum confirmation and no higher-timeframe context.
This script models the full institutional sequence explicitly — session, Initial Range, sweep, rejection, structure shift, displacement, HTF agreement — and only creates a signal after every enabled stage resolves in order on confirmed bar closes.
The Judas Confidence Filter converts five independently disclosed factors, including reversal aggression measured in bars-to-confirmation and rejection quality measured from close position within the sweep candle's own range, into a single adjustable score rather than a binary flag.
Confidence weighting is fully exposed, letting the ranking be tuned toward sweep depth, displacement strength, higher-timeframe agreement, rejection quality, or reversal speed depending on the trader's approach.
The optional 50%-62% Entry Zone models a specific, disclosed institutional retracement convention rather than simply marking the signal bar.
Inputs
Session Engine
Session (London Open / New York Open / Custom)
Custom Session Window
Session Timezone
Initial Range
Initial Range Duration (5/10/15/30 minutes)
Show Initial Range Box
Liquidity Sweep Detection
Minimum Sweep Pierce (x ATR)
Market Structure Confirmation
Require MSS Confirmation
MSS Pivot Length
MSS Timeout (bars)
Displacement Filter
Displacement Threshold (x ATR)
ATR Length
Higher Timeframe Bias
Require HTF Bias Agreement
HTF Timeframe
HTF Fast/Slow EMA Length
Judas Confidence Filter
Minimum Confidence Score
High-Confidence Threshold
Advanced weight sliders for sweep depth, displacement, HTF agreement, rejection quality, and reversal aggression
Entry Zone
Show Entry Zone (50%-62% Retracement)
Entry Zone Extension (bars)
Visual Settings
Show Sweep Markers / Confirmation Arrows / Stop Marker
Label Size
Bullish/Bearish/Initial Range/Elite Score Colors
Status Panel
Show Status Panel
Panel Position
Alerts
Alerts are available for:
Session Started
Liquidity Sweep detected
Bullish Judas Swing confirmed
Bearish Judas Swing confirmed
High-Confidence Judas Swing (Elite grade)
Higher-Timeframe Bias Change
Entry Zone Reached
Practical Usage
Use the status panel's HTF Bias reading as directional context before evaluating an individual Judas signal.
Treat a High-Confidence (Elite) signal as a materially stronger setup than one that merely clears the minimum threshold, since it reflects agreement across all five scored factors rather than a narrow pass.
Raise the Minimum Confidence Score on lower timeframes or noisy instruments to reduce the number of marginal signals generated.
Disable Require MSS Confirmation only if you specifically want to evaluate the sweep-and-rejection event on its own, understanding this removes one of the seven confirming stages.
Combine the alert feed with a broader trade plan, since each alert marks a structural event, not an execution signal.
Limitations
The Initial Range and session logic depend on the chart's intrabar data matching the selected session window; behavior on markets with irregular or 24-hour sessions may differ from traditional FX/futures sessions.
Market structure confirmation depends on minor swing pivots, which require bars to form on both sides before they confirm, introducing an inherent, bounded delay.
Confidence scoring is a relative, disclosed ranking and does not predict the outcome of any individual signal.
The higher-timeframe bias is read via a standard non-repainting security call and reflects EMA relationship only; it is not an independent trend-strength model.
As with any structure-based tool, results will vary across instruments, timeframes, and market regimes.
Notes
This indicator is a session and structure analysis tool intended to organize and score the Judas Swing sequence through a disclosed, multi-stage validation process.
All session state, sweep detection, structure confirmation, displacement, and scoring 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.
Indicator

Market Structure MTF Dashboard v6.3 [SMC]Tired of cluttering your charts with manual lines, missing high-probability setups, and getting trapped by low-volume fakeouts?
Market Structure MTF Dashboard v6.3 is a institutional-grade analytical engine engineered for traders utilizing Smart Money Concepts (SMC) and Price Action. This script completely automates your technical analysis by scanning market structure, validating breaks with raw volume metrics, tracking institutional liquidity sweeps, and filtering micro-noise—all condensed into a beautiful, ultra-compact graphical dashboard.
Whether you trade Crypto, Forex, or Indices, this tool does the heavy lifting in the background, shifting your focus from tedious chart drawing to executing razor-sharp setups.
🛠️ Core Engine Features & Built-in Logic
1. High-Precision Swing & BOS Engine
Dynamic Pivot Detection: Automatically maps swing structure using adjustable left/right structural wings (leftBars / rightBars).
True Break of Structure (BOS): Choose between conservative body-close confirmation (breakByClose) or aggressive wick breaches.
RVOL Filtering: Eliminates low-liquidity fakeouts. A structure break is only considered validated if the breakout candle is backed by expansion volume exceeding the 20 SMA.
2. Smart Money Footprints: Sweeps & FVGs
Liquidity Sweep Tracking: Detects false breakouts at key major highs/lows. If the price spikes past an old extreme but closes back inside the range, the engine instantly highlights a liquidity grab—one of the most powerful reversal signals in trading.
Adaptive Fair Value Gaps (FVG): Tracks institutional inefficiencies. FVGs are dynamically filtered based on a minimum percentage size of the asset price (fvg_min_size) to avoid noise, and they remain live until fully mitigated (tested) by price action.
3. Multi-Timeframe (MTF) Context & Premium/Discount Matrix
HTF Core Scanning: Fetches 4-Hour and Daily structural trends directly in the background.
Equilibrium 0.5 Line: Plots the crucial midline of the 4H trading range.
Value Assessment: Instantly updates whether price is inside the Premium Zone (expensive — look for Shorts) or Discount Zone (cheap — look for Longs) relative to the HTF range.
4. Next-Gen Smart UI (Dashboard Layout)
Real-time Context Trigger (Top Row): Shows active Fibonacci expansion targets (T1 / T2) with exact real-time prices, live unmitigated FVG levels, or flashing institutional confirmations (⚡ SWEEP L / SWEEP H).
Market Sentiment Histogram: A clean visual matrix (🟩/🟥) aggregating multi-timeframe weights to score total buyer vs. seller control.
Chronological Session Tracker: Fully optimized single-row display.
Left tile: Color-coded active session (Asia, London, NY) or overlaps (e.g., LON+NY).
Right tile: Displays the exact local opening time of the upcoming session based on your custom tzOffset. No confusing countdowns—you know exactly when volatility is hitting the clock.
📘 How to Trade It: Official Rules (Trading Rules)
This script is designed to act as an educational market assistant, providing pure mechanical logic and potential structural entry points rather than blind commercial trading signals. For maximum probability, follow these two systematic setups:
🟩 The Institutional Long Setup
HTF Trend Alignment: The 4H matrix block must be green (Bullish structure).
Premium/Discount Context: Current price must be trading in the Discount Zone (below the yellow dashed Equilibrium line).
The Trigger: The dashboard prints a flashing ⚡ SWEEP L: CONFIRMED LONG signal, showing that retail sell-stops were hunted and price recovered.
Targets: Take profit at T1 / T2 prices printed on the dashboard, with the ultimate target being the high of the 4H range.
🟥 The Institutional Short Setup
HTF Trend Alignment: The 4H matrix block must be red (Bearish structure).
Premium/Discount Context: Current price must be trading in the Premium Zone (above the yellow dashed Equilibrium line).
The Trigger: The dashboard prints a flashing ⚡ SWEEP H: CONFIRMED SHORT signal, showing that retail buy-stops were grabbed before a sudden drop.
Targets: Take profit at T1 / T2 short target prices, aiming down toward the low of the 4H range.
📅 Smart Weekend Protection Filter
No more distorted charts or broken session calculations during illiquid market closures.
Forex & Indices: The session tracker automatically freezes on Saturdays and Sundays, displaying a clean ⏸️ WEEKEND status tile.
Crypto Markets: The filter automatically detects asset types, bypassing the weekend pause to ensure continuous 24/7/365 live session mapping.
Disclaimer: Past performance is not indicative of future results. Use proper risk management and treat this tool as a systematic structural assistant to streamline your confluence. Indicator

Breaker Block Identifier [algo_aakash]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.
Indicator

Ultravol Matrix - volume spike heatmap [GF4M]Ultravol Matrix - cross-exchange volume spike heatmap
❗️Reason for displaying two indicators together on the main chart:
🔗 Use together for reading volume — Ultravol, Ultravol Matrix are originally built as one indicator, split in two due to Pine's 64-plot limit & multi-pane drawing limit. (same language by UV-scaled color): Ultravol Matrix reads vol spike history, Ultravol reads live.
❗️Per PulseWire's policy that each script's description must be self-contained on its own, the Ultravol engine description common to both Ultravol and Ultravol Matrix is repeated across both indicators' descriptions.
───────────────────────────────────────────────
🔶 PROBLEM
On a standard chart, volume is just numbers and bars, so to know how much weight is behind the current candle's move, you have to scan the whole chart yourself and judge relative size. Doing that instantly during live trading takes intuition built through long training. This problem is worse in crypto: since the same asset trades on dozens of exchanges at once, looking at a single exchange's volume alone doesn't show where the real volume spike actually is. I came to think there were two important points.
1. (Common) How much does this volume mean in the market as a whole?
Every asset has a normal, average scale at which it typically trades. If far more trading is happening than that, the asset is drawing attention right now. Conversely, even when candles look active and volume keeps increasing, if it stays below the whole-market average, it is actually a minor move. In other words, it should be readable instantly against the whole market — not against the immediately preceding period.
2. (Multi-exchange asset) Is this a market-wide event, or a local event on one exchange?
For an asset traded on dozens of exchanges at once, as in crypto, even a very large exchange's volume spike alone won't move the price much — because the remaining exchanges still hold volume that can't be ignored. The same spike means something completely different depending on whether it happens across many exchanges at once or only locally — and neither a single exchange's volume, nor a simple aggregate of them, shows this difference clearly (it ends up buried under the pattern of whichever pair has overwhelming volume, like Binance).
🔷 SOLUTION
1. (Common) The whole chart's accumulated average volume is extracted as a base line, and each bar's ratio to it is standardized into a common UV-scaled color. For crypto, one step further — the volumes of 12 major exchange pairs are each weighted by importance and composited into one Final Synthetic UV volume, used as the main volume. This way, every visual element on the chart can be drawn based on one common scale. This is Ultravol.
2. (Multi-exchange asset) The volume spike history of each of those same 12 sources, before Ultravol composites them into one, is decomposed along the time axis using the same UV-scaled color, so you can see at a glance whether the current spike spans the whole market or is local. This is Ultravol Matrix. (Originally one indicator, but split into two because the number of plots needed exceeded Pine's limit (64-plot) — the core engine is the same.)
Volume can now be perceived instantly. Candles carrying below-average volume stay dark and featureless; candles carrying above-average energy render brighter and more intense. The screen looks quiet when the market is quiet, and busy when it is busy. And this color grammar reads the same way on any asset, any timeframe — because the reference is always that market's own whole-history average. This indicator set can fully replace ordinary candles and volume charts.
🔷 Ultravol Core Engine: Processing Diagram
🟣 Full engine mechanics (Master GATE scheduling, coin-unit correction, per-exchange trust weighting, auto listing-join) are documented in the Appendix — see origin indicator .
───────────────────────────────────────────────
Ultravol Matrix - cross-exchange volume spike heatmap
✨ Gives you an insight into hidden, cross-exchange volume spike flow — by color, instantly!
Across many crypto exchanges, Ultravol Matrix curates 12 pairs (spot + perp) — Each exchange's volume, reverted to native base. → normalized to its own signature. → Rendered on the same UV-defined color scale. → Spike flow patterns (not absolute volume) can be compared directly across history in one matrix.
📘 Strong trends begin with cascading vol spikes across all exchanges.
📗 A perp vol spike with no spot participation (all or a single perp pair) is often just a futures liquidation cascade.
📙 Track vol spike trends by exchange. Who is trending? Alone? User base? Region? Spot or Perp? All together?
📕 Trending vol spike sequence — drop to lower TF (1m or seconds) to read the order in detail.
✨ Ultravol Matrix Engine:
Its own unique method. 12-pair per-exchange UV-scaled color leveling is crypto-exclusive.
🔹 How to read it
🔗 The time-axis extension of Ultravol — same language by UV-scaled color: Ultravol Matrix reads history, Ultravol reads live.
🔹 You can easily spot mass volume that's concentrated in a single exchange.
🔹 All together or single spike trending.
🔹 For altcoins, even on the 5m and 15m timeframes, persistent long spikes tend to occur on only a few individual exchanges. This behavior is less frequent in major cryptocurrencies like BTC or ETH. (It is recommended to familiarize yourself with the volume spike patterns of your specific trading pairs in advance.)
Setup Panel
☑ 📱 : Mobile friendly UI setup
• Source : Ultravol (Auto) fixed
• Rescale : Only for extremes, too 🔥 or too ⚫️
Especially for altcoins, the market heats up significantly during trending phases. Consequently, if the heatmap temperature rises to a point where chart variations become difficult to distinguish, lowering the rescale option by -1 or -2 makes it easier to discern the intensity differences on the screen. (In this case, the adjusted value is temporarily displayed in the bottom-right corner.)
🔸 Hover over the nametag for symbol info.
🔸 Maximize the pane (or drag it taller) for detailed matrix flow.
Matrix's volume spectrum is compressed using a separate log-based clamp to fit within a low-height panel. Read it only as relative magnitude — judge volume spikes by color, not by bar height.
⚠️ Required setting: In order to vertically align the Name tag (on matrix)
⚙︎ > Chart option > Canvas > Margins > Top: 0% Bottom: 0% Rights: 50bars
Indicator

Ultravol - correct market volume [GF4M]Ultravol - correct market volume
❗️Reason for displaying two indicators together on the main chart:
🔗 Use together for reading volume — Ultravol, Ultravol Matrix are originally built as one indicator, split in two due to Pine's 64-plot limit & multi-pane drawing limit. (same language by UV-scaled color): Ultravol Matrix reads vol spike history, Ultravol reads live.
❗️Per PulseWire's policy that each script's description must be self-contained on its own, the Ultravol engine description common to both Ultravol and Ultravol Matrix is repeated across both indicators' descriptions.
───────────────────────────────────────────────
🔶 PROBLEM
On a standard chart, volume is just numbers and bars, so to know how much weight is behind the current candle's move, you have to scan the whole chart yourself and judge relative size. Doing that instantly during live trading takes intuition built through long training. This problem is worse in crypto: since the same asset trades on dozens of exchanges at once, looking at a single exchange's volume alone doesn't show where the real volume spike actually is. I came to think there were two important points.
1. (Common) How much does this volume mean in the market as a whole?
Every asset has a normal, average scale at which it typically trades. If far more trading is happening than that, the asset is drawing attention right now. Conversely, even when candles look active and volume keeps increasing, if it stays below the whole-market average, it is actually a minor move. In other words, it should be readable instantly against the whole market — not against the immediately preceding period.
2. (Multi-exchange asset) Is this a market-wide event, or a local event on one exchange?
For an asset traded on dozens of exchanges at once, as in crypto, even a very large exchange's volume spike alone won't move the price much — because the remaining exchanges still hold volume that can't be ignored. The same spike means something completely different depending on whether it happens across many exchanges at once or only locally — and neither a single exchange's volume, nor a simple aggregate of them, shows this difference clearly (it ends up buried under the pattern of whichever pair has overwhelming volume, like Binance).
🔷 SOLUTION
1. (Common) The whole chart's accumulated average volume is extracted as a base line, and each bar's ratio to it is standardized into a common UV-scaled color. For crypto, one step further — the volumes of 12 major exchange pairs are each weighted by importance and composited into one Final Synthetic UV volume, used as the main volume. This way, every visual element on the chart can be drawn based on one common scale. This is Ultravol.
2. (Multi-exchange asset) The volume spike history of each of those same 12 sources, before Ultravol composites them into one, is decomposed along the time axis using the same UV-scaled color, so you can see at a glance whether the current spike spans the whole market or is local. This is Ultravol Matrix. (Originally one indicator, but split into two because the number of plots needed exceeded Pine's limit (64-plot) — the core engine is the same.)
Volume can now be perceived instantly. Candles carrying below-average volume stay dark and featureless; candles carrying above-average energy render brighter and more intense. The screen looks quiet when the market is quiet, and busy when it is busy. And this color grammar reads the same way on any asset, any timeframe — because the reference is always that market's own whole-history average. This indicator set can fully replace ordinary candles and volume charts.
🔷 Ultravol Engine: Processing Diagram
🟣 Check the Appendix — (16 live feeds/candle · coin-unit correction (1000x-listed coins) · USDT/USDC reference price conversion · Master GATE calc scheduling · per-exchange trust weighting · auto listing-join. Full mechanics + reusable code.)
───────────────────────────────────────────────
Ultravol - correct market volume
✨ Gives you a trained trader's sense for volume — by color, instantly!
📘 Reveal key market energy areas through volume-encoded candles, spectrum layer, v-ray, energy flux, and spike panel by color. A full legacy candle & volume chart replacement.
📗 Final synthetic UV — Across many crypto exchanges, Ultravol curates 12 (spot + perp) — reverted to native base → normalized & weighted by custom criteria, spot summed and perp summed separately (used as Energy Flux source), then combined into one — to read the unified volume flow across the whole market.
📙 Per-exchange UV level on the panel — Each exchange's volume, normalized to its own signature. → Rendered on the same UV-defined color scale. → Current candle's volume spike level (not raw volume) can be compared across exchanges at a glance.
✨ Ultravol engine:
Its own unique method. Synthetic UV (12-pair fusion) and Per-exchange UV-scaled color mark are crypto-exclusive — UV-scaled coloring works on any chart.
🔷 How to read it
It is recommended to check the color reference scheme in the settings panel to understand how candle colors are represented. Once you are familiar with these patterns, you can instantly gauge the intensity of current movements during live trading.
Refer to the historical patterns where rare, massive volume occurred (indicated by sky blue, blue, and purple - When similar volume occurs later, frequently become the Top or Bottom.)
Massive volume spike levels frequently act as strong S/R.
🔷 Basic Screen - check volume by color.
Spike Panel
This panel simultaneously displays the live candle volume in two ways: 1) as an absolute value in the base unit, and 2) as a UV-scaled mark. Users can quickly identify which exchange is experiencing a volume spike based solely on the colored emoji characters.
Status Label
The working mode automatically adjusts based on the selected symbol type and information, with the current status displayed via the label in the bottom-right corner.
Panel setup
☑ 📱 : Mobile friendly UI setup
• Source : Use Ultravol (Auto) normally
• Rescale : Only for extremes, too 🔥 or too ⚫️
☑ V-Ray : Vertical highlight marks on big spike.
☑ Energy Flux : 8 Spot(U), 4 Perp(L)
+ Trending energy balance (Spot vs Perp)
☑ Candles : Chart candle × UV fusion.
Each element—Volume, Volume-encoded Candlesticks (Up/Dn), and Ruler—features its own independent color scheme.
No volume chart color
☑ Spectrum : Synthetic UV from 12 vol src.
+ Instant energy read by UV-scaled color
+ Max height. Move to a pane first.
☑ Panel : Exchange's raw vol (number)
+ Current UV-scaled spike (color mark)
☑ s Smaller UI ☑ ↓ Center-right
☑ ! Wait Long · Act Fast (#1 principle)
🔸 Hover over the panel for detailed info.
Vol src info. & current status notice
Volume spike marking by unique UV-scaled color
Works together as one.
You can see historical spike flow and current spike details at the same time.
🔗 Ultravol Matrix reads vol spike history, Ultravol reads live.
⚠️ Ultravol must be placed at the very front.
(To ensure the correct z-layer order of all graphics, including hybrid override candles, is displayed exactly as intended. )
HELP: Check a tooltip on the setup panel & spike panel.
🟣 APPENDIX — A few notes on what happens inside UV engine.
💊 Master GATE (Calculation scheduling)
This indicator reads 16 external data sources in real time: the volumes of 12 exchange pairs, plus market cap, two stablecoin exchange rates, and the market average price. The computation that follows these calls is substantial. But volume is a simple cumulative value — I do not see immediate tick-by-tick recomputation as essential. So the work is divided into what happens when a candle opens (new), while it is in progress (realtime), and when it closes (confirmed) — and the heavy computation was judged reasonable to run only at fixed intervals during the candle. It is the internal scheduler that keeps the whole indicator responsive, and a precondition for this indicator to work at all.
// 🟧🟦🟧🟦🟧🟦🟧🟦🟧🟦🟧🟦🟧🟦🟧🟦🟧🟦🟧🟦🟧🟦🟧🟦🟧🟦🟧🟦🟧🟦
// MASTER GATE - throttling setup
var bool uv_throttleGATE_required = uv_chart_symbol_crypto_basequotetickvol_flg
varip bool bar_NOTLIVE_flg = false
varip bool bar_GATEbypass_flg = false
bar_NOTLIVE_flg := uv_throttleGATE_required
and barstate.isrealtime and (timenow - (time_close + ((time_close - time)*2)) > 0)
bar_GATEbypass_flg := not (uv_throttleGATE_required and barstate.isrealtime and not bar_NOTLIVE_flg)
const int UV_MASTERGATE_RATE_T_VAL = 160 // ms
varip int uv_MasterGATE_last_t = na // Last GATE Open time = LINUX time ms
varip bool uv_MasterGATEopen_flg = false
uv_MasterGATEopen_flg := bar_GATEbypass_flg
or na(uv_MasterGATE_last_t)
or (timenow - uv_MasterGATE_last_t >= UV_MASTERGATE_RATE_T_VAL)
or barstate.isconfirmed
if not bar_GATEbypass_flg and uv_MasterGATEopen_flg
uv_MasterGATE_last_t := timenow
// MASTER GATE - throttling setup End
// 🟧🟦🟧🟦🟧🟦🟧🟦🟧🟦🟧🟦🟧🟦🟧🟦🟧🟦🟧🟦🟧🟦🟧🟦🟧🟦🟧🟦🟧🟦
You can make this simple throttling GATE. After configuring the GATE operating conditions as shown above, you can apply them to the actual indicator calculation section by utilizing uv_MasterGATEopen_flg like below. It is simple yet effective. (Caution: Given how Pine Script executes, this GATE mechanism provides reasonable computational savings rather than perfect scheduling. For precise control, use it alongside barstate.isnew / isrealtime / isconfirmed)
if uv_MasterGATEopen_flg
s1_color_x := f_src_uv_lv_coloring(s1_uv_lv)
s2_color_x := f_src_uv_lv_coloring(s2_uv_lv)
s3_color_x := f_src_uv_lv_coloring(s3_uv_lv)
s4_color_x := f_src_uv_lv_coloring(s4_uv_lv)
s5_color_x := f_src_uv_lv_coloring(s5_uv_lv)
s6_color_x := f_src_uv_lv_coloring(s6_uv_lv)
s7_color_x := f_src_uv_lv_coloring(s7_uv_lv)
s8_color_x := f_src_uv_lv_coloring(s8_uv_lv)
p1_color_x := f_src_uv_lv_coloring(p1_uv_lv)
p2_color_x := f_src_uv_lv_coloring(p2_uv_lv)
p3_color_x := f_src_uv_lv_coloring(p3_uv_lv)
p4_color_x := f_src_uv_lv_coloring(p4_uv_lv)
🏁 Compositing the 12 exchange pairs
The volumes of 8 spot and 4 perpetual pairs are each converted into base-currency units, then merged into a single weighted volume. Ultravol shows the merged value; Ultravol Matrix shows the per-exchange values before merging, on the same color standard. The list stops at 12 because the volume figures of lower-ranked exchanges are often inflated, and would contaminate the result rather than improve it — the top 12 alone carry roughly 80% of real volume. This part is admittedly subjective; it was curated based on general exchange reputation in the market.
🏁 Unifying coin display units
Some coins — 1000PEPE, 1000SATS — are listed by different exchanges at 1000× or 10000× units (typically the case for extremely low-priced assets). Without reverting these to their original common unit, summing volumes across exchanges loses its meaning. There is no published reference for which exchange lists which coin at which multiple, so each case was verified one by one and built into an internal exception table, matched against the crypto name of the current chart. The symbol tickers used to call the 12 volumes are composed in two ways: (a) coins present in the low-volume table use the values defined there; (b) all other coins are composed per-symbol from 12 predefined symbol templates.
💊 This simple function extract crypto-name from any symbols with 1000x 1000000x
f_crypto_symbol_corekey(_tickerid, _basecurrency) =>
_tickerid_upper = str.upper(_tickerid)
_key = str.upper(_basecurrency)
if str.contains(_tickerid_upper, ":1000000BOB")
_key := '1000000BOB'
else
_prefix = str.match(_key, "^(?:1000000|10000|1000)")
_suffix = str.match(_key, "(?:1000000|10000|1000)$")
if _prefix != ''
_key := str.substring(_key, str.length(_prefix))
if _suffix != ''
_key := str.substring(_key, 0, str.length(_key) - str.length(_suffix))
_key
💊 This simple function extract the multiple number from symbol.
f_crypto_symbol_multiple(_fullname, _corekey) =>
_f = str.upper(_fullname)
_k = str.upper(_corekey)
_k_pos = (na(_k) or _k == '') ? na : str.pos(_f, _k)
_multiple = 1.0
if not na(_k_pos)
_colon_pos = str.pos(_f, ':')
_prefix_start = na(_colon_pos) ? 0 : _colon_pos + 1
_between = str.substring(_f, _prefix_start, _k_pos)
_after = str.substring(_f, _k_pos + str.length(_k))
_pre_num = str.match(_between, "^(?:1000000|10000|1000)$")
_suf_num = str.match(_after, "^(?:1000000|10000|1000)")
_raw = _pre_num != '' ? str.tonumber(_pre_num) : _suf_num != '' ? str.tonumber(_suf_num) : 1
_multiple := na(_raw) ? 1.0 : _raw
_multiple
💊 Coin name exceptions
The crypto names used by PulseWire's CRYPTO: and CRYPTOCAP: feeds quite often differ from the names exchanges actually use (this happens among smaller coins — SLC → SLCS, HYPE → HYPEH, and the like). Each time one was found, it was manually verified to be the same coin and added to an exception list. That exception table is pre-checked on the actual M.CAP and Avg. Price security calls.
This simple function maps standard exchange crypto names to PulseWire's native CRYPTO: , CRYPTOCAP: chart names.
f_crypto_cryptocap_tv_ticker(_uv_chart_crypto_tickerhead_str) =>
// CRYPTO: CRYPTOCAP:
//────────────────────────────────────────────---
// EXCHANGES => CRYPTOCAP // Cypto name
//────────────────────────────────────────────---
result_ticker = switch _uv_chart_crypto_tickerhead_str
'SLC' => 'SLCS' // Silencio
'BABY' => 'BABYL' // Babylon
'HYPER' => 'HYPERL' // Hyperlane
'HYPERL' => 'HYPERL' // 〃
'HYPE' => 'HYPEH' // Hyperliquid
'BOB' => 'BOBBUIL' // Build On Bitcoin
'BOBBOB' => 'BOBBUIL' // 〃
'TAG' => 'TAGG' // Tagger
'TAO' => 'TAOB' // TAO
'TOSHI' => 'TOSHI3' // Toshi
'NEIROCTO' => 'NEIROF' // First Neiro On Ethereum
'NEIRO' => 'NEIROF' // 〃
'NEX' => 'NEXUS5' // Nexus
'RATS' => 'RATS2' // Rats
'CHEEMS' => 'CHEEMSC' // Cheems
'SATS' => 'SATSO' // SATS (Ordinals)
'CAT' => 'CATSI' // Simon's Cat
'TRUMP' => 'TRUMPOF' // Trump official
'USDS' => 'USDS2' // USDS
'MOVE' => 'MOVEM' // Movement
'MOCA' => 'MOCAV' // Mocaverse
'ZORA' => 'ZORA2' // Zora
'BARD' => 'BARDL' // Lombard
'ATH' => 'ATHAE' // Aethir
'SONIC' => 'SONICSV' // Sonic SVM
'KNC' => 'KNC' // Kyber Network
'ZRO' => 'ZROL' // LayerZero
'AMP' => 'AMP2' // AMP
'CHIP' => 'CHIPUS' // USD.AI
'RAVE' => 'RAVED' // RaveDAO
'PROS' => 'PROSPH' // Pharos
=> _uv_chart_crypto_tickerhead_str
result_ticker
💊 G-Index px (Reference market price)
A mix of the current chart's price and the whole-market average price. It is a buffer that keeps the base line from being dragged around by a momentary price jump on a single exchange. G-Index Price operates only when the current chart uses USDT, USDC, or USD as its base unit. -> takes the avg. price provided by TV -> converts it to the current chart's unit by exchange rate.
//⬜🟥⬜🟥⬜🟥⬜🟥⬜🟥⬜🟥⬜🟥⬜🟥⬜🟥⬜🟥⬜🟥⬜🟥⬜🟥⬜🟥⬜🟥⬜
// G-Index PX
//
varip bool g_index_px_works = false
varip float g_index_px = na
var float chart_current_multiple = not uv_chart_symbol_crypto_basequotetickvol_flg ?
1.0 : f_crypto_symbol_multiple(uv_chart_tikerid_str, uv_chart_crypto_tickerhead_str)
var string chart_current_currency = syminfo.currency
float USD2USDT_avg_rate = request.security("CRYPTO:USDTUSD", timeframe.period, ta.sma(hlc3, 3))
float USD2USDC_avg_rate = request.security("CRYPTO:USDCUSD", timeframe.period, ta.sma(hlc3, 3))
bool USDT_is_DEPEG = math.abs(USD2USDT_avg_rate - 1.0) * 100 >= 0.1
bool USDC_is_DEPEG = math.abs(USD2USDC_avg_rate - 1.0) * 100 >= 0.2
var int chart_currency_convert_mode = switch chart_current_currency
'USD' => 1
'USDT' => 2
'USDC' => 3
=> 0
float g_avg_chart_ratio = switch chart_currency_convert_mode
1 => 1.0
2 => (1.0 / USD2USDT_avg_rate)
3 => (1.0 / USD2USDC_avg_rate)
0 => 0.0
var bool chart_currency_convert_no_need = (uv_chart_crypto_tickerhead_str == 'USDT')
or (uv_chart_crypto_tickerhead_str == 'USDC')
or (uv_chart_crypto_tickerhead_str == 'USDS')
or (uv_chart_crypto_tickerhead_str == 'PYUSD')
or (uv_chart_crypto_tickerhead_str == 'USDP')
var string g_index_px_crypto_ticker = 'CRYPTO:' + f_crypto_cryptocap_tv_ticker(uv_chart_crypto_tickerhead_str) + 'USD'
if chart_currency_convert_mode != 0
g_index_px := (request.security(g_index_px_crypto_ticker,timeframe.period, close * g_avg_chart_ratio,gaps=barmerge.gaps_on, ignore_invalid_symbol=true) * chart_current_multiple )
if not g_index_px_works and not na(g_index_px) and uv_volmode_ultravol_task_flg and not chart_currency_convert_no_need
g_index_px_works := true
if g_index_px_works and na(g_index_px) and na(g_index_px )
g_index_px_works := false
//G-Index - end
//⬜🟥⬜🟥⬜🟥⬜🟥⬜🟥⬜🟥⬜🟥⬜🟥⬜🟥⬜🟥⬜🟥⬜🟥⬜🟥⬜🟥⬜🟥⬜
🏁 Listing detection and exception reporting
An exchange that was absent early in the chart and began trading midway is automatically included in the calculation from that point on, and appears on the panel. The top-right panel shows the current bar's volume both as an absolute number (in base units) and as per-pair UV-scaled markings. When an exception occurs — some data not provided on a particular timeframe, for instance — you can hover over the panel to see exactly how the indicator is operating right now. Better to show what is happening than to behave strangely in silence.
🏁 You can check the uv engine (marking area like below) inside code.
// ⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜
// Ultravol Core Engine
// ⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜
Indicator

Change of Character (CHoCH) Alert System [algo_aakash]Change of Character (CHoCH) Alert System is a market structure signal tool focused on a single event: a confirmed shift in directional bias. Rather than labeling every Break of Structure and CHoCH the way many public structure scripts do, this indicator deliberately ignores continuation breaks and limits both the chart and the alert feed to the moments where the prevailing character of the market actually flips.
Problem Statement
Most public CHoCH implementations classify a character change purely on the direction of a swing break, with no measure of how convincing that break actually was. This creates two practical issues for anyone building alerts around structure. Every minor swing wobble can trigger a notification, producing alert fatigue, and there is no way to separate a decisive character change from one that barely closed beyond the swing level. This script addresses both issues with a close-confirmed CHoCH-only detection engine and a built-in confidence grading step applied to every signal.
Methodology
The script maintains a single structure register holding the most recent confirmed swing high and swing low, located with standard pivot detection over a user-defined pivot length. When the adaptive swing filter is enabled, a newly confirmed pivot only replaces the stored swing if its distance from the last opposite-type pivot exceeds a configurable ATR-relative threshold, which keeps insignificant micro-swings out of the structure register before they can influence a signal.
A Change of Character is only evaluated on a confirmed candle close, so nothing in the detection logic repaints once a signal has printed. A bullish CHoCH requires a close above the last swing high while the tracked bias is bearish or undefined. A bearish CHoCH requires a close below the last swing low while the tracked bias is bullish or undefined. A break that occurs while the bias already agrees with the break direction is treated as ordinary continuation and is not flagged.
Two optional filters gate confirmation further. A displacement filter requires the breaking close to clear the swing level by a minimum ATR multiple, removing marginal breaks. A momentum filter requires the breakout candle's body to represent a minimum percentage of its total range, removing breaks driven mostly by wick with little real conviction behind the close.
Once a CHoCH is confirmed, the broken swing level is projected forward on the chart as an active structure line. If a later confirmed close moves back through that level, the structure is marked invalidated and the projection line is dimmed, separately from the detection of any new CHoCH.
Signal Workflow
Track the most recent confirmed swing high and swing low using pivot detection.
Apply the adaptive swing filter to reject pivots too close to the last opposite-type pivot.
On each confirmed candle close, test for a close beyond the stored swing level against the current bias.
Apply the displacement filter to confirm the close cleared the level by a minimum ATR multiple.
Apply the momentum filter to confirm the breakout candle's body-to-range ratio meets the minimum threshold.
Score the confirmed breakout candle on displacement in ATR units and body-to-range ratio to produce a Weak, Moderate, or Strong confidence grade.
Flip the tracked bias, plot the CHoCH label with its grade, and project the broken level forward as an active structure line.
Continue monitoring the active structure line and mark it invalidated if a later confirmed close moves back through it.
Why This Indicator Is Different
Many structure tools plot every Break of Structure alongside every CHoCH, leaving the trader to filter out which events represent an actual change in character.
This script omits BOS events entirely and reports only confirmed CHoCH signals, which are the events that correspond to a bias flip.
Each confirmed CHoCH is scored using two independent factors measured on the breakout candle itself, its ATR-normalized displacement past the level and its body-to-range ratio, rather than being treated as a single undifferentiated event.
The confidence grade is written into the alert message text at the moment the event fires, which requires composing the message dynamically rather than relying on a fixed template.
The swing level broken by a CHoCH remains tracked after the signal fires, so a later close back through that level produces a distinct invalidation alert rather than silently vanishing into the next structure calculation.
Detection is restricted to confirmed candle closes throughout, so the bias, the grade, and the invalidation state cannot change intrabar once printed.
Inputs
Structure Engine
Swing Pivot Length
Adaptive Swing Filter
Filter Threshold (ATR multiple)
Break Confirmation
Displacement Filter
Displacement Multiplier
Momentum Filter
Minimum Body % of Range
ATR Length
Visual Settings
Show Swing Points
Show Structure Projection
Projection Extension
Show Trend Background Wash
Color Candles After CHoCH
Show Confidence Grade
Label Size
Bullish, Bearish, and Projection colors
Status Panel
Show Status Panel
Panel Position
Alerts
Alert: Bullish CHoCH
Alert: Bearish CHoCH
Alert: Bullish Structure Invalidated
Alert: Bearish Structure Invalidated
Alerts
Alerts are available for:
Bullish CHoCH confirmed on a closed candle, with the confidence grade included in the alert message
Bearish CHoCH confirmed on a closed candle, with the confidence grade included in the alert message
Bullish structure invalidated after a confirmed close back below an active bullish level
Bearish structure invalidated after a confirmed close back above an active bearish level
Practical Usage
Use a shorter pivot length on intraday charts to react to structure earlier, combined with the displacement and momentum filters to avoid marginal breaks.
Use a longer pivot length on higher timeframes to isolate structurally significant character changes only.
Treat a Strong-grade CHoCH as a higher-conviction event than a Weak-grade CHoCH when weighing entry timing or position sizing.
Watch for a structure invalidated alert shortly after a CHoCH, since it indicates price has returned through the level that produced the signal.
Use the status panel as a quick reference for the current bias and the most recent CHoCH grade without needing to scan the chart for labels.
Limitations
Swing highs and lows depend on confirmed pivots, which require the full pivot length of bars to close on both sides before becoming available, introducing a disclosed confirmation lag.
The displacement and momentum filters reduce signal frequency by design, which means fewer but more selective CHoCH events compared to unfiltered structure break detection.
Structure invalidation reflects a return through a previously broken level and does not attempt to forecast subsequent price direction.
This indicator identifies structural events only and does not constitute financial advice or a complete trading system on its own.
Notes
All structural state, including the tracked bias, the active levels, and the confidence grade, is evaluated only on a confirmed candle close, so nothing in this script repaints once printed.
The only lag in the system is the standard pivot confirmation lag inherent to pivot-based swing detection, which is disclosed above rather than hidden.
Designed for dark theme charts. On light themes, consider darkening the projection line color for improved contrast.
Indicator

Volatility Jump DetectorVolatility Jump Detector
This tool marks structurally significant price moves and tells you what kind of move each one was. It is an event detector, not a signal — it does not predict direction. It answers "did something real just happen here, and what was behind it?"
HOW JUMPS ARE DETECTED
Most "big candle" indicators compare a move to an ordinary volatility estimate, which has a circular flaw: a large jump inflates the very volatility measure used to judge it, so the biggest moves look less exceptional than they are.
This uses bipower variation (Barndorff-Nielsen and Shephard; Lee and Mykland), which builds the local volatility estimate from products of adjacent absolute returns. That construction is insensitive to a single large move, and it is computed excluding the current bar — so a jump cannot inflate its own threshold. A move is flagged when it exceeds a chosen multiple of that robust volatility, and the panel reports the exact sigma reading.
TWO INDEPENDENT CONTEXT AXES
INTENSITY — Is the recent jump rate elevated versus its own long-run baseline? Reported as a multiple with the underlying counts always visible, so you can see the sample behind the verdict. Note on method: a Hawkes branching-ratio estimate was implemented first and dropped. At a 4-sigma threshold real data yields only a handful of jumps per few hundred bars, far too few for count-variance statistics — it returned zero on every timeframe tested. A plain rate comparison is what sparse events can actually support, and below a minimum count the reading honestly says "insufficient" rather than printing a fabricated number.
VOLUME — Was the jump backed by participation, or did it slip through a thin book? A large move on heavy volume and the same move on nothing are different events. Auto-disables on instruments without a volume feed.
Optionally link the Risk & Levels Cockpit's exported levels, and jumps that fire through your invalidation level or at the point of control are flagged.
ON THE CHART
Direction-aware triangles mark each jump, colored by the intensity regime at that moment. The most recent jump is labelled with its sigma reading and volume tag. The background tints when jump intensity is elevated. The panel adapts to your chart theme and colors each row by meaning.
WORKS ON ANY MARKET AND TIMEFRAME
All lookbacks are in bars with no session, expiry, or clock anchors. Non-repainting: the robust volatility estimate excludes the current bar, and everything confirms at close.
LIMITATIONS
Not a signal and not investment advice. This marks events and describes them; it does not forecast what follows. An earlier version classified jumps as "ignition" versus "exhaustion" and measured the forward tendency of each — the measured continuation and reversal rates sat at base rate, so that classification was removed rather than kept as decoration. Jump detection depends on the threshold you choose; a lower threshold marks more moves and dilutes significance. Intensity needs a long baseline window because jumps are rare, and reports "insufficient" when the count is too low. Volume confirmation requires a volume feed.
CREDITS
Original implementation. Barndorff-Nielsen and Shephard bipower variation; Lee and Mykland (2008) jump test; jump-rate intensity comparison. Indicator

The Z impact Market Sessions (Auto GMT)The Z Impact Market Sessions (Auto GMT)
OVERVIEW
This indicator highlights the four major Forex trading sessions —
London, New York, Tokyo and Sydney — directly on the chart as colored
boxes. Each box tracks the high and low reached during that session, so
you can see each session's range as it forms and where price sits
relative to it.
WHAT MAKES IT PRACTICAL
The main focus is a single GMT offset input. Instead of editing four
separate session time ranges by hand every time your broker's server
time or daylight saving changes, you adjust one value and all four
sessions shift together. Session times are defined internally on a fixed
base and recalculated from that one offset, including correct handling of
sessions that cross midnight (such as Tokyo and Sydney).
HOW IT WORKS
- Each session has a fixed base open/close time. A single offset input
shifts all of them, with hours wrapping correctly across the 0-24
boundary.
- A box is opened when a session starts and is extended bar by bar until
the session ends, continuously updating its high and low.
- A label marks each session by name, centered over its box.
- Sessions that span midnight are detected with an OR-based time check so
the box stays continuous.
INPUTS
- GMT offset: one value to align all sessions to your chart/broker time.
- Show toggles for London, New York, Tokyo and Sydney.
- A color per session and a background transparency control.
HOW TO USE
- If the sessions do not line up with your chart, adjust the GMT offset
until London (or any session you can verify) sits where you expect.
- Use the session boxes to see range highs and lows, session overlaps,
and where the current price is within the active session.
- Sydney is off by default; enable it if you trade that session.
NOTES
- Times are based on standard session hours; during daylight saving
transitions you may need to adjust the offset by half or one hour.
- This is a visual session tool. It does not generate buy or sell
signals. Indicator

Smart Money Concepts Liquidity Sweep, Order Block & FVGOVERVIEW
Every Smart Money indicator draws order blocks and tells you they work. This one scores them 0–100 and then forward-tests whether the score is actually true — on your instrument, on your timeframe.
It maps liquidity, detects stop-hunts, builds entry zones from the displacement that follows, confirms them with real order flow, and grades every zone that price returns to. Instead of "here is an order block, trust me", the panel tells you something like:
Tier-A zones returned +0.23R vs +0.08R for a matched control, n=61, t=2.1 — PROVEN
...or, just as usefully, NOT PROVEN. It is built to be able to tell you it doesn't work.
This is a research and framing tool. It is NOT a strategy, NOT a signal service, and NOT a validated edge.
WHY THESE PARTS ARE ONE TOOL (mashup rationale)
The Smart Money / ICT model is a SEQUENCE. Each step is meaningless on its own, and that is why they are combined here rather than sold as separate scripts:
1. LIQUIDITY POOLS — Stops cluster above equal highs (buy-side) and below equal lows (sell-side). Swing points within an ATR tolerance are clustered into a single pool; the more swings, the more stops resting there. A pool is not a signal. It is a magnet and a target.
2. THE SWEEP — Price wicks THROUGH the pool and closes back INSIDE it. That is a stop-hunt, and it is the only part of the sequence that reveals intent. A sweep alone is still not a trade.
3. DISPLACEMENT — An impulsive, ATR-normalised move away from the swept level. This is what separates a SWEEP (reversal) from a RUN (continuation).
4. THE ZONE — Displacement leaves footprints: a FAIR VALUE GAP (a three-bar imbalance) and an ORDER BLOCK (the last opposing candle before the impulse). Where an FVG sits INSIDE an order block, two independent structures agree — flagged as a confluence zone.
5. LOCATION — The zone is then judged on WHERE it sits. Against the VOLUME PROFILE (value area, point of control, and untested "naked" POCs), and against the DEALING-RANGE EQUILIBRIUM. A bullish zone in DISCOUNT is a zone you are being paid to buy; the same zone in premium is not.
6. ORDER FLOW — The question structure cannot answer: did anyone actually show up? Intrabar delta signs each lower-timeframe bar's volume by its own direction. A bullish zone born on NEGATIVE delta is a vacuum, not a footprint — and scores nothing for it.
7. THE ENTRY — Price is never chased. The engine arms only when price RETRACES into a fresh zone, then frames entry / stop / target — the target being THE NEXT OPPOSING POOL OF STOPS, because that is where the next batch of liquidity is resting.
8. THE CALIBRATION — Without it, everything above is folklore.
Remove any one of these and the tool marks noise, chases price, targets nothing, ignores where value actually is, or reports a confidence it has not earned.
THE SCORE (0–100, eight measurable components, no discretion)
Displacement strength ...... impulse body ÷ ATR — the energy behind the zone
Participation (RVOL) ....... volume at formation vs its own recent average
Born from a sweep .......... did a stop-hunt precede it? (the core ICT claim)
Imbalance size ............. FVG height ÷ ATR
HTF alignment .............. does the higher timeframe agree?
Premium / discount ......... bullish zone in DISCOUNT? bearish zone in PREMIUM?
Volume-profile location .... at value, at the POC, or at an untested POC?
Order flow (delta) ......... was the displacement backed by real aggressive flow?
Tiers: A (70+) · B (40–69) · C (below 40). Every weight is an input — if you think the sweep matters more than I do, turn it up, and let the calibration tell you whether you were right.
THE CALIBRATION — AND WHY IT IS HONEST
Every zone trade is paired with a MATCHED CONTROL: the same bar, the same direction, and the SAME R:R — but entered at market with an ATR stop instead of at the zone. This isolates exactly one variable: does entering AT THE ZONE beat entering anywhere else on identical geometry? Under a random walk, this control has zero expectancy, so anything the zones earn is real.
Each tier is tested against its OWN control, because an A-zone may carry a very different R:R from a C-zone, and a trade's hit rate depends on its R:R.
Results are reported as EXPECTANCY IN R, not hit rate. When R:R varies from trade to trade, a hit rate on its own is meaningless: a 6R winner at 20% is +0.4R (excellent), while a 1R winner at 55% is +0.1R (barely worth the commission).
A Welch t-test decides whether the difference is real or luck. The panel does not say "proven" unless t > 1.96.
The panel also answers the one question that matters most: DOES TIER A BEAT TIER C? If the scoring model has any value, A-grade zones must outperform C-grade zones. If they don't, the score is noise — and it will say so.
Conventions are deliberately chosen so the tool cannot flatter itself:
· Both barriers touched on the same bar → the STOP is assumed first.
· Expired trades are marked to market, not counted as wins or losses.
· Everything is logged and resolved on confirmed bars only.
HOW TO USE IT
1. Read the bias, the liquidity map, and the premium/discount shading. Pools above are buy-side, pools below are sell-side, and price usually travels from one to the other.
2. Wait for a SWEEP, then for a zone to be created by the displacement that follows.
3. Do NOT chase. The engine arms an entry only when price RETRACES into a fresh zone.
4. Watch for ABSORPTION at the zone — heavy volume, a small range, price holding. Someone is soaking up the aggression. That is a defended zone, and it is the best live confirmation available.
5. READ THE CALIBRATION BEFORE YOU WEIGHT ANY OF IT. If Tier A is not proven on your instrument and timeframe, a zone is a LOCATION, not a PROBABILITY — treat it as context only.
6. Entry / stop / target and the resulting R:R are drawn on the chart. They are arithmetic, not advice.
Do not tune the weights until the numbers turn green. That is curve-fitting, and the calibration exists to catch it — not to be defeated by it.
ORIGINALITY
The underlying SMC concepts are public and credited below. What is assembled here is the specific synthesis: an eight-component measurable score, the fusion of SMC structure with auction-theory location (volume profile and premium/discount), true intrabar order-flow confirmation, a per-tier matched control, expectancy-in-R reporting, and a significance test that can — and frequently does — return "not proven".
Clean-room implementation. No third-party Pine code is reused.
UNIVERSAL / DATA REQUIREMENTS
Works on any symbol and any timeframe — the engine is ATR-normalised throughout, so it adapts to the instrument rather than assuming point values.
Volume improves the score but is NOT required. On a symbol without real volume, the RVOL, volume-profile and order-flow components neutralise and the panel says so, rather than blanking or pretending.
Intrabar delta requires a timeframe strictly below the chart's. The script AUTO-MAPS this (1m→5s, 3m→15s, 5m→30s, 15m→1m, and so on) because if the intrabar timeframe equals the chart timeframe there is only ONE intrabar — the bar itself — and delta degenerates to ±100% on every bar. Where true intrabar data is unavailable, the script falls back to a close-location proxy AND LABELS IT AS A PROXY in the panel.
NON-REPAINTING
Pools, sweeps, displacement, zones, the volume profile, absorption and entries are ALL computed on confirmed bars only.
Swing points use ta.pivot* and are therefore known only AFTER their confirmation bars. This is why a liquidity pool appears a few bars after its swing. That delay is the honest cost of not repainting, and it is paid deliberately — a level that moves after the fact is worse than no level at all.
The higher-timeframe read uses lookahead_off with a live-bar offset. The calibration harness logs AND resolves on confirmed bars, so its statistics cannot inflate intrabar. Nothing here is drawn and then moved.
HONEST LIMITATIONS — PLEASE READ
Smart Money Concepts is a popular framework, not a proven one. That is precisely why this script measures it instead of asserting it.
The calibration figures are IN-SAMPLE, close-to-close, with NO costs or slippage, and they use overlapping windows. A proven in-sample edge is NOT a guarantee of out-of-sample results.
The rolling volume profile is an APPROXIMATION — each bar's volume is spread uniformly across the bins its range covers. It is not tick data.
Small samples are unreliable. A tier with a low "n" is provisional even if it looks good.
If the edge is near zero, negative, or unstable across timeframes, the honest conclusion is that this model carries no edge on that instrument. The tool is designed to be able to tell you that, and you should believe it when it does.
Nothing here predicts price.
CONCEPT CREDITS
Smart Money / ICT concepts — liquidity pools, stop-hunts, displacement, fair value gaps, order blocks, premium/discount and optimal trade entry — are public trading concepts popularised by Michael J. Huddleston (Inner Circle Trader) and the wider SMC community.
Market Profile, the point of control and the value area — J. Peter Steidlmayer and the CBOT.
Market structure theory — Charles Dow.
Average True Range — J. Welles Wilder.
Wilson score interval — Edwin B. Wilson.
Triple-barrier forward labelling — Marcos López de Prado.
Welch's t-test — B. L. Welch.
The zone-scoring model, the order-flow fusion, the per-tier matched control and the tier calibration are the author's own. Not affiliated with, nor endorsed by, any of the above.
DISCLAIMER
This is a research and educational tool only. It is NOT financial advice, NOT a recommendation, and offers NO guarantee of profitability or accuracy. Indicators describe past behaviour; they do not predict the future. Entry, stop and target output is arithmetic, not advice. Trading carries a risk of loss. Test out-of-sample and make your own decisions. The author accepts no liability for any use of this script. Indicator

Fractal Support & Resistance Zones invincible]Fractal Support & Resistance Zones
Fractal Support & Resistance Zones is an advanced market-structure and price-reaction framework designed to identify, evaluate, and dynamically manage support and resistance zones derived from confirmed fractal pivots.
Unlike traditional support and resistance indicators that simply draw horizontal levels at swing highs and lows, this indicator treats every zone as a dynamic market structure object. Each zone develops through its own lifecycle based on price interaction, independent retests, reaction strength, penetration, estimated buying and selling activity, structural confirmation, trend alignment, and eventual support/resistance role reversal.
The objective is not simply to show where price previously turned.
The objective is to evaluate which zones are still technically relevant, which have gained confirmation, which are weakening, and which may provide better structural trade locations.
---------------------------------------------------------------------------------------------
Fractal-Based Zone Detection
The indicator identifies two independent classes of fractal pivots:
Weak Fractals
Shorter-length pivots designed to capture local price reactions and minor structural turning points.
Major Fractals
Higher-strength pivots based on a larger fractal window. These represent more significant swing highs and swing lows and receive greater importance within the zone-quality model.
Fractal support zones are created from confirmed pivot lows, while fractal resistance zones are generated from confirmed pivot highs.
The detection timeframe can be independently selected, allowing zones from a higher timeframe to be displayed on a lower-timeframe chart.
Higher-timeframe fractal data is requested with lookahead disabled to prevent future data from being intentionally introduced into the pivot calculation.
---------------------------------------------------------------------------------------------
Dynamic Support and Resistance Zones
The indicator creates price zones rather than single horizontal lines.
Markets rarely react from one exact price. Orders, liquidity, and previous positioning are often distributed across a price range. The zone model therefore attempts to represent the broader reaction area surrounding a fractal pivot.
Three zone-width methods are available:
ATR
Zone width is calculated from Average True Range and automatically adapts to market volatility.
Pivot Candle
The structure of the original fractal candle is used to determine the zone width.
Hybrid Candle + ATR
Combines pivot-candle structure with an ATR-based volatility limit.
The hybrid method is designed to prevent unusually large pivot candles from creating excessively wide support or resistance areas.
A minimum tick-based width can also be configured for instruments with very small price movements.
---------------------------------------------------------------------------------------------
Fractal Zone Clustering
Markets frequently produce several nearby fractal pivots around the same price area.
Drawing every pivot independently can create overlapping boxes and unnecessary chart congestion.
The indicator therefore includes a fractal clustering engine.
Nearby same-side fractals may be merged into a common structural zone when:
* They are within the configured ATR merge distance.
* The resulting merged zone does not exceed the maximum permitted ATR width.
* The maximum cluster count has not been exceeded.
* Fresh major zones are not being merged into previously tested or damaged zones when protection is enabled.
The cluster count becomes one component of the zone-quality model.
A cluster does not automatically mean a zone is strong. It simply indicates that multiple independent fractal structures developed around a similar price area.
---------------------------------------------------------------------------------------------
Independent Retest Detection
A major feature of the indicator is the distinction between bars inside a zone and independent zone retests.
If price remains inside a support or resistance area for several candles, those candles are not counted as multiple tests.
A new test is counted only after price:
1. Interacts with the zone.
2. Moves sufficiently away from the zone.
3. Travels the configured ATR reset distance.
4. Returns to the zone again.
This creates a more realistic retest model and avoids artificially increasing the test count during sideways congestion.
The label displays the number of independent tests recorded for each selected zone.
---------------------------------------------------------------------------------------------
ATR-Based Reaction Measurement
After an independent zone retest, the indicator measures how strongly price reacts away from the zone.
Reaction strength is normalized using ATR.
For a support zone, the engine measures upward movement from the reaction anchor.
For a resistance zone, the engine measures downward movement from the reaction anchor.
The strongest reaction generated by the zone is stored as its **Best Reaction ATR**.
Two configurable reaction thresholds are used:
Verified Reaction
The zone has produced the minimum ATR reaction required for technical validation.
Proven Reaction
The zone has generated a stronger ATR reaction and has also accumulated sufficient independent testing.
This prevents a zone from receiving a high structural status simply because price briefly touched it.
The market must demonstrate an actual directional response.
---------------------------------------------------------------------------------------------
Dynamic Zone Status System
Every zone is continuously classified according to its current structural condition.
FRESH
A newly created major zone that has not yet received an independent retest.
Fresh zones may represent relatively untouched structural areas.
WEAK
A zone originating from the shorter weak-fractal detection model.
Weak zones can still produce valid reactions but receive a lower fractal-grade contribution in the quality model.
VERIFIED
A zone that has been tested and remains structurally active.
Reaction behaviour and zone validation contribute dynamically to its score.
PROVEN
A zone that has accumulated multiple independent tests and generated a reaction exceeding the configured Proven Reaction ATR threshold.
Proven zones represent areas with demonstrated historical reaction behaviour.
DAMAGED
Price has penetrated a configurable percentage of the zone.
A damaged zone has not necessarily broken, but deeper penetration reduces its quality score.
BROKEN
Price has invalidated the zone according to the selected break-confirmation method.
Break confirmation can use either:
* Close Beyond Zone
* Full Candle Beyond Zone
Broken zones may optionally remain visible for historical analysis.
FLIPPED SUPPORT / FLIPPED RESISTANCE
A previously broken zone has confirmed a structural role reversal.
Previous support may become resistance.
Previous resistance may become support.
The indicator does not immediately flip a zone when price crosses it. A separate role-reversal confirmation process is required.
---------------------------------------------------------------------------------------------
Zone Damage and Penetration Tracking
Zone quality is not binary.
A support or resistance area may gradually weaken before it completely breaks.
The indicator continuously measures the maximum percentage of zone penetration.
For support, penetration is measured downward through the support area.
For resistance, penetration is measured upward through the resistance area.
When penetration exceeds the configured damage threshold, the zone is classified as ** DAMAGED
Damage also applies a progressive penalty to the quality score.
This means a deeply penetrated zone may remain technically valid while receiving a lower structural ranking.
---------------------------------------------------------------------------------------------
Support and Resistance Role Reversal
The indicator contains a dedicated zone-flip engine.
After a support or resistance zone breaks, the engine monitors whether price moves sufficiently beyond the former zone.
The broken zone must first establish separation from price using a configurable ATR distance.
Price must then return to the previous structural area.
Depending on the selected confirmation mode, the indicator can require:
Zone Reclaim Only
The opposite-side retest itself is sufficient.
Close Away
Price must close a configurable ATR distance away from the zone.
Rejection or Engulfing
The retest can be confirmed through rejection behaviour, an engulfing candle, or a sufficiently strong close away from the zone.
Once confirmed:
* Broken support can become resistance.
* Broken resistance can become support.
The zone is then reset into a new lifecycle as a flipped structural area.
---------------------------------------------------------------------------------------------
Estimated Buy and Sell Activity
The indicator includes an estimated directional volume model.
Because standard PulseWire volume does not directly provide true executed bid and ask volume for every market, buying and selling activity is estimated from candle position within the candle range.
A close nearer the candle high allocates a greater portion of volume to estimated buying activity.
A close nearer the candle low allocates a greater portion of volume to estimated selling activity.
The model can use:
* Pivot volume only.
* Pivot volume plus independent retest activity.
Selected zone labels display estimated activity as:
B 64% | S 36%
This should be interpreted as an estimated directional participation model rather than true exchange-level order-flow delta.
---------------------------------------------------------------------------------------------
Multi-Factor Zone Quality Model
Every zone receives a dynamic quality score from 0 to 10.
The score is not based on a single condition.
The model combines several structural factors.
Fractal Grade
Major fractals receive a stronger contribution than weak fractals.
Rejection Wick
The pivot candle's rejection wick is normalized against ATR.
Larger relative rejection can increase the origin score.
Independent Retests
The model evaluates how many genuinely independent zone tests have occurred.
Importantly, unlimited retests do not continuously improve quality.
Excessive testing can weaken a zone.
Reaction Strength
The strongest measured ATR reaction contributes to zone validation.
Estimated Volume Confirmation
Pivot volume participation and directional estimated activity contribute to the score.
Fractal Cluster
Multiple nearby fractals can increase structural confidence.
Freshness
Newer zones receive a greater freshness contribution.
As a zone ages, this component gradually decreases.
The weight of every major quality component can be adjusted by the user.
---------------------------------------------------------------------------------------------
Origin Score and Validation Score
Internally, the quality engine separates zone evaluation into two conceptual stages.
Origin Quality
Evaluates how the zone was created.
This includes:
* Fractal grade.
* Pivot rejection wick.
* Pivot volume participation.
* Fractal clustering.
* Zone freshness.
Validation Quality
Evaluates what price did after the zone was created.
This includes:
* Independent retests.
* Reaction strength.
* Directional estimated activity.
Fresh zones are influenced more heavily by origin quality.
As price begins interacting with a zone, validation behaviour receives greater influence.
This allows the quality score to evolve with market behaviour rather than remaining permanently fixed at zone creation.
---------------------------------------------------------------------------------------------
Retest Exhaustion Penalty
A common assumption is that more support or resistance tests always make a zone stronger.
This indicator does not use that assumption.
Repeated interaction may gradually consume resting liquidity around a price area.
After the configured number of retests, the indicator begins applying an excess retest penalty.
The penalty increases with each additional independent test.
As a result, a heavily tested zone may receive a lower quality score even if it has not formally broken.
---------------------------------------------------------------------------------------------
Congestion Penalty
Price remaining inside a zone for an extended period may indicate balance, absorption, or structural deterioration.
The indicator tracks consecutive bars interacting with each zone.
After the configured congestion threshold, a progressive quality penalty is applied.
This helps distinguish a clean rejection from prolonged price acceptance inside the area.
---------------------------------------------------------------------------------------------
Trend Regime Alignment
An optional EMA-based trend regime is included in the quality model.
Support zones located in an unfavourable bearish regime can receive a counter-trend penalty.
Resistance zones located in an unfavourable bullish regime can also receive a penalty.
The trend filter does not automatically delete zones.
Instead, it modifies their relative quality.
This allows historically valid support and resistance areas to remain visible while acknowledging the current directional regime.
---------------------------------------------------------------------------------------------
Market Structure Break Detection
The indicator includes an independent Market Structure Break, or **MSB**, engine.
Confirmed swing highs and swing lows are detected using a configurable pivot length.
A bullish MSB occurs when price closes above the latest eligible structural high with sufficient momentum confirmation.
A bearish MSB occurs when price closes below the latest eligible structural low with sufficient negative momentum confirmation.
Momentum is normalized using a Z-score calculated from recent price changes.
This reduces the number of minor structural crossings classified as meaningful breaks.
Each structural pivot can generate only one MSB event, preventing repeated labels from appearing after the same swing has already been broken.
---------------------------------------------------------------------------------------------
Zone-to-Structure Confirmation
Market Structure Breaks can also validate previously tested zones.
When a bullish MSB occurs, the indicator searches for a recently touched support zone.
When a bearish MSB occurs, it searches for a recently touched resistance zone.
The most recent eligible zone can receive structural confirmation.
A configurable quality bonus is then applied.
This creates a basic structural sequence:
Zone interaction → Price reaction → Market Structure Break
The intention is to distinguish zones that merely produced a temporary bounce from zones followed by a measurable structural shift.
---------------------------------------------------------------------------------------------
Premium and Discount Trade Location
The indicator uses the latest structural swing high and swing low to estimate the current swing midpoint.
The midpoint represents the 50% equilibrium level of the structural range.
When Premium/Discount grading is enabled:
* Support zones are favoured when positioned in the discount portion of the swing.
* Resistance zones are favoured when positioned in the premium portion of the swing.
This condition contributes to the displayed Trade Grade.
It does not remove zones from the chart.
---------------------------------------------------------------------------------------------
Trade Grade System
Selected zones receive a simplified structural trade grade.
Grade A+
Reserved for high-quality zones with strong alignment between:
* Zone quality.
* Trend regime.
* Premium/discount location.
* Low structural damage.
* Limited retest exhaustion.
Grade A
Strong-quality zones with favourable trend alignment and low damage.
Grade B
Moderate-to-strong structural zones that are not classified as weak fractals.
Grade C
Lower-quality but still technically visible zones.
Grade D
Zones with poor overall structural quality.
The Trade Grade is a contextual ranking system.
It is not an automatic buy or sell signal.
---------------------------------------------------------------------------------------------
Star-Based Quality Display
To make the detailed labels easier to read, the numerical quality model is represented using stars.
★★★★★ = Quality 8.0 or higher
★★★★ = Quality 6.0 to 7.99
★★★ = Quality 4.0 to 5.99
★★ = Quality 2.0 to 3.99
★ = Quality below 2.0
The stars provide a quick visual representation of the underlying 0–10 quality score.
---------------------------------------------------------------------------------------------
Compact Detailed Labels
Selected zones can display compact one-line labels such as:
VERIFIED SUP | B 64% | S 36% | ★★★★ | Tests: 2 | Grade A
The label contains:
* Current zone status.
* Support or resistance classification.
* Estimated buying activity.
* Estimated selling activity.
* Quality stars.
* Independent retest count.
* Structural Trade Grade.
Because displaying a detailed label on every zone can create significant chart congestion, two label modes are available.
Nearest + Strongest
Prioritizes the nearest support, nearest resistance, and the highest-quality remaining zones.
All Visible Zones
Displays labels for every currently visible zone.
The maximum number of detailed labels can also be controlled.
---------------------------------------------------------------------------------------------
Nearest Zone Highlighting
The indicator continuously identifies:
* The nearest active support below price.
* The nearest active resistance above price.
These zones can receive stronger border highlighting.
This makes the most immediately relevant structural areas easier to identify without removing historical zones from the chart.
---------------------------------------------------------------------------------------------
Structural Equilibrium Zone
The latest confirmed structural swing high and swing low are used to calculate a 50% equilibrium area.
The indicator plots:
* Swing origin.
* Swing destination.
* 50% midpoint.
* Configurable equilibrium zone thickness.
Before price interacts with the equilibrium area, the zone is displayed as the current structural midpoint.
After price touches the area, the indicator changes its state to:
Equilibrium touched · wait for structure
This is intended to remind the trader that equilibrium interaction alone is not necessarily directional confirmation.
Additional market structure may be required.
---------------------------------------------------------------------------------------------
Alert Conditions
The indicator provides alert conditions for important zone and market-structure events:
* New fractal support zone.
* New fractal resistance zone.
* Independent zone retest.
* Zone verified by ATR reaction.
* Zone reaching Proven status.
* Zone becoming Damaged.
* Zone break.
* Support/resistance role reversal.
* Bullish Market Structure Break.
* Bearish Market Structure Break.
These alerts can be used to monitor structural changes without continuously watching the chart.
---------------------------------------------------------------------------------------------
Suggested Interpretation
This indicator is designed as a market context and structural analysis tool.
A possible analytical workflow is:
1. Identify the nearest active support and resistance.
2. Review the zone's current status.
3. Check estimated buy/sell activity.
4. Evaluate the quality stars.
5. Review the independent test count.
6. Check whether the zone is fresh, validated, damaged, or exhausted.
7. Evaluate trend alignment.
8. Check premium or discount location.
9. Observe whether price produces a structural break after the zone reaction.
10. Use the Trade Grade as an additional contextual ranking.
No single factor should be interpreted independently.
A five-star zone can still break.
A damaged zone can still generate a reaction.
A weak fractal can still become structurally relevant.
The purpose of the model is to organize multiple price-action variables into a consistent framework.
---------------------------------------------------------------------------------------------
Important Volume Note
The Buy and Sell percentages displayed by this indicator are estimated directional volume statistics.
They are calculated by allocating candle volume according to the closing position within the candle's high-low range.
They do not represent true bid/ask volume, footprint delta, or exchange-level aggressive buying and selling.
The values should therefore be used as a relative activity estimate only.
---------------------------------------------------------------------------------------------
Non-Repainting Considerations
Fractal pivots require confirmation bars.
A zone is created only after the corresponding pivot has been confirmed by the selected fractal length.
Higher-timeframe fractal calculations use `lookahead_off`.
Therefore, historical zones should be interpreted from the point at which the fractal became technically confirmed rather than assuming the pivot was known at the exact swing candle in real time.
Market Structure Break conditions are also evaluated using confirmed price and momentum conditions.
---------------------------------------------------------------------------------------------
Final Note
Fractal Support & Resistance Zones is designed for traders who prefer **dynamic structural zones instead of static support and resistance lines**.
The indicator combines fractal structure, volatility-normalized zone construction, independent retests, reaction measurement, damage analysis, estimated directional activity, structural breaks, trend regime, premium/discount location, and role reversal into a unified zone lifecycle model.
It is intended to help answer three practical questions:
Where is the important price structure?
How has price behaved around that structure?
Is the zone gaining validation, remaining fresh, or gradually losing structural quality?
This indicator is intended for technical analysis and research purposes only. It does not constitute financial advice. Traders should independently evaluate market conditions and apply appropriate risk management.
Indicator

Potential Well MapOverview
A volume or time profile tells you where price spent time. Potential Well Map tells you the forces acting at each level. It models the market as a particle drifting in a one-dimensional energy landscape and estimates that landscape directly from recent price action — the local drift (average next move) and diffusion (variance of the next move) at each price level — then integrates them into a potential curve. Its valleys are attractors (dynamical support/resistance that pulls price in); its peaks are barriers (levels price is repelled from). Two levels with identical occupancy can be opposite in dynamics — one an attractor, one a barrier — and this map tells them apart. It is a descriptive structure-and-risk map, not a predictive signal.
Why these components are ONE tool (mashup justification)
This is a four-stage chain where each stage produces something the previous one can't, and the honesty layer keeps the whole thing accountable:
Drift + diffusion per level — the raw forces. For every price bin, exponentially-decayed accumulators track the count, sum, and sum-of-squares of the next one-bar move that started there, giving the conditional first two moments (drift and diffusion) with recent regime weighted most. This is O(N) per bar — no window rebuild, no timeout.
The potential curve — the integral of drift ÷ diffusion. This turns the raw forces into a landscape whose valleys and peaks are attractors and barriers. It is the object an occupancy profile fundamentally cannot produce, because occupancy measures time spent, not the pull at a level.
Escape pressure — a bounded 0–100 breakout gauge derived from the remaining wall height between price and the nearest barrier. Because the potential is already diffusion-normalized, the escape factor is a clean exponential of the wall height, and it concentrates toward 100 as price approaches a wall.
The calibration harness — the honesty layer. When a barrier escape is flagged, did price actually travel that way more often than the unconditional base rate? It reports Hit / Base / Edge, resolved forward on confirmed bars only. The forces are a picture; the harness is the proof. Remove any one stage and the map either asserts structure it never tested, or shows a level with no dynamics behind it.
How it works
Price is detrended into a coordinate x = ln(price) − ln(slow anchor) so the distribution stays roughly centred as price trends. A grid of x-bins spans a few volatility units either side of zero. For each bin, the decayed accumulators build drift and diffusion; neighbour bins are sample-weighted-smoothed; the force (drift ÷ diffusion) is integrated into the potential; valleys and peaks that clear a prominence margin are marked as wells and barriers; and the escape pressure to each adjacent barrier is computed. Bins with too few effective samples are greyed out rather than trusted.
How to use it
Read the landscape as context. The green valley line is the active attractor — a mean-revert target. The dashed red lines are the barriers above and below. The shaded box is the expected range of a stiff well. In the dashboard, the escape pressures rise toward 100 as price nears a wall; a pin (fade-to-mean) is flagged only when price sits mid-well in a stiff, bounded valley, and an escape is flagged when price crosses a barrier after that side's pressure was already elevated. Watch the Edge row: a positive, matured Edge means escapes have led price on this instrument; near-zero means treat the map as structure only, not a trigger. It is never a standalone signal.
Universal & non-repainting
The source is an input and everything is self-scaling (vol-scaled grid, detrended coordinate), so it runs on any symbol and timeframe; defaults suit a liquid index/futures intraday chart. All statistics use closed past bars only — both the drift/diffusion accumulators and the calibration harness update solely on confirmed bars, so their numbers never inflate intrabar. The displayed landscape naturally evolves bar to bar because it is a live estimate, not a fixed level; confirmed escape and pin marks settle on the close of their bar. Edge figures are in-sample, close-to-close, with no costs — a study aid, not a backtest.
Originality
The building blocks are public physics and statistics: stochastic drift-diffusion dynamics, conditional-moment estimation of the drift and diffusion coefficients, and escape-rate theory. What's original is the application to a price series as a live, decayed, per-level energy landscape — the detrended coordinate, the exponential-memory conditional-moment accumulators, the diffusion-normalized potential integral, the prominence-gated well/barrier detection, the escape-pressure gauge, and the forward-calibration harness that scores escapes against their base rate. This is a clean-room implementation; no third-party Pine code is reused.
Concept credits
Stochastic drift-diffusion (Langevin) dynamics and the Fokker–Planck description of a probability landscape — Paul Langevin, Adriaan Fokker, Max Planck
Estimating drift and diffusion from the conditional moments of increments (Kramers–Moyal expansion) — Hendrik Kramers, José Enrique Moyal; exposition after Hannes Risken
Barrier escape / escape-rate theory — Kramers' escape-rate framework
Forward base-rate calibration discipline — standard out-of-sample evaluation practice
Disclaimer
Research and educational tool only. Not financial advice, no recommendation, no guarantee of results. It is an effective, empirical 1-D approximation of a memoryful, multi-factor market — treat "escape pressure" as a relative, normalized gauge, not a literal probability. Estimates are noisy where samples are sparse (the greyed bins). Indicators describe past behaviour; they do not predict the future. Trading carries risk of loss. Test out-of-sample and make your own decisions. The author accepts no liability. Indicator

Bedaiwi's Smart PivotsBedaiwi's Smart Pivots is a three-level market-structure indicator that classifies price turning points as Minor, Intermediate, and Major highs and lows.
HOW IT WORKS
Minor Pivots
A Minor High is confirmed when the middle bar of a three-bar formation has a high that is strictly higher than the highs immediately before and after it.
A Minor Low is confirmed when the middle bar has a low that is strictly lower than the lows immediately before and after it.
Equal highs and equal lows are not treated as Minor pivots.
Intermediate Pivots
Intermediate pivots are derived from confirmed sequences of Minor pivots.
An Intermediate High is identified when a higher Minor High is followed by a lower Minor High.
An Intermediate Low is identified when a lower Minor Low is followed by a higher Minor Low.
Major Pivots
Major pivots apply the same hierarchical logic to confirmed Intermediate pivots.
A Major High is identified when a higher Intermediate High is followed by a lower Intermediate High.
A Major Low is identified when a lower Intermediate Low is followed by a higher Intermediate Low.
SYMBOLS AND COLORS
- Red diamond: Intermediate High
- Green diamond: Intermediate Low
- Red exclamation mark: Major High
- Green exclamation mark: Major Low
Optional Minor pivots use the same High and Low color settings.
When the replacement option is enabled, an Intermediate symbol is removed and replaced with an exclamation mark if the same point is later promoted to Major status.
HISTORICAL PLOTTING AND CONFIRMATION DELAY
Pivot identification requires subsequent price information.
A Minor pivot is confirmed only after the following bar closes. Intermediate and Major pivots require additional confirmed pivot sequences, so their confirmation occurs later.
After confirmation, the indicator places the symbol on the historical bar where the relevant high or low occurred. Therefore, a symbol displayed on an earlier bar was not necessarily available in real time on that bar.
Historical placement is used only to show the actual location of the confirmed turning point. It should not be interpreted as a signal that was known on the historical pivot bar.
SETTINGS
Users can:
- Show or hide Minor pivots
- Show or hide Intermediate pivots
- Show or hide Major pivots
- Replace an Intermediate symbol when it becomes a Major pivot
- Customize High and Low pivot colors
PRACTICAL USE
Smart Pivots can help users:
- Study market structure
- Identify significant historical swing highs and lows
- Separate short-term fluctuations from higher-level price structure
- Review possible support and resistance areas
- Add context to discretionary price-action analysis
LIMITATIONS
Smart Pivots is an analytical indicator. It does not place trading orders and does not define entries, exits, stop-loss levels, profit targets, position sizing, or expected returns.
Pivot confirmation is delayed by design because later price action is required. Results may vary between symbols, timeframes, sessions, and data feeds.
The indicator does not identify final market tops or bottoms with certainty. Historical observations do not guarantee future market behavior.
This script is provided for research and educational purposes only. It is not financial or investment advice. Indicator
