Liquidity Breakout MatrixLIQUIDITY BREAKOUT MATRIX (LBM)
www.tradingview.com
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
OVERVIEW
Liquidity Breakout Matrix is an original consolidation-and-breakout mapping tool. It automatically detects the phases where a market stops trending and coils inside a tight liquidity pocket, draws that pocket as a structured channel on the chart, monitors the participation building up inside it, and then marks the exact bar where price resolves out of it.
Every channel it draws is a container of resting orders. The upper edge of a consolidation is where sell-side liquidity accumulates. The lower edge is where buy-side liquidity accumulates. Price does not stay inside these pockets forever โ it eventually resolves through one side, and that resolution is what LBM is built to isolate and time.
The indicator is fully self-adapting. It does not use fixed pip values, fixed point distances or hard-coded thresholds anywhere in its detection logic, so the same settings behave consistently on gold, indices, FX pairs, crypto, futures and equities, on any timeframe from seconds to monthly.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
WHY THIS INDICATOR WAS CREATED
Three specific problems motivated this build.
1. Most consolidation tools only see the range after it has already broken.
Manual range drawing is subjective, and simple "highest high / lowest low of the last N bars" boxes are drawn on every bar regardless of whether the market is actually consolidating. What was needed was a detector that identifies a genuine volatility contraction as a discrete event, waits for it to complete, and only then maps the exact bars that formed it.
2. Breakout signals fire far too often on single wicks.
A large portion of range breaks are liquidity grabs: a wick pierces the boundary, sweeps resting stops, and the candle closes back inside. A tool that treats every touch as a breakout produces constant false signals. LBM needed a confirmation model that ignores pure wick penetration by default.
3. Volume-based tools break completely on spot FX, CFD and metals feeds.
A very large number of brokers and data feeds publish no traded volume at all. Most volume-dependent indicators respond to this by printing blank values, broken numbers or an error notice, which makes half the tool useless on exactly the instruments many traders watch. LBM needed an activity engine that always resolves to something usable, and that is honest about what it is using.
The result is a single tool that maps compression, measures the participation inside it, and marks the resolution โ on any instrument, with or without a volume feed.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
HOW IT WORKS โ FULL METHODOLOGY
1. THE COMPRESSION INDEX (0โ100)
This is the core engine. It blends two independent and deliberately different readings of market contraction.
Reading A โ structural dispersion.
Raw price is first normalized into a 0โ1 position inside its own rolling high/low range over the Normalization Lookback. This converts price into a pure structural coordinate: 1 means price sits at the top of its recent range, 0 means the bottom, 0.5 means the middle. The standard deviation of that normalized coordinate is then measured over the Dispersion Length. This tells you how much price is actually travelling within its own structure. A market that is grinding sideways produces a low dispersion value even if the instrument itself is volatile in absolute terms.
Reading B โ raw volatility decay.
Independently, a fast ATR is compared against a slow ATR. When recent true range is shrinking relative to the longer baseline, the ratio falls. This catches volatility drying up even when structural position is still drifting.
Combining them.
Each reading is converted into a rolling percentile rank over the Percentile Window, which places the current value against its own recent history rather than against an arbitrary fixed number. This is what makes the tool instrument-agnostic and timeframe-agnostic. The two ranks are then blended using the Dispersion Weight and inverted, producing the Compression Index:
- High Compression Index โ the market is coiling
- Low Compression Index โ the market is expanding
The live value is always visible in the info panel.
2. THE SQUEEZE STATE MACHINE
The Compression Index alone is not a signal. It feeds a state machine.
While the index holds above the Compression Threshold, the script counts how many consecutive bars the squeeze has lasted. When the index drops back below the threshold, the squeeze is considered released. At that moment the duration is checked against Minimum Range Bars. If the coil was too short to be meaningful it is discarded and nothing is drawn. This filter is what keeps the chart clean โ brief one or two bar pauses never become channels.
3. CHANNEL CONSTRUCTION
When a valid squeeze completes, the channel is built retroactively over exactly the bars the coil lasted โ not over a fixed lookback. The script walks back through that specific window and extracts:
- Main channel body โ from the highest high to the lowest low of the coil, drawn as a shaded box
- Upper edge zone โ a red band sized by ATR beneath the top of the channel. This is the supply pocket, where sell-side liquidity is resting
- Lower edge zone โ a green band sized by ATR above the bottom. This is the demand pocket, where buy-side liquidity is resting
- Equilibrium line โ a dashed line at the exact 50% of the channel
The edge zone size is capped as a fraction of the total range, so a wide channel never ends up with edge bands that swallow the whole box.
While price remains trapped inside, the channel keeps extending to the right in real time. When price resolves, the channel freezes at the breakout bar and stays on the chart, so the full history of every pocket the market built remains readable.
4. UNIVERSAL ACTIVITY ENGINE
This is the component that keeps the participation side of the tool alive on every market. It resolves a usable per-bar activity series in a strict priority order.
Priority 1 โ Real chart volume.
If the feed publishes genuine traded volume, that is used and the panel reports "Chart volume (real)".
Priority 2 โ External reference symbol.
You may point the indicator at another symbol that trades the same underlying asset on a venue that does publish volume โ for example a futures contract or a major exchange pair. That symbol's volume is requested on the chart timeframe and used as the activity series. The panel reports "External symbol (real)".
Priority 3 โ Synthetic Activity.
If neither is available, the script builds its own participation proxy. It measures each bar's true range relative to a baseline ATR to get a relative activity reading, then weights that by candle body efficiency โ the proportion of the bar's range that was converted into directional body rather than rejected wick. A bar that travels far and closes with conviction registers as heavy participation; a bar that travels far but closes back where it started registers as lighter, because most of that movement was rejected.
This is explicitly a participation estimate, not traded volume, and the panel always labels it "Synthetic (estimated)" so nothing is ever presented as real exchange data.
Whichever source is resolved, it is then split into estimated buy and sell pressure using where each candle closed inside its own range: a close near the high assigns most of that bar's activity to buyers, a close near the low assigns most to sellers, and a mid-range close splits it.
5. FLOW OVERLAY INSIDE THE CHANNEL
Inside each channel, the per-bar buy/sell split is plotted as columns around the equilibrium line, so you can see which side was accumulating during the coil rather than only where price ended up.
- Comparison mode โ estimated buy pressure plotted upward, estimated sell pressure plotted downward
- Total mode โ a symmetric column of total activity, coloured by which side dominated
- Delta mode โ only the net difference, upward when buyers led, downward when sellers led
A tag on each channel prints the total estimated buy and sell activity accumulated across the entire consolidation.
6. BREAKOUT ENGINE
A breakout is registered when price resolves outside the channel body.
With Body Confirmed Breakout enabled (the default), the midpoint of the candle body must clear the boundary. A wick alone is not enough. This single filter removes a large share of liquidity-grab false signals, because a sweep that reverses will leave the body inside the channel.
With it disabled, the close alone triggers the signal, which produces earlier but noisier entries.
On a valid break the channel freezes and an arrow prints โ โฒ for an upside resolution, โผ for a downside resolution.
7. PRESSURE GAUGE
While a channel is still unresolved, a vertical red-to-green gauge is projected to the right of price, spanning the channel's own height, with a โ pointer. The pointer position reflects where the net accumulated flow of that specific channel sits between its own extremes โ effectively, who is currently winning inside the pocket. Above 50% means buyers have accumulated more; below 50% means sellers have.
8. INFO PANEL
The panel reports, in real time:
- Activity Source โ exactly which of the three sources is currently in use, so you always know whether you are reading real volume or an estimate
- Compression โ the live Compression Index out of 100
- State โ whether the market is currently Coiling (with the bar count so far) or Expanding
- Active Channel โ the price boundaries of the channel currently in play, or "none"
- Pressure โ the current buyer percentage inside the active channel
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
HOW TO READ IT ON THE CHART
- Shaded box โ a completed consolidation, a liquidity pocket
- Red band at the top โ supply zone, resting sell-side orders
- Green band at the bottom โ demand zone, resting buy-side orders
- Dashed centre line โ equilibrium of the range
- Columns inside the box โ estimated buy pressure above the line, sell pressure below it
- Tag on the box โ total estimated buy / sell activity for that whole consolidation
- Green โฒ arrow โ price resolved upward out of that channel
- Red โผ arrow โ price resolved downward out of that channel
- Gauge on the right โ live pressure balance inside the channel that has not resolved yet
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
PRACTICAL USE
Reading the structure.
Treat each channel as a pool of trapped orders rather than as a support/resistance pair. The market built that pocket for a reason: it is where positions accumulated. The resolution direction tells you which side of that pocket got run.
Taking the resolution.
The straightforward application is to act on the arrow, in the direction of the break, using the opposite edge zone of the broken channel as the invalidation level. That edge is structurally meaningful โ if price returns all the way through the channel to the far side, the breakout thesis is dead.
Failed resolutions.
A break that immediately returns inside the channel is a failed resolution and is often the more powerful signal. Liquidity was taken on one side and rejected; these frequently run hard toward the opposite edge instead. Watching for this behaviour on a frozen channel is one of the higher-quality uses of the tool.
Using the flow.
When the flow overlay shows one side clearly dominating during the coil, and price then resolves in that same direction, the two agree and the resolution has participation behind it. When the coil shows heavy buying but price resolves downward, that is a distribution signature โ buyers were absorbed. Read this as context, not as a standalone signal.
Using compression.
A rising Compression Index with the state showing "Coiling" and a growing bar count tells you a channel is being built right now, before it is drawn. This is your advance warning that a resolution is being set up.
Timeframe stacking.
Because the engine is percentile-based, it works identically on higher timeframes. Mapping the channel on a higher timeframe and taking the resolution on a lower one is a natural workflow.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
SETTINGS
COMPRESSION ENGINE
- Sensitivity Preset โ High, Medium, Low or Custom. High produces more channels on faster charts, Low isolates only the heaviest compressions. Custom unlocks the manual threshold and minimum-bar inputs below.
- Normalization Lookback โ the range used to map price into its 0โ1 structural position.
- Dispersion Length โ bars used to measure how much normalized price is travelling.
- Percentile Window โ the rolling window that current compression is ranked against.
- Compression Threshold โ the level the index must hold above for a squeeze to be active. Higher means fewer, tighter channels.
- Minimum Range Bars โ coils shorter than this are discarded entirely.
- Dispersion Weight โ blends between structural dispersion (1.0) and raw ATR contraction (0.0).
- Fast / Slow ATR Length โ the two legs of the volatility-decay reading.
- Maximum Range Bars โ caps how far back a single channel can be reconstructed.
CHANNEL AND ZONES
- Keep Channel After Breakout โ on by default, broken channels stay frozen on the chart so you keep the full history. Turn it off if you only want the currently active pocket visible.
- Edge Zone Size (x ATR) โ thickness of the supply and demand bands.
- Edge Zone Max (x Range) โ caps those bands as a fraction of the channel height.
- Show Equilibrium Line โ the dashed 50% line.
- Max Channels On Chart โ how many historical channels are retained before the oldest are removed.
BREAKOUT ENGINE
- Body Confirmed Breakout โ on by default, requires the candle body midpoint to clear the edge, so wick sweeps are ignored.
- Wait For Bar Close โ confirms breakouts only on closed bars, removing all intrabar flicker.
UNIVERSAL ACTIVITY ENGINE
- Activity Source โ Auto, Chart Volume Only, External Symbol, or Synthetic Estimate. Auto is recommended.
- External Volume Symbol โ optional reference symbol for instruments whose own feed has no volume.
- Synthetic Baseline ATR โ the baseline length the synthetic proxy normalizes against.
- Show Info Panel โ toggles the panel.
FLOW OVERLAY
- Show Flow Inside Channel, Flow Mode (Comparison / Total / Delta), Flow Column Height, Flow Column Width, Max Flow Columns Per Channel, Show Buy/Sell Tag.
PRESSURE GAUGE
- Show Pressure Gauge, Gauge Offset, Gauge Width.
STYLE
- Full colour control over the channel body, border, upper and lower edge zones, equilibrium line, bullish and bearish colours, channel tag text, and the info panel background and text.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
ALERTS
Three alert conditions are included:
- Bullish Breakout โ price resolved above a channel
- Bearish Breakout โ price resolved below a channel
- New Channel โ a new consolidation has been mapped
Alert messages carry the ticker and timeframe automatically.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
REPAINTING STATEMENT
Channels are created only after a squeeze has been confirmed as finished, and once a channel freezes on a breakout it never moves again. Historical channels and historical arrows are fixed.
Breakout evaluation runs on live bars by default so you see the signal as it develops; enable Wait For Bar Close if you want breakouts confirmed strictly on closed bars with no intrabar movement.
The optional external activity symbol is requested on the chart timeframe with invalid symbols ignored and no lookahead.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
HONEST LIMITATIONS
- The Synthetic Activity source is a participation estimate derived from price behaviour, not traded volume. It is a reasonable proxy for relative activity and it is labelled as an estimate everywhere it is used, but it should never be interpreted as real order flow. Where a genuine volume feed exists, use it.
- The estimated buy/sell split assigns activity by close position within the bar's range. This is a standard estimation approach and it is directionally useful, but it cannot see actual aggressor side. No indicator built on standard OHLCV can.
- Consolidation detection is a lagging-by-design process: a channel is only drawn once the coil has finished, because the completed coil is what defines the boundaries. The Compression Index in the panel is the leading component and moves in real time.
- No indicator predicts direction. This tool maps structure and marks resolutions. Risk management remains entirely the responsibility of the trader.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
AUTHOR VERIFICATION
- Script Name: Liquidity Breakout Matrix
- Short Title: LBM
- Author: Forex_Market_Insights
- Original Developer: Forex_Market_Insights
- Copyright: ยฉ Forex_Market_Insights
- Pine Version: v6
- Script Type: Overlay indicator
- Build: 2.0
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
DECLARATION OF ORIGINALITY
I, Forex_Market_Insights, declare that this script is an original implementation written from scratch by me.
Every calculation block in this indicator โ the Compression Index composite, the squeeze state machine, the retroactive channel construction, the ATR edge-zone model with range capping, the Universal Activity Engine and its three-tier resolution logic, the synthetic participation proxy, the estimated buy/sell split, the flow overlay scaling, the pressure gauge normalization and the body-confirmed breakout filter โ was designed, coded and tested by Forex_Market_Insights.
This script does not copy, port, decompile, translate or re-skin any other author's published or protected code. Where the underlying market concepts are common technical analysis knowledge โ volatility contraction, consolidation ranges, supply and demand edges, range breakouts, volume distribution within a range โ they are expressed here through my own formulas and my own code architecture, which differ materially from any third-party implementation.
No built-in indicator is simply re-wrapped under a new name, and no open-source script is republished as my own work. Standard Pine built-in functions are used only as low-level mathematical primitives inside my own composite engine, in the same way any developer uses a language's standard library.
The full commented source, including this declaration, is contained in the script header.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
DISCLAIMER
This tool is published for market study and educational purposes only. It is not financial advice, not a solicitation to trade, and no signal it produces is a guarantee of any outcome. Past behaviour of any pattern does not predict future results. All trading decisions and all risk taken are entirely your own responsibility.
www.tradingview.com
Indicator

Wyckoff Architectural Range - erdensedatThe "Wyckoff Architectural Probability Range" is an advanced, non-overlapping consolidation detector and liquidity sweep identification system. Designed to keep charts clean, it dynamically adapts to market volatility and focuses solely on the current active trading range.
Key Features:
- Dynamic ATR-Based Range Width: The indicator automatically adjusts its maximum allowed range width based on the asset's current volatility, ensuring it works seamlessly across both major assets (BTC, ETH) and highly volatile altcoins.
- Non-Overlapping Architecture: Historical ranges are completely removed upon a confirmed breakout, leaving only the active, actionable consolidation zone on your chart.
- Premium & Discount Zones: The range is mathematically divided into Premium (Top 25%), Equilibrium (Middle 50%), and Discount (Bottom 25%) zones. Internal EQ levels (0.4 and 0.6) are also projected.
- Advanced Retest Signals:
> Buy Signal: Prints when price crosses below the Discount EQ and subsequently retests and closes above it.
> Sell Signal: Prints when price crosses above the Premium EQ and subsequently retests and closes below it.
- Smart Liquidity Detection (Spring & UTAD): Automatically identifies and labels wick-based liquidity sweeps outside the range.
- Mean Reversion Probability: A dynamic stats panel calculates the mean reversion probability based on the current deviation from the main Equilibrium level.
- Built-in Alert System: Provides any() alert conditions for Buy/Sell signals, Spring/UTAD sweeps, and Range Breakouts.
- Optional VWAP: Toggle a standard VWAP line on or off directly from the settings for additional confluence.
How to Use:
Use the statistical panel and structural boxes to identify institutional accumulation (Discount Zone) and distribution (Premium Zone). Wait for confirmed retest signals (Triangles) or liquidity sweeps (Spring/UTAD) for high-probability mean-reversion entries.
Disclaimer:
The information and scripts provided in this indicator are for educational and informational purposes only and do not constitute financial advice. Trading cryptocurrencies, forex, and other financial markets involves a high degree of risk and may not be suitable for all investors. Past performance is not indicative of future results. Always conduct your own research and consult with a certified financial advisor before making any trading decisions.
Indicator

Professional Anchored VWAP with Multi Level Standard Bands
ไธใๆๆ ๆฆ่ฟฐ
ๆฌๆๆ ๆฏไธๆฌพๅบไบๆไบค้ๅ ๆ็่ฟ้ถ้ๅๅๆๅทฅๅ
ท๏ผๆ ธๅฟๅ่ฝๆฏๅฐ VWAP ็่ฎก็ฎ่ตท็นโ้ๅฎโๅฐๆจ่ช่ก้ๆฉ็ไปปๆๅๅฒๆถ้ด็น๏ผๅนถๅด็ป่ฏฅๅบๅ่ชๅจ็ๆๅ
ญ็บงๆ ๅๅทฎๆฆ็้้๏ผยฑ0.5ฯใยฑ1.0ฯใยฑ1.5ฯใยฑ2.0ฯใยฑ2.5ฯใยฑ3.0ฯ๏ผ๏ผๅฝขๆๅฎๆด็ๅธๅบไปทๆ ผๅๅธ็ๆตไฝ็ณปใ
ไธๆฏๆฅๅผ็้็ฝฎ็ไผ ็ป VWAP ไธๅ๏ผ้ๅฎ VWAP ๅฐ่ฎก็ฎ่ตท็นๅบๅฎๅจๆไธชๅ
ทๆๆ็ฅๆไน็ๆถ้ด่็นโโไพๅฆ้ๅคงๅฎ่งไบไปถ๏ผFOMC ๅณ่ฎฎใCPI ๅๅธ๏ผใๅ
ฌๅธๅบๆฌ้ขไบไปถ๏ผ่ดขๆฅๆซ้ฒ๏ผใๆๆฏ็ปๆ่็น๏ผ่ถๅฟ่ตท็นใๆๅจ้ซ็น/ไฝ็นใ็ช็ ด็น๏ผๆไปปไฝๆจ่ฎคไธบๅผๅพ่ท่ธช็ๆถ็นใ่ฟ็ง่ฎพ่ฎก่ฎฉๆจ่ฝๅคๆ็ปญ่ฟฝ่ธชโ่ช่ฏฅไบไปถๅ็ไปฅๆฅ๏ผๅธๅบ็ๆญฃ็ๅนณๅๆๆฌโ๏ผไป่ๆด็ฒพๅๅฐ่ฏๅซๆบๆ็บงๆฏๆ้ปๅใ่ฏไผฐ่ถๅฟๅฅๅบทๅบฆใๆๆๅๅผๅๅฝๆบไผใ
ๆฌๆๆ ้็จไบ่ก็ฅจใETFใๆ่ดงใๅ ๅฏ่ดงๅธ็ญๆๆๅ
ทๅค็ๅฎๆไบค้ๆฐๆฎ็ๅ็ง๏ผๅนถไธๅฏๅ ่ฝฝไบไปปๆๆถ้ดๆกๆถ๏ผ1ๅ้ใ5ๅ้ใๆฅ็บฟใๅจ็บฟ็ญ๏ผใ
ไบใๆ ธๅฟ็ๅฟตไธ่ฎพ่ฎก้ป่พ
ไปๆฏๆฅ้็ฝฎๅฐไบไปถ้ๅฎ็ๅ็บง
ไผ ็ป VWAP ๅจๆฏไธชไบคๆๆฅๅผ็ๆถ้ๆฐ่ฎก็ฎ๏ผๅฏนๆฅๅ
ไบคๆ่
้ๅธธๅฎ็จ๏ผไฝๅฏนไบๆไปๆฐๆฅใๆฐๅจ็่ณๆด้ฟ็ๆณขๆฎตๆ่ถๅฟไบคๆ่
๏ผๆฏๆฅ้็ฝฎๆๅณ็ๅ
ณ้ฎๅๅฒๅ่็ไธขๅคฑใAVWAP ้่ฟๅบๅฎ้็น๏ผ่งฃๅณไบ่ฟไธๅฑ้๏ผ่ฎฉๆจ่ฝๅคไปฅ็นๅฎไบไปถไธบๅ็น๏ผๆ็ปญ่กก้ๅธๅบๅไธ่
็ๅนณๅๆๆฌๅๅใ
ไปไปทๆ ผไฝ็ฝฎๅฐ็ป่ฎกๆฆ็็่ท่ฟ
ๅไธ็ VWAP ็บฟๅช่ฝๅ่ฏๆจไปทๆ ผๅจๅบๅ็บฟไธๆน่ฟๆฏไธๆน๏ผ่ๆฌๆๆ ๅผๅ
ฅโๆไบค้ๅ ๆๆ ๅๅทฎโ๏ผๅฐไปทๆ ผๅ็ฆป่ฝฌๅไธบๅ
ทๆ็ป่ฎกๆไน็ๆฆ็ๅบฆ้ใยฑ1ฯ ้้่ฆ็็บฆ 68% ็ไปทๆ ผๅๅธ๏ผๅฎไนๅธธๆๆณขๅจๅบ้ด๏ผยฑ2ฯ ้้่ฆ็็บฆ 95%๏ผๅๆ ๆพ่ๅ็ฆป๏ผยฑ3ฯ ้้่ฆ็็บฆ 99.7%๏ผ่งฆๅๆญคๅบๅ้ๅธธๆๅณ็ๆ็ซฏๆ
็ปชๅฎไปท๏ผๅๅผๅๅฝ็ๆฆ็ๆพ่ๅ้ซใ่ฟไฝฟๅพไปทๆ ผๅๆไปโ้ซไฝๅคๆญโๅ็บงไธบโไปทๆ ผๅจ็ป่ฎกๅๅธไธญ็ไฝ็ฝฎๅคๆญโ๏ผไธบๅณ็ญๆไพๅฏ้ๅ็ๆฆ็ไพๆฎใ
ไธใ่ฎก็ฎๆนๆณ็ฎ่ฟฐ
AVWAP ็่ฎก็ฎ้็จๅ
ธๅไปทๆ ผ๏ผๅณๆ้ซไปทใๆไฝไปทใๆถ็ไปท็็ฎๆฏๅนณๅๅผ๏ผไธๆไบค้็ไน็งฏ่ฟ่ก็ดฏๅ ๏ผๅ้คไปฅ็ดฏ่ฎกๆไบค้๏ผๅพๅฐ่ช้็นไปฅๆฅ็ๆไบค้ๅ ๆๅนณๅไปทๆ ผใๆ ๅๅทฎๅๅบไบไปทๆ ผๅนณๆนไธๆไบค้็ๅ ๆ็ดฏๅ ๏ผ็ปๅๆนๅทฎๅ
ฌๅผ E(Pยฒ)โE(P)ยฒ ่ฎก็ฎๅพๅบ๏ผๆดไธช่ฟ็จไป
้ๅๆฌกๆฐๆฎ้ๅ๏ผ็กฎไฟๅจๅคงๆถ้ด็ชๅฃไธ็่ฎก็ฎๆ็ใๅ้้ๅธฆๅณไธบ AVWAP ๆฐๅผๅ ไธๆๅๅปๅฏนๅบๅๆฐ๏ผ0.5ใ1.0ใ1.5ใ2.0ใ2.5ใ3.0๏ผ็ๆ ๅๅทฎๅผใ
ๅใๅฎๆๅบ็จๆๅ
่ถๅฟๆนๅๅคๆญ
ๅฝไปทๆ ผๆ็ปญ่ฟ่กไบ AVWAP ไธๆน๏ผ่กจๆ่ช้็นไปฅๆฅๅคๅคดๅ ๆฎไธปๅฏผ๏ผๅธๅบๅนณๅๆๆฌไฝไบ็ฐไปท๏ผๅคๅคดๆไปๆดไฝ็ๅฉ๏ผๅไน๏ผไปทๆ ผๆ็ปญ่ฟ่กไบ AVWAP ไธๆน๏ผๅ็ฉบๅคดๅ ๆฎไธปๅฏผใ่ฅไปทๆ ผ้ข็น็ฉฟ่ถ AVWAP๏ผๅๅธๅบๅคไบ้่กๅ่กก็ถๆใ
ๅจๆๆฏๆไธ้ปๅ
AVWAP ็บฟๆฌ่บซๆฏๆ้่ฆ็ๅจๆๆฏๆ/้ปๅไฝใไธๅ่ถๅฟไธญ๏ผไปทๆ ผๅ่ธฉ AVWAP ๅนถ่ทๅพๆฏๆ๏ผๅพๅพๆฏ่ถๅฟๅปถ็ปญ็ไฟกๅท๏ผไธ้่ถๅฟไธญ๏ผไปทๆ ผๅๅผน่ณ AVWAP ๅนถ้้ป๏ผๅพๅพๆๅณ็่ถๅฟๅปถ็ปญใๅๆ ๅๅทฎ้้ๅธฆๅๆ ทๆๆๆฌก็บงๆฏๆ/้ปๅๅบๅ๏ผๅฏไฝไธบๅๆนๅปบไปๆๆญข็็ๅ่ไฝ็ฝฎใ
ๅๅผๅๅฝไบคๆ
ๅฝไปทๆ ผๅปถไผธ่ณๅคๅฑ้้๏ผๅฆ ยฑ2.5ฯ ๆ ยฑ3.0ฯ๏ผๆถ๏ผไปทๆ ผๅทฒๆพ่ๅ็ฆปๆไบค้ๅ ๆๅ
ฌๅ
ๅผ๏ผๅๅฒไธ่กจ็ฐๅบๅผบ็็ๅๅฝๅพๅใ่งฆๅไธ่ฝจๆ็ซฏๅบๅๅฏ่่็ญ็บฟๅ็ฉบๆ่ทๅฉไบ็ป๏ผ่งฆๅไธ่ฝจๆ็ซฏๅบๅๅฏ่่็ญ็บฟๅๅคๆๅ่กฅไปไฝใ้ๆณจๆ๏ผๅจๅผบๅ่พน่ถๅฟไธญ๏ผไปทๆ ผๅฏ่ฝๅจๆ็ซฏๅบๅๅ็่พ้ฟๆถ้ด๏ผๅปบ่ฎฎ็ปๅๅ
ถไป่ถๅฟๆๆ ่ฟ่ก่ฟๆปคใ
่ถๅฟๅปถ็ปญ็กฎ่ฎค
ไปทๆ ผๅจ็ช็ ด +1ฯ ไธ่ฝจๅๆ็ปญ่ฟ่กไบ่ฏฅ้้ไนไธ๏ผๅนถไผด้ๆไบค้ๆพๅคง๏ผ็กฎ่ฎคๅผบๅฟๅคๅคด่ถๅฟ๏ผๅไน๏ผไปทๆ ผ่ท็ ด -1ฯ ไธ่ฝจๅๆ็ปญ่ฟ่กไบไธๆนๅนถๆพ้๏ผ็กฎ่ฎคๅผบๅฟ็ฉบๅคด่ถๅฟใ
ๅคๆถ้ดๆกๆถๅ
ฑๆฏ
ๅปบ่ฎฎๅจๆฅ็บฟ็บงๅซ็กฎๅฎไธป่ฆ้็นๅ้ฟๆ่ถๅฟๆนๅ๏ผๅจๅฐๆถๆๅ้็บงๅซๅฏปๆพ็ฒพ็กฎๅ
ฅๅบๆถๆบใๅฝ็ญๅจๆ AVWAP ไธ้ฟๅจๆ AVWAP ๆนๅไธ่ดๆถ๏ผไฟกๅทๅฏ้ ๆงๆพ่ๅขๅผบใ
ไบใ้็น้ๆฉๅปบ่ฎฎ
่ฏๅฅฝ็้็น้ๆฉๆฏ AVWAP ๆๆๆง็ๅๆใไปฅไธไธบๆจ่็้็น็ฑปๅๅ็คบไพ๏ผ
ๅฎ่งไบไปถๅ๏ผ้็จไบ้ๅคงๆฟ็ญๆๆฐๆฎๅๅธๅ็ๅธๅบ้ๅฎไปท๏ผไพๅฆ FOMC ๅณ่ฎฎๆฅใCPI ๆ้ๅๆฐๆฎๅๅธๆฅใ
ๅ
ฌๅธไบไปถๅ๏ผ้็จไบๅบๆฌ้ขๅฌๅๅๅ็่ถๅฟ่ท่ธช๏ผไพๅฆ่ดขๆฅๅๅธๆฅใๅนถ่ดญๅ
ฌๅๆฅใ
ๆๆฏ็ปๆๅ๏ผ้็จไบ่ถๅฟ่ท่ธชไธ็ปๆๅๆ๏ผไพๅฆๆพ่ๆๅจ้ซ็น/ไฝ็นใ่ถๅฟ่ตท็นใๅ
ณ้ฎ็ช็ ด็นใ
ๆถ้ด่็นๅ๏ผ้็จไบๅจๆๆงๅบๅๅ่๏ผไพๅฆๅนดๅใๆๅใๅจๅใ
ๆ ธๅฟๅๅ๏ผ้็นๅบ้ๆฉๅฏนๆ ็่ตไบงๅ
ทๆๆพ่ไปทๆ ผๅฝฑๅไธๅธๅบๅไธ่
ๅนฟๆณๅ
ณๆณจ็ๆถ้ด่็นใ
ๅ
ญใๅๆฐ้
็ฝฎ่ฏดๆ
ๆจๅฏไปฅ้่ฟไปฅไธ่พๅ
ฅๅๆฐ็ตๆดปๆงๅถๆๆ ๆพ็คบ๏ผ
้ๅฎๆฅๆ๏ผๅๅซ่ฎพ็ฝฎๅนดใๆใๆฅ๏ผ้ป่ฎคไธบ 2024 ๅนด 9 ๆ 24 ๆฅ๏ผใ
ๆพ็คบๆงๅถ๏ผๆจๅฏไปฅ้ๆฉ็ฌ็ซๅผๅฏๆๅ
ณ้ญๆฏไธ็บงๆ ๅๅทฎ้้๏ผยฑ0.5ฯใยฑ1.0ฯใยฑ1.5ฯใยฑ2.0ฯใยฑ2.5ฯใยฑ3.0ฯ๏ผ๏ผๆ้ไฟๆๅพ่กจ็ฎๆดใ
้ข่ฒ็ผ็ ไฝ็ณป๏ผ
่่ฒๅบๅ็บฟ๏ผAVWAP ไธปๅ่็บฟใ
็ปฟ่ฒ้้๏ผยฑ0.5ฯใยฑ1.0ฯ๏ผ๏ผๅธธๆๆณขๅจๅบ้ดใ
ๆฉ่ฒ้้๏ผยฑ1.5ฯใยฑ2.0ฯ๏ผ๏ผไธญ็ญ็บงๅซๅ็ฆปๅบ้ดใ
็บข่ฒ้้๏ผยฑ2.5ฯใยฑ3.0ฯ๏ผ๏ผๆ็ซฏๅ็ฆป / ๅๅผๅๅฝๅ
ณๆณจๅบ้ดใ
ไธใ้็จไบคๆ่
็ฑปๅ
- ๆฅๅ
ไบคๆ่
๏ผๅฏๅฐ้็น่ฎพไธบๅฝๆฅๅผ็๏ผๅฉ็จ AVWAP ไฝไธบๆฅๅ
ๅ
ฌๅ
ๅผๅ่ไธๅๅผๅๅฝไฟกๅทใ
- ๆณขๆฎตไบคๆ่
๏ผๅฐ้็น่ฎพไธบๅ
ณ้ฎไบไปถๆๆๅจ็น๏ผ่ฏๅซไธญๆๆฏๆ/้ปๅๅบๅใ
- ่ถๅฟไบคๆ่
๏ผๅฐ้็น่ฎพไธบ่ถๅฟ่ตท็น๏ผๆ็ปญ่ท่ธช่ถๅฟๅฅๅบทๅบฆไธๆนๅใ
- ๆบๆไธไธไธไบคๆ่
๏ผ่ฟฝ่ธชๅธๅบๅนณๅๆๆฌ๏ผ่ฏๅซๆบๆ็บงไนฐๅๅบๅใ
ๅ
ซใๆณจๆไบ้กนไธ้ฃ้ฉๆ็คบ
- ๆไบค้ๆฐๆฎ่ดจ้็ดๆฅๅฝฑๅ AVWAP ็ๅ่ไปทๅผ๏ผๅจไฝๆตๅจๆงๅ็งไธๅปบ่ฎฎ่ฐจๆ
ไฝฟ็จใ
- ้็น้ๆฉๅฟ
้กปๅบไบๅ็้ป่พ๏ผๅฆ้ๅคงไบไปถ๏ผ๏ผ้ๆบ้ๅ็ๆฅๆๅฏ่ฝๅฏผ่ดๆๆ ๅคฑๅปๅ่ๆไนใ
- ๆ ๅๅทฎ้้ๅบไบๅๅฒๆฐๆฎ่ฎก็ฎ๏ผไธๆๆๅฏนๆชๆฅ่ตฐๅฟ็็กฎๅฎๆง้ขๆต๏ผ้้่พน็ๆฏๆฆ็ๅ่่้็กฌๆง่พน็ใ
- ๅๅผๅๅฝ็ญ็ฅๅจๅผบๅฒๅ่พนๅธๅบไธญๅฏ่ฝ้ขไธด่พๅคง้ฃ้ฉ๏ผๅปบ่ฎฎ็ปๅ่ถๅฟๅผบๅบฆๆๆ ่ฟ่ก่ฟๆปคใ
- ๆฌๆๆ ไป
ไพๆๆฏๅๆๅ่๏ผๆๆไบคๆๅณ็ญๅบ็ฑๆจ็ฌ็ซๅคๆญๅนถ่ช่กๆฟๆ
้ฃ้ฉใ
ไนใๅผๆบ่ฏดๆ
ๆฌๆๆ ไปฅๅผๆบๆนๅผๅๅธๅจ TradingView ็คพๅบใๆๆไปฃ็ ๅๅฏไพๆจๅฎก้
ใ้ช่ฏๅ่ฝ้ป่พ๏ผๅนถๅบไบ่ช่บซ้ๆฑ่ฟ่กไฟฎๆนไธไผๅใๆฌข่ฟๅจ่ฏ่ฎบๅบๅไบซไฝฟ็จๅฟๅพใๆน่ฟๅปบ่ฎฎๆ้ฎ้ขๅ้ฆใ
ไปทๆ ผๅ่ฏไฝ ๅ็ไบไปไน๏ผๆไบค้ๅ่ฏไฝ ่ฐๅจๆจๅจๅฎ๏ผAVWAP ๅ่ฏไฝ ๅธๅบ็็ๅฎๆๆฌๅจๅช้ใ
1. Indicator Overview
This indicator is an advanced quantitative analysis tool based on volume weighting. Its core functionality is to anchor the starting point of VWAP calculation to any historical timestamp you choose, and automatically generate six levels of standard deviation probability bands (ยฑ0.5ฯ, ยฑ1.0ฯ, ยฑ1.5ฯ, ยฑ2.0ฯ, ยฑ2.5ฯ, ยฑ3.0ฯ) around that benchmark, forming a complete market price distribution monitoring system.
Unlike the traditional VWAP which resets at the open of each trading day, the Anchored VWAP fixes the calculation origin at a strategically significant point in time โ for example, major macroeconomic events (FOMC decisions, CPI releases), companyโspecific events (earnings announcements), technical structure nodes (trend starts, swing highs/lows, breakout points), or any moment you consider worth tracking. This design allows you to continuously monitor "the true average cost of the market since that event occurred," enabling more precise identification of institutional support/resistance, assessment of trend health, and capturing meanโreversion opportunities.
This indicator is suitable for all instruments with genuine volume data, including stocks, ETFs, futures, cryptocurrencies, and can be applied on any timeframe (1โminute, 5โminute, daily, weekly, etc.).
2. Core Concepts & Design Logic
Upgrade from Daily Reset to Event Anchoring
Traditional VWAP recalculates at the open of each trading day, which is highly useful for intraday traders. However, for swing or trend traders who hold positions for days, weeks, or longer, the daily reset means the loss of critical historical context. AVWAP overcomes this limitation by fixing the anchor, allowing you to measure the evolution of market participantsโ average cost from a specific event onwards.
From Price Position to Statistical Probability
A single VWAP line only tells you whether price is above or below the benchmark. This indicator introduces "volumeโweighted standard deviation," converting price deviations into statistically meaningful probability measures. The ยฑ1ฯ band covers approximately 68% of the price distribution, defining the normal fluctuation range; ยฑ2ฯ covers about 95%, reflecting significant deviations; ยฑ3ฯ covers about 99.7%, and touches at this level typically indicate extreme sentiment pricing, with meanโreversion probability rising markedly. This elevates price analysis from a simple "high/low" judgment to a "position within the statistical distribution" framework, providing quantifiable probabilistic grounds for decisionโmaking.
3. Brief Calculation Methodology
AVWAP is computed by accumulating the product of the typical price (arithmetic average of high, low, and close) and volume, then dividing by the cumulative volume to obtain the volumeโweighted average price since the anchor. The standard deviation is derived from the volumeโweighted accumulation of squared prices, combined with the variance formula E(Pยฒ)โE(P)ยฒ. The entire process requires only a single pass through the data, ensuring computational efficiency even over large time windows. Each band is simply the AVWAP value plus or minus the corresponding multiple (0.5, 1.0, 1.5, 2.0, 2.5, 3.0) of the standard deviation.
4. Practical Application Guide
Trend Direction Bias
When price consistently trades above AVWAP, it indicates that bulls have been dominant since the anchor, as the average market cost is below the current price and long positions are in profit. Conversely, sustained trading below AVWAP suggests bearish dominance. Frequent crossovers of AVWAP imply a rangeโbound/equilibrium state.
Dynamic Support & Resistance
The AVWAP line itself is the most important dynamic support/resistance level. In an uptrend, a pullback that finds support at AVWAP often signals trend continuation; in a downtrend, a bounce that meets resistance at AVWAP also indicates continuation. The standard deviation bands also serve as secondary support/resistance zones, useful for scaling entries or taking partial profits.
MeanโReversion Trading
When price extends to the outer bands (e.g., ยฑ2.5ฯ or ยฑ3.0ฯ), it has significantly deviated from the volumeโweighted fair value, historically exhibiting a strong tendency to revert. Touching the upper extreme zone may be considered for shortโterm selling or profitโtaking; touching the lower extreme zone may suggest shortโterm buying or covering shorts. Note that in strong trending markets, price may linger in extreme zones for extended periods; it is advisable to combine with other trendโstrength filters.
Trend Continuation Confirmation
If price breaks above the +1ฯ upper band and continues trading above it with rising volume, it confirms a strong bullish trend. Conversely, if price breaks below the -1ฯ lower band and continues below it with volume expansion, it confirms a strong bearish trend.
MultiโTimeframe Confluence
It is recommended to determine the primary anchor and longerโterm trend direction on the daily chart, and then seek precise entry signals on hourly or minute charts. When the shorterโtimeframe AVWAP aligns with the longerโtimeframe AVWAP, signal reliability increases significantly.
5. Anchor Selection Recommendations
Proper anchor selection is a prerequisite for AVWAP effectiveness. Below are recommended anchor types with examples:
MacroโEvent Type: Suitable for market reโpricing after major policy/data releases, e.g., FOMC decision days, CPI or NonโFarm Payroll release days.
CompanyโEvent Type: Suitable for trend following after fundamental catalysts, e.g., earnings release days, M&A announcement days.
TechnicalโStructure Type: Suitable for trendโfollowing and structural analysis, e.g., significant swing highs/lows, trend starting points, key breakout levels.
TimeโBased Type: Suitable for periodic benchmark references, e.g., start of the year, month, or week.
Core Principle: The anchor should be chosen at a point in time that had a notable price impact on the asset and is widely observed by market participants.
6. Input Parameter Settings
You can flexibly control the indicator display with the following inputs:
Anchor Date: Set year, month, and day separately (default is 2024โ09โ24).
Display Controls: You can independently enable or disable each standard deviation band (ยฑ0.5ฯ, ยฑ1.0ฯ, ยฑ1.5ฯ, ยฑ2.0ฯ, ยฑ2.5ฯ, ยฑ3.0ฯ) to keep your chart as clean as needed.
Color Coding System:
Blue baseline: AVWAP main reference line.
Green bands (ยฑ0.5ฯ, ยฑ1.0ฯ): Normal fluctuation range.
Orange bands (ยฑ1.5ฯ, ยฑ2.0ฯ): Moderate deviation range.
Red bands (ยฑ2.5ฯ, ยฑ3.0ฯ): Extreme deviation / meanโreversion focus zone.
7. Suitable Trader Types
- Day traders: Can set the anchor to the day's open, using AVWAP as an intraday fairโvalue reference and meanโreversion signal.
- Swing traders: Anchor to key events or swing points to identify intermediate support/resistance areas.
- Trend traders: Anchor to the trendโs starting point to continuously monitor trend health and direction.
- Institutional / professional traders: Track the average market cost to identify institutionalโgrade accumulation/distribution zones.
8. Important Notes & Risk Disclaimers
- The quality of volume data directly affects the reference value of AVWAP; use with caution on lowโliquidity instruments.
- Anchor selection must be based on sound logic (e.g., significant events); randomly chosen dates may render the indicator meaningless.
- Standard deviation bands are computed from historical data and do not constitute a deterministic prediction of future price movements; band boundaries are probabilistic references, not hard edges.
- Meanโreversion strategies carry higher risk in strong trending markets; it is advisable to incorporate trendโstrength filters.
- This indicator is for technical analysis reference only. All trading decisions should be made independently by the user, who bears full responsibility for their actions.
9. Open Source Statement
This indicator is published as open source in the TradingView community. All code is available for you to review, verify its functional logic, and modify or optimise according to your own needs. Feedback, usage experiences, and suggestions for improvement are warmly welcomed in the comments section.
*โPrice tells you what happened, volume tells you who is driving it, and AVWAP tells you where the marketโs true cost lies.โ*
Indicator

FULCRUM: Rates & Vol Adjusted Ratio VWAPWHAT IT DOES
The fulcrum of the index complex: a rates-and-volatility-adjusted VWAP for the relationship between two markets. It rebuilds the NQ/ES ratio bar by bar โ 2500ยทNQ/ES, normalized by VXNรUS10Y โ then anchors a volume-weighted mean with ยฑ1ฯ and ยฑ2ฯ bands on that relative-value series. One line that says whether tech is rich or cheap against the broad market, and how stretched the move is. It lives in its own pane, works on any chart, and configures itself.
HOW IT WORKS
Both legs are requested at chart resolution, and the bar's ratio high/low come from the cross-extremes (NQ high over ES low, and the reverse) โ the VWAP sees the bar's true range, not just closes.
A spread has no volume of its own, so weighting borrows the geometric mean of both legs' volume.
The rates/vol divisor uses the PRIOR session's confirmed VXN and US10Y closes โ identical live and on reload. No repaint.
The anchor is automatic: session on charts up to 20m, week up to 4h, month above. Override it if you disagree.
Bands come from cumulative volume-weighted variance, not a rolling stdev, and stay hidden for the first bars after each reset while they cook.
The ratio line holds its color until the move clears ยฑ0.15ฯ โ color changes are regime, not noise. A faint tint marks ยฑ2ฯ extension.
A live table reads VWAP, ratio, ฮ%, ฯ-distance, zone, and the divisor's status โ if a feed is missing it says so instead of guessing silently.
HOW TO USE IT
Read the relationship against its anchored mean: +2ฯ on a ratio behaves like +2ฯ on price โ stretched, and usually walked back. Cross alerts on VWAP, ยฑ1ฯ, and ยฑ2ฯ are included. Swap the symbols and multiplier and it generalizes to any pair you trade.
WHAT IT CAN'T DO
It describes the relationship, not direction โ the ratio falling doesn't say whether NQ is weak or ES is strong. If the VXN or US10Y feed is unavailable, the divisor falls back to sane defaults and the table flags it; it will not pretend.
SETTINGS
Numerator, denominator, and multiplier; VXNรUS10Y normalization; auto or manual anchor (session, week, month); band multipliers; warm-up hiding; colors, fill, labels, table.
Open source. Free. Where the balance sits. Indicator

Indicator

Anchored VWAP Engine [Quantum Algo]Anchored VWAP Engine
====================================================
๐ถ OVERVIEW
Anchored VWAP Engine is a multi-stream anchored Volume Weighted Average Price indicator that removes the hardest part of trading with anchored VWAP: choosing the anchor. The engine runs up to seven independently anchored VWAP streams that place and reset their own anchors automatically โ the week open (the default stream), session open, month open, confirmed swing highs and swing lows, the highest-volume bar in a lookback, and a liquidity-sweep anchor that re-anchors from the exact bar where a stop run occurred. On top of the streams it adds volume-weighted deviation bands, automatic confluence cluster zones where multiple streams converge, band-rejection signals, and a stability metric that names which VWAP the market is currently respecting most.
Out of the box the chart shows a single clean line: the week-anchored Volume Weighted Average Price with its deviation bands. Every additional stream is one checkbox away.
๐ถ WHAT IS AN ANCHORED VWAP?
The Volume Weighted Average Price is the average price of an instrument weighted by traded volume โ the closest public approximation of the average position price of everyone who transacted since a chosen starting point. An anchored VWAP starts that calculation from a meaningful event rather than an arbitrary date: a weekly open, a swing low, a high-volume climax bar. Price above an anchored VWAP means the average participant since that event is in profit; price returning to it often behaves as a decision level, because it is where the average position breaks even. The power of the tool depends entirely on where it is anchored โ which is exactly what this engine automates.
๐ถ WHY THIS SCRIPT IS ORIGINAL
1. Automatic multi-anchor engine. Seven streams anchor and re-anchor themselves from objectively defined events โ no manual anchor placement, no stale anchors, no guessing.
2. The liquidity-sweep anchor. When a swing level is wicked through and rejected โ a stop run โ the sweep stream re-anchors from that exact bar and colors itself by implication: the accumulation tone after a sell-side sweep, the distribution tone after a buy-side raid. Averaging from the stop-run bar tracks the entry basis of the participants who engineered it. To our knowledge this anchor type has not been published before.
3. Exact swing anchoring. Swing-anchored streams rebuild their sums retroactively from the true pivot bar once the pivot confirms, so the calculation is mathematically identical to a VWAP hand-anchored on the swing itself โ not started late at the confirmation bar.
4. Confluence clusters. When two or more active streams converge within an Average True Range tolerance, the engine draws a cluster zone and labels its strength. Multiple independent volume-weighted averages agreeing on one price is the strongest form of VWAP confluence, detected automatically.
5. The In Control metric. An exponentially decayed crossing-rate measures how cleanly price is respecting each stream; the dashboard names the stream currently in control. Users learn which anchor matters today instead of watching all of them equally.
6. True volume-weighted deviation bands. The bands are built from the volume-weighted variance of the primary stream โ not a simple price standard deviation โ at two configurable widths, with band-rejection signals printed as a single ฯ character whose full context lives in the hover tooltip, protected by a signal cooldown.
7. Quiet by default. One stream, one set of bands, capped signals, and a compact dashboard. The engine detects everything; the chart shows only what is asked of it.
๐ถ HOW IT WORKS
Streams: Each stream maintains volume-weighted price and variance sums that reset on its anchor event โ new week, new session, new month, a confirmed swing, a lookback volume record, or a qualified liquidity sweep. Between events the sums accumulate bar by bar, producing the stream's live anchored VWAP.
Sweep detection: A sweep qualifies when price wicks through the last confirmed swing level but closes back inside it, with per-level memory so the same level cannot re-trigger. The sweep stream then re-anchors from that bar.
Deviation bands: The primary stream (selectable; week open by default) carries inner and outer bands at configurable sigma multiples computed from its own volume-weighted variance, with softly tinted zones between them.
Signals: A wick beyond the outer band with a close back inside, on the correct side of the VWAP, prints the ฯ rejection signal โ reversion bias toward the average โ evaluated on closed bars only and rate-limited by the cooldown.
Clusters: On the live bar the engine groups all active stream values within the tolerance and draws a labeled zone for each group of two or more.
Dashboard: A fully themeable panel lists every stream with its live distance from price in Average True Range units and side, plus the In Control stream, active cluster count, and the current band width.
Non-repainting: Anchors use confirmed events, sweeps and signals are evaluated at bar close, and swing streams rebuild exactly rather than approximately.
๐ถ HOW TO USE IT
1. Works on any market with reliable volume โ cryptocurrency, stocks, indices, futures. On the default settings, read the week-anchored VWAP as the institutional benchmark: above it with rising distance means the average weekly participant is in profit.
2. Treat the VWAP itself as the decision level and the outer bands as stretch: ฯ rejections at the outer band carry a reversion bias back toward the average.
3. Enable the swing and sweep anchors to study reactions: price returning to a sweep-anchored VWAP is returning to the average entry of the stop-run โ a level worth watching.
4. Cluster zones are the highest-value levels the engine produces: several independent volume-weighted averages agreeing on one price. Watch how price behaves on first touch.
5. Use the In Control row to pick which stream deserves your attention today, and the distance column to see what is nearby before it is hit.
6. Intraday traders can switch the primary stream to Session Open; swing traders can promote Month Open.
๐ถ SETTINGS
- Anchors: independent toggles for all seven streams, swing pivot length, highest-volume lookback. Default: Week Open only.
- Primary stream selection with inner and outer band multiples.
- Cluster detection with Average True Range tolerance.
- Signals: toggle, cooldown, and signals to keep.
- Individual colors for every stream plus accent and neutral colors.
- Themeable dashboard: position, four text sizes, title band, background, frame, grid, and three text colors.
๐ถ ALERTS
- Bullish / Bearish Band Rejection โ price rejected the outer deviation band of the primary stream.
- Price Crossed Above / Below Primary VWAP.
- VWAP Cluster Formed โ two or more streams converged into a confluence zone.
- Sweep Anchor Reset โ a liquidity sweep occurred and the sweep stream re-anchored from the stop-run bar.
๐ถ FREQUENTLY ASKED QUESTIONS
Does the indicator repaint? No. Anchor events are confirmed before they act, swing streams rebuild exactly from the confirmed pivot bar, and signals are evaluated on closed bars. Swing confirmation carries its standard pivot lag by design.
Why do I only see one line? By default only the week-anchored stream is enabled for a clean first chart. Every other anchor is a checkbox in settings.
What makes the sweep anchor special? It averages price and volume from the exact bar where stops were run โ the basis of the participants who engineered the move โ rather than from a calendar date or swing alone.
Why is there no cluster or In Control reading? Both features compare multiple streams; enable two or more anchors and they activate.
Which markets should avoid it? Any Volume Weighted Average Price tool is only as good as the volume feed. On symbols with unreliable or synthetic volume reporting, treat every stream with caution.
๐ถ CREDITS
The Volume Weighted Average Price was introduced by Stephen Berkowitz, Dennis Logue and Eugene Noser (1988), and the anchored application was popularized by Brian Shannon, whose work established anchoring from meaningful events as a discipline. This script gratefully acknowledges both. The multi-stream auto-anchoring engine, the liquidity-sweep anchor, the exact retroactive swing rebuild, confluence clustering, the In Control stability metric, and all code in this script are original work โ no third-party or open-source script code was reused.
๐ถ LIMITATIONS
Volume quality determines VWAP quality; symbols with unreliable volume produce unreliable averages. Deviation bands need bars to mature after each re-anchor. Cluster detection reports convergence, not a guarantee of reaction. The In Control metric measures recent respect, not future behavior. No indicator replaces independent analysis.
๐ถ DISCLAIMER
This script is provided strictly for educational and informational purposes. It is not financial advice, an investment recommendation, or a solicitation to buy or sell any financial instrument. Past behavior of any average, band, or cluster does not guarantee future results. Trading involves substantial risk. Always do your own research and manage risk independently. Indicator

Market Regime Engine [NQ Labs] WHAT THIS ANSWERS
Almost every indicator tells you WHAT the market is doing. Very few tell you
whether the current market has enough exploitable structure to be worth
risking money on at all. The Market Regime Engine is built for that second
question: should I be trading this right now, and if so, what style of
approach do current conditions actually favour?
It is not a signal generator. It produces no entries. It is a filter you run
underneath whatever you already trade.
WHY IT IS BUILT THIS WAY
Two design decisions separate this from a conventional regime or trend filter.
1. EVERY AXIS IS PERCENTILE-RANKED AGAINST ITS OWN HISTORY.
Most regime tools use fixed thresholds - an ADX of 25, an ATR multiplier of 3.
Those numbers are calibrated to whatever the author tested on. They are the
reason a tool behaves sensibly on one instrument and nonsensically on the
next. Here, each axis is ranked against its own recent distribution on the
current symbol and timeframe, so a 65th-percentile reading carries the same
meaning on a crypto pair as it does on an FX major. Nothing needs retuning
per market.
2. THE THREE AXES ARE ORTHOGONAL BY DESIGN.
Many "confluence" tools stack three views of momentum and present the
agreement as confirmation. Correlated inputs agreeing is not evidence. These
three measure genuinely different properties:
DIRECTIONAL EFFICIENCY - net distance travelled divided by the total path
walked to get there. A value near 1 is a straight line. A value near 0 means
price ended where it started after a great deal of work. This is the most
direct available answer to "is there a trend here", and it is independent of
direction.
VOLATILITY STATE - ATR ranked against its own history. Not "is volatility
high" in absolute terms, but "is volatility high for this instrument".
RETURN PERSISTENCE - lag-1 autocorrelation of log returns. Positive means an
up bar tends to be followed by an up bar, so momentum approaches have
something to work with. Negative means the market reverts. Near zero means
returns carry no usable memory.
THE SCORING LOGIC
The Tradeability Score (0-100) rests on one idea:
Efficiency is the signal. Volatility is the cost of being wrong.
Volatility only hurts you when there is no direction to exploit.
So the noise penalty is the product of how little direction exists and how
violent the market is. It approaches zero inside a strong trend no matter how
wild conditions get - because volatility inside a trend is opportunity, not
noise - and it peaks precisely where traders are most reliably ground down:
low efficiency combined with high volatility. That specific combination is
what the engine exists to flag.
THE FIVE REGIMES
TREND Efficiency high. Directional. Follow it.
VOLATILE CHOP Efficiency low, volatility high. No direction, maximum cost
of being wrong. The state that does the damage.
COIL Efficiency low, volatility low. Compression. Wait.
RANGE Efficiency low, volatility middling. Edges are tradeable.
TRANSITION Efficiency mid-range. No clean read. Reduce size.
A raw regime read must hold for a configurable number of consecutive bars
before it is confirmed. Without that filter, readings that straddle a
threshold flip back and forth for single bars.
REGIME MATURITY - THE PART I HAVE NOT SEEN ELSEWHERE
The engine records the length of every completed regime run on the current
chart and reports the current run against that learned baseline, together with
the sample size behind it.
A trend at 0.3x its typical duration and a trend at 2.4x are not the same
trade, even though every conventional indicator prints the identical reading
for both. A compression that has lasted three times longer than compressions
normally last on this instrument is a different proposition to one that
started six bars ago.
The sample size (n=) is shown deliberately. Below the configured threshold the
cell dims, because a baseline built from two observations is not evidence and
should not be dressed up as though it were.
HOW TO USE IT
The engine is a gate, not a trigger. The intended workflow:
1. Read the Verdict first. STAND DOWN means your edge, whatever it is, is
probably not present. The most valuable output of this tool is the trades
it talks you out of.
2. Read the Regime and Favoured Style. Trend-following systems belong in
TREND. Mean-reversion belongs in RANGE, and only when Persistence confirms
the market is actually reverting rather than merely quiet. COIL means the
setup has not arrived yet. VOLATILE CHOP means nothing you own works here.
3. Read Persistence before choosing an approach. If it reads Random, the
market has no memory to exploit in either direction, and both momentum and
mean-reversion are coin flips.
4. Use vs Typical for position management, not entry. An extended regime is
not a reversal signal. It is a reason to stop adding and to tighten what
you already hold.
5. Let the ribbon and score do the work on the price chart. The dashboard can
be forced onto the main pane so the engine occupies a pane without costing
you chart real estate.
SETTINGS THAT ACTUALLY MATTER
RANKING LOOKBACK is the important one. It must span several complete regime
cycles on your timeframe or every axis will rank near the middle and
everything will read TRANSITION. 250 bars on a daily chart is roughly a year -
a real baseline. 250 bars on a 5-minute chart is under a day, and is not.
On intraday timeframes, raise it substantially.
MINIMUM REGIME RUN trades responsiveness for stability. Higher values give a
calmer read and a cleaner duration baseline at the cost of confirming changes
later. Set it to 1 to see the unfiltered classification.
CHOP PENALTY controls how hard low-efficiency volatility is punished. Set it
to 0 and the score becomes pure efficiency rank.
EFFICIENCY and VOLATILITY thresholds are percentiles, not raw values. They do
not need adjusting per instrument. That is the point.
LIMITATIONS - STATED PLAINLY
- This is a lagging, descriptive tool. It classifies conditions that have
already formed. It does not forecast, and it cannot tell you a regime is
about to end.
- Confirmation costs lag. A genuine regime change registers a few bars late by
design. That is the price of not flickering.
- The maturity baseline is learned from visible chart history and rebuilds
whenever settings, symbol, or timeframe change. It is not persistent memory.
Early in a chart, or for a rarely-occurring regime, the sample is thin. The
n= value tells you when to discount it.
- On intraday equity charts, overnight gaps inflate ATR and distort the
persistence reading. Daily and above, or extended hours, handle this better.
- Autocorrelation is a weak statistic on short samples. Persistence readings
close to zero should be read as "no information", not as a subtle signal.
- Efficiency is directionless. TREND tells you a trend exists, not which way
it points. Pair it with something that reads direction.
- No regime classification is correct at the moment it matters most, which is
the turn. Nothing here changes that.
This script is open-source. Read the code, disagree with it, improve it.
This is an analytical tool for studying market conditions. It is not financial
advice, and it does not generate trade recommendations. Trading involves risk
of loss. Indicator

VWAP Suite I EonMetricsVWAP Suite
VWAP Suite plots three independently anchored Volume-Weighted Average Price lines โ Session, Weekly and Monthly โ with volume-weighted deviation bands and the previous period's VWAP close kept on the chart as a reference level. Everything is computed from first principles at each anchor, so every line resets exactly where its period starts.
๐ถ WHAT VWAP IS
VWAP is the average price of the period weighted by how much volume traded at each price. It answers one question: "what is the fair average price actually paid since the anchor?" That is why institutional execution desks benchmark fills against it, and why price so often reacts when it returns there โ it is the level where the average participant in the period is at break-even. Above the VWAP the average buyer of the period is in profit; below it, under water.
๐ถ WHAT IT DOES
Three anchors โ Session (resets each trading day), Weekly and Monthly VWAP, each with its own toggle and color. Intraday traders typically work with Session, swing traders add Weekly, and Monthly serves as the higher-timeframe fair-value reference. Anchors that make no sense on the current chart timeframe (e.g. a Session VWAP on a daily chart) hide themselves automatically.
Deviation bands โ ยฑ1ฯ, ยฑ2ฯ and optional ยฑ3ฯ around ONE chosen anchor. The deviation is volume-weighted and anchored to the same period as the VWAP it wraps โ not a rolling standard deviation โ which is the statistically consistent way to band a VWAP (the same math TradingView's built-in VWAP bands use). ยฑ2ฯ is the classic stretched-price reference; the optional gradient fill keeps the zones readable without clutter.
Previous VWAP Close โ the exact level where the Session (or Weekly) VWAP finished its previous period, drawn flat through the current one. The same idea as previous day high/low, but volume-based: yesterday's fair price is a natural magnet and reaction level for today. Few VWAP tools carry this level forward โ it is the reason this suite exists.
๐ถ HOW IT IS CALCULATED
From each anchor the script accumulates three sums bar by bar: volume ร price, volume, and volume ร priceยฒ. VWAP = ฮฃ(volume ร price) / ฮฃ(volume). The band deviation comes from the volume-weighted variance ฮฃ(volume ร priceยฒ)/ฮฃ(volume) โ VWAPยฒ. At every period rollover the previous VWAP value is captured first, then the sums reset to zero. Values only update on confirmed data โ there is no repainting logic anywhere in the script.
๐ถ ALERTS
Seven alert conditions: price crossing each of the three VWAPs, price touching the +2ฯ or โ2ฯ band, and price crossing the previous Session or previous Week VWAP close.
๐ถ HOW TO USE
1. Pick your anchors โ Session for intraday, add Weekly for swing context.
2. Choose which anchor carries the deviation bands (Bands Around).
3. Keep Previous Session VWAP on โ reactions at yesterday's fair price are the cleanest thing this tool shows.
4. Set alerts on the crossings you actually trade around.
๐ถ SETTINGS
Source (price input, hlc3 default) ยท Anchors (Session / Weekly / Monthly, each with color) ยท Deviation Bands (anchor selector, ยฑ1ฯ/ยฑ2ฯ/ยฑ3ฯ toggles, gradient fill) ยท Previous VWAP Close (Session / Weekly levels).
๐ถ HONEST LIMITATIONS
On CFDs and spot forex the data feed reports TICK volume (number of price updates), not true traded volume. VWAP built on tick volume is still the standard practice on those markets and tracks the real one closely on liquid symbols, but you should know what feeds the math. On symbols with no volume data at all the script deliberately shows nothing rather than fake a line. VWAP is a descriptive average, not a prediction โ this tool draws levels, it does not generate signals.
Part of the EonMetrics toolset.
Indicator

Auto Trend Channel & Breakout Expectancy in ROVERVIEW
An auto-drawn trend channel is easy. Knowing whether breaking it has ever paid on YOUR symbol is not โ and it is the only thing that matters.
This tool draws the channel objectively and then does the part nobody else does: it forward-resolves every historical break through a real target and stop, and reports, in R, what breaks like the current one have actually returned. Not a prediction. A track record.
Expectancy exp +1.24R ยท need 15% @ RR 6.0
HV win/loss 38/59% n400 โ
MV win/loss 32/65% n150 โ
LV win/loss 17/83% n55
Null / net net 1.29R t=3.1 โ
It is a research and framing tool. NOT a strategy, NOT a signal service, NOT a validated edge.
HOW THE CHANNEL IS BUILT โ objectively, no hand-placed anchors
The support and resistance lines come from a CONVEX HULL over confirmed pivots, not from two points a human chose. The opposite boundary is drawn parallel, and the channel WIDTH becomes the measured-move target. Because the construction is mechanical, the same rule produces the same channel on every symbol and every timeframe โ there is nothing to curve-fit.
HOW A BREAK IS GRADED โ and why volume is split three ways
A break is a confirmed CLOSE beyond the boundary. Every break is then sorted by its break-bar volume percentile into HV / MV / LV (high / medium / low), and each tier is calibrated SEPARATELY.
That split is the point. "Breakouts need volume" is repeated everywhere and tested almost nowhere. Here you can read straight off the panel whether heavy breaks on your instrument actually pay more than thin ones โ and often they do not, which is worth knowing before you wait for a volume confirmation that costs you the entry.
THE FORWARD TEST โ expectancy in R, on identical geometry
Every break is resolved through a triple barrier: a target at the channel-width move, a stop at a fixed ATR distance, and a horizon. Win, loss, or chop. The expectancy is the exact realized R per trade โ a win contributes +RR, a loss contributes โ1, chop contributes 0 โ so the win rate and the R:R are on the SAME footing, computed from the same resolved trades. There is no mixing of a win rate from one calculation with an R:R from another.
The R:R shown is the target-to-stop RATIO, and it is deliberately not the headline. A 6:1 target sounds wonderful and is reached maybe a third of the time; quoting it alone flatters a low-hit-rate system. So the panel leads with the realized EXPECTANCY, then states the breakeven win rate the geometry requires, then shows the win rate actually achieved. Expectancy first, because expectancy is the thing that is actually true.
Nothing is rated until a tier has at least 30 resolved trades. Below that, no checkmark, no verdict, no meta call โ a Wilson floor on a dozen trials is too wide to certify anything, and pretending otherwise is how bad tiers get a green tick.
THE RANDOM-DIRECTION NULL โ the honesty check
Here is the trap this defends against. A 6:1 target with a nearby stop is an asymmetric payoff, and on a drifting instrument an asymmetric payoff makes money in a RANDOM direction โ the geometry earns, not the signal. So for every real break the script ALSO runs a coin-flip-direction trade with the identical target and stop, and reports its expectancy alongside.
If the null earns as much as the signal, the "edge" is just the geometry capturing drift, and you should believe the null. And it is now TESTED, not just displayed: a Welch t between the signal's realized-R distribution and the null's turns "net 1.29R" into "net 1.29R, t = 3.1, real" โ or into "ns", not significant, which is the more common and more honest outcome.
THE OPTIONAL META-LABEL โ a learned second opinion
An online logistic model trains on this script's own resolved outcomes and outputs a calibrated probability of follow-through for the current break. No hand-tuned weights; it self-corrects as more breaks resolve, and it reports its own reliability (the realized win rate inside each probability bin) so you can see whether its confidence is earned. It is off by default and it never overrides the forward test โ it is a second opinion, not the verdict.
THE ANTI-BIAS GUARDS
ENTRY IS THE CLOSE (or, in retest mode, the line touch) โ a break is a signal, not a fill, and entering at a better price than the trade actually offered would manufacture an edge.
Both barriers on one bar: the STOP is assumed first โ conservative, and the only assumption that cannot flatter the result. Unresolved trades at the horizon are scored as chop (zero), not as wins.
THE NULL is direction-randomised on the same geometry, which is what isolates signal from payoff structure. Every rating is gated by a minimum sample and a Wilson lower bound, and the null gap is significance-tested. Nothing here is asserted that has not cleared a test.
NON-REPAINT
Confirmed pivots, confirmed-close breaks, and forward-resolved calibration that never looks ahead. The channel can extend and re-fit as new pivots confirm, but a resolved trade is never re-scored, and no barrier is evaluated on a bar that has not closed.
DATA AND SCOPE
Any symbol, any timeframe. ATR-normalised throughout. Volume is used for the tier split; without it the tiers collapse to one and everything else still works.
EXPORTS (Data Window โ consume from other scripts via input.source())
Channel high, channel low, break direction, volume tier, entry, stop, target, per-tier expectancy, null expectancy, meta probability โ see the Exports group.
CONCEPT CREDIT
The convex-hull approach to objective trendlines, the triple-barrier forward-labelling method and the meta-labelling idea are from Marcos Lopez de Prado ("Advances in Financial Machine Learning"). The trading-range break as a formal, testable rule was first studied at scale by Brock, Lakonishok and LeBaron (Journal of Finance, 1992); its vulnerability to data-snooping was shown by Sullivan, Timmermann and White (1999) โ which is exactly why this tool measures the rule on your instrument instead of asserting it. Wilson score interval โ E. B. Wilson (1927). Welch's t-test โ B. L. Welch. ATR โ J. Welles Wilder.
The convex-hull channel implementation, the volume-tier calibration, the random-direction null with its significance test, and the online meta-label are the author's own. Clean-room implementation; no third-party Pine code is reused. Not affiliated with, nor endorsed by, any of the above.
HONESTY AND LIMITATIONS
Calibration is IN-SAMPLE, fixed-barrier, and assumes idealised fills โ no commission, no slippage, no partial fills. It describes the past; it does not predict the future. Real costs will reduce every number, and they reduce the low-hit-rate high-RR tiers most.
Overlapping windows mean the samples are not fully independent, so treat the t-stats as directional evidence, not exact p-values. A tier that is proven in-sample is not guaranteed out-of-sample.
The null being beaten is the single most important line on the panel, and on many instruments it will read "ns". That is a real result. A tool that cannot report "no edge here" is selling you something.
Nothing in this script predicts price.
DISCLAIMER
Research and educational tool only. NOT financial advice, NOT a recommendation, and NO guarantee of results. Entry, stop and target output is arithmetic, not advice. Trading carries risk of loss. Test out-of-sample and make your own decisions. The author accepts no liability for any use. Indicator

Strategy

Indicator

Machine Learning Price Bands Kernel Regression SignalsOVERVIEW
Every "AI band" on this platform draws two lines and asserts them. None of them can tell you how often price actually stays inside.
This one can โ because it is built on a method that comes with a MATHEMATICAL COVERAGE GUARANTEE, and then it CHECKS WHETHER IT KEPT THE PROMISE, live, on your chart:
Coverage (empirical vs nominal) 89.1% vs 90% n = 20,266
Is the miss REAL? -0.9 pp z = -4.3 (real)
Verdict undercovering โ real, but small
That is not a band. That is a prediction interval that has been audited, and it is the whole reason this tool exists.
It is a research and framing tool. NOT a strategy, NOT a signal service, NOT a validated edge.
THE MACHINE LEARNING, SPELLED OUT โ no buzzwords, here is the actual model
1. NADARAYA-WATSON KERNEL REGRESSION. Non-parametric: no functional form is assumed, the data chooses the shape. Each past bar votes on the current estimate with a Gaussian weight that decays with distance. This is the same estimator Lo, Mamaysky and Wang used in the Journal of Finance to make chart-pattern recognition objective. It is real machine learning, and it is sixty years old.
The kernel here is CAUSAL. It only ever looks backwards. A centred kernel โ the kind most "Nadaraya-Watson envelope" scripts use โ peeks at bars that have not happened yet, and that is why their historical fit looks so much better than their live one.
2. BANDWIDTH BY PREDICTIVE MODEL SELECTION. The bandwidth h is the only real parameter, and it is not a magic number: several candidates are run in parallel and scored on their ROLLING ONE-STEP-AHEAD SQUARED ERROR. The winner is used. That is honest model selection โ the criterion you would use to choose any forecaster โ rather than a knob you turn until the chart looks nice.
3. CONFORMAL PREDICTION INTERVALS. The half-width is the (1-alpha) empirical quantile of the recent ABSOLUTE one-step-ahead errors. Under exchangeability this carries a FINITE-SAMPLE coverage guarantee, with NO distributional assumption at all: no normality, no GARCH, no volatility model. The model's own recent mistakes size the band โ which is why it widens when the model starts being WRONG, not merely when price starts moving.
4. ADAPTIVE CONFORMAL INFERENCE โ Gibbs and Candes, NeurIPS 2021.
Here is the problem with plain conformal prediction on markets, stated plainly: its guarantee holds under EXCHANGEABILITY, and financial returns are the textbook counterexample. Volatility CLUSTERS. So a residual quantile computed over a trailing window is always a step behind, the band is too narrow exactly when it matters, and the misses bunch together. Coverage lands quietly under nominal. Measured live on NIFTY futures before this was added: 89.1% against a nominal 90%, on the 1m, the 3m and the 1h, every one of them roughly four standard errors below target. Not a bug. The assumption breaking.
ACI makes the miscoverage level a LEARNED parameter:
alpha(t+1) = alpha(t) + gamma * (alpha - err(t))
Miss the interval and alpha falls, so the quantile rises and the band WIDENS. Cover it and alpha creeps back, so the band TIGHTENS. Long-run coverage provably converges to the target IRRESPECTIVE OF THE DATA GENERATING PROCESS โ no exchangeability assumption anywhere.
A band that notices it is undercovering and fixes itself. Watch the alpha row: where it settles BELOW nominal is a direct measurement of how badly exchangeability fails on your instrument.
MEASURED, ON THE SAME INSTRUMENT, BEFORE AND AFTER:
timeframe plain conformal with ACI
1m 89.1% 90.1%
3m 89.1% 90.1%
5m 89.1% 90.1%
15m 90.1% 90.1%
1h 89.1% 90.1%
(nominal 90%)
Five timeframes, a four-standard-error undercoverage on four of them, closed. The binomial test now returns "calibrated โ within sampling noise" and means it. That is not a backtest of a trading rule. That is a mathematical promise being kept, and being checked.
5. NORMALISED NONCONFORMITY โ Papadopoulos et al. (2008), Lei et al. (2018).
The plain score |price - fit| is a SCALAR, which means the band is THE SAME WIDTH in a dead tape and in a crash. It therefore OVERCOVERS in calm and UNDERCOVERS in chaos โ and the single marginal coverage figure is the average of those two errors, looking correct while being wrong in both directions.
Normalising divides each residual by a local scale estimate before taking the quantile, and multiplies it back when drawing:
score = |price - fit| / sigma band = fit +/- q * sigma
The band now scales with LOCAL DIFFICULTY โ and note it is the MODEL'S difficulty, not the market's volatility. Related, but not the same thing, and the first one is what a prediction interval is actually about.
6. THE COVERAGE AUDIT. A guarantee you do not verify is just a claim.
TWO QUESTIONS ABOUT THE COVERAGE, AND THE PANEL ANSWERS BOTH
IS THE MISS REAL? That is a binomial z-test and it needs no tolerance at all. Each bar is a Bernoulli trial with p = nominal, so the standard error of the observed coverage is sqrt(p(1-p)/n).
IS THE MISS BIG ENOUGH TO CARE ABOUT? That is a judgement, and you set it.
These are NOT the same question, and conflating them is how a band gets waved through as "calibrated". Measured live on NIFTY futures: at n = 20,266 the standard error is 0.21 pp, so an empirical coverage of 89.1% against a nominal 90% is a 0.9 pp miss โ FOUR STANDARD ERRORS. Unmistakably real. Arguably too small to trade differently. A 5 pp tolerance called that "calibrated", which was the headline row of the script asserting the one thing the script exists to verify, and asserting it wrongly.
The panel now reports the size of the miss, its significance, and a verdict that distinguishes "within sampling noise" from "real, but small" from "MISCALIBRATED โ do not trust the band". You get to decide which of those matters to you, and you get the numbers to decide with.
AND THEN THE ROW NOBODY HAS: CONDITIONAL COVERAGE
Coverage 90.0% vs 90% n = 20,178
calm / normal / turbulent 96.4% ยท 90.1% ยท 83.2%
A single marginal number can read a perfect 90% while the interval covers 96% of quiet bars and 83% of violent ones. Ninety per cent is then the AVERAGE OF TWO ERRORS โ it looks right while being wrong in both directions, and it is wrong in the direction that costs you money exactly when it costs you money.
Exact conditional coverage is provably impossible without strong assumptions. But you can always MEASURE it, and almost nobody does. Bars are split into calm, normal and turbulent thirds by the percentile rank of ATR, and coverage is scored inside each. If the three numbers fan apart, the band is not breathing โ and the normalised score is what closes the gap.
Turn the normalised score off and watch those three fan out. That is the demonstration.
FADE OR FOLLOW? THE TOOL DOES NOT PRETEND TO KNOW
Price leaving a 90% interval is statistically unusual. Whether to FADE it (an outlier, so bet on reversion) or FOLLOW it (the model has broken, so bet on the new regime) is an EMPIRICAL question, and the honest answer is often neither.
So both are logged, both are graded, and BOTH ARE TESTED AGAINST EACH OTHER.
That last part matters more than it sounds. Knowing that fading beats an unconditional control, and that following also beats an unconditional control, does not answer the question a trader is actually asking at a band break โ which of the two should I do? They are mutually exclusive responses to the SAME event. So they are run head to head with a Welch t-test, and the answer is allowed to be:
FADE or FOLLOW? NEITHER โ the break does not tell you which
If the difference does not clear the noise, then on this instrument the break carries no directional information, and saying so IS the finding. A tool that cannot report its own failure is an advertisement, not a measurement.
And the chart agrees with the panel. An unproven direction is still drawn โ it is arithmetic, and you may want it โ but it is drawn MUTED and labelled "(not proven)". It used to print "Follow the break" in full colour while the panel directly beneath it said "neither proven". The paint has to agree with the code.
THE ANTI-BIAS GUARDS
ENTRY IS THE CLOSE, for the event and for the control alike. A band break is a SIGNAL, not a fill. Entering at the band โ a better price โ while the control enters at the close hands every signal a free head start and manufactures an edge out of nothing.
THE CONTROL IS DIRECTION-MATCHED. In a downtrend there are more break-downs than break-ups, so FOLLOW skews short and FADE skews long. A direction-skewed event set measured against a 50/50 control inherits the index drift for free and calls it an edge. Longs are compared only with control longs, shorts only with control shorts, and the control is blended back using the events' OWN direction mix.
IDENTICAL GEOMETRY. Every event and every control trade uses the same stop and the same R multiple, so the comparison is apples to apples.
Both barriers on one bar: the STOP is assumed first โ conservative, and the only assumption that cannot flatter the result. Unresolved trades at the horizon are marked to market, not booked as losses. Nothing is marked proven below t = 1.96.
NON-REPAINT
The kernel is causal, the bandwidth is chosen on past error only, the interval is built from past residuals, and coverage is scored by asking whether the actual close landed inside the interval that was published BEFORE it. Everything is computed on confirmed bars. Nothing is drawn and then moved.
WHY THESE PARTS ARE ONE TOOL
The regression gives the trend. Without the interval, a band is a guess. Without model selection, the bandwidth is a knob you turn until you like the picture. Without the coverage audit, a conformal interval is an unverified promise. And without the signal calibration, "price left the band" is folklore. Each piece is worthless alone โ which is exactly why they ship together.
DATA AND SCOPE
Any symbol, any timeframe. ATR-normalised throughout. No volume required.
EXPORTS (Data Window โ consume from other scripts via input.source())
EXP_Fit, EXP_Upper, EXP_Lower, EXP_Bandwidth, EXP_Coverage, EXP_Miscal, EXP_Signal, EXP_Entry, EXP_Stop, EXP_Target
CONCEPT CREDIT
Nadaraya-Watson kernel regression โ E. A. Nadaraya and G. S. Watson (1964). Its use for technical pattern recognition in finance โ Andrew W. Lo, Harry Mamaysky and Jiang Wang, "Foundations of Technical Analysis", Journal of Finance 55(4), 2000. Conformal prediction โ Vladimir Vovk, Alexander Gammerman and Glenn Shafer; the split/inductive form used here follows Papadopoulos et al. and Lei et al. Triple-barrier forward labelling โ Marcos Lopez de Prado. Welch's t-test โ B. L. Welch. ATR โ J. Welles Wilder.
The causal-kernel implementation, the parallel bandwidth selection, the live coverage audit, the binomial calibration test and the fade-versus-follow head-to-head are the author's own. Clean-room implementation; no third-party Pine code is reused. Not affiliated with, nor endorsed by, any of the above.
HONESTY AND LIMITATIONS
Conformal coverage is guaranteed under EXCHANGEABILITY. Financial returns are NOT exchangeable โ volatility clusters, regimes shift โ so the guarantee is approximate in practice. THAT IS PRECISELY WHY THE COVERAGE IS AUDITED LIVE INSTEAD OF ASSUMED. When empirical coverage drifts from nominal you are watching the assumption break, in real time, and you should believe what you see rather than the label.
A prediction interval says where price is LIKELY TO BE. It says nothing about DIRECTION, and it is not a forecast. Coverage being correct does not make band breaks tradeable โ those are two different claims, and the tool tests them separately for exactly that reason.
Calibration figures are IN-SAMPLE, with no costs or slippage, and use overlapping windows. A proven in-sample edge is NOT a guarantee out-of-sample. Nothing here predicts price.
DISCLAIMER
Research and educational tool only. NOT financial advice, NOT a recommendation, and NO guarantee of results. Entry, stop and target output is arithmetic, not advice. Trading carries risk of loss. Test out-of-sample and make your own decisions. The author accepts no liability for any use. Indicator

True RSITrue RSI | MisinkoMaster
The True RSI is a sophisticated reimagining of classical momentum. While the standard Relative Strength Index has served as a cornerstone of technical analysis for decades, it possesses a fundamental limitation: it treats all price movements equally, regardless of the time elapsed since the market made its last major peak or trough. The True RSI solves this structural blind spot by merging price magnitude with temporal trend strength, weighting gains and losses according to their cyclical maturity.
By dynamically scaling price changes against the time-distance of local extremes, this indicator filters out lateral market noise, reduces false overbought and oversold readings during strong trends, and delivers highly responsive execution signals.
How It Works (The Core Architecture)
Instead of relying solely on arithmetic averages of upward and downward price closes, True RSI filters raw market data through a multi-dimensional momentum matrix:
Temporal Trend Weighting: The algorithm continuously tracks how recently the market has formed local highs and lows. Gains are mathematically weighted against the strength of the upward cycle, while losses are weighted against the strength of the downward cycle.
Cycle-Weighted Ratio: The accumulated, time-weighted gains and losses are calculated over your lookback period to establish a true relative strength ratio. If gains occur during an actively surging upward cycle, they are heavily amplified; if they occur during a dying trend, they are heavily discounted.
Smoothing and Normalization: This ratio is translated into a normalized scale bounded between 0 and 100, providing an incredibly smooth yet responsive oscillator curve alongside a secondary momentum velocity histogram.
Key Features
Time-Weighted Velocity: True RSI prevents premature exhaustion signals during strong, healthy trends because it understands the cyclical age of the current market move.
On-Chart Candle Morphing: The system automatically tracks the oscillator state and alters the colors of your main price bars to keep you visually aligned with the macro trend.
Overlay Execution Labels: Prints pristine Long and Short labels directly on your price pane the moment the underlying structural momentum shifts past your designated thresholds.
Internal Divergence Histogram: Built directly behind the main oscillator is a custom acceleration histogram that monitors the rate of change of the index, pinpointing hidden momentum shifts before they reflect in the price.
Input Parameters & Optimization Guide
Lookback Period: Controls the baseline window for both the cycle-strength calculations and the price change evaluations. A default of 21 bars balances macro trend stability with immediate short-term utility.
Long / Short Thresholds: The structural boundaries that dictate trend shifts. By default, crossing above 50 signals a bullish regime, while dropping below 50 initiates a bearish regime.
Overbought / Oversold Thresholds: Tailored extremes designed to isolate true premium and discount zones. The default 80 and 20 boundaries act as high-probability mean-reversion targets.
Trading Strategies & Execution
Trend Regime Shift
When momentum builds structural backing, the indicator updates its trend state:
A crossing of the True RSI above the Long Threshold triggers a green Long label on the chart, changing candle colors to vibrant green.
A crossing of the True RSI below the Short Threshold triggers a pink Short label, shifting candle colors to pink.
Exhaustion Reversals
Because price movement is weighted against cycle time, entering the overbought (80) or oversold (20) zones represents a market that is genuinely overstretched both in terms of price velocity and time. Reversals from these zones carry high statistical significance for counter-trend scalps or trailing-stop targets.
Acceleration Divergences
Watch the central histogram centered around the 50 line. When the price is grinding flat but the histogram starts to rise or fall aggressively, it shows that the internal speed of the True RSI is accelerating. This hidden momentum often foreshadows explosive breakout expansions.
Disclaimer: Trading financial markets involves high risk. This technical script is designed as an informational analytical tool to support your rule-based mechanical execution system and does not constitute financial advice. Indicator

Institutional VWAP Bands [JOAT]Institutional VWAP Bands
An anchored VWAP with standard-deviation bands that classifies price as cheap, fair or expensive and offers two complementary playbooks: mean reversion and trend pullback.
What it is
VWAP is the benchmark institutions measure their own fills against โ the market's running notion of fair value. Standard-deviation bands around it map where price is stretched relative to that benchmark. This indicator runs an anchored VWAP with three band pairs and turns them into a structured, non-repainting decision tool rather than a plain VWAP line.
How it works
โข Anchored VWAP โ volume-weighted average price accumulated from a chosen anchor (session, week or month) with a controlled reset, so the reference restarts cleanly each period.
โข Sigma bands โ three pairs of bands at one, two and three standard deviations of price around VWAP, computed from the same volume-weighted variance. These define the stretch zones.
โข Value state โ every bar is classified with a z-score into cheap, fair or expensive relative to VWAP. This drives the colour system and the dashboard.
โข Mean-reversion fades โ when price is stretched to the outer bands against the higher-timeframe trend and then reclaims back inside, a fade toward VWAP is signalled. The reclaim requirement is deliberate, so you are not blindly catching a falling knife.
โข Trend-pullback entries โ in a trend, a retracement to VWAP or the first band that holds is a discount entry in the trend direction. Both playbooks are labelled by type, and Buy/Sell are mutually exclusive with a minimum-gap control.
Trade levels
Each signal draws a red risk box to the ATR stop and a green reward box to the third target, with inner dividers and right-edge labels for entry, stop and each take-profit. For reversion signals the first target is clamped toward VWAP so it always sits on the profit side of entry.
The dashboard
An adjustable value-ladder panel shows the value state, the z-score, the trend bias, the active playbook and signal, a conviction estimate, and a live first-target-before-stop tally from closed bars only.
How to use it
โข Choose the anchor that matches your style: session for intraday, week or month for swing context.
โข Fade the outer bands only against the trend and with a reclaim; take pullbacks to VWAP with the trend.
โข Works across assets and timeframes, though the anchor should suit the timeframe you trade.
Settings
Anchor period, VWAP source, three band multipliers, trend filter length, reversion trigger, ATR risk multiple and target R multiples, plus visual and dashboard controls.
Originality and usefulness
VWAP and deviation bands are standard building blocks; the contribution here is the explicit two-playbook logic (reclaim-based reversion versus trend pullback), the value-state classification that ties colour, dashboard and signals together, and the reversion target clamp โ combined into one coherent, non-repainting framework and fully explained.
Notes and limitations
โข VWAP is most meaningful on instruments with reliable volume; on symbols without real volume the bands lose accuracy, which is stated here honestly.
โข Reversion trades against a strong trend carry inherent risk even with the reclaim filter.
โข The tally reflects only past bars on the current chart and is not a forecast.
โข Educational and analytical tool, not financial advice.
โ made with passion by officialjackofalltrades
Indicator

Indicator

YES RSI + BB SniperYES RSI + BB Sniper โ Mean-Reversion Setup Tool with Auto Entry/SL/Targets
What it does:
This indicator combines RSI and Bollinger Bands to identify mean-reversion setups, then automatically plots a complete trade plan โ Entry, Stop Loss, and three Targets โ with a live dashboard tracking every level.
Signal Logic:
LONG: Price tags the lower Bollinger Band AND RSI crosses back above the oversold level (default 30) โ exhaustion + momentum shift confirmation
SHORT: Price tags the upper band AND RSI crosses back below overbought (default 70)
Optional EMA-200 trend filter to trade only with the larger trend
Auto Trade Levels:
Entry: Signal candle close
Stop Loss: Beyond the band/swing extreme with an ATR-based buffer (adjustable)
Target 1: BB Basis (the mean โ natural magnet in mean-reversion), minimum 1R
Target 2: Opposite band, minimum 2R
Target 3: Configurable Risk:Reward runner (default 1:3)
Dashboard shows: Signal status with bar count, RSI value, %B, Bandwidth (squeeze detection below 4%), trend direction, all trade levels with real-time hit-tracking (โ/โ), and Risk:Reward ratios.
Alerts: Built-in alert conditions for both LONG and SHORT setups.
How to use: Works best on Daily and 1H timeframes for swing trades. Wait for the signal candle to close, verify the R:R on the dashboard suits your plan, and always size positions according to your risk management.
This is an educational tool, not financial advice. Always do your own analysis before trading.
Indicator

Apex Turn v4APEX TURN v4: Kalman Snapback with Fee Gate, Trend Guard and Fair Value Take Profit
Apex Turn is a mean reversion tool that hunts exhausted moves and trades the snap back to fair value. It was designed for crypto perpetual futures but works on any liquid market.
HOW IT WORKS
The script runs an adaptive Kalman filter on log price to estimate fair value, drawn as the orange line. The gap between price and fair value is normalized into a z score over a rolling window. When the z score stretches beyond the entry threshold (2.8 by default) and then hooks back toward the mean while still deeply stretched, the engine looks to trade against the extreme. Longs trigger at washed out lows and shorts trigger at blow off highs.
THREE GATES PROTECT EVERY SIGNAL
Gate one is the chop filter. The Kaufman Efficiency Ratio must confirm a ranging market before any mean reversion entry is allowed.
Gate two is the fee gate. The script projects the reward from current price to fair value, converts your maker and taker fees into R units based on the stop distance, and blocks any signal that would not cover all fees plus a minimum net gain of 0.35R. Blocked signals print as small gray crosses so you can see exactly what fees would have eaten.
Gate three is the strong trend guard. Fair value drift is measured in ATR per bar. When drift is strong, counter trend signals are suppressed until the market prints a release event: a momentum divergence on the z score, volume absorption at the extreme, or both together depending on the mode you select. Trend blocked signals print as orange squares and release events print as aqua diamonds.
EXITS
On entry the script freezes the current fair value as the take profit target, plotted in green, and places the stop in red at 1.5 ATR from entry. The default exit mode assumes you rest a reduce only limit order at the target so your winning exit pays the lower maker fee. Mean touch and overshoot exit modes are also included in the settings. A time stop closes stale positions after 45 bars.
ADAPTIVE ATR
The ATR length is anchored to real time rather than a fixed bar count. It always measures roughly 112 minutes of volatility, so stops, targets and fee math stay consistent whether you chart 30 seconds or 4 hours.
ALERTS
Four webhook ready alerts are included. Entry alerts carry the close price, the stop, the frozen take profit and the projected net R, so an automated system can place the full bracket the moment a position is born. Exit alerts fire for stop, target and time stop events.
SUGGESTED USE
Developed and tested for the 8 minute chart on liquid perpetual pairs. The 30 minute and 1 hour charts also suit the logic well. Timeframes under 5 minutes are not recommended because trading fees consume most of the edge there. Set the maker and taker fee inputs to match your own exchange tier before trusting the fee gate.
Signals are evaluated at bar close and do not repaint. Nothing in this script is financial advice and past behavior in testing does not guarantee future results. Always size positions responsibly and manage your own risk. Indicator

Two Sigma Factor Composite [JOAT]TWO SIGMA FACTOR COMPOSITE
A tribute to the multi-factor approach pioneered by Two Sigma โ long-only, long/short, and risk-premia funds that decompose returns into orthogonal factor exposures, normalise each factor onto the same statistical scale, and combine them into a single signed score. Two Sigma Factor Composite builds five canonical factors (Momentum, Quality, Value, Volatility, Mean-Reversion), Z-normalises each against a rolling baseline, sum-normalises the user-controllable weights, and outputs a composite score with signal labels, factor sparklines on the chart, and a rolling hit-rate backtest.
The five factors
Each factor is computed independently and Z-normalised over a configurable window (default 100 bars) with optional outlier clipping (default ยฑ4ฯ):
Momentum โ return / volatility over the configurable momentum window (default 50 bars). The classic "trend" factor.
Quality โ inverse of recent realised volatility (default 50-bar window). Lower volatility = higher quality; an asset that has been calmer is treated as higher quality, consistent with academic factor research.
Value โ deviation from a long mean (default 200-bar SMA). Negative deviation = "cheap" (positive value factor exposure); positive deviation = "expensive". The classical cross-sectional value definition, adapted to time series.
Volatility โ percentile rank of recent realised volatility (default 20-bar stdev percentile-ranked over 252 bars). High vol = negative factor; low vol = positive factor.
Mean-Reversion โ signed deviation from a 20-bar mean (default). Captures short-term reversion bias.
Each factor's window is independently configurable. All five outputs are Z-scores capped at ยฑ4ฯ to prevent any single outlier from dominating the composite.
Sum-normalised weights
Five weight sliders (default 1.0 each) are normalised internally so any positive combination is valid. Default equal weight is the most defensible baseline; tune individual weights to bias the composite. Want a pure momentum + quality read? Set the others to 0.1 and Momentum/Quality to 2.0. The composite reshapes itself live.
Signal engine โ bounded composite with three tiers
The composite is bounded by the clipping cap. The signal engine layers three thresholds:
Buy โ composite crosses above the buy threshold (default +1.0ฯ).
Sell โ composite crosses below the sell threshold (default โ1.0ฯ).
Extreme Bull / Extreme Bear โ |composite| crosses ยฑ2.0ฯ. The script's strongest read.
A configurable signal cooldown (default 10 bars) prevents clustering.
Factor sparklines (the signature visual)
The script renders inline sparklines on the chart for all five factors โ small line plots that visually show each factor's recent Z trajectory. Configurable base offset (vertical position below zero), row spacing, amplitude, and per-row transparency mapping. At a glance you see which factors are driving the composite and which are flat.
When all five sparklines lean the same way, the composite is high-confidence. When they disagree, the composite is a weighted compromise โ the sparklines tell you the truth that a single number cannot.
Visual system
Composite line (configurable width, default 3px) with sign-coloured fill toward zero (configurable transparency).
Threshold lines at ยฑbuyTH and ยฑextremeTH (configurable transparency).
Buy / Sell labels on chart on threshold crosses.
Factor sparklines โ five inline Z-trajectory plots in the pane.
Optional chart-background override to follow chart.bg_color.
A locked Emerald Night palette: vivid green bull / vivid red bear / sage mid on a deep emerald background โ strict 2-hue discipline with bg. No third colour invented anywhere; all variations are transparency-only.
Dashboard
Monospaced table positionable to any of eight corners. Surfaces:
Composite Z value and sign.
Per-factor Z rows (Momentum / Quality / Value / Volatility / Mean-Reversion).
Factor agreement percentage (how many factors agree with composite sign).
Last signal direction with bars-ago.
Weight configuration in use.
Backtest stats row โ rolling forward-N-bar hit rate (configurable lookahead, default 10 bars). The script's own performance audit.
Alerts
Five alert conditions, each independently controllable:
BUY Cross (composite crosses above buy threshold)
SELL Cross
Extreme Bull (composite > +2.0ฯ)
Extreme Bear (composite < โ2.0ฯ)
Low Factor Agreement (% of factors agreeing falls below the configurable threshold, default 40%) โ the script's "no edge" warning.
How to read it
Three reads, in order of conviction:
Extreme score with high factor agreement (e.g. composite > +2.0ฯ AND agreement > 80%) โ the highest-conviction read the script produces. Four or five factors are pointing decisively one way, and the composite is at a statistical extreme.
Buy / Sell with sparkline confirmation โ visual confirmation that the directional read is being driven by multiple factors, not just one. If the composite is bullish but only the Momentum sparkline is leaning, the read is fragile; if Momentum + Quality + Value + Mean-Reversion all lean, the read is robust.
Low Agreement alert โ stand-aside signal. The factors disagree internally; the composite is a wash. Wait for re-alignment.
Suggested settings
Defaults (momentum 50 / quality vol 50 / value 200 / vol 20/252 / MR 20, Z window 100, ยฑ4ฯ clip, ยฑ1.0 buy/sell, ยฑ2.0 extreme, 10-bar cooldown) are tuned for daily charts on broad indices โ the timeframes where factor approaches are statistically meaningful. For lower timeframes drop all windows proportionally. For weekly+ keep defaults; factor reads on weekly are the canonical institutional horizons.
Originality / what's reused
The factor-investing framework is published academic finance โ Fama-French 1992, Carhart 1997, AQR 2013, and many others. The five factors used here (Momentum, Quality, Value, Volatility, Mean-Reversion) are the canonical institutional factor set. The implementation here โ the five-factor pipeline with each factor's window independently configurable, the rolling Z-normalisation with outlier clipping, the sum-normalised five-weight composition, the bounded-composite signal engine with three-tier thresholds, the inline factor sparklines render in the same pane, the rolling forward-bar hit-rate backtest, and the strict 2-hue alpha-only palette โ is JOAT-original. No third-party code reused. The script is a tribute to Two Sigma-style factor-composite portfolio construction, not a direct replication of any proprietary Two Sigma model.
Limitations
The five factors are computed from chart data only โ they are time-series proxies of the cross-sectional factors used in true multi-asset portfolios. The Z-normalisation needs the window populated; early bars give a warm-up read. The forward-N-bar hit-rate backtest is descriptive of recent signal behaviour under the current settings; it is not a predictive metric. Factor exposures historically underperform for extended periods โ the dashboard's agreement row and the low-agreement alert exist specifically to warn you when the model is breaking down.
โ
-made with passion by jackofalltrades
Indicator

Adaptive Predictability Engine Entropy Gate, Regime RouterAdaptive Predictability Engine โ Entropy Gate, Regime Router & Expert Committee
What it is
The Adaptive Predictability Engine is a governed decision framework, not another confluence average. It refuses to treat all market conditions as tradable. It applies a strict hierarchy: first it asks whether price is forecastable at all right now; if it is, it decides whether trend-style or reversion-style logic is appropriate; and only then does a small committee of transparent experts vote โ with the committee continuously re-weighting itself toward whichever experts have been correct recently. When the market is unpredictable, the whole engine stands aside and shows nothing to trade.
It plots directly on price: long/short signals, the live entry/target/stop of the active trade, a plain-language dashboard, and an optional self-calibration panel that scores past signals in R-multiple expectancy (not just win rate).
Why these components are combined (mashup justification)
This is a deliberate, dependent stack โ each layer conditions the next, so removing any one changes the layer below it. That is the difference between a governed engine and a bag of averaged indicators.
Predictability gate (permutation entropy + structure). Permutation entropy (BandtโPompe) measures the ordinal randomness of recent price across three time scales; this is blended with |Hurst โ 0.5|, the distance of the market from a random walk, which is high for strong trends and strong mean-reversion. The blended predictability is percentile-ranked so the gate self-tunes per symbol and timeframe. If the tape is unpredictable, nothing downstream may fire. This is the master switch, and it is why the engine spends much of its time deliberately doing nothing.
Regime router (Hurst exponent). When structure exists, the Hurst exponent (generalized, via a structure-function slope) decides whether it is persistent (trend) or anti-persistent (mean-revert), and routes weight toward the appropriate family of experts rather than averaging trend and reversion logic together.
Expert committee (Hedge / multiplicative weights). Six deliberately diverse experts โ price trend, volume-weighted price, order-flow delta, momentum exhaustion, volatility extreme, and range extreme โ each cast a directional vote. Their weights update every bar by exponential regret (right experts gain influence, wrong ones lose it), with fixed-share regularization so no single expert can dominate and make the vote fragile.
Distribution-shift guard. If the recent return distribution moves materially versus a reference window, the engine freezes learning and cuts conviction until conditions settle, so stale weights don't drive trades through a regime change.
The output is a single decision = the regret-weighted vote of only the currently-appropriate experts, gated to zero whenever the tape is unpredictable.
How to use it
Add it to any liquid symbol and timeframe. Defaults are tuned for index futures (e.g. NIFTY) but every input is adjustable, and the Data source group lets you repoint price and volume for any market.
Watch the dashboard headline: LONG / SHORT / WAIT / STAND ASIDE. When a signal fires, the engine draws the entry, ATR target, and ATR stop so the action is concrete.
Treat the shaded background as a hard "do not trade" โ the engine has judged the tape unpredictable.
Open the Edge calibration (advanced) panel to see, per market memory, the past R-expectancy of the engine's own signals versus a direction-matched baseline. Positive expectancy means the sample was profitable before costs; this is descriptive of the past, not a forward guarantee.
Use the Ablation (research) toggles to switch each layer off and see, on your own data, whether it earns its place.
What makes it original
Most published tools average indicators and hope. This one inverts the approach by asking whether to act at all before what to do, using information-theoretic predictability (permutation entropy) as a master gate, a memory estimate (Hurst) as a router, and online regret-minimization (Hedge) to arbitrate a diverse expert set โ with built-in R-expectancy self-calibration so users can judge it honestly rather than on a cherry-picked screenshot. The order-flow expert reads finest-available lower-timeframe signed volume with automatic fallback. The coupling and governance order are the contribution; the individual estimators are classical and credited below.
Concept credits
Permutation entropy โ Bandt & Pompe. Hurst exponent / long-range dependence โ H. E. Hurst; Mandelbrot. Hedge / multiplicative-weights online learning โ Freund & Schapire; Littlestone & Warmuth; Vovk. Efficiency/structure framing โ Kaufman. Triple-barrier labelling and R-multiple expectancy โ M. Lรณpez de Prado. Wilson score interval โ E. B. Wilson. Synthesis, governance design, and implementation are the author's own.
Important disclaimer
Research and education only. Not financial advice, not a signal service, not a guarantee of future results. No indicator has an inherent edge. The calibration panel is a descriptive summary of past behaviour on the current chart โ not a backtest and not a forward prediction. Always validate independently, apply realistic costs and slippage, and manage risk. You are solely responsible for your trading decisions. Indicator

Multi-Indicator Confluence Strategy Automator [MarkitTick]๐ก A comprehensive, multi-dimensional technical analysis suite engineered to evaluate market conditions through a rigorous synthesis of trend, momentum, volatility, and cross-asset correlation metrics. Designed for traders who require a systematic approach to market entry and risk management, this script aggregates signals from multiple proven indicators and applies advanced statistical filters to minimize false positives. By unifying foundational technical analysis with advanced mathematical concepts like the Hurst exponent and momentum inflation, this tool provides a highly objective, data-driven environment for evaluating market structure and defining structured trade parameters.
โจ Originality and Utility
Standard trading methodologies often rely on isolated indicators, which can lead to high failure rates in dynamic market environments. The originality of this script lies in its robust confluence engine, which demands simultaneous alignment across multiple independent market dimensions before generating a signal.
Instead of merely stacking moving averages, this suite integrates a strict Boolean gating system that evaluates:
A primary directional baseline derived from a Hull Moving Average combined with an Average True Range volatility buffer.
A directional movement and momentum confirmation matrix utilizing the Average Directional Index and Commodity Channel Index.
Dynamic volume filtering to ensure market participation supports the price action.
Advanced statistical gating mechanisms, including confluence decay, regime detection, and cross-asset correlation analysis.
This utility is exceptionally valuable for systematic traders, as it translates complex, multidimensional market data into a highly legible, unified dashboard while automatically projecting risk-adjusted stop-loss and take-profit levels dynamically based on current market volatility.
๐ฌ Methodology and Concepts
โ The Confluence Engine
The core of this strategy revolves around a scoring system that evaluates bullish or bearish alignment. A valid signal requires a minimum confluence score, calculated by assessing the following core components:
โข Baseline Trend
The script utilizes a Hull Moving Average to determine the primary market bias. To eliminate noise, a volatility buffer equivalent to a fraction of the Average True Range is applied, ensuring that only definitive breakouts beyond the baseline are considered valid directional shifts.
โข Directional Movement (ADX/DMI)
The first confirmation layer relies on the Average Directional Index alongside the Directional Movement Indicators. A trend is only considered active if the ADX exceeds a user-defined threshold, and the relationship between the positive and negative directional indicators defines the bias.
โข Momentum Oscillators (CCI)
The second confirmation layer employs the Commodity Channel Index to measure the current price level relative to an average price level over a given period. Bullish or bearish confirmation requires the CCI to pierce specific upper or lower thresholds.
โข Volume Validation
A volume filter ensures that signals are backed by significant market interest. The current period's volume must exceed a rolling exponential moving average of historical volume, multiplied by a strict sensitivity factor.
โข Advanced Gating Filters
Confluence Decay: A time-based penalty system that degrades the value of a signal if the confluence state persists for too long without triggering an entry, preventing late entries into exhausted trends.
Hurst Regime Detector: Classifies the market as trending or mean-reverting, gating signals that conflict with the overarching statistical regime.
Momentum Inflation Ratio: Normalizes current price velocity against historical volatility to detect and filter out exhaustion spikes.
Cross-Asset Lead-Lag: Computes the Pearson correlation against a secondary asset to confirm macroeconomic or sector-wide alignment before entry.
๐จ Visual Guide
The script employs a highly intuitive visual hierarchy designed to keep the chart clean while providing maximum data density.
โ Chart Elements
โข Heatmap Candles
The standard price candles are color-coded based on the baseline trend state. Bullish bars are colored a vibrant teal, bearish bars are marked in a distinct red, and neutral states default to a muted slate blue. This visual heuristic allows traders to instantly recognize the dominant market regime without processing raw numerical data.
โข Signal Markers
When all confluence conditions and advanced gates are met, the script plots distinct entry markers: small upward-pointing triangles below the bar for long signals, and downward-pointing triangles above the bar for short signals.
โข Risk Management Levels
Upon a confirmed signal, the script dynamically draws horizontal lines representing the trade parameters:
Entry Line: A dashed, neutral-colored line projecting the exact trigger price.
Stop Loss (SL): A dashed, red line projected against the trend based on a multiple of the Average True Range.
Take Profit (TP1, TP2, TP3): Three dotted, green lines representing scaled exit targets, dynamically calculated using expanding volatility multiples.
Each line is accompanied by a precise price label anchored to the right side of the chart.
โ The Information Dashboard
A comprehensive table is anchored to the top right of the screen. It displays the real-time status of the Baseline, Confirm 1, Confirm 2, Volume, Exit status, and the aggregate Score. Furthermore, it outputs the exact values for ADX, ATR, Decay Age, Hurst Exponent, Momentum Inflation, Baseline Distance-Integral, and Lead-Lag Correlation, using a color-coded text system (Green for bullish/favorable, Red for bearish/unfavorable, Yellow for warnings).
๐ Note : the best way to resolve visual overlap is to navigate to the Object Tree and drag the indicator above the main chart layer, or simply hide the native candles in your chart settings.
๐ How to Use
โ Interpreting Signals
Traders should monitor the chart for the appearance of the signal triangles. Because the script utilizes a strict minimum gap requirement between signals, traders will not be overwhelmed by repetitive alerts during a sustained trend.
โ Executing Trades
Once a signal appears, the script automatically projects the optimal Entry, Stop Loss, and three Take Profit levels on the chart. Traders can use these exact price labels to populate their exchange order tickets or algorithmic routing software.
โ Managing Positions
The built-in Exit Indicator, driven by a faster CCI calculation, will trigger an alert when counter-trend momentum builds, providing an objective reason to manually close or trail stops on an active position before the hard stop loss is hit.
โ Dashboard Monitoring
Use the dashboard table to gauge the overall health of the trend. If the Confluence Score drops or the Confluence Decay percentage reaches high levels, it is highly advisable to tighten stops on existing positions, as the mathematical probability of trend continuation has diminished.
โ๏ธ Inputs and Settings
โ Core Indicator Tuning
Baseline HMA Length: Adjusts the sensitivity of the primary trend filter.
ADX/DMI Length & Threshold: Defines how strong a trend must be to pass the first confirmation gate.
CCI Length & Threshold: Sets the momentum required for the second confirmation gate.
Volume RMA Length & Multiplier: Configures the strictness of the volume participation filter.
โ Risk Parameters
ATR Length: The lookback period for volatility measurement.
SL ATR Mult: The multiplier applied to the ATR to define the stop-loss distance.
TP1, TP2, TP3 ATR Mult: The multipliers defining the three scale-out profit targets.
โ Advanced Filter Settings
Confluence Decay: Toggles the time penalty system and defines the maximum bars before full decay.
Hurst Regime Detector: Toggles regime filtering and sets the threshold for trending vs. mean-reverting environments.
Momentum Inflation Ratio: Toggles velocity normalization and sets the threshold ratio for exhaustion alerts.
Cross-Asset Lead-Lag: Defines the correlation ticker, correlation lookback window, and minimum Pearson threshold.
๐ Deconstruction of the Underlying Scientific and Academic Framework
โ Rescaled Range Analysis and the Hurst Exponent
This script integrates a specialized implementation of the Hurst Exponent, a statistical measure originally developed in hydrology, to classify financial time series data. It calculates the cumulative deviation of the asset's price from its Simple Moving Average over a defined rolling window. By identifying the maximum and minimum cumulative deviations, the script establishes the range, which is then normalized against the standard deviation of the price series to compute the rescaled range ratio. The final Hurst value is derived logarithmically. A value significantly greater than 0.5 mathematically confirms a persistent, trending regime, while a value below 0.5 indicates an anti-persistent, mean-reverting environment.
โ Momentum Inflation via Volatility Normalization
The script tackles the academic problem of momentum illusion, where sheer point movement is mistaken for structural momentum, by normalizing absolute price speed against the Average True Range. It then compares this normalized current velocity against a rolling historical average of normalized velocity. If the resulting ratio exceeds the user-defined threshold, the script identifies the movement as mathematically over-extended, gating further entries to prevent buying the top or selling the bottom of a volatility spike.
โ Cross-Asset Correlation Dynamics
To account for macroeconomic interconnectedness, the script employs a rolling Pearson correlation coefficient between the primary asset and a defined leading indicator. By analyzing the covariance of the two assets relative to the product of their standard deviations over a specific window, it mathematically verifies if the broader sector or macroeconomic environment supports the localized signal.
โ Distance-Integral Calculations
The Baseline Distance-Integral utilizes a rolling mathematical sum of the spatial delta between the closing price and the moving average. This integral provides a quantifiable area-under-the-curve measurement, offering deeper insight into the cumulative kinetic energy of a trend rather than relying solely on point-in-time cross signals.
โ ๏ธ Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. We expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion. Indicator

Indicator

Mean-Deviation Divergence OscillatorMean-Deviation Divergence Oscillator
A bounded oscillator that measures how far the typical price has stretched from its own recent mean, scaled by how much it normally deviates โ so a reading tells you "how unusual is this move," not just "how big." That normalization makes its swings comparable across calm and volatile regimes and well suited to divergence. It adds higher-timeframe confirmation and a plain-language forward-calibration layer, so you can see at a glance whether a divergence is corroborated and whether it has actually paid on this symbol.
Why this construction (not a mashup for show). Each part fixes a flaw in naive divergence. Raw distance-from-mean isn't comparable across regimes โ dividing by the average absolute deviation (with the conventional 0.015 scaling, chosen so that roughly 70โ80% of readings fall within ยฑ100) makes the oscillator regime-comparable, which is the whole reason it's a good divergence base. Higher-timeframe confirmation removes single-timeframe noise. Forward calibration removes blind faith: instead of assuming a divergence "should" reverse price, it measures whether it actually has, with realistic profit/stop outcomes. The normalized oscillator, the divergence engine, the MTF check and the calibration form one coherent tool.
How it works. Oscillator = (typical price โ its moving average) รท (0.015 ร mean absolute deviation), soft-bounded to a clean ยฑ100 pane that auto-fits its own recent magnitude. Divergence is detected from confirmed price pivots versus the oscillator (regular and optional hidden). With MTF confirmation on, a divergence counts only if a same-direction divergence is also present on the chosen higher timeframe. Each signal is then labelled by a triple barrier โ a profit target and equal stop in ATR units plus a time limit โ split into in-sample and recent out-of-sample, with a confidence interval and a multiple-testing check.
How to use. Read the Verdict row (Bull/Bear divergence confirmed, "unconfirmed," or Wait) and the Conviction row, which reads "High" only when that divergence type shows a positive edge that survives the test on this symbol. A divergence is a reversal warning, not a trend signal โ pair it with your own entry trigger and risk plan.
What's original. Higher-timeframe divergence confirmation on a mean-deviation normalized oscillator, the forward triple-barrier calibration with an out-of-sample split, and a conviction read that openly admits when there's no proven edge.
Inputs. Price/High/Low sources (change them for any market), reading mode (Simple/Pro), engine length and deviation scale, divergence and HTF-confirm controls, full calibration settings, and an auto-adapting dashboard legible on dark or light charts. Defaults are tuned for NSE:NIFTY1! intraday.
Honesty & limitations. Edge figures are computed on this chart's own history with overlapping windows and no costs โ context, not a guaranteed backtest; past behaviour doesn't predict the future. Divergence is inherently early and can persist before price turns.
Disclaimer: for research and education only. Not financial advice. Trading carries risk of loss; manage your own positions. Indicator

Intermarket Divergence with Reliability ScoringIntermarket Divergence with Reliability Scoring
Related markets tend to move together. When your chart pushes to a new high but a market that usually tracks it does not confirm, that non-confirmation can precede a turn. This script measures divergence between your chart and a chosen leader market โ but only when the leader is actually correlated to price, because a decoupled market's "divergence" is meaningless โ and then scores, in real time, whether those divergences have been worth trading on your symbol.
WHAT IT PLOTS
A normalised oscillator built from a chosen leader market, its stretch bands, divergence markers and connecting pivot lines, plus a plain-language verdict panel. By default the chart stays minimal โ the oscillator and the verdict panel โ with optional key-info and per-class tables you can switch on in settings.
WHY THESE COMPONENTS ARE COMBINED, AND HOW THEY WORK TOGETHER
Three classical pieces are fused into one pipeline, not stacked as independent signals:
A z-scored leader series โ optionally inverted, optionally lead-lag shifted โ the cross-market line your price is compared against.
A live correlation gate โ the leader only votes when its trailing correlation to price clears a threshold, so non-confirmations from a decoupled market are ignored.
A binomial-proportion confidence test โ asks, for each divergence class, whether the expected move followed more often than a same-zone baseline would deliver.
Part 1 builds the comparison, part 2 keeps only the meaningful divergences, part 3 decides whether the survivors have actually paid on this instrument, by direction. The parts are interdependent โ remove any one and the script can no longer answer its core question: is this intermarket divergence worth trading here, and which way?
HOW TO READ IT
The verdict panel translates the statistics into four states:
GREEN, edge confirmed: these divergences have beaten a same-spot baseline here. Worth acting on.
RED, no edge here: they have lost to a coin-flip. Skip them, pick a leader that genuinely leads, or change the timeframe.
AMBER, unproven: edge not statistically established yet; treat as low-confidence.
GREY, learning: still collecting completed samples.
It also shows:
Best signal โ names a direction only once that direction is individually proven (its edge lower-bound clears zero). Otherwise it says "none confirmed", so you are never lured by a single noisy number.
Leader link โ how tightly the leader currently tracks price (strong, moderate or weak). A weak link means the leader has decoupled and its divergences are unreliable.
Reward : risk โ the average best move versus the average worst move after a signal, in ATR. Below 1:1 means signals have hurt more than they helped.
Market regime โ reverting markets suit divergence; strong trends punish it.
A divergence is simply price making a higher high or lower low while the leader line does the opposite, counted only when the leader is correlated enough to matter.
CHOOSING A LEADER
Pick a market that genuinely leads โ a currency, a global risk proxy, a sector index โ not one that merely co-moves with your chart. The lead-lag offset lets you test whether it leads. A co-moving index will usually show no edge, which the panel will tell you plainly.
WHAT IS ORIGINAL
Standard intermarket tools just overlay two symbols. This one fuses a live correlation gate into the divergence filter, then keeps a self-updating, confidence-scored, per-class track record against a same-zone baseline โ so you see not just that a non-confirmation printed, but whether and how it has paid, and you only trust a direction once it is statistically proven.
UNIVERSAL ACROSS MARKETS
Reads the chart's own price (the source is configurable in settings) plus one leader symbol. Defaults target NIFTY futures with Bank Nifty as the leader. Change the leader to USD/INR (inverse), a sector or overseas index, or any related market for other instruments, in any market.
OUTPUTS FOR OTHER SCRIPTS
Generic EXP_ values โ oscillator, signal, probability, edge, edge lower-bound, sample count, regime, leader value and leader correlation โ are published to the Data Window so other indicators can read them via input.source().
CONCEPT CREDITS
Average true range โ J. W. Wilder. Binomial score confidence interval โ E. B. Wilson. Trend-efficiency regime measure โ P. Kaufman. Intermarket analysis and divergence โ classical technical analysis.
DISCLAIMER
For research and education only. This is not financial advice, not a recommendation to buy or sell, and not a guarantee of future results. All performance shown is in-sample and past-only. Markets carry risk โ do your own research and manage your own risk. Indicator
