Auto Trend Channels [AFD]A trend channel is only worth drawing if price actually respected it. This script builds every channel from three confirmed swing pivots, checks each bar between the anchors against the boundaries, and puts the channel on your chart only once a bar has closed inside it. Then it marks, on the drawing itself, the exact bar it became usable - so you always know which part of the channel is history and which part you could have acted on.
WHAT IT DOES
Auto Trend Channels finds parallel channels from confirmed swing pivots and follows each one through its whole life: accepted, broken, retouched, returned or expired.
Three pivots, exact geometry - a rising channel joins two rising swing lows and runs its upper boundary parallel through the swing high between them. A falling channel joins two falling swing highs, with the parallel through the swing low between. No regression fit, no approximate parallels.
Every bar between the anchors is checked - a candidate is rejected if any bar in its span pokes past a boundary by more than your Containment allowance. Its width has to sit between your Minimum and Maximum width, both measured in units of the chart's own average range, frozen when the channel is built.
Usable means a bar closed inside it - a channel is drawn only after a confirmed close lands between its boundaries. The dotted vertical Known line marks that bar.
One active channel per layer - a newer candidate never replaces an intact channel. Turn on Longer swing channel for a second, larger layer on the same timeframe, drawn heavier and fainter so the two stay tellable apart.
HOW A CHANNEL LIVES AND DIES
Active - solid boundaries in the rising or falling colour, shaded inside, extending to the current bar. The label at the right edge reads the direction and Active.
Close outside - the first confirmed close beyond a boundary, past your Close allowance, starts a return watch. The channel switches to the history colour, goes dashed, loses its shading, and its label reads Watching above or Watching below. It keeps extending while the watch runs.
Boundary retouch - the first later bar whose high or low reaches the broken boundary while the close stays outside gets a one-time mark on that channel. Recorded once, never counted or rated.
Returned inside - a confirmed close back between the boundaries within the watch window finishes the channel as Returned inside. A finished channel never reactivates.
Watch ended - no close back inside within the window, and the channel is finished with its right edge frozen where it ended. Separately, once a channel's first anchor passes your horizon it is retired and leaves the chart, whatever state it was in.
Finished channels stay on the chart up to your Retained channels count, dashed and grey, so you can see what each channel did after it broke. Channels hidden by that count keep running their watch and still alert.
WHAT YOU GET ON THE CHART
Upper and lower boundaries, with an optional midpoint and quarter lines.
The Known marker on a dotted vertical line at the acceptance bar.
Event labels at the bar that produced them, offset clear of the candles: Close above, Close below, Boundary retouch, Returned inside.
Optional A, B and C markers on the three source pivots.
An optional Forming channel view: the candidate a layer is currently building, dotted, faint and labelled as not accepted. Off by default, because a candidate can change or vanish before it is accepted.
A corner notice stating linear-price geometry and confirmed-pivot delay, with an optional status panel: per-layer state, live boundary prices, watch counts and how many sets are drawn.
Nine colour themes, including Paper for light charts and a Colourblind safe palette built on the published Okabe-Ito blue and vermilion, plus Custom pickers.
Three display switches - Channel labels, Channel fill and Corner table - to strip the drawing down to the lines alone when you want a clean chart.
ALERTS AND THE DATA WINDOW
Ten named alert conditions - Formed, Close above, Close below, Returned inside and Boundary retouch, for each layer - plus one combined dynamic alert that lists every enabled event on the bar with its layer, the channel's anchor timestamps and its raw boundaries. Each alert switch gates both the named condition and the combined message. Twenty Data Window plots expose the live upper, mid and lower values, the acceptance bar, the event flags and the watch counts, so every number on the chart can be read and exported.
SETTINGS WORTH KNOWING FIRST
Swing length sets how many bars either side confirm a pivot: raise it for fewer, larger, later channels, lower it for more, smaller, sooner ones. Pivots searched is how far back each construction reaches. Containment allowance, Minimum width and Maximum width are all multiples of the average true range frozen at construction, so they carry across symbols and timeframes without retuning. Close allowance is how far a close must clear a boundary before it counts as outside; 0 accepts any close beyond. Return watch is how many bars a broken channel is watched for a close back inside. Most tooltips end with a concrete example of what changing that setting does.
WHAT IT WILL NOT DO
It is not a signal tool. A channel is a description of where price has already been, and a break, a retouch or a return is a description of a close that already happened. Nothing here is an entry, an exit, a target, a probability or evidence of an edge, and no channel is ranked against another. Retouches are marked, never counted.
WHAT IS DISCLOSED RATHER THAN HIDDEN
Channels appear late by design. A pivot confirms Swing length bars after it prints, and a channel is drawn only after a bar closes inside it, so a new channel first appears drawn back over earlier anchors. The Known marker shows exactly where the usable part starts: left of it is where the geometry came from, not something you could have traded.
Linear-price geometry. Boundaries are parallel in price per bar. On a logarithmic price axis they are not log-space parallels, and the script cannot detect your axis setting. Slope is per bar, so a channel keeps its slope straight across a weekend gap.
Standard time-based charts only. Renko, Kagi, Range, tick and other nonstandard charts get a corner warning and no channels.
Reconstruction can change with loaded history, session settings, data adjustments or inputs. Whether this script repaints has not been observed on a replay and is not claimed here either way; confirm it with the bar-replay tool on your own symbol and timeframe.
No request.*() calls, no higher-timeframe data, no volume. Everything is computed from the chart's own bars.
ORIGINALITY AND CREDIT
Most auto-channel scripts fit a regression line and offset it, or join two points and draw a parallel at a fixed distance. This one builds exact three-pivot geometry, validates the full span between the anchors, waits for a confirmed close inside before it calls the channel usable, marks that bar on the drawing, and follows the channel through a bounded watch after it breaks. The geometry, engine and label patterns are adapted from Auction Foundry's own Auto Trendlines, Classical Auto Chart Patterns and Zone Forge.
Open source under the Mozilla Public License 2.0. (c) Auction Foundry.
This indicator describes channel geometry built from your chart's own price history. It is not a forecast, not a signal, and not financial advice. 指標

Variance-Weighted Regression Trend [BackQuant]Variance-Weighted Regression Trend
Overview
Variance-Weighted Regression Trend is a rolling linear-regression trend indicator that adjusts the influence of observations according to the estimated variance of their regression residuals.
The script first calculates a standard ordinary least-squares regression across the selected window. It then measures the squared residuals around that fit and uses those residuals to estimate how variable the regression error has been through the sample.
Those variance estimates are converted into relative weights. Lower estimated residual variance can receive more influence, while higher estimated residual variance can receive less. A second weighted regression is then calculated using those weights.
The indicator also includes:
EMA, RMA or rolling-average residual variance.
Configurable inverse-variance weighting strength.
Weight regularization and upper/lower weight limits.
Weighted R² and slope-quality diagnostics.
Two regression-channel methods.
Optional trend-flip quality confirmation.
OLS comparison.
Linear regression projection.
Trend colouring and alerts.
Calculation
The basic process is:
Fit an ordinary least-squares regression over the Regression Length.
Calculate the squared residual of every observation around that fit.
Smooth those squared residuals to estimate local residual variance.
Add a regularization floor to reduce unstable extreme weights.
Convert variance into relative observation weights.
Clamp weights between the selected minimum and maximum.
Calculate a second weighted regression.
The weighted line is therefore influenced more by observations receiving larger relative weights and less by those receiving smaller ones.
Variance Weighting
The weighting is based on regression residual variance , not ATR, trading volume or raw price volatility.
For each point:
Residual = Source - OLS fitted value
Squared Residual = Residual²
The squared residuals are then processed using the selected Variance Model.
EMA
Uses exponential smoothing and responds more quickly to recent residual changes.
RMA
Uses a slower recursive smoothing process.
Rolling Mean
Uses a finite moving average of squared residuals.
Weight Power
Weight Power controls how strongly estimated variance affects the regression.
The raw weighting relationship is:
Weight ∝ 1 / Variance^Weight Power
0 gives equal weighting, making the final fit behave like the OLS regression.
1 applies standard inverse-variance-style weighting.
Values above 1 increase the difference between low- and high-variance observations.
Higher settings can make the regression more selective, but can also concentrate too much influence in a small part of the sample.
Variance Regularization
Very small variance estimates can otherwise create extremely large inverse weights.
The script therefore adds a fraction of the window's mean squared residual to each local variance estimate.
Higher regularization makes the weights more uniform.
Lower regularization allows stronger differences between observations.
Minimum and Maximum Relative Weight
Raw weights are normalized relative to their average before being clamped.
A relative weight above 1 means the observation has greater-than-average influence.
A value below 1 means it has less.
The Minimum Relative Weight prevents high-variance observations from effectively disappearing from the regression.
The Maximum Relative Weight prevents very low-variance observations from dominating the entire fit.
Weighted Regression
Once the final weights are calculated, the script solves a weighted linear regression:
Y = Intercept + Slope × X
The displayed line is the current endpoint of that rolling weighted regression.
Each new bar shifts the regression window and recalculates:
OLS.
Residuals.
Variance estimates.
Weights.
Weighted slope and intercept.
OLS Comparison
The optional OLS line shows the endpoint of the initial equal-weight regression.
This makes it easy to see how much the variance weighting is actually changing the result.
If Weight Power is set to 0, the weighted regression and OLS should be effectively aligned.
As the weighting becomes more aggressive, the lines may separate depending on the residual structure inside the window.
Trend State
Trend direction comes from the sign of the weighted regression slope.
Positive slope = bullish.
Negative slope = bearish.
A bullish flip occurs when the stored trend changes from bearish to bullish.
A bearish flip occurs when it changes from bullish to bearish.
Quality Confirmation
Quality Confirmation can be enabled to prevent weak slope changes from immediately flipping the trend state.
When enabled, an opposite slope must also satisfy:
Minimum Weighted R².
Minimum Slope / Standard Error.
If those conditions are not met, the existing trend state remains active even if the current slope temporarily changes sign.
Weighted R²
Weighted R² measures how well the weighted straight-line regression describes the current sample.
Higher values indicate that the weighted observations are more closely aligned with a linear fit.
Lower values indicate a less orderly linear relationship.
R² does not determine trend direction and should not be interpreted as a forecast of future performance.
Slope / Standard Error
The script calculates the absolute weighted slope relative to its estimated standard error:
|Slope| / Slope Standard Error
This is used as a practical slope-quality measure.
Higher values indicate that the fitted slope is larger relative to the estimated regression error.
It is used by the optional Quality Confirmation setting and is not presented as a formal significance test.
Regression Channels
Two channel-width methods are available.
Weighted Residual RMS
Uses the weighted root-mean-square distance of observations from the fitted regression.
This reflects the general amount of scatter around the line.
Regression Standard Error
Uses the calculated standard error of the fitted current regression value.
This normally represents a different and often narrower measure than residual RMS.
The Channel Multiplier scales whichever method is selected.
Expand During Poor Fit
When enabled, the channel becomes wider as Weighted R² decreases.
This is intended to visually reflect greater uncertainty when the current window is poorly described by a straight line.
The expansion affects only the channel width.
It does not alter the regression or trend calculation.
Projection
The Projection extends the current regression slope forward by the selected number of bars.
It is simply:
Current fitted line extended using the current slope.
It is not a separate forecasting model.
As the regression changes on new bars, the projection also changes.
Current Relative Weight
The Data Window shows the final relative weight assigned to the newest observation.
A value:
Above 1 = greater-than-average influence.
Below 1 = less-than-average influence.
This can help show how the current observation is being treated by the variance-weighting model.
Effective Sample Size
The indicator also reports:
Effective N = (Sum of Weights)² / Sum of Squared Weights
This provides a simple measure of weight concentration.
If weights are similar, Effective N remains close to the full Regression Length.
If a smaller group of observations receives most of the weight, Effective N falls.
This is useful when experimenting with aggressive Weight Power or wide weight limits.
Trend Strength
Trend Strength is used only for the regression glow.
It combines:
60% Weighted R².
40% normalized Slope / Standard Error.
It does not affect the regression or signals.
ATR(14) is used only to scale the visual width of the glow and flip bloom to the instrument.
Input Guide
Regression Length
Controls the size of the rolling regression sample.
Projection Bars
Controls how far the current fitted slope is extended visually.
Variance Length
Controls how quickly the residual-variance estimate changes.
Variance Model
Selects EMA, RMA or Rolling Mean smoothing of squared residuals.
Weight Power
Controls the strength of inverse-variance weighting.
Variance Regularization
Reduces extreme differences between weights.
Minimum / Maximum Relative Weight
Limits how little or how much influence any one observation can receive.
Channel Width
Selects Weighted Residual RMS or Regression Standard Error.
Channel Multiplier
Scales the regression channel.
Poor Fit Expansion
Optionally widens the channel as R² deteriorates.
Quality Confirmation
Requires minimum regression fit and slope quality before allowing trend flips.
How to use it
The indicator can be used as:
A regression-based trend filter.
A comparison between ordinary and variance-weighted regression.
A way to study how residual-based weighting changes a rolling trend estimate.
A trend-quality filter using R² and slope strength.
A regression channel for visualizing fit dispersion.
The OLS Comparison and Data Window values are particularly useful when testing the weighting settings, because they show whether the extra weighting is materially changing the regression or simply producing a result close to ordinary least squares.
Limitations
The variance estimates are derived from OLS residuals inside the same rolling window.
The model is a custom two-stage weighted regression rather than a full generalized least-squares procedure.
Higher Weight Power can concentrate the fit in a relatively small part of the sample.
Linear regression cannot represent every type of market structure.
High R² does not imply future trend continuation.
The forward projection is only a linear extrapolation of the current fit.
Quality Confirmation can reduce weak flips but can also delay genuine changes in direction.
Data Window
The script exposes:
Weighted Slope.
Weighted R².
Slope / Standard Error.
Weighted Residual RMS.
Regression Standard Error.
Current Relative Weight.
Effective Sample Size.
Trend Strength.
Alerts
The indicator includes:
Variance-Weighted Regression Bullish: trend changes from bearish to bullish.
Variance-Weighted Regression Bearish: trend changes from bullish to bearish.
Variance-Weighted Regression Flip: either transition occurs.
Summary
Variance-Weighted Regression Trend starts with a normal rolling OLS regression, measures the residual variance around that fit, and uses those estimates to assign relative weights to the observations in a second regression.
The weighting strength, variance smoothing, regularization and weight limits are all configurable, making it possible to move from essentially equal-weight OLS to a much more selective fit.
The final weighted slope controls the trend state, while Weighted R² and the Slope / Standard Error score can optionally be used to filter weak reversals.
Regression channels, OLS comparison, forward projection and the visual strength system provide additional context around the core weighted regression without changing the underlying trend logic.
指標

MA Ribbon Aurora_Channel_V1 (DRIZZLE_ALGO56) MA Ribbon with Aurora Channels UI
█ Overview
MA Ribbon with Aurora Channels UI is an experimental indicator designed to modernize the classic Moving Average Ribbon. Instead of relying on static trailing averages—which frequently lag during sharp structural shifts—the system fuses custom MA ribbons with Flipped (Inverse) Ribbon Dynamics, Volume Expansion Multipliers, and Asymmetrical Wick Ratios, wrapped inside a real-time HUD interface.
The indicator converts standard ribbon dispersion into a multi-layered, volatility-adaptive envelope (Core Channel, Expansion Envelope, and Trigger Buffer). The channel automatically expands during high-volume momentum breakouts and contracts during low-volatility consolidation phases.
⚠️ Author Note: This project is an experimental research prototype. Optimal performance requires manual tuning of parameter settings (smoothing lengths, volume sensitivity, and width multipliers) based on your target asset, timeframe, and prevailing market regime.
█ How It Works
⚪ Dynamic Midline Engine
The system averages all active moving averages (supporting SMA, EMA, SMMA, WMA, VWMA) to create a central equilibrium reference line.
⚪ Flipped Ribbon & Width Engine
Rather than relying purely on standard moving average distance, the indicator calculates inverse mirror projections for every active ribbon line to measure true structural price dispersion:
flip = 2 * source - ma
The maximum deviation across normal and flipped lines defines the raw channel width, which is then smoothed using an exponential moving average:
rawWidth = math.max(math.abs(diff1), math.abs(diff2), math.abs(diff3), math.abs(diff4))
⚪ Volume-Driven Expansion
Channel width dynamically scales upward when volume participation exceeds its baseline moving average, ensuring bands react instantly to institutional volume spikes:
volRatio = volume / volMa
volBoost = 1.0 + math.max(0.0, volRatio - 1.0) * volSens
⚪ Asymmetrical Wick Balancing
Upper and lower envelope boundaries expand independently based on the ratio of directional wicks relative to ATR. This prevents false boundary breaches caused by one-sided wick rejections:
upAsym = 1.0 + asymStr * (ur / math.max(atrVal, syminfo.mintick))
dnAsym = 1.0 + asymStr * (lr / math.max(atrVal, syminfo.mintick))
⚪ Aurora Multi-Layer Bounds
The engine calculates three distinct volatility zones:
Core Channel: The primary equilibrium zone surrounding the midline.
Expansion Envelope: Outermost normal volatility bounds where directional acceleration occurs.
Trigger Buffer: An extreme extension boundary for mean-reversion cues.
⚪ Signal Engine & HUD Dashboard
The script tracks zone transitions, logging whether a boundary breach represents a 1st Touch or a Retest. The real-time HUD table tracks current zone regime, duration, ribbon compression percentage, active volume boost, and touch history directly on the chart.
█ How to Use
⚪ Volatility Contraction & Compression
When the Ribbon Tightness value on the HUD falls below 30%, the MA ribbon is in deep compression. Price residing strictly inside the Core Channel signals neutral range consolidation prior to a breakout.
⚪ Trend Expansion & Momentum Setup
A candle close outside the Expansion Envelope indicates institutional volume acceleration. Look for 1st Touch (triangle) or Retest (circle) shapes for momentum entries aligned with expanding channel width.
⚪ Mean-Reversion / Profit-Taking Setup
When price reaches or breaches the outer Trigger Buffer, market expansion is overextended. Look for mean-reversion rejections back toward the Core Channel or Midline.
█ Settings
MA Ribbon Inputs
MA #1 – #4: Enable or disable up to four independent moving averages. Select the MA type (SMA, EMA, SMMA, WMA, VWMA), source, length, and plot color.
Display
Show Normal / Flipped Ribbon: Toggle visibility of standard ribbon lines or mirror projections.
Show Core / Envelope / Trigger: Toggle individual channel layer visibility.
Show Dashboard & Position: Enable the real-time HUD and select its chart overlay anchor.
Show Signal Shapes: Enable breakout and retest signal markers.
Channel Engine
Core Multiplier: Sets the width multiplier for the inner fair-value channel.
Envelope Multiplier: Controls the distance of the momentum envelope bounds.
Trigger Buffer Multiplier: Controls the outer overextension boundary.
Width & Edge Smoothing: Sets the EMA smoothing applied to raw dispersion and final channel edges.
Volume MA Length & Sensitivity: Adjusts how strongly volume spikes expand channel boundaries.
Asymmetry Strength: Controls how aggressively upper/lower bounds deform in response to long wicks.
Colors
Core Upper / Lower: Custom colors for the inner channel clouds.
Envelope / Trigger / Midline: Color selection for boundary lines and fill layers.
Cloud Transparency: Adjusts the opacity gradient of background fills.
Disclaimer
The content provided in my scripts, indicators, ideas, algorithms, and systems is for educational and informational purposes only. It does not constitute financial advice, investment recommendations, or a solicitation to buy or sell any financial instruments. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs. 指標

Dynamic Deviation Channels (RSI Trigger) [ChartPrime]Dynamic Deviation Channels (RSI Trigger)
🔶 OVERVIEW
Standard volatility channels paint static bands across your entire chart, ignoring shifting market momentum and leading to false breakouts in trending environments. The Dynamic Deviation Channels (RSI Trigger) solves this by combining ATR-based volatility bands with a dynamic Relative Strength Index filter.
Instead of showing overlapping channels on both sides simultaneously, the indicator intelligently displays upper bands only when momentum is bullish/neutral and lower bands only when momentum shifts bearish, keeping your workspace clean and focused on active market participation zones.
🔶 HOW IT WORKS
The indicator processes market structure and momentum through a multi-stage execution pipeline:
Adaptive Mid-Line Trend Matrix: Computes a configurable moving average (SMA, EMA, WMA, or RMA) to serve as the central channel baseline, dynamically coloring itself based on short-term price slopes.
ATR Volatility Multipliers: Expands outward from the central basis using multi-tiered ATR deviations to establish structured Level 1, Level 2, and Level 3 boundary channels.
RSI Directional Filtering: A smoothed RSI engine checks prevailing momentum state. When the RSI value is at or above 50, upper channel bands activate; when it drops below 50, lower channel bands engage.
Smart Signal Generation: Plots precise entry triangles when price interacts with the primary deviation bands, utilizing a built-in bar gap control to prevent signal clustering.
🔶 KEY FEATURES
Conditional Band Rendering: Automatically hides inactive channel zones based on RSI momentum thresholds, eliminating chart clutter during strong directional trends.
Multi-Tiered Deviation Zones: Features three distinct deviation multiplier levels with custom background fills to highlight volatility expansion and over-extension zones.
Glowing Mid-Line Display: A highlighted central moving average complete with a soft glow effect for immediate trend-direction recognition.
Live Deviation Labels:** Clean, real-time price labels pinned to the final bar of each active upper and lower deviation boundary for instant reference.
🔶 TRADING APPLICATIONS
Momentum-Aligned Rebounds:** When lower bands are active during a bearish-to-neutral momentum phase, look for price rejections off Deviation Level 1 or 2 to catch high-probability counter-trend bounces.
Volatility Expansion Breakouts:** Monitor price interaction with outermost Level 3 bands. A clean break past these boundaries during high-volatility regimes signals an aggressive continuation move.
Trend Filtering via Mid-Line:** Use the glowing central moving average slope and color state to determine primary bias before taking entries off individual deviation levels.
🔶 SETTINGS
Moving Average (Length / Type): Controls the lookback period and calculation method (SMA, EMA, WMA, RMA) for the central baseline channel.
RSI Filter (Length / Source): Adjusts the sensitivity and data input source used by the momentum filter engine to toggle upper and lower band visibility.
Deviation Bands (Multipliers / Display Toggles): Customizes the width spacing for all three deviation tiers and lets you toggle the visibility of the outermost channels.
🔶 CONCLUSION
The Dynamic Deviation Channels (RSI Trigger) brings clarity to volatility channel analysis. By filtering band display through real-time RSI momentum, it ensures you are only looking at the structural levels that matter most for your current market direction. 指標

MarketMaulers Auto TrendlinesMarketMaulers Auto Trendlines draws the diagonal structure you would have drawn yourself, and then stays with the line through the part that matters. Two confirmed pivots anchor it, the market's own touches validate it, and its parallel rail is projected through the furthest price travelled while the line was forming. Then it waits for the break, and reports which of the only two things that can follow a break took place.
Forming · Validated · Broken · Retested / Failed break
THE RETEST IS THE PRODUCT
Anyone can draw a line through two pivots and print a marker when price closes through it. The break is the least informative moment in a trendline's life. Most lines break, and the break on its own says nothing about whether the level still matters.
Two things can follow, and they mean opposite things.
• RETEST. Price comes back and respects the line from the OTHER side. Old support is now resistance. The line survived its own break as a reference and is arguably more useful after it than before.
• FAILED BREAK. Price closes straight back on the original side. The break was noise, the line was never beaten, and anyone who traded the break is offside.
This tool waits for one of those and names it. That is the read you cannot get by eyeballing the chart in the moment, because in the moment the two look identical.
FROM ZERO: WHY A DIAGONAL LINE IS A DIFFERENT ANIMAL FROM A HORIZONTAL ONE
A horizontal level is a price. It sits at one number and it is still that number tomorrow. A trendline is a price AND a rate. It asks the market to keep making higher lows at a certain speed, or lower highs at a certain speed. That is a much stronger claim, which is why trendlines break more often than horizontal levels and why the break carries less information when they do.
It is also why a line has to be earned rather than drawn. Two points define any line at all. Three or more touches is the market repeatedly agreeing to the rate.
HOW A LINE EARNS ITS PLACE
Five gates, each closing a specific way auto-trendline scripts produce clutter.
• Confirmed pivots only, paired for direction. A rising support line needs a second swing low strictly HIGHER than the first, a falling resistance line a second high strictly lower. A zero slope is unreachable by construction, so this file never draws a horizontal line.
• A cleanliness scan. Every bar between the two anchors is checked for a close through the line. A line price has already spent time on the wrong side of was never a valid line, and drawing it anyway is how a chart fills with lines nobody would have drawn by hand.
• Touch counting with a spacing rule. A touch is a bar reaching within a quarter of an ATR of the line, and touches within three bars of each other count once. Without the spacing rule one slow drift along a line counts as five touches and validates anything.
• Near-duplicate rejection. Two lines are compared at two sample points, now and fifty bars back, and the newer one is dropped if they sit within 0.75 ATR at BOTH. Comparing at a single point lets two lines with different slopes look identical at the moment they cross.
• A slope cap and abandoned-line retirement. Near-vertical lines off a single spike are refused, and a line price has stayed far away from for twenty consecutive bars is retired. That is what keeps ancient support lines from hanging under current price forever.
TWO WAYS A LINE BREAKS, AND THE SECOND ONE IS THE INTERESTING ONE
The obvious break is distance: a close sitting at least 0.35 ATR beyond the line. That catches the decisive break and it misses the slow one.
Price can park a fraction through a line, too shallow to trigger the distance test and too close to trigger retirement, and grind there bar after bar. Under a distance-only rule the line stays marked VALIDATED with price on the wrong side of it for as long as the grind lasts, which is a tool stating something false. So three consecutive wrong-side closes break a line at any distance. Decisive breaks are caught by distance, grinds by persistence, and there is no state left where the display and the price disagree.
A RETESTED LINE GOES BACK TO WORK
Most implementations treat the retest as the end of a line's life, which is backwards from what the retest proves. A line that broke, was left alone, and then held from the other side has demonstrated it still matters, and the tools that go quiet there stop watching at the exact moment the line earned its keep.
The mechanism is a POLARITY FLIP rather than a new line. Old support becomes resistance, so the side the break test looks at flips while the line's geometric identity does not. It is still a rising line, it keeps its color and its channel offset, and it starts being tested for a break to the upside. The label carries R1, R2, R3 so a twice-proven line is visibly different from a fresh one, and the cycle is capped at three, after which retested is terminal. A line oscillating around price cannot churn forever.
The status card reports both facts rather than picking one. RISING · RES is a rising line currently acting as resistance. Unflipped lines read RISING · SUP and FALLING · RES, which is what they always meant, said out loud.
THE CHANNEL
Once a line is validated, its parallel rail is projected through the furthest the market travelled away from it while the line was forming. The rail comes from a real extreme rather than from a statistical fit, so the width means something specific: this is how far this structure has been willing to travel from its own floor. Fill and opacity are yours to set, and the fill carries the state, so there is no color legend to memorize.
CONVERGENCE, WITH A TIME
Two validated lines with different slopes meet at an apex, and an apex is a price AND a bar. That is a triangle or a wedge resolving, one of the oldest readable objects in chart reading. It needs both lines retained as DATA rather than as drawings, which is why most auto-trendline scripts cannot offer it at all.
It is reported on the card and alerted, not drawn. A marker painted into future bars would say the same thing and add a drawing to a chart whose whole design rule is fewer marks. And it is a fact, not a forecast: it says where and when the structure runs out of room, not what happens when it gets there.
HIGHER TIMEFRAME LINES
A second engine, off by default, sharing the concepts of the chart-timeframe engine and none of its code paths. If the higher-timeframe layer is wrong, the layer you already trust keeps working.
Why most higher-timeframe trendline overlays are unsound is worth stating. A security call hands back prices. It does not hand back the ability to walk backwards through higher-timeframe bars, and the cleanliness scan IS a walk. So an HTF line built off a plain security read cannot be validated the way a chart line is, and most implementations quietly skip the check. Here, completed higher-timeframe bars are pushed into a ring buffer as they close and the whole HTF engine walks those. A real scan, real HTF touches, and a break that is a real HTF close through the line.
Breaks are judged by the timeframe that OWNS the line. A 15m candle closing through a 4H trendline is not a 4H close, and treating it as one is the most common way an HTF overlay lies. The visible consequence is that an HTF line can die up to one HTF bar later than the chart makes it look like it should. That is correct, and it will look wrong the first time.
What the HTF layer deliberately does not do, each one a decision rather than an omission: no channel, no polarity flip, no apex participation, and no separate alerts. The rail is measured by the same pass that validates the chart line. Converging HTF and chart slopes needs a unit conversion that is wrong the moment the chart timeframe changes. And two engines firing the same alert would double every notification. One slot, defaulted off, because new surface gets proven before it gets duplicated.
THE STATUS CARD
Six live lines on a chart and no way to tell which one matters this bar. The card names the nearest line, the distance to it in points and in ATR, its geometry and its current role, how many broken lines are still awaiting a verdict, and the soonest apex. A table rather than a label, because a label draws inside the price pane and loses the z-order fight with candles.
ALERTS
Trendline validated · Trendline broken · Trendline retest confirmed · Failed trendline break · Trendline convergence approaching
The convergence alert is the one worth leaving on. The other four report something that has already finished, which is useful for a journal. Convergence is the one thing the tool knows about the future, so it is the one alert that can reach you while there is still something to do about it. It is edge-triggered: it arms while the apex is beyond your warning distance and fires once on the way in, rather than firing every bar of the approach until you mute it forever.
WHY IT DOES NOT REPAINT
Lines anchor on confirmed pivots only, and a pivot is not known until the required bars have closed after it. Every state change is judged on a closed bar. The chart-timeframe engine contains no security call at all, and the higher-timeframe engine reads only completed HTF bars, never the one in progress, using the last-closed idiom with an atomic tuple so high, low, close and time cannot straddle a boundary. The cost is a deliberate lag of a few bars on every anchor, and that lag is the guarantee.
WHAT THIS TOOL IS NOT
It draws structure. It shades no band, marks no zone, and makes no claim about resting orders anywhere. When a broken line is reclaimed, this tool calls it a FAILED BREAK, which is a statement about structure and is what the price action supports on its own. A liquidity tool looking at the same bar would call it a sweep, which is a statement about order flow. Same behavior, different claim, and only one of them is visible on the chart.
MADE TO FIT YOUR CHART
Eight card positions, three text sizes, separate colors for rising and falling lines and for their higher-timeframe counterparts, line width, channel fill and opacity, labels on or off, and a toggle per section. Detection, channel, break and retest, style, higher timeframe, card and alerts are separate groups. Pivot length, minimum touches, maximum active lines, the slope cap, the retirement distance, the retest confirmation mode and the retest window are all exposed.
HOW TRADERS ACTUALLY USE IT
Pivot Length decides everything downstream, because it decides which swings exist to be paired. If the chart looks emptier than you expect, that is the first knob, ahead of the touch count.
Minimum touches is the honesty dial. Two touches is a line you drew. Three is a line the market drew. Three is the default for that reason.
Treat a break as the question and the following bars as the answer. Wait for RETESTED or FAILED before deciding what the break meant. The whole tool is built so you do not have to guess which one you are sitting in.
Works on any market and any timeframe.
Display only. This draws structure and reports what happened to it, it does not fire buy/sell signals and it does not forecast. Educational tool, not financial advice.
Published open-source. The pivot pairing and cleanliness scan, the near-duplicate rejection, the two-mode break test, the polarity-flip lifecycle, the apex pre-filter and the higher-timeframe ring buffer are all readable in the source. Everything above explains what it draws and how it decides what to draw; the code is there so you can check that the description is accurate rather than take it on faith. Read it, fork it, argue with the constants. 指標

Keltner Rings [Quantum Algo]Keltner Rings
═══════════════════════════════════════════════
🔶 OVERVIEW
Keltner Rings is a complete reading system built on Keltner Channels — volatility bands placed around an exponential moving average, with width set by the Average True Range. Three nested rings form a gradient volatility field around price, a regime classifier determines what kind of market you are actually in, and the dashboard translates it into plain instructions: when riding the upper band is strength, and when the very same touch is fade material.
That distinction is the heart of this tool. The most common way traders lose money with any channel indicator is applying range logic in a trend — shorting an upper-band touch while price is band-walking higher. Keltner Rings classifies the regime first, interprets every touch accordingly, generates three distinct signal families, and scores each family's historical performance on your exact symbol and timeframe.
═══════════════════════════════════════════════
🔶 WHAT ARE KELTNER CHANNELS?
Keltner Channels are volatility-based bands around a moving average. The concept originates with Chester W. Keltner (1960); the modern formulation — an exponential moving average with bands offset by multiples of the Average True Range — was popularized by Linda Bradford Raschke. Because the Average True Range expands and contracts with real movement, the channel breathes with the market: wide in storms, tight in calm.
This tool extends the classic single channel into three rings — inner, middle and outer — creating a graded map of how far price has traveled from its average in volatility-adjusted terms.
═══════════════════════════════════════════════
🔶 WHAT IS A BAND WALK?
In a genuine trend, price does not oscillate politely around its average — it presses against the channel and rides it, closing beyond the inner ring bar after bar. This is the band walk, and it is the single most misread behavior in channel trading: it looks overbought, and it is actually strength. Keltner Rings detects the walk explicitly (a configurable count of consecutive closes beyond the inner ring), paints the walking bars in full trend color, and marks the walk's beginning as a continuation signal rather than a fade.
═══════════════════════════════════════════════
🔶 WHY IS THIS ORIGINAL?
1. Regime-aware interpretation. The classifier combines average slope, band-walk state, squeeze condition and the channel's own width percentile into four regimes — Trend Up, Trend Down, Range, Squeeze — and the dashboard's "How To Read It" row states, live, how touches should be interpreted right now. The tool teaches its own correct usage.
2. Three signal families, separated on purpose. W marks the start of a band walk with the trend (continuation). R marks a middle-ring rejection in a range regime only (reversion, exactly where reversion belongs). S marks a squeeze release through the inner ring (expansion). One tool, three behaviors, never confused with each other.
3. Per-family statistics on your chart. Every family's ten-bar outcomes are tracked in first-in-first-out samples, shrunk toward neutral at small sizes, with Wilson lower bounds. Each signal's tooltip quotes its own family record on the current symbol at the moment it prints — and the dashboard shows all three records side by side.
4. The width cone. Channel width is ranked as a percentile inside its own recent history, so "tight" and "wide" are defined by this symbol's behavior, never by fixed numbers.
5. The squeeze, credited and integrated. Bollinger Bands closing inside the Keltner ring — the compression concept popularized by John F. Carter — is detected with duration tracking, gold coil markers on the average, and directional release signals.
═══════════════════════════════════════════════
🔶 HOW IT WORKS
— The exponential average and Average True Range build three rings at configurable widths; five gradient fills render the volatility field between them.
— Average slope, walk counters, squeeze state and width percentile feed the regime classifier every bar.
— Signals: W fires when the walk count is reached with the trend; R fires on middle-ring rejections in range regimes; S fires when a mature squeeze releases through the inner ring.
— Each family's outcomes feed its own statistics; the dashboard and tooltips report them with sample counts.
All signals are evaluated on confirmed bars and do not repaint. All drawings are capped for performance.
═══════════════════════════════════════════════
🔶 HOW TO USE IT
— Read the regime row first, then the guidance row — they tell you which of the three signal families is currently in its natural habitat.
— In trends: treat inner-ring pullbacks as entries in the trend direction, and let the painted band walk carry the position; the walk ending is your first warning.
— In ranges: middle-ring touches with rejection candles target the average — the R family's record shows how this symbol has respected that logic.
— In squeezes: the coil duration and width percentile tell you how compressed the spring is; the S release gives the direction, and the family record tells you how trustworthy releases have been here.
— Works on all markets and timeframes; every threshold is volatility-adjusted or percentile-based, so nothing needs retuning per symbol.
═══════════════════════════════════════════════
🔶 SETTINGS
— Keltner Channels: exponential average length, Average True Range length, three ring widths.
— Regime & Signals: trend slope threshold, band-walk bar count, width history window, cooldown, squeeze ring width.
— Statistics: sample cap, minimum samples, shrinkage strength, Wilson z-score.
— Visuals and dashboard: full color control, band-walk painting toggle, position and text size.
═══════════════════════════════════════════════
🔶 ALERTS
— Squeeze Started — compression began.
— Squeeze Release Up / Down — compression resolved through the inner ring.
— Band Walk Started — consecutive closes locked beyond the inner ring with the trend.
— Reversion Signal — middle-ring rejection in a range regime.
═══════════════════════════════════════════════
🔶 FAQ
Q: How is this different from standard Keltner Channels?
A: The standard indicator draws one channel and leaves interpretation to you — including the fatal ambiguity of what an upper-band touch means. This tool adds the regime classifier, the three-ring field, the band-walk engine, explicit signal families for continuation, reversion and expansion, and per-family statistics, so every touch arrives with its context and its track record.
Q: Does it repaint?
A: No. All signals are evaluated on confirmed closes; a printed signal never changes.
Q: Keltner Channels or Bollinger Bands?
A: They answer different questions. Bollinger Bands use standard deviation and react sharply to close-to-close variance; Keltner Channels use the Average True Range and breathe more smoothly with the full bar range. This tool uses both — the channel as the structure, and the Bollinger relationship as the squeeze detector.
Q: What do the family percentages mean?
A: The share of past signals in that family after which price had moved favorably ten bars later, on the current symbol and timeframe, shrunk toward fifty percent at small samples. They describe history — they are not predictions.
Q: Which settings matter most?
A: Band Walk Bars (higher = stricter walks, fewer W signals) and the ring widths — the defaults of one, two and three Average True Ranges follow common practice and suit most markets.
═══════════════════════════════════════════════
🔶 CREDITS
The original channel concept is by Chester W. Keltner (1960); the modern exponential-average and Average True Range formulation was popularized by Linda Bradford Raschke. The Average True Range is by J. Welles Wilder Jr. (1978). Bollinger Bands are by John Bollinger, and the band-compression squeeze concept was popularized by John F. Carter. The Wilson score interval is by Edwin B. Wilson (1927). The regime classifier, three-ring field, band-walk engine, signal families, per-symbol statistics and all code in this script are original work — no third-party or open-source script code was reused.
═══════════════════════════════════════════════
🔶 LIMITATIONS
— Regime classification is descriptive, not predictive: regimes are identified as they form, and transitions are only visible once underway.
— Reversion logic is disabled by design outside range regimes; traders who want to fade trends will not find those signals here.
— Statistics describe the current chart's history only; past frequencies never guarantee future outcomes.
═══════════════════════════════════════════════
🔶 DISCLAIMER
This indicator is a research and charting tool provided for educational purposes. It is not financial advice, and nothing it displays is a recommendation to buy or sell any asset. Trading involves substantial risk of loss. Always do your own analysis and manage risk responsibly. 指標

XauLabs Liquidity LevelsENGLISH
What it does
Most tools draw every swing high and low the same way. This one counts. A level touched four times without being broken is not the same object as a level touched once, and the script says so on the chart: line thickness and shading grow with the number of touches, and the count is written next to each zone. It also draws the diagonal along which lows keep rising — the sloping counterpart of a horizontal level — and marks the places where the two meet.
How it works (full method)
Confirmed pivots only. A swing is registered when it dominates a set number of bars on both sides (8 by default). The right-hand bars are what make the tool non-repainting: a level appears with that delay and never moves afterwards. The dashboard states the delay in plain sight.
Grouping into zones. Each new pivot is compared to existing levels. If it falls within a tolerance expressed in ATR (0.12 by default), it counts as the same zone and the counter increases. The zone is drawn as a band spanning the actual spread between its touches — equal highs and equal lows are rarely exactly equal, and the band shows the real width.
Weight by touches. Border, shading and the printed count all scale with the number of touches. Two touches is a pair of equal highs; four is a wall the market keeps returning to. By default only zones with at least two touches are displayed — single pivots are noise.
Sweeps are marked, not erased. When price wicks beyond a zone and closes back inside, the zone turns dotted grey and is labelled swept. It stays on the chart: what happened is part of the reading. Single-touch levels are never labelled swept — that is an ordinary break of structure, not a liquidity event.
Liquidity trendline. The script searches all pairs of confirmed pivots for the ascending line that the most lows have respected, with a tolerance of its own (0.5 ATR by default) because a diagonal spanning hours cannot hug prices to the cent. A low sitting above the line is not a violation — only a low clearly beneath it invalidates the line. Where several candidates tie, the oldest anchor wins, so the line starts at the origin of the move. The touch count is printed at its right end.
Confluence. When the projected diagonal reaches a horizontal zone, both are recoloured and marked. That intersection is where a horizontal cluster and a sloping one arrive together.
Recovery. If price closes below the diagonal, the script frames the area between the break and the current low, and names it: the diagonal and the equal lows have to be reworked.
Housekeeping. Zones further than a set distance from price, or older than a set number of bars, are removed. Beyond the display cap, the least-touched zones go first — an accumulation zone far from price outranks an isolated pivot nearby.
On what "liquidity" means here
The script measures touches, which is observable. The idea that stop orders accumulate behind repeatedly defended levels is an interpretation of that measurement, and a common one, but it is not something a chart can prove. The distinction matters: what you see counted is real, what it implies about resting orders is a reading.
No repainting
Pivots are confirmed by the right-hand bars and never revised. Zones extend forward as bars close; sweeps are evaluated on closed bars only. The diagonal is recomputed on the last bar because new pivots can extend it, which is stated here rather than hidden.
Settings
Pivot width, equality tolerance, minimum touches, maximum zones, distance and age filters, sweep marking and quota, diagonal tolerance, anchor depth, projection length, confluence and recovery marking, colours, dashboard and text size.
Educational structural tool. It gives no buy or sell signals and makes no performance claim. Trading involves substantial risk of loss.
FRANÇAIS
Ce que fait l'indicateur
La plupart des outils dessinent tous les sommets et creux de la même façon. Celui-ci compte. Un niveau touché quatre fois sans être franchi n'est pas le même objet qu'un niveau touché une fois, et le script le dit sur le graphique : l'épaisseur et l'intensité augmentent avec le nombre de touches, et le compte est écrit à côté de chaque zone. Il trace aussi la diagonale le long de laquelle les creux montent — l'équivalent en pente d'un niveau horizontal — et marque les endroits où les deux se rejoignent.
Comment il fonctionne (méthode complète)
Uniquement des pivots confirmés. Un pivot est enregistré quand il domine un nombre fixé de bougies de chaque côté (8 par défaut). Ce sont les bougies de droite qui rendent l'outil non-repainting : un niveau apparaît avec ce délai et ne bouge plus ensuite. Le tableau de bord affiche ce délai en clair.
Regroupement en zones. Chaque nouveau pivot est comparé aux niveaux existants. S'il tombe dans une tolérance exprimée en ATR (0,12 par défaut), c'est la même zone et le compteur augmente. La zone est tracée comme une bande couvrant l'écart réel entre ses touches — des equal highs ne sont presque jamais exactement égaux, et la bande montre la largeur véritable.
Le poids vient des touches. Bordure, intensité et compte affiché suivent le nombre de touches. Deux touches, c'est une paire d'equal highs ; quatre, c'est un mur où le marché revient sans cesse. Par défaut, seules les zones à deux touches minimum s'affichent — un pivot isolé est du bruit.
Les balayages sont marqués, pas effacés. Quand le prix dépasse une zone en mèche et clôture en deçà, elle passe en gris pointillé avec la mention « balayé ». Elle reste au graphique : ce qui s'est passé fait partie de la lecture. Un niveau à une seule touche n'est jamais marqué balayé — c'est une cassure de structure ordinaire, pas un événement de liquidité.
Diagonale de liquidité. Le script examine toutes les paires de pivots confirmés pour retenir la droite ascendante que le plus de creux ont respectée, avec une tolérance qui lui est propre (0,5 ATR par défaut) : une diagonale qui traverse plusieurs heures ne peut pas coller au centime. Un creux situé au-dessus de la droite n'est pas une violation — seul un creux nettement dessous l'invalide. À égalité, l'ancrage le plus ancien gagne : la droite part de l'origine du mouvement. Le nombre de touches est écrit à son extrémité.
Confluence. Quand la diagonale projetée rejoint une zone horizontale, les deux sont recolorées et signalées. C'est l'endroit où un amas horizontal et un amas en pente arrivent ensemble.
Récupération. Si le prix clôture sous la diagonale, le script encadre la zone entre la cassure et le plus bas atteint depuis, et la nomme : la diagonale et les equal lows sont à retravailler.
Entretien. Les zones trop éloignées du prix ou trop anciennes disparaissent. Au-delà du plafond d'affichage, ce sont les moins touchées qui partent en premier — une zone d'accumulation lointaine vaut mieux qu'un pivot isolé tout proche.
Sur le mot « liquidité »
Le script mesure des touches, ce qui est observable. L'idée que des ordres stop s'accumulent derrière les niveaux défendus plusieurs fois est une interprétation de cette mesure, très répandue, mais qu'un graphique ne peut pas démontrer. La distinction compte : ce que vous voyez compté est réel, ce que cela suppose des ordres en attente est une lecture.
Aucun repaint
Les pivots sont confirmés par les bougies de droite et ne sont jamais révisés. Les zones s'étendent vers l'avant à mesure que les bougies clôturent ; les balayages sont évalués sur bougies closes uniquement. La diagonale est recalculée sur la dernière bougie parce que de nouveaux pivots peuvent la prolonger — c'est écrit ici plutôt que caché.
Réglages
Largeur de pivot, tolérance d'égalité, touches minimum, zones maximum, filtres de distance et d'âge, marquage et quota de balayages, tolérance de la diagonale, profondeur d'ancrage, longueur de projection, marquage des confluences et des récupérations, couleurs, tableau de bord et taille du texte.
Outil structurel à but éducatif. Il ne donne aucun signal d'achat ou de vente et ne formule aucune promesse de performance. Le trading comporte un risque de perte important. 指標

SmartFit Trend Channels [MarkitTick]💡 This tool builds a linear regression channel that does not sit on a fixed, arbitrary lookback window. Instead, it continuously re-anchors itself at confirmed swing pivots, filters its regression source through a selectable adaptive smoothing stage, validates every channel against a statistical fit-quality test, and optionally gates its breakout signals behind a trend-strength filter. Confirmed breakouts trigger directional alerts (including ready-to-route webhook JSON payloads), while a compact on-chart dashboard keeps the current channel's statistics visible at all times.
✨ Originality and Utility
Most regression-channel tools on the platform work from a single static bar count chosen by the user, redraw the entire channel on every bar, and offer no way to judge whether the underlying price action is actually behaving linearly enough for a straight-line model to be meaningful. This script addresses all three limitations at once. It measures channel validity using the Pearson correlation coefficient rather than assuming a regression fit is automatically useful, it restarts its lookback window dynamically at the most recent statistically valid swing pivot rather than a fixed period, and it finalizes historical segments as discrete drawn objects instead of continuously repainting a single line across the whole chart.
● Why These Components Are Combined
The regression engine, the pivot-anchoring logic, the adaptive source filter, the ADX gate, and the merge engine are not stacked together arbitrarily; each solves a specific weakness left open by the others. The adaptive smoothing stage reduces the high-frequency noise that a raw-price regression is otherwise highly sensitive to. The pivot-anchoring logic solves the "where should this channel actually start" problem that fixed-length regression channels never address. The Pearson fit-quality filter prevents the tool from drawing a confident-looking straight line through what is statistically a sideways, non-linear market. The ADX filter exists specifically to reduce breakout signals firing inside genuinely trendless conditions. The merge engine exists to prevent the chart from filling with redundant, near-identical channel segments once the pivot-anchoring logic starts producing frequent restarts on lower timeframes. Together, these form one coherent statistically-aware channel system rather than five unrelated features bundled for the sake of it.
🔬 Methodology and Concepts
● Regression Engine
At its core, the script performs an ordinary least-squares linear regression across the bars since the current channel's anchor point, producing a slope and intercept that define the channel's midline. This calculation always runs on confirmed, closed price data, never on the live forming bar.
● Statistical Validity Filter
Every regression is scored with the Pearson correlation coefficient, which measures how well price actually fits a straight line on a scale of -1 to 1. A minimum bar count and a minimum absolute correlation strength (both user-configurable) must be met before a channel, or a breakout signal derived from it, is considered valid. Channels that fail this test are still drawn, but are visually flagged as low-confidence rather than treated as a directional signal.
● Deviation Bands
Upper and lower channel boundaries are placed a user-defined number of standard deviations away from the regression midline, based on the vertical dispersion of price around that line. This produces a statistically scaled envelope rather than a fixed-percentage or fixed-tick band.
● Adaptive Source Filter
Instead of regressing on raw closing price, the script can first pass price through one of several smoothing methods, selectable per chart:
SMA / EMA / RMA — standard simple, exponential, and Wilder-smoothed moving averages, offered as baseline options with different responsiveness-to-noise tradeoffs.
Double WMA — a weighted moving average smoothed a second time through another weighted pass, trading additional lag for a cleaner underlying line.
Triple VWMA — a volume-weighted moving average smoothed through three successive passes, intended for instruments where volume-weighting the trend estimate is meaningful.
HMA — a low-lag moving average designed to track price more closely than a standard average of the same length.
LLAMA — a proprietary MarkitTick method that blends a simple average baseline with a linear slope term measured across the filter length, effectively projecting the recent directional momentum forward onto the smoothing output rather than only averaging past values.
Kalman Filter — a recursive single-state estimator that continuously balances its own prediction against each new price print, with the filter length controlling how much weight is given to new information versus the existing estimate.
Selecting "None" regresses directly on the previous confirmed close.
● Dynamic Pivot Anchoring
The script tracks confirmed swing highs and swing lows using a symmetric bar-confirmation window (either auto-scaled to the chart's timeframe or manually set). These pivots are only accepted once enough bars have closed on both sides of the candidate bar to confirm it, so no pivot is ever assumed before it is actually confirmable. When a breakout occurs, the script evaluates whether the most recent opposite-type pivot has a strong enough regression fit of its own to serve as a more representative channel origin; if it does, the newly drawn segment is anchored there instead of at the current bar.
● Confirmation Lag Notice
Because segment anchors are only finalized once a breakout confirms them, a newly drawn historical segment's starting point is placed at a bar in the past, after the fact. This is standard behavior for any pivot-anchored channel tool and does not involve unconfirmed or future data, but it does mean the visual origin of a finalized segment was not known in real time at that bar; it becomes fixed only once the breakout that closes out the prior segment occurs.
● Channel Merge Logic
When enabled, a newly forming channel is compared against the band edges of the segment it is replacing. If the gap between them falls within a user-selected tolerance (expressed as a multiple of the current standard deviation), no new discrete segment is drawn and the channel is treated as a continuation. This keeps visually similar, closely-spaced channels from cluttering the chart as separate labeled objects.
● ADX Trend Filter
An optional Average Directional Index filter can require a minimum trend strength reading before a breakout is allowed to register as a directional signal, reducing the number of signals generated while the market is directionless.
● Breakout Signal Logic and Webhook Alerts
A directional signal fires only on a confirmed bar, only when the minimum bar count and fit-quality thresholds are met, and only once per new breakout (not on every bar the price remains beyond the band). Each signal type — long entry, short entry, and their corresponding opposite-side close — has its own configurable action label, which is packaged into a JSON payload suitable for forwarding to third-party automation or webhook services.
🎨 Visual Guide
The live, currently forming channel is drawn as three connected lines — an upper band, a midline, and a lower band — with the space between the bands filled in a translucent color. Green indicates a bullish-sloped channel, red indicates a bearish-sloped channel, and gray indicates a channel that has not met the minimum fit-quality threshold and should be treated as statistically unreliable. A small label at the live edge of the channel states its bias, its fit percentage (the Pearson correlation expressed as a percentage), and its standard deviation value. When a segment finalizes, its own colored line-and-fill combination plus a labeled marker remain on the chart as a permanent historical record of that channel. An optional setting recolors the chart's candles using the live channel's bias color for an at-a-glance read of current conditions without needing to look at the channel itself. In the corner of the chart (position configurable), a compact dashboard table lists the ticker and timeframe, current bias, a bar-style fit-quality gauge, the standard deviation value, the current upper and lower band prices, the number of bars in the active channel, the pivot length in use, the current breakout/breakdown state, and — only when the relevant filters are enabled — the live ADX reading and the selected adaptive filter type.
📖 How to Use
Read channel color and the dashboard's Bias row together: a green, high-fit-percentage channel reflects a statistically supported uptrend in the regression sense, while red reflects the equivalent downtrend condition. Treat gray, low-fit-percentage channels as periods where price is not moving in a way a straight line meaningfully describes, and weight any signal generated during those conditions accordingly. A directional signal, visible as a Breakout or Breakdown state on the dashboard and paired with an alert firing, indicates confirmed price has closed beyond the channel's statistical deviation band with sufficient trend history and fit quality behind it — this is a signal generator, not a backtested strategy, so no historical win-rate or equity curve is produced by the script itself. Enabling the ADX filter is most useful on instruments or timeframes prone to frequent whipsaw, where it will suppress breakouts that occur without adequate underlying trend strength. Choosing a smoother adaptive filter (Double WMA, Triple VWMA) will produce fewer but later channel restarts; choosing a more responsive one (HMA, Kalman, LLAMA) will track price more closely at the cost of more frequent re-anchoring. Enable channel merging on lower timeframes or choppier symbols to keep the chart readable; disable it if you want to see every discrete regression segment the script produces. To receive the webhook-ready alerts, create an alert on the script using the "Any alert() function call" option, or select one of the four named alert conditions individually if only a subset of signals is needed.
⚙️ Inputs and Settings
The Core group controls the statistical backbone of the tool: automatic or manual pivot lookback length, whether nearby channels merge and how strict that merge tolerance is, the minimum Pearson fit strength and minimum bar count required for a channel to be considered valid, and the deviation z-score used to size the bands. The Filters group holds the optional ADX trend gate (toggle, threshold, and length) and the adaptive source filter selection along with its length. The Visuals group controls channel line width and whether chart candles are recolored by the live channel bias. The Dashboard group sets which corner of the chart the statistics table is drawn in. The Alerts group defines the text sent in the "action" field of each of the four webhook JSON payloads (long, short, close-long, close-short), allowing the payload vocabulary to be matched to whatever automation platform is receiving it. The Colors group governs the bullish, bearish, and weak-fit channel colors, the support/resistance accent colors used in the dashboard gauge, and the dashboard's background, header, text, and warning colors.
🔍 Deconstruction of the Underlying Scientific and Academic Framework
The regression core is an ordinary least-squares fit — the same slope and intercept formulas taught in introductory statistics, chosen because they minimize the sum of squared vertical distances between the line and each price point in the window. Layered on top of this is the Pearson product-moment correlation coefficient, the standard statistical measure of how strongly two variables are linearly related; applying it to price-versus-time is the same logic underlying R²-based confidence filters used in quantitative trend-following research, here repurposed as a simple accept/reject gate for whether a channel is worth trusting. The deviation bands draw on the same statistical foundation as Bollinger-style envelopes — a mean or trend estimate flanked by a multiple of the underlying standard deviation — except the dispersion here is measured as residual distance from a sloped regression line rather than from a flat moving average, and a z-score of 1.96 specifically corresponds to the approximate 95% interval of a normal distribution, a deliberate nod to standard statistical confidence-interval convention. The pivot-confirmation logic is a symmetric-window fractal test in the tradition of classic swing-high/swing-low detection methods, used here purely as a principled way to choose a channel's starting point rather than as a standalone trading signal. The ADX/DMI component follows Welles Wilder's original directional movement framework for measuring trend strength independent of trend direction. Among the adaptive filters, the Kalman option applies a simplified single-state predict-correct estimator common in signal processing and control theory, while the LLAMA option applies a linear-extrapolation-style adjustment to a moving average — conceptually related to trend-adjusted smoothing methods such as Holt's linear exponential smoothing, which projects recent momentum forward rather than only averaging past observations.
⚠️ 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. 指標

Reversal Pattern Auto Targets [JPT]
🔷 OVERVIEW
R eversal Pattern Auto Targets is an educational price action indicator that automatically detects potential Double Top, Double Bottom, Head & Shoulders, and Inverse Head & Shoulders reversal structures using confirmed swing points. When a valid reversal setup is confirmed, the indicator displays a complete trade framework including Entry, Stop Loss, TP1, TP2, and TP3 levels.
The indicator is designed to help traders visualize reversal structures and practice structured trade planning. It does not predict future price movement or guarantee profitable trades.
🔷 FEATURES
Automatic reversal pattern detection
Double Top & Double Bottom patterns
Head & Shoulders & Inverse Head & Shoulders
Bullish and bearish reversal signals
Entry, Stop Loss, TP1, TP2, and TP3 levels
ATR-based Stop Loss buffer
Risk/Reward-based target calculations
Optional EMA 50 & EMA 200 trend filter
Confirmed pivot-based structure
Optional pivot structure visualization
Extendable Entry, SL, and TP levels
Optional pattern labels
Alert conditions for reversal signals and TP1
Clean chart layout with minimal clutter
🔷 HOW IT WORKS
Detects confirmed swing highs and swing lows.
Compares confirmed pivot points to identify potential reversal structures.
Confirms Double Top and Double Bottom setups through neckline breaks.
Identifies potential Head & Shoulders and Inverse Head & Shoulders structures.
Applies the optional EMA trend filter when enabled.
Generates a bullish or bearish reversal signal after confirmation.
Calculates Entry, Stop Loss, and multiple Take Profit levels automatically.
Displays the trade framework directly on the chart.
🔷 HOW TO USE
Look for newly detected REV BUY or REV SELL signals.
Identify the displayed reversal pattern and review its structure.
Check the overall market trend before considering a setup.
Use the Entry, SL, TP1, TP2, and TP3 levels as a trade-planning reference.
Consider using the optional EMA 50/200 filter for additional trend context.
Combine the indicator with your own price-action confirmation and risk-management rules.
🔷 NOTES
Signals are based on confirmed pivot and price-action structures.
The indicator uses confirmed pivots and does not use lookahead logic.
Historical signals do not guarantee future performance.
Entry, SL, and TP levels are analytical references and should not be treated as guaranteed trade levels.
Market conditions can change quickly, so proper risk management is essential.
This indicator is intended for educational and analytical purposes only.
No indicator can guarantee successful trades, and this script should not be used as the sole basis for investment or trading decisions. 指標

Double Tap Double Top/Bottom [Viprasol]Double Tap — Double Top / Double Bottom
═══════════════════════════════════════════════════════════
WHAT IT DOES
═══════════════════════════════════════════════════════════
Double Tap finds the two most reliable reversal patterns in classic technical analysis —
the Double Top (M) and Double Bottom (W) — draws them as they FORM, and on a confirmed
neckline break projects a complete trade map: Entry, Stop, and measured-move Target, then
tracks the outcome to ✓ or ✗. It keeps a history of recent patterns on the chart, not
just the latest one, so you can see how the tool reads structure over time.
═══════════════════════════════════════════════════════════
HOW THE PATTERN IS DETECTED
═══════════════════════════════════════════════════════════
1. Two confirmed swing highs (Double Top) or lows (Double Bottom) are found via a pivot
length you control.
2. The two extremes must match within a tolerance — a percentage of the pattern's height —
so the "double" is genuinely level, not a random pair of swings.
3. A valley (top) or peak (bottom) between them becomes the NECKLINE.
4. The pattern must span between your min and max width (bars) to filter noise.
5. While these conditions hold, the pattern is shown FORMING (a dotted preview). If price
breaks back past the twin extreme first, the setup is invalidated and the preview clears.
6. TRIGGER: a confirmed bar close through the neckline solidifies the pattern and prints
the trade levels.
Non-repainting: swings are confirmed pivots and the trigger evaluates on closed bars.
═══════════════════════════════════════════════════════════
THE TRADE MAP (drawn on every confirmed pattern)
═══════════════════════════════════════════════════════════
• ENTRY — the neckline-break close.
• STOP — beyond the higher top / lower bottom, padded by an ATR buffer.
• TARGET — the measured move: pattern height projected from the neckline (adjustable %).
On the chart: two peak markers with prices, a shaded pattern box, a dashed neckline, an
Entry line, and green/red TP/SL zones — all extending forward until price resolves them.
The pattern label then flips to ✓ (target hit) or ✗ (stop hit).
═══════════════════════════════════════════════════════════
FEATURES
═══════════════════════════════════════════════════════════
• Live "forming" preview so you see a pattern building before it triggers.
• Tracks multiple patterns across history (configurable how many to keep).
• Detect tops, bottoms, or both; full control of tolerance, pivot length, min/max width.
• Measured-move target (% of height) + ATR stop buffer.
• Dashboard: current status, active Entry / Target / Stop with % distance, and a running
hit rate (how often target was reached before stop, on the patterns shown).
• Alerts on Double Top / Double Bottom confirmation, plus a webhook-ready alert() message
(Text or JSON) carrying entry / stop / target.
═══════════════════════════════════════════════════════════
HOW TO USE
═══════════════════════════════════════════════════════════
1. Set Swing Length to the pattern size you want (larger = bigger, cleaner patterns).
2. Watch the dotted "forming" preview; act only on the confirmed neckline break.
3. Use the drawn Entry / Stop / Target as your plan; scale or exit at the target.
4. Tune Tolerance (how level the two extremes must be) to your market's character.
5. Set an alert on "Any alert() function call" for automation, or use the built-in
Double Top / Double Bottom conditions.
═══════════════════════════════════════════════════════════
HONEST LIMITATIONS
═══════════════════════════════════════════════════════════
• Pattern recognition is inherently subjective; this uses one consistent rule-based
definition — it won't catch every double a human would draw, and vice versa.
• The dashboard's hit rate is a simple tally of the patterns currently shown (target-before-
stop), not a full backtest — use it as a feel, not a performance guarantee.
• Swings confirm after the fact (pivot lookback), so patterns appear with a natural lag.
• This is a decision-support tool, not financial advice. Manage your own risk.
═══════════════════════════════════════════════════════════
CREDITS & ORIGINALITY
═══════════════════════════════════════════════════════════
The double top / double bottom is public, classic technical analysis; ATR is J. Welles
Wilder's public concept. Every line of Pine here — the pivot-pairing detection, the
tolerance/neckline/measured-move logic, the forming preview, the multi-pattern tracker,
and all visualization — is original Viprasol work written from scratch. No third-party
Pine code is reused.
指標

Ronaldo Bicycle Kick Orbit Break Reversal [ Viprasol ]Ronaldo Bicycle Kick — Orbit Break Reversal (Viprasol)
WHAT IT DOES (the idea)
Most reversal tools watch a single line. This one watches a region. It treats recent price structure as a set of confirmed swing points that "orbit" a structural centre of mass, and it trades the moment price escapes that orbit to the upside. Like a ball coiling around a centre and then leaving orbit — that break is the signal. The name is a sporting homage to a spectacular finish; the tool itself is pure geometry.
HOW IT DETECTS
1. Swings: a lightweight zigzag keeps the last several confirmed pivots. A pivot is only accepted after the required number of bars close to its right, so swings do not move once printed.
2. Orbit geometry: from the last K swings (default 6) it computes the geometric centroid — the mean bar position and mean price. It then measures the average (root-mean-square) distance those swings sit from the centroid price. That distance, scaled by "Orbit radius," becomes the orbit ring. A minimum radius floor (in ATR) filters out flat, meaningless rings.
3. Escape: the setup arms only when the orbit is valid. The signal fires on the first bar that CLOSES above the top of the orbit ring (centroid price + radius) having closed at or below it on the prior bar.
ENTRY / STOP / TARGET
- Entry: the close of the escape bar (long only).
- Stop: the lowest swing price inside the orbit, minus an ATR buffer.
- Target: Entry + R multiple x risk (default 2R), where risk = Entry - Stop.
Each trade draws an entry line plus filled TP and SL zones that extend forward bar by bar until price touches one of them, then freeze.
NON-REPAINTING
Signals are built from confirmed pivots and only evaluated on a confirmed (closed) bar. Nothing is placed on the developing bar, so a printed signal does not disappear or shift on later ticks. The dotted "live orbit" preview is a forward-looking sketch of the current geometry and is not a signal.
KEY FEATURES
- A real orbit ellipse is drawn around the centroid so you can see the ring being broken.
- Extend-until-hit TP/SL zones with a one-trade-at-a-time option.
- Optional hide-new-setup-while-in-trade to reduce clutter.
- Adjustable pivot width, swing count, orbit radius, ATR floor, R multiple, stop buffer, and a minimum-bars-between-signals gap.
INPUTS OVERVIEW
Swing pivot left/right bars; swings used for the orbit; minimum swings for validity; orbit radius multiplier; minimum orbit radius in ATR; ATR length; TP R multiple; SL ATR buffer; signal gap; one-trade toggle; visual colours and label offset.
HOW TO USE
1. Add to any liquid symbol and timeframe; it works on all.
2. Watch for the dotted orbit ring to form around recent structure.
3. Take note when a bar closes above the ring and the GOAL label prints.
4. Use the drawn entry, TP, and SL zones as a visual trade map; adjust the R multiple and stop buffer to your own plan.
5. Raise the pivot width or ATR floor on noisy, low-timeframe charts to demand cleaner structure.
LIMITATIONS (honest)
- This is a pattern and education tool, not a signal service or an autotrading system. It highlights a geometric condition; it does not predict outcomes.
- Long-only by design. It will not flag downside setups.
- In strong one-way trends the orbit ring can be escaped repeatedly; in choppy ranges valid orbits may be sparse. Context and discretion still matter.
- Requiring confirmed pivots means the orbit is defined slightly after a swing forms, which is the cost of non-repainting behaviour.
- Past behaviour of any pattern does not guarantee future results.
CREDITS
Built on public, well-known concepts: Average True Range (J. Welles Wilder) for volatility scaling, and standard pivot/zigzag swing detection. The orbit-centroid geometry and the escape logic are original Viprasol work. The "Bicycle Kick" name is an affectionate sporting homage and does not imply any endorsement or affiliation.
This script is an educational tool and is not financial advice. Trade your own plan and manage risk.
Original Viprasol work; no third-party Pine code reused.
指標

Volume Regression Channel [BOSWaves]Volume Regression Channel - Regression-Anchored Volume Flow Visualization with Inward Pressure Bars, Edge Flares, and Cumulative End Profile
Overview
Volume Regression Channel is a regression-anchored volume flow analysis system that fits a polynomial or linear curve to recent price history and maps buy and sell volume pressure inward from the channel boundaries toward the centerline on every bar, where bar height, coloring, edge flare intensity, and end profile distribution are all driven by actual volume participation and close-position-derived directional weighting rather than fixed histogram positions or arbitrary price levels.
Instead of displaying volume as a separate panel histogram detached from price context, this system integrates volume directly into the regression channel structure. Each bar's volume is split into buy and sell components based on where close sat within the bar's range, and those components are rendered as inward-pointing bars anchored to the upper and lower channel edges, with bar height proportional to normalized volume and coloring distinguishing above-average from below-average participation. The result is a channel where the volume activity on every bar is visible in spatial relationship to the channel boundaries that define the structural context.
This creates a complete price and volume framework within a single overlay. The regression curve defines the trend's expected path. The gradient channel fills communicate the statistical distance from the centerline. The inward volume bars reveal participation intensity and directional split at each bar. The flow-colored centerline segments expose directional pressure evolution across the window. Edge flares highlight exceptional volume events occurring near the channel boundaries. Bound diamond markers identify the first bar of each new boundary touch. And the cumulative end profile extending from the current bar provides a full buy-sell volume distribution summary across the channel's price range for the entire regression window.
Price is therefore evaluated not just for its position within the regression channel but for the volume participation and directional flow composition supporting its location at every bar across the full lookback window.
Conceptual Framework
Volume Regression Channel is founded on the principle that a regression channel becomes significantly more analytically powerful when volume participation is integrated directly into its structure rather than displayed separately, allowing the trader to simultaneously assess where price sits relative to the statistical trend expectation and how much and what type of volume supported each bar's position within that channel.
Standard regression channel tools provide structural price context through the curve and its standard deviation bounds but offer no volume intelligence, leaving traders to consult a separate panel to understand participation dynamics. This framework eliminates that separation by embedding volume directly into the channel geometry, with inward bars, edge flares, centerline flow coloring, and the end profile all deriving from the same volume and price data that defines the channel itself.
Three core principles guide the design:
Volume should be displayed in direct spatial relationship to the channel structure it relates to, with inward bars anchored to the boundaries and sized proportionally to participation intensity so that high-volume bars are immediately identifiable within their structural context.
Buy and sell volume should be separated using close position within the bar range, rendering the directional split of each bar's participation as distinct inward segments that reveal whether volume at each price location was predominantly absorbed by buyers or sellers.
A cumulative end profile should summarize the full window's volume distribution at the current channel position, providing a reference for where participation has been most concentrated across the regression window without requiring a separate profile indicator.
This shifts regression channel analysis from structural price context alone into an integrated price-volume framework where participation intensity, directional flow composition, and cumulative distribution are all visible within the channel geometry itself.
Theoretical Foundation
The indicator combines matrix ordinary least squares regression fitting to HL2 price data, standard deviation channel construction, close-position buy-sell volume splitting, volume SMA normalization for significance classification, three-layer gradient polyline fill construction, inward volume bar rendering with dynamic width scaling, flow-weighted centerline segment coloring, edge flare detection combining volume and boundary proximity conditions, and an overlap-weighted cumulative buy-sell profile with smoothing applied across the channel rows.
The regression is computed using the same OLS matrix approach as conventional polynomial regression, producing a prediction array covering all bars in the lookback window for both linear and quadratic modes. The channel width is scaled by the rolling standard deviation of HL2, ensuring channel boundaries adapt to the instrument's actual price variability. Volume splitting uses close position within the high-low range as the proxy for directional commitment, with bars closing near the high allocating more volume to buying and bars closing near the low allocating more to selling. The end profile smooths each row's accumulated buy and sell volume with a three-point weighted average before normalizing and rendering.
Four internal systems operate in tandem:
Regression Channel Engine : Computes OLS curve fitting in linear or polynomial mode, derives the standard deviation channel width, and constructs all polyline geometry for the gradient fills, glow boundary lines, and centerline using chart.point arrays that follow the regression curve.
Inward Volume Bar System : For each bar in the recent display window, normalizes volume against the window maximum, splits the normalized height into buy and sell components by close position, and renders inward lines from the channel edges with dynamic width scaling and above-average volume coloring.
Edge Flare and Bound Marker System : Monitors each recent bar for the combination of above-threshold volume and boundary zone proximity, rendering bright glowing line segments on the channel edge when qualifying conditions are met, and places diamond markers at the first bar of each new boundary touch.
Centerline Flow and End Profile Engine : Divides the centerline into sixty flow segments and computes volume-weighted directional bias for each, coloring segments by flow direction and strength. Simultaneously accumulates overlap-weighted buy and sell volume into channel rows across the full window, smooths the distribution, and renders horizontal profile bars extending from the current bar edge.
This design ensures volume participation is embedded into every layer of the channel visualization while the end profile provides a complete cumulative distribution summary that updates with each new bar.
How It Works
Volume Regression Channel evaluates price through a sequence of regression-aware and volume-integrated processes:
Regression Curve Fitting : On the last bar, the OLS matrix computation produces a prediction array covering all bars in the configured lookback window using either a linear or polynomial fit to HL2, providing the baseline curve that all channel geometry and volume positioning follows.
Channel Width Calculation : The standard deviation of HL2 over the regression window multiplied by the SD multiplier defines the channel half-width, establishing the upper and lower boundary distances from the curve at each bar position.
Gradient Fill Construction : Three polyline polygon regions are constructed for each of the upper and lower channel halves at proportional fractions of the standard deviation width, filled with progressively increasing opacity from inner to outer to produce a smooth visual gradient across the channel depth.
Boundary Glow Rendering : Triple polylines at the upper and lower channel boundaries create a glow effect using wide low-opacity outer lines and a narrow full-opacity core line, providing visually prominent boundary markers that follow the regression curve.
Volume Normalization and Splitting : For each bar in the volume display window, raw volume is normalized against the window maximum to produce a proportional height score. Close position within the high-low range splits this height into buy and sell components, with the buy portion anchored to the lower boundary and the sell portion anchored to the upper boundary pointing inward.
Inward Bar Rendering : Buy and sell component heights are rendered as inward-pointing lines from the respective channel edges with dynamic width scaling based on relative volume and opacity intensifying for above-average participation bars.
Edge Flare Detection : Each recent bar is tested for the combination of volume exceeding the flare multiplier threshold and price high or low reaching within the configured edge zone percentage of the channel boundary. Qualifying bars receive bright dual-layer line segments on the boundary edge with width scaling by relative volume strength.
Bound Diamond Placement : Each bar is tested for initial channel boundary contact, with a diamond marker placed at the first bar of each new upper or lower boundary touch to mark where price newly reached the statistical extremes.
Centerline Flow Coloring : The centerline is divided into sixty equal segments and each segment's volume-weighted close position bias is computed across its constituent bars. Segments are colored green, red, or neutral based on the directional flow value and intensity with line width scaling to strength.
End Profile Construction : All bars in the regression window contribute their volume to the profile rows based on price overlap between the bar range and each row boundary, with the contribution split into buy and sell portions by close position. The accumulated distribution is smoothed and normalized before rendering as horizontal buy and sell bars extending from the current bar.
Together, these elements form a continuously updating integrated price-volume framework where the regression structure, volume participation, flow direction, and cumulative distribution are all rendered within the same channel geometry on each bar update.
Interpretation
Volume Regression Channel should be interpreted as a regression-anchored structural framework with embedded volume participation intelligence at every level:
Regression Curve : The fitted centerline represents the trend's statistical best-fit path through the lookback window, with the flow-colored segments revealing whether volume-weighted directional bias above or below the curve was predominantly bullish or bearish across each portion of the window.
Channel Boundaries : The upper boundary with its red glow represents the upper standard deviation limit where price is statistically extended above the regression expectation. The lower boundary with its green glow represents the lower limit where price is statistically extended below.
Gradient Fill Depth : The three-layer gradient within each channel half provides visual depth cues, with the innermost near-transparent fill representing mild deviation and the outermost fully opaque fill representing maximum channel boundary proximity.
Inward Buy Bars (Green) : Lines extending upward from the lower channel boundary reflect the buy-attributed volume portion of each bar. Taller bars indicate greater buying participation. Brighter coloring indicates above-average total volume on that bar.
Inward Sell Bars (Red) : Lines extending downward from the upper channel boundary reflect the sell-attributed volume portion of each bar. Taller bars indicate greater selling participation. Brighter coloring indicates above-average total volume.
Neutral Volume Bars (Gray) : Below-average volume bars render in neutral gray regardless of direction, identifying periods of low participation where the directional split carries reduced analytical significance.
Edge Flares : Bright glowing line segments on the channel boundary mark bars where significant volume occurred close to the boundary edge, identifying high-participation boundary interaction events that frequently precede reversals or continuations from the statistical extremes.
Bound Diamonds : Small colored diamonds at boundary touch initiation bars mark where price first reached the channel edge after a period of interior activity, identifying the onset of boundary interaction sequences.
End Profile : The horizontal bar chart extending from the right edge shows the cumulative volume distribution across the channel's price range for the full regression window, with green segments showing buy-attributed volume and red segments showing sell-attributed volume at each price row. The longest bars identify the price levels with the greatest total participation concentration.
Colored Candles : Optional candle coloring reflects whether price is above or below the regression centerline, providing a continuous directional bias reference directly on the price chart.
Boundary proximity, inward bar height and direction, edge flare frequency, centerline flow coloring, and end profile distribution collectively provide more analytical depth than any element in isolation.
Signal Logic & Visual Cues
Volume Regression Channel does not generate discrete buy or sell signals but provides continuous structural and volume participation reference through several interaction cues:
Edge Flare Events : High-volume boundary proximity bars highlighted by bright edge flares identify exceptional participation at the statistical extremes, marking the bars most likely to precede structural reactions from channel boundaries.
Bound Diamond Initiation : Diamond markers at the first bar of new boundary touches identify where price has newly entered channel extreme territory, providing early warning of boundary interaction sequences before their outcome is determined.
Centerline flow segment coloring provides ongoing directional pressure context across the full window, with color and width encoding whether the volume-weighted bias at each point in the regression history was bullish, bearish, or neutral.
Strategy Integration
Volume Regression Channel fits within regression-informed structural and volume-participation-based analytical approaches:
Boundary Interaction Trading : Use channel boundary touches combined with edge flare presence as elevated-significance interaction events. High-volume flares at the boundary suggest meaningful participation at the statistical extreme that frequently precedes a reaction back toward the centerline or a volume-supported continuation beyond it.
End Profile Acceptance Reading : Use the end profile distribution to identify the price rows with the greatest cumulative participation concentration. Price returning to high-volume profile rows encounters levels where the greatest historical participation occurred within the regression window, making them structurally significant references for support, resistance, or reversion.
Inward Bar Volume Divergence : Monitor situations where price is approaching a boundary but inward bar height from the opposing direction is increasing, indicating growing participation against the directional move and potentially signaling that the boundary interaction will result in rejection rather than continuation.
Centerline Flow Direction : Use centerline flow coloring as a mid-channel directional bias indicator. Sustained green flow segments suggest dominant buying pressure within the regression window. Sustained red segments suggest dominant selling. Neutral gray segments indicate a contested equilibrium without clear directional participation weight.
Regression Mode Selection : Use Polynomial mode for markets with visible curvature in their trend structure where the quadratic bend produces a more accurate fit. Use Linear mode for markets trending in a straight consistent direction where the polynomial's additional degree of freedom would overfit noise.
Profile Distribution Skew Analysis : Compare the buy and sell distribution balance in the end profile to assess whether the window's participation was predominantly concentrated above or below the centerline, providing a volume-based directional bias reading that complements the price-based trend assessment.
Technical Implementation Details
Regression Engine : Matrix OLS with design matrix construction, normal equation formation, matrix inversion, and prediction array application for linear or polynomial curve fitting to HL2
Channel Construction : Standard deviation-scaled channel width with three-layer gradient polyline fills and triple-line glow boundaries following the regression curve
Inward Volume System : Window-maximum normalization with close-position buy-sell splitting, dynamic width scaling by relative volume, and above-average volume color intensification
Edge Flare System : Volume multiplier threshold combined with boundary zone percentage proximity testing with dual-layer glow line rendering and width scaling by relative volume
Centerline Flow : Sixty-segment volume-weighted close-position bias computation with directional color and width encoding
End Profile : Overlap-weighted row accumulation across the full regression window with three-point smoothing, normalization, and horizontal buy-sell bar rendering with curved outline polyline
Performance Profile : All rendering triggered on last bar with full object cleanup and rebuild each cycle, configurable regression length capped at 490 bars for object management
Optimal Application Parameters
Timeframe Guidance:
1 - 5 min : Intraday regression flow tracking with shorter length and tighter SD multiplier for fast-adapting channel that captures intraday trend structure with responsive volume distribution
15 - 60 min : Session-level structural volume analysis with balanced regression length and moderate SD multiplier for meaningful channel geometry across typical session directional moves
4H - Daily : Swing-level regression channel profiling with longer lookback and polynomial mode for a curve-following channel spanning multi-session trend structures
Suggested Baseline Configuration:
Regression Length : 236
SD Multiplier : 1.75
Mode : Polynomial
Volume SMA : 15
Bar Height (ATR×) : 2.1
Show Edge Flares : Enabled
Show Bound Diamonds : Enabled
Show Centerline : Enabled
Show End Profile : Enabled
Color Candles : Enabled (requires disabling original chart candles in chart settings)
These suggested parameters should be used as a baseline; their effectiveness depends on the instrument's volatility characteristics, volume behavior, and preferred channel sensitivity, so fine-tuning is expected for optimal performance.
Parameter Calibration Notes
Use the following adjustments to refine behavior without altering the core logic:
Channel too wide or narrow : Adjust SD Multiplier to expand or contract the channel width relative to the instrument's typical deviation from the regression curve, calibrating boundary distance to realistic price excursion ranges.
Curve fits too loosely to recent price : Decrease Regression Length to shorten the lookback window, producing a tighter curve that adapts more quickly to recent structural changes. Switch to Polynomial mode if visible trend curvature is present.
Inward bars too tall or short : Adjust Bar Height (ATR×) to scale the maximum inward bar height, making volume bars more prominent during high-participation sessions or more subtle on instruments with lower volume variance.
Too many or too few edge flares : Increase Flare Volume Multiplier to restrict flares to only exceptional volume events, or adjust Flare Edge Zone % to control how close to the boundary price must be before a flare qualifies.
End profile too wide or compact : Adjust Profile Width to control the maximum horizontal extent of the end profile bars, calibrating the profile size to the available chart space at the current zoom level.
Profile rows too coarse or granular : Adjust Profile Rows to increase or decrease vertical resolution, with higher values providing finer detail across the channel's price range and lower values producing broader, more readable rows.
Too many bound diamonds cluttering the chart : The diamond system marks only first-bar boundary touches. On instruments with frequent boundary contact the marker density may be high. Disable Show Bound Diamonds and rely on edge flares alone for boundary interaction identification.
Adjustments should be incremental and evaluated across multiple session types rather than isolated market conditions.
Performance Characteristics
High Effectiveness:
Trending markets where the regression curve provides an accurate fit to the directional price path and the channel boundaries represent meaningful statistical extremes with genuine participation significance
Liquid instruments with consistent volume where the buy-sell splitting produces reliable directional participation readings and the end profile accumulates a statistically meaningful distribution across the regression window
Boundary interaction strategies where edge flares and bound diamond markers identify high-participation channel extreme events that frequently precede structural reactions
Distribution analysis workflows where the end profile provides a regression-relative volume profile summary that replaces or complements standalone volume profile indicators
Reduced Effectiveness:
Choppy, directionless markets where the regression curve has no clear shape and channel boundaries are penetrated frequently without the sustained trend structure required for meaningful boundary interaction analysis
Low-liquidity instruments where thin volume produces unreliable buy-sell splits and end profile distributions that reflect random participation patterns rather than genuine directional flow
Markets with frequent gaps where the HL2 series used for regression produces curves distorted by discontinuous price events that shift the channel relative to actual price structure
Very short regression windows where insufficient bars per channel row produce end profiles dominated by noise rather than statistically meaningful participation concentration
Consolidation environments where price oscillates near the regression centerline without reaching channel boundaries, reducing the analytical value of edge flares and bound diamonds while producing uniformly short inward bars
Integration Guidelines
Confluence : Combine with BOSWaves momentum tools, order block analysis, or structural indicators to validate channel boundary interactions and edge flare events with broader analytical context
End Profile Reference : Use the end profile distribution as a volume-based reference layer for price levels visited by price within the regression window. High-volume rows in the profile identify price levels with the greatest historical participation concentration, making them structurally significant references for future interaction.
Inward Bar Divergence Monitoring : Monitor inward bar height on opposing sides as price approaches boundaries. Growing opposing-side bars during boundary approach suggest increasing counter-directional participation that may oppose the boundary continuation.
Regression Mode Consistency : Maintain a consistent regression mode when using the channel as an ongoing structural reference. Switching between Linear and Polynomial shifts the curve and redistributes the channel geometry, making successive comparisons of profile distribution and boundary levels unreliable.
Centerline Cross Awareness : Treat price crossing the regression centerline as a potential flow transition event. Combined with a centerline flow segment color change from one direction to the other, centerline crossings with above-average volume suggest genuine directional repositioning within the channel structure.
Disclaimer
Volume Regression Channel is a professional-grade regression-anchored volume flow analysis tool. It uses OLS curve fitting with close-position volume splitting and cumulative profile construction but does not predict future price movements. Results depend on market conditions, instrument volume characteristics, parameter selection, and disciplined execution. BOSWaves recommends deploying this indicator within a broader analytical framework that incorporates momentum context, order flow analysis, and comprehensive risk management. 指標

Sigmoid Alpha Bands | NAL1. Overview
Sigmoid Alpha Bands | NAL is an adaptive trend and volatility framework built around a sigmoid-weighted EMA baseline and dynamically adjusted volatility bands.
Instead of smoothing price with a fixed alpha, the indicator modifies its responsiveness using a selected market feed. Momentum, volatility, volume, or price disparity can control how quickly the baseline adapts to changing conditions.
The surrounding bands can also respond asymmetrically to bullish and bearish return shocks. This allows the upper and lower boundaries to develop independently rather than remaining equally spaced around the baseline.
2. Calculation
The indicator begins by selecting the market variable used to control the baseline’s adaptive smoothing weight.
Momentum measures changes in RSI, volatility measures changes in ATR, volume measures changes in smoothed volume, and disparity measures changes in price relative to its EMA.
sigmoidFeed = switch sigFeed
"Momentum" => ta.change(ta.rsi(src, modLen), changeL)
"Volatility" => ta.change(ta.atr(modLen), changeL)
"Volume" => ta.change(ta.ema(volume, modLen), changeL)
"Disparity" => ta.change(src / ta.ema(src, modLen), changeL)
The selected feed is passed through a sigmoid function, converting it into a bounded adaptive weight.
That weight modifies the standard EMA alpha. When the sigmoid weight increases, the baseline can respond more quickly. When it decreases, the baseline becomes more stable.
sigmoidWeight = sigmoid_function(sigmoidFeed)
baseAlpha = 2.0 / (emaLen + 1.0)
adaptiveAlpha = f_clamp(baseAlpha * (0.5 + sigmoidWeight), 0.01, 1.0)
The final adaptive baseline is calculated recursively using the changing alpha.
sigmoid_ema = f_sigmoid_ema(src, sigmoidFeed, sigLen)
The indicator then calculates its base volatility using one of four methods: standard deviation, ATR, mean absolute deviation, or median absolute deviation.
volatilityRaw = switch volFeed
"SD" => ta.stdev(src, volLen)
"ATR" => ta.atr(volLen)
"MeanAD" => ta.dev(src, volLen)
"MedianAD" => f_median_ad(src, volLen)
This raw volatility value is also processed through a sigmoid-adaptive smoothing layer. The result becomes the symmetric volatility foundation used by the bands.
volatilityFeed = ta.change(volatilityRaw / nz(ta.ema(volatilityRaw, volLen), volatilityRaw), changeL)
volatility = f_sigmoid_ema(volatilityRaw, volatilityFeed, volLen)
When asymmetric bands are enabled, positive and negative log-return shocks are separated into bullish and bearish variance components.
bullShock = math.pow(math.max(ret, 0.0), 2.0)
bearShock = math.pow(math.max(-ret, 0.0), 2.0)
totalShock = bullShock + bearShock
Each shock component is adaptively smoothed and compared with total variance. This produces separate upper and lower volatility multipliers.
The multipliers are constrained around their longer-term average so the bands can adapt without becoming unstable.
upperVol = math.max(nz(symmetricVol, syminfo.mintick) * upperMultAdj, syminfo.mintick)
lowerVol = math.max(nz(symmetricVol, syminfo.mintick) * lowerMultAdj, syminfo.mintick)
The final bands are positioned around the sigmoid-adaptive baseline.
upperBand = sigmoid_ema + finalUpper * volMul
lowerBand = sigmoid_ema - finalLower * volMul
A bullish state is established when price closes above the upper band. A bearish state is established when price closes below the lower band. While price remains between the boundaries, the existing state is preserved.
if close > upperBand
NAL := 1
if close < lowerBand
NAL := -1
3. Key Features
Sigmoid-weighted adaptive EMA baseline.
Selectable momentum, volatility, volume, or disparity adaptation feed.
Multiple volatility calculation methods.
Optional asymmetric bullish and bearish volatility bands.
Independent modeling of positive and negative return shocks.
Controlled asymmetry through long-term multiplier normalization.
State-based candle coloring, layered volatility hulls, glow effects, and directional fills.
4. Use
Sigmoid Alpha Bands is designed to identify when price expands beyond an adaptively smoothed volatility structure.
A close above the upper boundary reflects bullish expansion beyond the current baseline and volatility regime. A close below the lower boundary reflects bearish expansion beneath that structure.
The asymmetric mode allows the indicator to recognize that bullish and bearish volatility do not always develop with equal intensity. As market pressure changes, each side of the channel can adjust independently while remaining anchored to the same adaptive baseline.
This indicator is designed as a specialized component within a complete strategy architecture. Its role is to isolate the interaction between adaptive trend, changing volatility, and directional return pressure. Its full value emerges through the way this information is integrated into a broader decision framework.
指標

Flag Pattern Breakout [Dots3Red]█ FLAG PATTERN BREAKOUT
This script detects bull and bear flag patterns using two structural components: the staff (the impulsive pole) and the edge (the consolidation channel). Rather than relying on generic pivot-to-pivot zigzag lines, both components are built from regression-fitted geometry so the drawn shapes reflect the actual price structure rather than an approximation.
█ THE STAFF
The staff is the sharp, near-straight-line impulsive move that starts a flag. Two checks work together to identify it:
Structural continuity — instead of checking candle color (green vs red), the script checks whether each bar's wick still overlaps the bar before it. For a rising staff, a bar whose high fails to reach the previous bar's low counts as a break in the move. This catches genuine gaps in the advance while tolerating a normal red pullback candle that still overlaps the prior bar.
Straightness (R²) — a linear regression is fit through the closing prices of the candidate window, and its R² (coefficient of determination) is required to clear a minimum threshold (default 0.85). An R² of 1.0 would mean the closes sit exactly on a straight line; lower values reflect real curvature. Since real price data rarely produces a perfectly straight move, the threshold is adjustable rather than fixed at 1.0.
The search checks the longest possible window first and works down to shorter ones. A long window is only accepted if it clears both the wick-overlap test and the R² threshold — so the result favors the longest staff that still qualifies as straight, rather than the first short segment that happens to pass.
The staff line itself is drawn using the actual price at the two boundary bars (not the highest/lowest price found anywhere inside the scanning window), so it sits flush against the real candle wicks at both ends.
█ THE EDGE
The edge is the flag itself — a channel that runs opposite to the staff's direction. It is built as follows:
Slope — a running linear regression is fit through the highs (for a bull flag's falling edge) or the lows (for a bear flag's rising edge) of every bar since the staff ended. This produces one slope value that updates each bar as more data arrives.
Direction and steepness constraints — the edge's slope must run opposite to the staff (negative for a bull flag, positive for a bear flag) and must be shallower than the staff's own slope by a configurable ratio (default 60%). A flag that slopes as steeply as its pole is not behaving like a consolidation.
Width cap — the vertical distance between the tracked high and low extremes of the edge cannot exceed a percentage of the staff's height (default 60%). This is measured in absolute price distance, not bar count, so a slow-forming edge and a fast-forming edge are held to the same physical size constraint.
Breakout confirmation — the pattern is not finalized as soon as it meets minimum criteria. It keeps extending, bar by bar, for as long as price stays inside the channel. Confirmation only happens when price closes beyond the channel boundary by a configurable ATR buffer, in the direction that continues the original staff move (upward for a bull flag, downward for a bear flag). This means the edge is drawn at its full, longest actual duration rather than being cut short at an arbitrary minimum.
Envelope construction — once a pattern confirms, the two boundary lines are built by taking the regression-fitted line and shifting it by the maximum deviation observed on each side across every bar in the edge. The upper boundary is shifted up by the largest high-to-line distance seen; the lower boundary is shifted down by the largest line-to-low distance seen. Both lines share the identical slope, so they are parallel by construction, and together they contain the full price range of the consolidation rather than only touching two points.
█ VISUALS
The staff is drawn with a glow layer behind a sharp core line, color-coded green for bull and red for bear. The edge channel is filled with a soft translucent tint between its two boundary lines. A label at the breakout point shows the staff's height in ATR units, the edge's duration in bars, and the channel's width in ATR units.
█ SETTINGS
Staff
• Min Staff Height (×ATR) — minimum impulsive move size relative to ATR
• Min/Max Staff Duration (bars) — bounds on how many bars the staff can span
• Max Opposite-Direction Bars — structural wick-overlap tolerance
• Min Straightness (R²) — how closely the staff must fit a straight line
Edge
• Min Bars Before Breakout Eligible — minimum edge duration before a breakout can confirm
• Max Edge Duration (bars) — safety cap; abandons the pattern if no breakout occurs in time
• Max Channel Width (% of Staff Height) — absolute-distance cap on the edge's vertical size
• Max Edge Slope (× staff slope) — how much shallower the edge must be than the staff
• Min Edge Slope (×ATR per bar) — minimum slope magnitude so the edge counts as genuinely sloped
• Breakout Buffer (×ATR) — margin required beyond the boundary to confirm a breakout
█EXAMPLE ( DAILY APPLE STOCK )
█ NOTES
Because confirmation only happens at breakout, the pattern appears on the chart once the move has already resumed — this script identifies completed flag-and-breakout structures for review and study, not an early-warning signal before the breakout occurs. Works on any timeframe; behavior depends on how the ATR-based thresholds interact with the instrument's typical volatility.
However (!), with the ATR Breakout setting, it is possible to set a lower value, and by doing so we might "anticipate" Flag Development and consequent Breakout.
█ DISCLAIMER
This is a pattern visualization tool. It does not generate trade signals and does not constitute financial advice. Historical pattern detection does not guarantee that similar structures will behave the same way in the future. 指標

Strong Gradient Channel | ProjectSyndicateStrong Gradient Channel combines a full order-flow volume profile along the slope of a linear-regression channel, splits every price level into real buy and sell mass, grades the auction, and projects a forward route that stays locked inside the channel walls. It is not a channel with an indicator bolted on — the channel, the profile, the order flow and the outlook are one connected engine, and every number on the panel is measured, not invented.
USDJPY
🟥🟩 IMPORTANT INFO: The channel, the volume profile and the deviation walls are all computed over the same regression window, so the tool self-calibrates to whatever you load it on. Defaults are tuned for a wide 480-bar window on HLC3. Works on any symbol and timeframe; on very high timeframes drop the Channel Length so the profile stays representative of current structure.
📐 A Volume Profile That Follows the Trend — the core of this tool. Every other volume profile is drawn as flat horizontal rows, which quietly assumes price has no trend. This one doesn't. The profile is poured along the regression slope, so each row is a parallelogram tracking the channel's gradient. In a trending market that means the POC, the value area and every heavy level sit where volume actually built — on the diagonal — instead of being smeared into a flat histogram that ignores the move. The result is a value map that tells the truth about a sloped market.
🧲 Real Buy / Sell Split, Not Guesswork. Each candle's volume is broken into its internal buy and sell halves using intrabar data pulled from a lower timeframe, then classified by close-location, body-direction, or a weighted blend you control. Every profile row renders as a stacked bull + sell parallelogram, so you see not just where volume traded but which side owned each level. A Delta POC line marks the row holding the largest one-sided imbalance, and rows exceeding mean + 2σ are flagged as institutional — unusually heavy single-level activity.
ES
⭐ POC, Value Area & Naked POC Magnets. The point of control, the value-area high and low, and the profile extremes are all drawn as sloped lines that ride the channel and extend to the right edge with live price labels. On top of that, the script tracks Naked POCs — the point-of-control of unusually strong individual candles — and extends each one to the right as a magnet until price trades back through it, then retires it. Untested value tends to get revisited; this shows you exactly where it lives.
♻️ Contrarian Fade Engine — auction exhaustion at the walls. When price pierces a channel wall and the order flow shows the move is running out of participation, the engine fires a FADE ▲ / FADE ▼ signal graded by a 0–10 conviction score. It isn't a naive "price touched the band" trigger — it reads the auction against the move and only fires when exhaustion and a local extreme line up, with a cooldown so you don't get a cluster of the same idea. Each signal can plot its own target and invalidation line.
🗺️ Scenario Projection — the powerful new part. This is not a hand-drawn arrow. The script walks the live channel forward from the last bar and assembles a route from surveyed structure: 1 · TRIGGER — the first objective. In Channel Extremes mode it rides the wall in the trigger direction; in Key Levels mode it snaps to the nearest POC / VA / ΔPOC. 2 · REVERSE — a retrace of that leg, sized by your ratio. 3 · RETEST — a partial recovery that deliberately fails short of the trigger extreme. 4 · TARGET — the objective on the far side of price: the opposite wall, or the strongest key level. 5 · EXTENSION — a continuation leg toward the far wall, if you enable Extended detail. Trigger direction defaults to Auto, taken from the live net-flow bias (buy/sell split + slope + CVD). Every leg is a clean straight segment, bars-per-leg are allocated proportionally to price travel, and the whole path is clamped inside the sloped walls — so the outlook can span the full channel from the red wall to the green wall without ever looking synthetic or bowing outside structure.
📊 Command Dashboard — every figure measured. A compact panel that reports the whole engine at a glance, in five themed positions and four text sizes: CHANNEL & TREND — price regime (overbought / inside / oversold vs the walls), current price, slope and channel width. LIVE ORDER FLOW — the running buy/sell split and CVD read for the loaded window. VOLUME PROFILE — POC, value-area high/low and delta-POC prices straight off the sloped profile. AUCTION & FADE — the live fade signal, its direction, and its conviction stars. REGIME — a plain-language read of the overall state, including bullish / bearish reversal watches when regime and flow disagree. SCENARIO PATH — the full waypoint list: trigger, reverse, retest, target, extension, with prices and moves.
ETH
🔬 Non-Repainting By Construction. The regression, the profile and all levels are computed on closed bars and drawn on the last bar. Intrabar order flow is read from confirmed lower-timeframe data. Fade signals fire on bar close with a cooldown. Nothing is redrawn backwards once placed.
🎨 Clean Themed Visuals. Five palettes engineered for a pure-black background (Obsidian Aurora, Magma, Plasma, Deep Ocean, Graphite Mono), or full custom colors. Dashed value-area lines, a solid POC, red upper and green lower walls, an optional channel-body fill, a spectral volume-weighted ramp on the profile rows, and a scenario path drawn as a soft-glow core line with diamond waypoint markers, a terminal arrowhead and dotted trigger / target rails. An optional on-chart legend key explains every glyph.
🔔 Built-In Alerts & Standard-Chart Guard. Fade and structure events are surfaced on the panel and chart, firing on bar close. The script refuses to run on Heikin Ashi and Renko charts, because those distort the volume and price action the whole engine depends on — a guard most profile tools quietly skip.
🔧 Fully Customizable. Channel length, source and wall basis (Std Dev / Max Deviation / ATR) with independent upper and lower multipliers. Profile rows, width, anchor side, buy/sell split, value-area percent and every level toggle. Intrabar granularity and classification mode. The full fade filter set — conviction floor, extreme lookback, cooldown, target length. Naked-POC score floor and count cap. The complete scenario set — path detail, anchor mode, trigger direction, projection length, retrace and retest ratios, wall padding, right-extension length. Plus every theme, panel and legend option.
NVDA
🎯 Why this is different. Most volume-profile tools draw flat rows and pretend the market isn't trending. This one pours the profile along the actual regression slope, splits every level into real buy and sell mass, grades auction exhaustion at the walls, tracks untested POCs as forward magnets, and then projects a straight-line route that spans the full channel and stays locked inside it. Value, order flow, structure and outlook — one engine, one honest picture.
🧭 How to use it. · Read the dashboard before the chart. CHANNEL & TREND tells you where price sits relative to the walls; LIVE ORDER FLOW tells you which side is pressing; REGIME gives you the one-line summary. · Use the sloped profile as your value map. Price above a rising POC with buy-heavy rows is a different market than price below a falling POC — the diagonal keeps that distinction intact. Treat the POC and value area as magnets and the institutional rows as heavy shelves. · Watch the walls for the fade. A FADE ▲ / FADE ▼ at a wall with a high conviction score is the engine flagging exhaustion of a push into the extreme — a mean-reversion cue back toward the POC, not a blind reversal. · Treat the scenario as a roadmap, not a promise. TRIGGER is where the first objective sits, TARGET is the logical destination on the far side. In Channel Extremes mode the outlook spans wall-to-wall; switch to Key Levels for a tighter path that snaps to profile structure. If the Auto direction reads the wrong way for your bias, set Trigger Direction to Up First or Down First. · Combine, don't obey. Everything shown is descriptive of current structure, value and order flow — pair it with your own analysis and risk management.
EURUSD
⚙️ Key settings to know first. · Channel Length (default 480) — the single most important dial. It sets the regression window and the profile sample. Longer = the broader, structural channel; shorter = a reactive, local channel. · Source (default HLC3) — what the regression is fit to. HLC3 is smoother and less wick-sensitive than close. · Band Basis + Upper/Lower Mult — how wide the walls sit. Std Dev is statistical, Max Deviation hugs the most extreme wick, ATR is a volatility multiple. Independent multipliers let you build an asymmetric channel. · Trigger / Target Anchor — Channel Extremes makes the outlook span the whole channel wall-to-wall; Key Levels keeps it tight to POC / value area. · Extend Channel Right (bars) — how far the walls, midline and levels (and the room for the scenario) project past the last bar. · Use Intrabar Volume + Classification — the accuracy of the buy/sell split. Blend is the balanced default; turn intrabar off for a lighter, whole-candle read. · Min Conviction Score (Fade) — raise it to see only the highest-quality wall fades, lower it to see more.
⚠️ Important. This is a decision-support tool, not a standalone buy/sell system, and it makes no performance guarantees. Everything it displays is descriptive of current channel position, sloped-profile value, real order-flow split and measured auction state. The scenario path is level geometry rendered forward — a current-state projection that re-solves as structure changes, not a forecast of price, and it carries no probability claim. Volume-split figures are reconstructed from intrabar data and bar geometry, not raw tick data. Behaviour varies by symbol, timeframe and configuration. Always combine it with your own analysis and risk management, and test it on your market before trading it live. 指標

[ A L P H A X ] BREAKRUNE - Pattern Breakout RSI EngineAlphaX BREAKRUNE — Pattern Breakout Intelligence + RSI Trigger Engine: Real vs Fake Breakout Classification, Five-Pattern Detection, Fakeout Reversal Signals & Pending State Machine
AlphaX BREAKRUNE is a professional-grade breakout intelligence system built around a single foundational problem that defeats most breakout traders: the inability to distinguish a genuine structural breakout from a fakeout in real time. Most breakout indicators fire on any close beyond a pattern boundary — and then leave the trader holding a loss when price immediately reverses back inside the structure. BREAKRUNE solves this at the architectural level by separating breakout detection into three sequential phases — pattern recognition, breakout classification, and RSI trigger confirmation — and requiring all three to align before a signal fires. Every raw break is first classified as PENDING, then evaluated over a configurable decision window for either TRUE BREAK or FAKEOUT status using candle body and wick geometry, and only confirmed true breaks with RSI momentum alignment produce long or short entry signals. Fakeouts become their own opportunity: when a breakout is classified as fake, BREAKRUNE reverses the bias and watches for an RSI-confirmed trap reversal signal in the opposite direction. The result is a system that profits not just from real breakouts but also from the very fakeouts that trap the crowd — with the RSI trigger layer ensuring every entry has genuine momentum behind it. Designed for traders across crypto, forex, gold, and indices on any timeframe.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔮 The Core Philosophy — Three Phases Before a Signal
The fundamental failure of conventional breakout systems is compression of the detection and confirmation steps into a single bar event. Price closes above resistance — signal fires. This approach has no mechanism for distinguishing momentum breakouts from stop-hunt spikes, thin-market wicks, or false structural breaks that reverse immediately.
BREAKRUNE separates these into three distinct sequential phases that every potential signal must pass through:
Phase 1 — Pattern Recognition:
The system continuously scans the pivot structure to identify one of five major pattern types — Range, Double Top/Bottom, Triangle, Wedge, or Trend Channel. The detected pattern provides the structural context for the breakout evaluation: where the resistance and support levels are, what the directional bias of the formation is, and whether the pattern height meets the minimum size requirement for a qualified break.
Phase 2 — Breakout Classification:
When a raw break of the pattern boundary occurs, the system enters PENDING state. Over the next configurable bars (the fakeout decision window), it watches for one of two outcomes. If candles close back inside the structure with a significant rejection wick, the break is reclassified as FAKEOUT. If the required number of candles all close beyond the boundary without a wick rejection, the break is classified as TRUE BREAK. No premature signal fires during this window — the system waits for the evidence.
Phase 3 — RSI Trigger Confirmation:
Only after a TRUE BREAK or FAKEOUT classification does the RSI trigger layer evaluate. For true breaks, the Fast RSI must be above the configured long trigger (default: 55) with Core RSI above 50 and both RSI slopes positive. For fakeout reversals, the Fast RSI must cross the midline in the reversal direction with positive directional slope. Both must pass the quality score gate. Only then does a signal fire.
This three-phase architecture is what makes BREAKRUNE categorically different from breakout indicators that react to a single bar event.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📐 Five-Pattern Detection Engine
BREAKRUNE continuously classifies the current market structure into one of five pattern types using the most recent confirmed pivot highs and lows. Every pattern provides resistance (res) and support (sup) levels used as the breakout boundaries.
Pattern detection uses:
Confirmed fractal pivot highs and lows (configurable pivot length, default: 5 bars each side), ATR-normalized tolerance values for determining flat vs sloped levels, and a minimum pattern height filter to eliminate micro-structures.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Range:
Both the most recent pivot high and pivot low are within the flat level tolerance (default: 0.35× ATR) of their respective prior pivots — price has been oscillating between approximately horizontal support and resistance. The pattern bias is neutral (patBias = 0) — a range can break either direction. The resistance is the average of the two pivot highs; support is the average of the two pivot lows.
Double Top / Double Bottom:
Two pivot highs at approximately the same level (within flat tolerance) with the current price below both peaks — Double Top, bearish bias. Or two pivot lows at the same level with current price above — Double Bottom, bullish bias. The pattern height is the distance from the support/resistance level to the opposing pivot extreme. The directional bias (patBias) is set accordingly — bearish for Double Top, bullish for Double Bottom.
Triangle (Converging):
The pivot highs are trending lower (by more than the trend shift tolerance, default: 0.20× ATR, between consecutive highs) while the pivot lows are trending higher — a symmetrical converging triangle. No directional bias is set (patBias = 0) since triangles resolve in either direction. The resistance is the most recent pivot high; support is the most recent pivot low.
Wedge:
Both pivot highs and pivot lows are trending in the same direction. Rising Wedge: both highs and lows trending upward — despite the upward direction the narrowing structure is bearish (patBias = -1). Falling Wedge: both trending downward — bullish (patBias = 1). The wedge pattern is identified when the pivot-to-pivot shift exceeds the trend tolerance on both sides in the same direction.
Trend Channel:
Pivot highs are trending in one direction and pivot lows are trending in the same direction, but the high trend direction opposes the expected wedge classification — a parallel channel. The channel bias follows the direction of the trend (upward-sloping channel = bullish patBias, downward = bearish).
Pattern freshness filter:
All pivot-based pattern detections are subject to a maximum age constraint (default: 80 bars from the most recent contributing pivot). Patterns older than this threshold are excluded from pattern detection — the oldest pivot must be within the freshness window for the pattern to be considered current and relevant.
Pattern size validation:
The pattern height (distance from support to resistance) must meet or exceed the minimum pattern height in ATR multiples (default: 1.1× ATR). This sizeOk condition contributes 2 points to the quality score — the largest single weight component — and reflects that properly sized patterns have more institutional significance than micro-structures.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚡ The Breakout Classifier — PENDING → TRUE BREAK or FAKEOUT
When price closes beyond a pattern boundary by more than the break threshold (default: 0.12× ATR), a raw break event is registered and the breakout classifier enters PENDING state. From this moment, every bar within the fakeout decision window (default: 5 bars) is evaluated.
Raw break detection:
Long raw break: Close above the resistance level plus break threshold, with the pattern allowing long breaks (not a bearish pattern — Double Top and Rising Wedge suppress long breaks)
Short raw break: Close below the support level minus break threshold, with the pattern allowing short breaks
PENDING state variables stored at the break bar:
The direction (pendingDir), the exact level broken (pendingLvl), the bar index of the break (pendingBar), and the pattern name (pendingPat) are all stored in persistent variables. The PENDING state is displayed on the dashboard CLASS row as PENDING — visible awareness that a break has occurred and is being evaluated.
FAKEOUT classification:
Within the fakeout window (pendingAge ≤ fakeWindow), if price closes back inside the pattern:
For a long break fakeout: close falls back below the broken resistance level AND the upper wick of the current bar exceeds the configurable minimum wick rejection ratio (default: 45% of bar range) — the bar closed back inside with a dominant upper wick, confirming selling rejection of the attempted breakout
For a short break fakeout: close rises back above the broken support AND the lower wick exceeds the minimum ratio
When these conditions are met, pendingFake is set to true and the CLASS row displays FAKEOUT — the orange classification that activates the trap reversal signal pathway.
TRUE BREAK classification:
When the configurable number of consecutive candles (default: 2 bars) all close beyond the broken level — `ta.lowest(close, confirmBars) > pendingLvl` for longs, `ta.highest(close, confirmBars) < pendingLvl` for shorts — without any fakeout having been detected, pendingTrue is set to true and CLASS displays TRUE BREAK. The confirmed candles all remaining beyond the level eliminates the single-bar false breakout.
Window expiry:
If neither FAKEOUT nor TRUE BREAK is classified within the fakeout window, the pending state expires silently — pendingDir resets to zero, the level clears, and the system resumes scanning. This prevents stale pending states from generating signals long after the relevant price action has passed.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 The RSI Trigger Layer — Momentum Gating on Classified Breaks
The RSI trigger layer is the final gate before a signal fires. It ensures every entry — whether on a true break or a fakeout reversal — has genuine momentum direction behind it at the moment of entry.
Dual RSI architecture:
Fast RSI (default: 7 periods) — the timing layer. Reacts quickly to price movement and provides the momentum trigger reading
Core RSI (default: 14 periods) — the confirmation layer. The intermediate momentum context that must agree with the fast RSI direction
RSI slope measurement:
Both RSI slopes are computed over the configurable slope bars (default: 3 bars) — the current RSI value minus the value N bars ago. A positive slope means RSI is accelerating; a negative slope means decelerating.
True Break Long RSI conditions (rsiLongOk):
Fast RSI above the long trigger threshold (default: 55) — momentum has already crossed into bullish territory
Core RSI above 50 — the intermediate RSI confirms the bullish bias
Fast RSI slope positive — momentum is still accelerating upward
Core RSI slope non-negative — intermediate momentum is not rolling over
True Break Short RSI conditions (rsiShortOk):
Fast RSI below the short trigger threshold (default: 45)
Core RSI below 50
Fast RSI slope negative
Core RSI slope non-positive
Fakeout Reversal RSI conditions:
Trap Long (rsiTrapLong): Fast RSI crosses above 50 (ta.crossover) with a positive slope — the RSI midline crossover after the fakeout confirms the reversal is gaining momentum
Trap Short (rsiTrapShort): Fast RSI crosses below 50 with a negative slope
Why the RSI trigger is a layer, not a gate: The RSI conditions are required for the signal to fire but are also the primary quality score component (2 points when fully met). This dual role means the RSI is simultaneously a hard entry requirement and a quality contributor — signals that barely pass the RSI threshold score lower than signals where momentum is strongly confirmed.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔀 The Fakeout Reversal — Trapping the Trap
The fakeout reversal is BREAKRUNE's most distinctive and high-reward signal type. When a long breakout is classified as FAKEOUT (price returned below resistance with a rejection wick), the crowd that bought the breakout is now trapped — holding longs above what has become confirmed resistance again. The RSI trap reversal watches for the Fast RSI to cross below 50 with negative slope: the momentum of the trapped buyers failing. When this occurs within the cooldown window, a short signal fires — entering precisely as the trapped longs begin capitulating.
Why fakeout reversals often produce the strongest moves: A failed breakout above resistance concentrates stop losses of all the breakout buyers just above the resistance level. As those stops are triggered on the reversal, they add selling pressure to the downside move — creating a self-reinforcing cascade. The fakeout reversal entry captures this cascade from near the top.
Enabling/disabling: The Enable Fakeout Reversal Signals setting (default: on) controls whether trap reversal signals are active. Disabling it restricts BREAKRUNE to true break signals only — appropriate for traders who prefer pure momentum continuation entries.
Visual differentiation: True break signals are rendered in the standard bull/bear score-based colors (yellow-green for longs, red for shorts). Fakeout reversal signals fire through the same triangle shapes but with the quality score reflecting the trap penalty — trap signals score 1 point on the setup component vs 2 for true breaks, naturally producing slightly lower overall scores that are reflected in the triangle's brightness.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🏅 The 10-Point Quality Score
Every signal — true break or fakeout reversal — is scored through a 10-point composite system before it can fire. Signals below the minimum threshold (default: 5) are suppressed regardless of classification.
Score components:
Pattern Size (up to 2 points):
sizeOk (pattern height ≥ minimum ATR threshold) scores 2 points. A zero-score here (pattern too small) alone can suppress a signal by 2 points — the largest single deduction possible. Well-sized patterns carry proportionally more institutional significance and this component enforces that.
RSI Trigger Alignment (up to 2 points):
rsiLongOk (for long signals) or rsiShortOk (for short signals) scores 2 points. This is the second largest component — reflecting that genuine momentum confirmation at the moment of entry is as important as pattern quality. Signals where RSI barely meets the threshold (Fast RSI just above 55 with flat slope) score these 2 points; signals where RSI is not aligned at all score 0.
Signal Type (1–2 points):
True break signals score 2 points; fakeout reversal (trap) signals score 1 point. This weighting reflects the inherently lower confirmation of a reversal trade versus a confirmed structural continuation — the trap trade is valid but carries more uncertainty.
Volume Confirmation (1 point):
Current bar volume meets or exceeds the volume average × multiplier (default: 1.1×). When volume confirmation is disabled in settings, this point is always awarded.
Non-Chop Market (1 point):
Choppiness Index is below the configured threshold (default: 62.0). Also enforced as a hard gate — extreme chop blocks all signals regardless of score.
HTF Bias (up to 2 points):
When useHtf is on and the higher timeframe EMA structure agrees with the signal direction (htfBull for longs, htfBear for shorts), 2 points are awarded. When HTF is disabled, 1 neutral point is always given. When HTF opposes the signal and useHtf is on, 0 points. This component has the same maximum weight as RSI and pattern size — reflecting the institutional significance of macro directional alignment.
Grade-coded signal colors:
Score 8–10 → full brightness (colBull / colBear). Score 6–7 → slightly dimmer. Score below 6 → transparent-tinted version. The triangle color communicates quality at a glance without reading the dashboard.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 Live Dashboard
The 10-row real-time dashboard displays the complete internal state of the breakout classifier and all filter conditions.
PATTERN — the current detected pattern: Range, Dbl Top, Dbl Bot, Triangle, Rising Wedge, Falling Wedge, Up Channel, Down Channel. Purple color. Updates on every bar as the pivot structure evolves
CLASS — the current breakout classification state: IDLE (no pending break), PENDING (raw break registered, evaluating), TRUE BREAK (confirmed continuation), FAKEOUT (rejection detected, reversal watching). Color-coded — yellow-green for TRUE BREAK, orange for FAKEOUT, neutral for IDLE/PENDING
BIAS — the directional bias: BULL (pendingDir=1 or patBias=1), BEAR (pendingDir=-1 or patBias=-1), or NEUTRAL. Yellow-green or red
LEVELS — the current support and resistance levels as a price pair (e.g., "2450.50 / 2490.25"). The exact boundaries the breakout classifier is watching
QUALITY — the live quality score out of 10. Yellow-green when at or above the minimum threshold, neutral otherwise
RSI F/C — the live Fast RSI and Core RSI values as a pair (e.g., "58.4 / 53.7"). Yellow-green when above 50, red when below
HTF — higher timeframe EMA structure: ▲ BULL, ▼ BEAR, or — FLAT
CHOP — live Choppiness Index value. Orange when above the block threshold
VOL — CONFIRMED (volume above threshold) or LIGHT (below threshold). Yellow-green or orange
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📈 Chart Visual System
Pattern Boundary Lines — when Show Pattern Boundary Lines is enabled, a resistance line (res, red-tinted) and support line (sup, yellow-green-tinted) are drawn from the pattern's origin bar to the current bar, showing the exact levels the breakout classifier is watching
▲ Triangle (below bar) — long signal. Full brightness yellow-green for score 8+, standard for 6–7, transparent-tinted for minimum score. Fires on both TRUE BREAK longs and FAKEOUT reversal longs (trap shorts become long entries)
▼ Triangle (above bar) — short signal with matching grade-coded coloring
✕ Cross (above bar, orange) — fakeout mark for a failed long breakout. Appears when Show Fakeout Marks is enabled and fakeLongNow fires. The orange × above the bar is the visual alert that a bull breakout has been rejected
✕ Cross (below bar, orange) — fakeout mark for a failed short breakout
Candle tinting — when Show Tint Candles by Active Bias is enabled, bars are tinted yellow-green (bias=1) or red (bias=-1) during active pending or pattern-biased periods. The tint shows the directional context continuously, not just at signal bars
SL Line (red dashed) — when Show SL + TP1 + TP2 is on, the ATR-based stop loss level extending guideExtend bars forward
TP1 Line (lime dotted) — first take profit at 1.8× ATR from entry
TP2 Line (bright yellow-green dashed, width 2) — second take profit at 3.0× ATR from entry
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚀 How to Trade with AlphaX BREAKRUNE — Step by Step
Step 1 — Read the Pattern and Levels
Check the PATTERN row on the dashboard — what structure is the system currently detecting? A Triangle or Wedge has directional bias; a Range or Double Top/Bottom has a directional expectation. Understanding the pattern context helps you assess which breakout direction is more probable
Check the LEVELS row — note the exact support and resistance prices. These are the lines the classifier is watching. If price is approaching resistance, a long break event may be imminent
Check BIAS — if it already shows BULL or BEAR from the pattern's directional classification, the system has a pre-existing directional lean before any break occurs
Step 2 — Monitor the Breakout Classification
When CLASS changes from IDLE to PENDING, a raw break has occurred. Watch the dashboard closely over the next fakeWindow bars — CLASS will shift to either TRUE BREAK or FAKEOUT
If CLASS shows FAKEOUT with an orange × appearing on the chart, the fakeout reversal pathway has activated. Check RSI F/C — is the Fast RSI approaching or crossing the 50 midline in the reversal direction?
If CLASS shows TRUE BREAK, check RSI F/C — is Fast RSI above 55 (long) or below 45 (short) with Core RSI confirming and slopes positive? If yes, a signal is likely imminent or has just fired
Step 3 — Enter on the Triangle Signal
A ▲ or ▼ triangle confirms all three phases have aligned — pattern identified, break classified, RSI triggered, quality scored
Read the triangle color — bright full-color triangle is Grade A (score 8+). This is the premium entry with all components confirming. Faded triangles are Grade C — valid but with reduced size
The QUALITY row shows the exact score. For fakeout reversal signals, the score will typically be 1 point lower than an equivalent true break signal due to the trap signal type weighting
Enable Show SL + TP1 + TP2 to see the ATR guide levels projecting forward from the signal bar
Step 4 — Manage the Trade
Watch the CLASS row during the trade. A new PENDING state in the opposing direction during an open position is an early warning that a counter-breakout is developing
Monitor RSI F/C — if Fast RSI begins rolling toward 50 against the trade direction, intermediate momentum is weakening. Consider taking TP1
The candle tint changing from yellow-green to red (or vice versa) during a trade means the bias has reversed — this is a structural exit cue
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ Identifying Low-Quality Conditions — When Not to Trade
Stand aside when:
CHOP is orange on the dashboard — the hard chop gate is active. All signals are blocked. Pattern breakouts in extreme chop environments are dominated by noise — the range is too oscillatory for genuine structural breaks
CLASS shows PENDING for multiple consecutive bars with no resolution — when the system remains in PENDING state approaching the fakeWindow expiry without classifying as either TRUE BREAK or FAKEOUT, the break is ambiguous. The system will expire it silently. This ambiguity itself is a warning — directional commitment is absent
Pattern height is too small (sizeOk = false, quality score below 7) — the pattern exists but is too narrow to produce meaningful measured moves. Low-quality entries at micro-patterns carry reduced reward with the same stop risk
HTF Bias opposes the breakout direction — a bull breakout signal against a bearish HTF produces 0 HTF confluence points. The signal may still fire if other components score sufficiently, but counter-HTF breakouts resolve in the HTF direction far more often than not
FAKEOUT class appears but RSI is not approaching the midline — a fakeout has been detected but the RSI trigger for the reversal has not yet materialized. ARM SHORT / ARM LONG conditions are developing but no signal has fired. Do not anticipate the reversal signal without the RSI confirmation — the reversal could still fail
Multiple rapid PENDING → expiry cycles without TRUE BREAK or FAKEOUT — when the classifier repeatedly enters and exits PENDING state without resolving, the pattern boundary is being tested multiple times without follow-through. This is range-bound behavior masquerading as a breakout environment. Increase the break threshold or wait for a cleaner structural setup
The ideal BREAKRUNE setup:
Well-sized pattern (sizeOk true, pattern height 2× ATR or more)
Clean single raw break bar followed by TRUE BREAK classification within 2–3 bars
Fast RSI clearly above 55 (long) or below 45 (short) with positive/negative slopes on both RSI layers
HTF aligned with the breakout direction
Volume confirmed on the breakout bar
Chop Index well below threshold
Quality score at 8–10 (Grade A triangle, full brightness)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚡ Key Features
🔮 Three-phase breakout architecture — Pattern Recognition → Breakout Classification (PENDING → TRUE BREAK or FAKEOUT) → RSI Trigger Confirmation. No signal fires without all three phases completing sequentially
📐 Five-pattern detection engine — Range, Double Top/Bottom, Triangle, Rising/Falling Wedge, and Trend Channel identified from confirmed pivot structure with freshness and size filters
⚡ Real vs fake breakout classifier — candle body and wick geometry over a configurable decision window distinguishes genuine structural breaks from stop-hunt reversals before the signal fires
🔀 Fakeout reversal signal mode — when a break is classified as FAKEOUT, BREAKRUNE reverses bias and watches for an RSI midline crossover trap signal in the opposing direction, profiting from the crowd that got trapped
📊 Dual RSI trigger layer — Fast RSI (7) for timing precision and Core RSI (14) for momentum confirmation, with slope measurement on both. Required alignment conditions differ between true break and trap reversal entries
✕ Live fakeout markers — orange × marks above (failed long break) or below (failed short break) on bars where fakeout classification occurs, providing real-time awareness of failed breakouts independently of signal generation
🏅 10-point quality scoring — Pattern Size (2pts), RSI Alignment (2pts), Signal Type (1–2pts), Volume (1pt), Non-Chop (1pt), HTF Bias (2pts). Grade-coded triangle colors reflect score quality at a glance
🎨 Candle tinting — bars tinted yellow-green during bull pending/bias periods and red during bear periods, providing continuous directional context between signals
📊 10-row live dashboard — Pattern, Class, Bias, Levels, Quality, RSI F/C, HTF, Chop, and Volume updated in real time every bar
🔔 3 alert conditions — BREAKRUNE Long, BREAKRUNE Short, BREAKRUNE Fakeout (independent alert for fakeout detection regardless of reversal signal)
⚙ Fully configurable — pivot length, flat and trend tolerances, minimum pattern height, freshness window, break threshold, confirmation bars, fakeout decision window, wick rejection minimum, volume filter, dual RSI periods and trigger levels, RSI slope lookback, fakeout reversal enable, cooldown, quality minimum, HTF parameters, chop gate, SL/TP ATR multiples, guide extension, all visual toggles, and all colors are independently adjustable
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙ Settings Reference
Pattern Intelligence
Pivot Length — fractal sensitivity for pivot detection (default: 5). Lower = more frequent smaller patterns; higher = fewer, larger structural patterns
Flat Level Tol (xATR) — ATR tolerance for determining whether consecutive pivots are at the same level (default: 0.35). Controls Double Top/Bottom and Range classification sensitivity
Trend Shift Tol (xATR) — ATR tolerance for determining whether consecutive pivots show a directional shift (default: 0.20). Controls Triangle, Wedge, and Channel classification
Min Pattern Height (xATR) — minimum pattern height for the sizeOk condition and quality score (default: 1.1). Raise to filter micro-patterns
Pattern Freshness (bars) — maximum age of the oldest contributing pivot for pattern classification (default: 80). Older pivots are excluded
Breakout Classifier
Break Threshold (xATR) — minimum close extension beyond the pattern boundary to register a raw break (default: 0.12). Lower = more sensitive; higher = requires stronger breaks
True Break Confirmation Bars — consecutive candles that must all close beyond the level for TRUE BREAK classification (default: 2)
Fakeout Decision Window — maximum bars after the raw break within which FAKEOUT or TRUE BREAK must be classified (default: 5). After this window, the pending state expires
Fakeout Wick Rejection Min — minimum wick-to-body ratio required for FAKEOUT classification (default: 0.45). Higher = requires more obvious rejection wicks
Volume Confirm — require volume above average on the signal bar (default: on)
Volume Avg Length / Volume vs Avg — volume baseline parameters (defaults: 20 bars / 1.1×)
RSI Trigger Layer
RSI Fast — the timing RSI period (default: 7)
RSI Core — the confirmation RSI period (default: 14)
Long Trigger — minimum Fast RSI level for a true break long (default: 55). Above 50 is the baseline; raising this requires stronger bull momentum
Short Trigger — maximum Fast RSI level for a true break short (default: 45)
RSI Slope Bars — lookback period for RSI slope calculation (default: 3)
Enable Fakeout Reversal Signals — toggle the trap reversal signal mode (default: on)
Confluence Gate
Signal Cooldown (bars) — minimum bars between consecutive signals (default: 6)
Min Quality Score (of 10) — minimum score to fire a signal (default: 5)
HTF Bias Layer — when on, HTF alignment contributes up to 2 points to the quality score (default: on)
Hard HTF Alignment — when on, counter-HTF signals are fully blocked regardless of score (default: off)
HTF Timeframe / HTF Fast / Slow EMA — higher timeframe parameters (defaults: 60-minute / 21 / 55)
Block Extreme Chop / Choppiness Length / Chop Block Above — chop gate parameters (defaults: on / 14 / 62.0)
Entry / Exit Guides
Show SL + TP1 + TP2 — toggle guide line display (default: off)
ATR Length — ATR calculation lookback (default: 14)
SL (xATR) — stop loss distance in ATR multiples (default: 1.2)
TP1 (xATR) — first take profit distance (default: 1.8)
TP2 (xATR) — second take profit distance (default: 3.0)
Guide Extend (bars) — bars forward the guide lines project (default: 30)
Display
Show Pattern Boundary Lines — toggle the resistance and support boundary lines (default: on)
Show Signals — toggle signal triangle rendering (default: on)
Show Fakeout Marks — toggle the orange × fakeout markers (default: on)
Tint Candles by Active Bias — toggle directional candle tinting (default: on)
Show Dashboard — toggle the full dashboard (default: on)
Dashboard Position — Top Left / Top Right / Bottom Left / Bottom Right
Colors
Bull / Bull Bright — yellow-green family for bullish signals and tinting
Bear / Bear Bright — red family for bearish signals
Pattern Accent — purple for pattern labels, boundary lines, and structural elements
Pending / Fakeout — orange for fakeout marks, CHOP warnings, and VOL LIGHT indicators
Neutral — gray for IDLE class and neutral dashboard states
Stop / TP1 / TP2 — individual guide line colors
Dash BG / Dash Header / Dash Section / Dash Frame / Dash Text — full dashboard color control
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔔 Alert Conditions (3 total)
BREAKRUNE Long — all three phases confirmed for a long entry: pattern identified, TRUE BREAK or FAKEOUT reversal classified, RSI trigger aligned, quality score met
BREAKRUNE Short — all conditions confirmed for a short entry
BREAKRUNE Fakeout — a fakeout has been classified on the current bar (fakeLongNow or fakeShortNow). This fires independently of whether a reversal signal follows — useful for awareness of failed breaks even when the reversal RSI conditions are not yet met
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 Recommended Settings by Instrument & Timeframe
The default configuration is optimized for XAUUSD, major forex pairs, and crypto on M5–H1 :
Pivot Length at 5 — captures intraday structural swings without excessive micro-sensitivity
Fakeout Window at 5 — on M5 this is 25 minutes, sufficient to observe whether a break holds or fails without waiting too long. On M15, consider reducing to 3
Confirmation Bars at 2 — requires two consecutive closes beyond the level before TRUE BREAK classification. On M1, consider reducing to 1
RSI Long/Short Triggers at 55/45 — the asymmetric thresholds (not 60/40) accept momentum confirmation that is directional but not yet overbought/oversold
For other instruments or timeframes, adjust:
M1–M3 scalping — reduce Pivot Length to 3, reduce Fakeout Window to 3, reduce Confirmation Bars to 1, reduce Cooldown to 3, tighten Break Threshold to 0.08
H4–Daily swing trading — increase Pivot Length to 8–10, increase Pattern Freshness to 150, increase Fakeout Window to 8–10, increase Confirmation Bars to 3, increase TP2 to 5.0× ATR
Crypto (BTC, ETH) — increase Fakeout Wick Rejection to 0.50 for crypto's wider rejection wicks, increase Break Threshold to 0.18, increase Min Quality to 6 for tighter filtering on volatile instruments
Indices (NAS100, US30) — use Hard HTF Alignment (on), set RSI Long Trigger to 57, increase Confirmation Bars to 3 for cleaner index breakouts
Pure true-break mode — disable Enable Fakeout Reversal Signals, raise Min Quality to 6, raise RSI Long Trigger to 58 for higher-conviction momentum-only entries
Fakeout-specialist mode — enable Fakeout Reversal Signals, reduce Fakeout Wick Rejection to 0.38 for more sensitive fakeout detection, lower RSI Slope Bars to 2 for faster RSI crossover detection
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
👥 Who This Is For
🔮 Breakout traders who are tired of being faked out — BREAKRUNE is built specifically around the fakeout problem. The three-phase architecture exists for one reason: to separate genuine structural breaks from the stop-hunt reversals that cost breakout traders money consistently
🔀 Traders who want to profit from both real breaks AND fakeouts — the fakeout reversal signal mode transforms the system's most common failure scenario into its own entry opportunity. The crowd that bought the false breakout becomes the fuel for the reversal trade
📊 Pattern-aware traders who want quantified structure — the five-pattern detection engine provides automatic structural context without manual drawing. Every signal tells you which pattern type it came from
📐 Momentum traders who need RSI precision — the dual RSI trigger layer (Fast 7 + Core 14) with slope measurement provides the most precise momentum timing gate in the AlphaX breakout signal suite
🧠 Systematic traders who want state transparency — the PENDING → TRUE BREAK / FAKEOUT classification state machine is fully visible on the dashboard in real time. You always know exactly what phase the system is in and why
🥇 Gold and forex intraday traders — breakout and fakeout patterns are particularly consistent on XAUUSD and major forex pairs during London and New York session transitions. Default settings are calibrated for these instruments
⚠ Traders who struggle with breakout timing — the RSI trigger layer forces every entry to have genuine momentum behind it at the moment of entry, eliminating the common experience of entering a breakout just as momentum exhausts
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📝 Notes
All signals are confirmed on bar close — the indicator is non-repainting by design. Pattern detection, breakout classification, and RSI conditions all finalize on confirmed bars
The pending state machine uses persistent variables (var) — the PENDING, TRUE BREAK, and FAKEOUT states persist across bars until resolved or expired. This is essential for multi-bar classification but means the state machine holds values from previous breakout events. A signal firing clears all pending state variables
Pattern detection is a best-fit classification — the system selects the most matching pattern from the available pivot structure on every bar. When the pivot structure changes (new pivots form), the pattern classification may update. This means the PATTERN row on the dashboard may change between signal events as new structure forms
The Pattern Freshness filter (default: 80 bars) ensures the oldest contributing pivot is recent. On slower timeframes with infrequent pivots, this may cause pattern detection to intermittently show — before new pivots form. Increase the freshness window on higher timeframes
Maximum 80 labels, 120 lines, and 600 bars back are configured. On very active low-timeframe charts, the oldest guide lines may be removed by TradingView's rendering limits
The fakeout mark (orange ×) fires independently of the reversal signal. A fakeout mark can appear without a subsequent reversal signal if the RSI trap conditions (midline cross with slope) are not met — the fakeout is real but the reversal momentum confirmation is absent
The indicator does not track open positions or P&L and does not connect to any broker or account
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ Disclaimer
This indicator is a technical analysis and visualization tool intended for educational and informational purposes only. It does not constitute financial advice or a recommendation to buy or sell any financial instrument. All signals are generated from historical and real-time price data using mathematical calculations — their accuracy or profitability is not guaranteed. Past performance of any signal type does not guarantee future results. Always conduct your own analysis, use proper risk management, and consult a licensed financial advisor before making any trading decisions. The author accepts no responsibility for any losses incurred from the use of this indicator.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Built for traders who understand that a breakout is not a signal — it is the beginning of an evaluation. The signal comes after the market proves whether the break was real. 指標

[ A L P H A X ] RELAY - Pattern Relay EngineAlphaX RELAY — Pattern Relay Engine: Formation → Armed → Fired Lifecycle System, Pre-Breakout Detection, Completion Scoring, Volume Coil Confirmation & Real-Time Phase Intelligence
AlphaX RELAY is a professional-grade chart pattern anticipation system built around a fundamentally different concept from every other pattern indicator — including its companion AlphaX FORGE. Where FORGE detects patterns after breakout confirmation and fires entry signals on completed formations, RELAY tracks patterns throughout their entire development lifecycle , scoring their completion percentage in real time and alerting you before the breakout occurs. The RELAY framework divides every pattern's life into three sequential phases — FORMING, ARMED, and FIRED — and updates the phase designation on every bar as price evolves within the formation. When a pattern enters the ARMED zone (price approaching the neckline or boundary within ATR tolerance), RELAY alerts you to prepare. When the breakout fires, the full entry framework activates with computed entry, stop, TP1, and TP2 levels alongside a JSON alert. The result is a system that gives you advance warning of high-probability breakouts rather than reactive confirmation — designed for traders who want to be positioned before the crowd, across crypto, forex, gold, and indices on any timeframe.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔄 The RELAY Philosophy — Anticipation Over Confirmation
Every significant chart pattern begins forming bars or hours before the breakout. A Double Top starts when the second peak forms near the first — at that moment, a skilled technical trader begins watching the neckline. A Head & Shoulders is identifiable from the moment the right shoulder begins forming — before price has reached the neckline. A Bull Flag is established from the moment the pole terminates and consolidation begins.
Most pattern indicators wait until the breakout is confirmed — at which point the pattern is already complete, the first wave of breakout traders has already entered, and the entry price is often significantly beyond the pattern boundary. RELAY inverts this model. By continuously scanning for pattern geometries as they form , scoring their completion, and communicating their phase state in real time, RELAY gives traders the ability to:
Identify patterns well before breakout — watching them develop in real time on the chart
Receive an ARMED alert when price approaches the trigger level — preparing limit orders or monitoring for the candle close
Enter on the FIRED event with a pre-planned trade, not a reactive chase
Track completion percentage continuously — knowing whether a formation is 65% complete or 95% complete changes the urgency of preparation
This anticipatory framework is the core intellectual contribution of RELAY to the AlphaX suite, and it is what distinguishes it from FORGE — two systems covering the same pattern types from opposite temporal perspectives.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔄 The Three-Phase Lifecycle — FORMING → ARMED → FIRED
Every pattern in RELAY exists in exactly one of three states at any moment. The phase is computed on every bar and displayed prominently on both the chart label and the dashboard.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Phase 1 — FORMING (Purple)
The pattern geometry has been confirmed — the pivots are in the correct structural relationship and the formation is identifiable. However, price has not yet approached the neckline or boundary level closely enough to be considered imminently actionable.
What FORMING means: The pattern exists and is valid. Completion percentage is typically 60–80% in this phase. The formation box is drawn on the chart in purple. The neckline or boundary is plotted as a solid purple line. The dashboard shows the pattern name, FORMING phase, and the current completion percentage.
How to use FORMING: Plan your trade. Note the neckline level. Calculate where your entry, stop, and targets will be if the pattern fires. Set a price alert at the ARMED zone boundary so you are notified when price begins approaching the trigger level. Do not enter yet.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Phase 2 — ARMED (Orange)
Price has approached the neckline or boundary to within the configurable ATR tolerance (default: 0.35× ATR). The pattern is in its final stage of formation before the breakout. The trigger is imminent.
What ARMED means: Price is close enough to the neckline that the next 1–5 bars will likely determine whether the pattern fires or fails. Completion percentage typically reaches 85–100% in this phase. The formation box and neckline shift to orange. The dashboard phase row turns orange. An ARMED alert fires.
How to use ARMED: This is your active preparation signal. If you are trading with limit orders, now is the time to place a limit order at the neckline level. If you prefer market orders on breakout, watch the chart closely for the closing candle confirmation. Review the confluence score — if it is at or above the minimum, the ARMED setup is worth your full attention.
ARMED alert: Separate alert conditions fire for ARMED Long and ARMED Short, allowing you to set up targeted notifications for the direction you want to trade. The ARMED alert is the pre-breakout awareness signal.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Phase 3 — FIRED (Yellow-Green / Red)
Price has closed beyond the neckline or boundary by more than the configured break margin (default: 0.6× ATR). The pattern has completed and the entry framework activates. Completion is 100%.
What FIRED means: The breakout is confirmed by bar close. The formation box and neckline shift to the directional color — yellow-green for bull patterns, red for bear patterns. Entry, SL, TP1, and TP2 lines are drawn on the chart extending 40 bars forward. All four levels are labeled with exact prices. The TP2 label also shows the computed R:R. A FIRED alert fires with a full JSON payload.
How to use FIRED: Enter on the next bar's open at or near the entry level shown on the chart. Place the stop at the SL level. Scale out 50% (default) at TP1. Let the remainder run to TP2 or trail with a stop.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 Formation Completion Scoring — The Pattern Health Metric
The completion percentage is a pattern-specific quantitative score that measures how far along the formation has progressed toward its breakout. Unlike a simple binary detection, the completion score gives you continuous awareness of pattern health.
How completion is computed:
Each pattern type starts with a base completion score that reflects the geometric confirmation of the core structure:
Double Top / Bottom base: 70% — the two-pivot structure is confirmed
Head & Shoulders / Inv H&S base: 65% — the three-pivot structure with neckline is confirmed
Triangles base: 60–75% — converging trendlines with sufficient base height
Flags / Pennants base: 62% — pole plus parallel or converging consolidation confirmed
Wedges base: 58–78% — converging wedge with correct slope relationship
Additional completion points are awarded for:
+15 points — price is on the correct side of the neckline (below the neckline for Double Tops, above for Double Bottoms)
+15–20 points — price is within the ARMED zone (within ATR tolerance of the neckline or boundary)
Maximum possible completion before breakout is 100%. FIRED state also shows 100% on the dashboard.
Minimum formation threshold: Patterns below the configured minimum completion percentage (default: 55%) are not displayed. This prevents very early, nascent patterns with insufficient structural confirmation from cluttering the chart. Raising this threshold (e.g., to 70%) shows only well-developed formations where the pattern geometry is fully confirmed and price is approaching the trigger.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📐 Pattern Detection — Five Formation Types
RELAY continuously scans for five pattern families in real time, computing their phase and completion on every bar.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Double Top / Double Bottom
Two pivot highs at approximately the same level separated by a pullback low (Double Top), or two pivot lows at approximately the same level separated by a recovery high (Double Bottom). The neckline is the intervening low (Double Top) or high (Double Bottom).
Phase transitions:
FORMING — geometry confirmed, price not yet near neckline
ARMED — price within 0.35× ATR of the neckline
FIRED — price closes below neckline by 0.6× ATR (Double Top) or above by 0.6× ATR (Double Bottom)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Head & Shoulders / Inverted H&S
Three-peak structure with a dominant central peak (head) flanked by two lower peaks (shoulders) at approximately equal heights, connected by a potentially sloped neckline through the two intervening lows. The Inverted H&S is the mirror pattern with a dominant central trough.
The neckline for H&S patterns is computed as a projected line through the two neckline pivot points, evaluated at the current bar — producing a dynamically sloped neckline that accurately reflects the true pattern boundary at any point in time.
Phase transitions follow the same ATR-based FORMING → ARMED → FIRED logic, with the ARMED zone assessed against the sloped neckline projection.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Triangles — Ascending, Descending, Symmetrical
Converging trendlines formed by a falling or flat upper trendline and a rising or flat lower trendline. The three variants are distinguished by slope:
Ascending Triangle — upper trendline near flat, lower trendline rising. Bull breakout expected
Descending Triangle — lower trendline near flat, upper trendline falling. Bear breakout expected
Symmetrical Triangle — both trendlines converging, neither flat. Can break either direction; RELAY tracks the direction of the actual breakout
The ARMED zone is computed relative to the projected upper (bull) or lower (bear) trendline at the current bar. Completion receives a bonus for larger triangle base heights (more than 2× ATR adds 15 points vs 5 points for smaller bases).
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Flags and Pennants
A sharp pole move followed by a consolidation with parallel downward-sloping trendlines (Bull Flag / Pennant) or parallel upward-sloping trendlines (Bear Flag / Pennant). The pole size must be at least 2.5× ATR to qualify as a genuine pole rather than normal price movement.
The upper trendline for Bull Flags and the lower trendline for Bear Flags are the breakout boundaries. The ARMED zone is assessed against the projected trendline level at the current bar. The target is the breakout level plus the full pole distance.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Rising and Falling Wedges
Converging patterns where both trendlines slope in the same direction but the lower trendline has a more extreme slope than the upper (Rising Wedge — bearish) or the upper trendline has a more extreme slope than the lower (Falling Wedge — bullish). The slope relationship distinguishes wedges from flags (which are parallel) and triangles (where lines converge to a point rather than widening).
Completion bonus is proportional to the wedge width in ATR multiples — wider wedges with more price range between the trendlines score higher completion. The target is the high of the wedge origin (Falling Wedge) or the low (Rising Wedge) — the structural measurement move.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🏅 The 10-Point Quality Scoring System
Every active pattern is scored through a 10-point confluence system. Only patterns meeting the minimum score threshold (default: 5) are displayed, and the quality-ranked selection algorithm picks the highest-scoring pattern when multiple formations are active simultaneously.
Score components:
Formation Completion (up to 2 points):
Completion at 85% or above scores 2 points. Completion above the configured minimum scores 1 point. This ensures well-developed patterns score higher than nascent formations.
HTF Bias Alignment (up to 2 points):
Bull pattern with bull HTF, or bear pattern with bear HTF, scores 2 points. When HTF is disabled, 1 neutral point is awarded. Counter-HTF patterns score 0. The HTF filter can be set as a hard block on FIRED patterns — preventing counter-HTF breakout alerts even if the pattern is technically valid.
Non-Chop Market (1 point):
Choppiness Index below the threshold. Also enforced as a hard gate — extreme chop blocks all patterns from displaying.
Pattern Phase (up to 2 points):
FIRED scores 2 points, ARMED scores 1 point, FORMING scores 0. This weighting ensures that more advanced phases naturally score higher in the quality ranking — a FIRED pattern will nearly always outscore a FORMING pattern in the selection algorithm.
Volume Coil Before Break (1 point):
Current volume is below the configured fraction of the volume moving average (default: 0.85×). A drying volume condition approaching the neckline is the classic pre-breakout behavior — the market is consolidating on declining interest before the explosive release. This layer rewards patterns where this institutional behavior is present.
R:R at Minimum (1 point):
The computed R:R between entry and TP2 meets or exceeds the minimum (default: 1.5). Ensures only patterns with adequate measured moves relative to their stop are displayed.
Pattern Size (1 point):
The pattern height or target distance meets or exceeds 1.5× ATR. Filters micro-patterns with trivial measured moves.
Selection algorithm:
When multiple patterns qualify simultaneously, RELAY uses a composite ranking that combines the confluence score, completion percentage (weighted at 0.05 per percent), and phase bonus (FIRED: +3, ARMED: +2, FORMING: +0). This ensures that a FIRED pattern with good confluence almost always outranks a FORMING pattern, while also rewarding high-completion ARMED patterns over low-completion FORMING patterns of equal confluence.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📦 Formation Box and Neckline Visualization
Every active pattern is rendered with two core visual elements:
Formation Box:
A rectangle spanning the pattern's horizontal range (from the start bar to the current bar) and vertical range (from the neckline to the opposite extreme of the pattern — the tops for bear patterns, the bottoms for bull patterns). The box color reflects the current phase: purple for FORMING, orange for ARMED, yellow-green or red for FIRED. The fill opacity is moderate (88%) — present enough to identify the pattern zone without obscuring price action behind it.
Neckline / Boundary:
A solid line at the critical breakout level, extending 20 bars beyond the current bar. For patterns with flat necklines (Double Tops, Rectangles), this is a horizontal line. For Head & Shoulders with sloped necklines, the line reflects the slope. The neckline color matches the phase color — shifting through purple, orange, and the directional color as the phase advances.
Phase Label:
A label at the right edge of the formation showing the pattern name, current phase, and completion percentage. Positioned above price for bear patterns, below for bull patterns. The label color matches the phase.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 Live Dashboard
The 13-row real-time dashboard displays the complete state of the current highest-scoring pattern.
RELAY STATE
Pattern — the name of the current pattern: Double Top, Head & Shoulders, Asc Triangle, Bull Flag, Falling Wedge, etc. Color-coded yellow-green for bull, red for bear
Phase — FORMING (purple), ARMED (orange), or FIRED (yellow-green/red). The most critical single row in the entire dashboard
Formation — the live completion percentage. Orange when below 80%, yellow-green when above 80%
Neckline — the exact price of the current neckline or boundary level in real time
LEVELS (FIRED)
Entry — the computed entry price (current bar's open at FIRED). Shows — when pattern is still FORMING or ARMED
TP1 / TP2 — both take-profit targets displayed as a price pair
Stop — the computed stop loss level
QUALITY
Confluence — the pattern's score out of 10. Yellow-green when at or above the minimum threshold
HTF · Chop — HTF bias (▲ BULL, ▼ BEAR, FLAT) and live Choppiness Index displayed on a single row. Orange CI indicates the chop gate is near or active
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📈 Chart Visual System
Formation Box (FORMING — purple) — the developing pattern's price range from start to current bar, purple-tinted
Formation Box (ARMED — orange) — box shifts to orange when price enters the ARMED zone. This color change on the chart is itself an alert
Formation Box (FIRED — yellow-green / red) — pattern complete, box color reflects direction
Neckline Line (solid, phase color) — the critical breakout level extending 20 bars forward
Phase Label — pattern name, phase text, and completion percentage. Positioned at the right edge of the formation
Entry Line (yellow-green dashed) — FIRED phase only, with "ENTRY x.xxxx" label
SL Line (red dashed) — FIRED phase only, with "SL x.xxxx" label
TP1 Line (lime dotted) — FIRED phase only, with "TP1 x.xxxx" label
TP2 Line (bright yellow-green dashed, width 2) — FIRED phase only, with "TP2 x.xxxx · R:R x.xx" label
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📡 JSON Alert System
RELAY fires a structured JSON alert on every FIRED event, delivering complete trade parameters to webhook receivers.
FIRED JSON structure: 指標

Rising & Falling Wedge Detector [HexaTrades]Overview
Wedge Detector automatically identifies and draws the two most actionable wedge patterns: the Rising Wedge (bearish) and the Falling Wedge (bullish). It marks each as a converging cone, validates the geometry, waits for a bar-close breakout, then plots a measured-move target and a structure-based stop without repainting the pattern structure.
It is built around quality over quantity: a strict, perfect-shape gate ensures only genuinely converging, textbook wedges appear. Every part of the logic is transparent and tunable. Ideal for swing and intraday traders who trade chart patterns and want an objective, rules-based way to spot wedges and define risk.
What it detects
Rising Wedge( bearish)
Higher highs and higher lows, but the lows rise faster than the highs (the lines converge upward). Signals a likely breakdown confirmed on a close below the lower trendline.
Falling Wedge ( bullish)
Lower highs and lower lows, but the highs fall faster than the lows (the lines converge downward). Signals a likely breakout confirmed on a close above the upper trendline.
How the Indicator Works
- Pivots: confirmed swing highs/lows (locked pivotLen bars after they occur).
- Boundaries: upper line from the two most recent swing highs; lower line from the two most recent swing lows, projected as straight lines.
- Slope & convergence: rising = both up, lows rising faster; falling = both down, highs falling faster (set by Convergence strictness).
- Perfect-shape gate: no crossing inside, real narrowing, minimum contraction, apex ahead, sensible duration, minimum ATR height.
- Forming preview: dashed shaded cone while developing.
- Breakout: bar-close below lower line (rising → bearish) / above upper line (falling → bullish).
- Filters: optional EMA trend, volume, breakout-candle ATR size.
- Targets/stops: measured-move target + opposite-boundary stop, drawn as persistent right-extending lines.
Features
- Automatic detection of rising & falling wedges from confirmed pivots.
- Perfect-shape validation rejects crossing, barely-narrowing, diverging, past-apex, too-small or too-long shapes.
- Forming preview dashed shaded cone before breakout.
- Bar-close breakout confirmation, no intrabar fakes.
- Measured-move target + structure stop (opposite boundary).
- EMA trend filter, volume filter, breakout-candle ATR filter (all optional).
- Theme-aware dashboard + shaded wedge zone + 3 alerts.
Dashboard
Status: Forming while developing → Confirmed on breakout
Last wedge: Rising Wedge / Falling Wedge
Bias: Bearish / Bullish
Target: Projected take-profit level
Stop: Structure-based invalidation level
Filters: EMA / Volume / ATR shown as On / Off
Settings
Detection:
Pivot length: swing sensitivity. Lower = more (and smaller) wedges.
Min wedge height (ATR): rejects wedges smaller than this many ATR.
Convergence strictness: how strongly the lines must converge (higher = stricter).
Min width contraction: minimum narrowing from start to breakout.
Max wedge duration: rejects over-stretched patterns.
Show forming wedge: preview wedges before breakout.
Filters:
EMA trend filter: only confirm breakouts aligned with the EMA (falling wedge above EMA, rising wedge below).
Volume confirmation: requires above-average volume on the breakout candle.
Min breakout candle size: require a breakout candle of at least N×ATR.
Visuals
Toggle target/stop lines, colors for bullish/bearish / forming, and the dashboard.
Alerts:
Rising Wedge breakdown:bearish confirmation.
Falling Wedge breakout: bullish confirmation.
Any wedge confirmed - either of the above.
Create alerts with “Once per bar close” for non-repainting behaviour.
Trading Guide
- Identify: dashboard Status = Forming + clean dashed cone.
- Enter: on the bar-close breakout (▲/▼) in the wedge's direction.
- Avoid: when filters reject the breakout, or in choppy ranges.
- Stop: the drawn SL (opposite boundary). Target: the drawn TP (measured move).
- Risk: size so breakout→stop is an acceptable risk; R:R = (TP−entry) ÷ (entry−SL).
Bullish Example (Falling Wedge)
Down-trend forms a dashed falling cone → a candle closes above the upper line → ▲ prints, wedge turns solid green, Status = Confirmed → enter, SL = lower line, TP = breakout + wedge height.
Bearish Example (Rising Wedge)
Up-grind forms a dashed rising cone → a candle closes below the lower line → ▼ prints, wedge turns solid red → enter short, SL = upper line, TP = breakout − wedge height.
Best Markets & Timeframes
Markets: works on crypto, forex, stocks, indices, futures, commodities. Best on liquid instruments with clean swings (the volume filter is most meaningful on stocks/indices).
Timeframes: 5m/15m = more signals, more noise (use stricter filters); 1H/4H = the sweet spot; Daily/Weekly = highest quality, fewer & slower.
We would love to hear your suggestions. If you have ideas for new features, indicators, analytics, or improvements, please share your feedback. Your input helps guide future updates and improve the indicator for all traders.
Wedge pattern detector indicator is for educational and analytical purposes only. It is not financial advice. Trading involves risk. Always use proper risk management and combine this indicator with your own analysis before taking any trade.
指標

指標

Channel Volume Profilwizard channel vp idm is a visual analysis tool built around a dynamic price channel, an anchored volume profile, value area levels, volume nodes, inducement zones, liquidity sweeps, and confluence labels.
the purpose of this indicator is to help traders read where price is positioned inside an active market structure. it combines channel direction, volume acceptance, value area behavior, and liquidity reactions into one clean visual layout.
this indicator does not predict the market. it is designed to organize technical analysis and highlight areas where price may react, slow down, reject, or continue.
main concept
the script builds a dynamic channel around price using a regression-based structure. inside this channel, it calculates an anchored volume profile that follows the slope of the market.
unlike a classic horizontal volume profile, this profile is projected inside the active channel. when the market is rising, the profile follows the upward slope. when the market is falling, the profile follows the downward slope.
this makes the profile easier to read in trending conditions, because the volume zones stay aligned with the current market path.
what the indicator displays
poc
poc stands for point of control. it marks the area with the highest volume inside the profile. this is often an area of acceptance where price may return, pause, or consolidate.
vah
vah stands for value area high. it is the upper boundary of the value area. if price rejects this level, a move back toward the poc may be watched. if price accepts above it, the market may be trying to expand higher.
val
val stands for value area low. it is the lower boundary of the value area. if price rejects this level, a move back toward the poc may be watched. if price accepts below it, the market may be trying to expand lower.
hvn
hvn stands for high volume node. it marks an area where volume concentration is high. these levels may act as areas of acceptance, reaction, or slowdown.
lvn
lvn stands for low volume node. it marks an area where volume concentration is low. these levels may act as fast movement zones, rejection zones, or imbalance areas.
idm
idm represents an internal inducement area. it helps identify internal liquidity zones that may be swept before a reaction or continuation.
drop marker
the drop marker highlights a possible liquidity sweep. it appears when price takes a level or zone and then moves back inside.
a label
the a label is a confluence marker. it combines several conditions such as sweep, rejection, value area interaction, volume behavior, poc reclaim, and structure context. it should not be used alone. it is a visual signal for deeper analysis.
how to use the indicator
start by looking at the channel direction.
if the channel is rising, the trader can focus more on reactions near the lower part of the channel, val, or bullish sweep zones.
if the channel is falling, the trader can focus more on reactions near the upper part of the channel, vah, or bearish sweep zones.
if price is near the middle of the channel, the market may be balanced. in that case, it is usually better to wait for a clear rejection, breakout, sweep, or acceptance shift.
how to use the poc
the poc is the main acceptance level of the current profile.
when price is above the poc, the market may be accepting higher prices.
when price is below the poc, the market may be accepting lower prices.
when price keeps returning to the poc, the market may be consolidating or building balance.
a clean break and hold above the poc can show stronger bullish acceptance.
a clean break and hold below the poc can show weaker structure or bearish acceptance.
how to use vah and val
vah and val define the value area.
a rejection from vah can show that price is failing to accept higher levels.
a rejection from val can show that price is failing to accept lower levels.
an acceptance above vah can suggest expansion to the upside.
an acceptance below val can suggest expansion to the downside.
beginners can use vah, poc, and val as a simple map:
vah = upper value zone
poc = balance zone
val = lower value zone
how to use hvn and lvn
hvn and lvn are displayed as small dotted levels with tiny labels.
hvn can act as a reaction or slowdown zone because price has previously accepted volume there.
lvn can act as a faster movement zone because there was less volume acceptance there.
these levels are not automatic buy or sell signals. they are reference points that should be combined with price action, structure, and risk management.
how to use idm
idm labels show internal inducement areas.
an idm can represent a zone where liquidity was built and later taken by the market. when price sweeps an idm and then reintegrates, it may help explain a reaction or shift in behavior.
an idm near val may support a bullish reaction if price sweeps and returns inside the channel.
an idm near vah may support a bearish reaction if price sweeps and returns inside the channel.
how to use the drop marker
the drop marker shows a potential liquidity sweep.
a drop below val or below the lower channel can suggest that price swept lower liquidity and then returned inside.
a drop above vah or above the upper channel can suggest that price swept upper liquidity and then returned inside.
it is usually better to wait for candle close before interpreting the marker.
how to use the a label
the a label represents a stronger confluence condition.
a bullish a near val or the lower channel can suggest possible absorption if price sweeps liquidity and closes back inside.
a bearish a near vah or the upper channel can suggest possible distribution if price sweeps liquidity and closes back inside.
the a label becomes more meaningful when it appears near poc, vah, val, hvn, lvn, or idm.
it should always be confirmed with market context, candle close, and risk management.
important settings
channel / vp lookback
controls how many bars are used for the channel and the volume profile. a higher value gives a broader view. a lower value gives a more reactive view.
regression length
controls the base of the channel. a higher value makes the channel smoother. a lower value makes it react faster to recent price movement.
vp rows
controls the number of rows in the volume profile. more rows create more detail, but too many rows can make the chart heavier.
value area %
controls the value area calculation. the common default is 70.
poc source
chooses how the poc is calculated. raw is stricter. smoothed is more stable visually.
vah / val source
chooses whether value area boundaries use raw volume or smoothed volume.
keep vp / levels inside rails
keeps the volume profile and main levels inside the channel so they do not overlap the outer rail visuals.
auto guard from neon rails
adds extra spacing from the visual rail bands to keep the profile and levels clean.
show inner lines
shows or hides decorative inner channel lines. when disabled, inner decorative lines are removed, while important levels such as poc, vah, val, hvn, and lvn remain visible.
show hvn / lvn small lines
shows small dotted high volume node and low volume node markers.
idm validation mode
controls how idm labels are displayed.
balanced sweep is more flexible.
strict bos is more selective.
early candidate displays potential idm areas earlier.
a minimum score
controls how selective the a label is. a higher value gives fewer signals. a lower value gives more signals.
beginner workflow
step 1
identify the channel direction.
if the channel is rising, focus on bullish reactions near the lower channel, val, or sweep zones.
if the channel is falling, focus on bearish reactions near the upper channel, vah, or sweep zones.
step 2
check where price is compared to the poc.
above poc can show stronger acceptance.
below poc can show weaker acceptance.
around poc can show balance or consolidation.
step 3
watch vah and val.
vah is the upper value boundary.
val is the lower value boundary.
look for rejection, acceptance, or sweep around these levels.
step 4
use hvn and lvn as reaction levels.
hvn may slow price down.
lvn may lead to faster movement or sharp rejection.
step 5
wait for confirmation.
a drop marker shows a sweep.
an a label shows confluence.
an idm label shows internal liquidity.
when several elements appear in the same area, that zone becomes more important for analysis.
example use case
price is rising inside the channel.
price pulls back toward val.
a drop marker appears below val.
price closes back inside the channel.
an a label appears near the lower channel.
in this case, the trader can study the area as a possible bullish reaction zone. this does not mean automatic entry. the trader should still check market structure, candle close, risk, and invalidation level.
another example
price reaches the upper channel and trades near vah.
a drop marker appears above vah.
price closes back below vah.
an a label appears near the top of the channel.
this can be studied as a possible rejection zone. the trader should still confirm with structure, risk management, and broader market direction.
usage tips
do not use the indicator alone.
always check the broader trend.
wait for candle close before making a decision.
avoid trading every label.
focus on zones where several elements align.
adjust settings depending on the asset and timeframe.
use proper risk management.
test the indicator before using it in live conditions.
risk notice
this indicator is an educational and technical analysis tool. it is not financial advice and does not guarantee any result. all signals and levels should be used as visual references inside a complete trading plan. every trader is responsible for their own decisions, risk management, and execution.
指標

Self Calibrating Probability ChannelSELF-CALIBRATING PROBABILITY CHANNEL
A forecast channel whose width is set by conformal prediction, tuned by a parameter-free online calibrator, and proven on your own chart. You pick a coverage level - say 90% - and the indicator shows you, live, the percentage it has actually achieved over recent bars, on every timeframe. Most bands assert a width; this one measures whether the width was right and corrects itself until it is, with nothing to tune.
WHAT IT IS
Bollinger Bands, Keltner Channels, Donchian Channels and standard-deviation regression channels all draw a width from a formula and ask you to trust it. None of them tell you what fraction of price actually landed inside. A "2 standard deviation" band is only a true 95% band if returns are normally distributed and stationary - which markets are not - so the real hit-rate drifts, usually without the user ever knowing.
This indicator inverts that. It forecasts where price should be next bar, measures how wrong that forecast has actually been, and builds the band directly from the empirical distribution of those errors. Then it watches its own hit-rate bar by bar and self-corrects. The result is a channel that earns its stated confidence level instead of assuming it - and reports, honestly, where it is and isn't holding.
THE METHOD (plain language)
1. Forecast path. Each bar, a one-step-ahead forecast of price is formed. You can pick a Kalman level-and-velocity tracker, a linear-regression slope, an EMA projection, or an anchored VWAP - or leave it on Auto, which runs all of them and blends them online by recent accuracy, so the centre line self-calibrates too. The forecast for the current bar uses only prior bars, so it is genuinely out-of-sample.
2. Error window. The gap between forecast and outcome is the forecast error. A rolling window of recent errors is kept, stored in volatility (ATR) units so the band breathes with the market. Each error is recorded only after its band has already been scored, so the band never includes the bar it is being tested on.
3. Conformal bands. For a chosen confidence level, the band edges sit at the matching quantiles of the recent error distribution (split-conformal prediction). Because it uses the actual error quantiles - including their skew - the bands are asymmetric when the errors are, rather than forcing a symmetric width. Four levels are drawn at once (50 / 70 / 90 / 95%) as nested zones, so the channel doubles as a probability heatmap: the dark core is where price spends most of its time, the faint outer edge marks rare excursions.
4. Parameter-free self-calibration (DtACI). After each bar the indicator checks whether price fell inside each level and nudges the width to hold the target. Rather than asking you to pick a calibration speed, it runs several speeds as competing "experts" and continuously blends them by how well each has tracked coverage recently (Dynamically-tuned Adaptive Conformal Inference). There is no rate to tune - the calibration tunes itself.
5. Live coverage proof, including by regime. The dashboard shows, for every level, the target versus the actually-achieved coverage over a rolling window, each tagged calibrated / under / over. It also reports the realised 90% coverage broken down by market regime - so you can see, for instance, that the band holds 92% in a quiet range but 87% in a volatile breakout. You are not asked to trust the band; you are shown its track record on the symbol, timeframe and regime in front of you.
6. Forward cone. A widening cone projects the likely range several bars ahead. Its width is built from actual multi-step forecast errors (not a square-root-of-time assumption), and its centre curves as projected momentum decays rather than extrapolating in a straight line. An optional bootstrap cloud resamples the real errors into sample forward paths - a direct picture of the distribution the bands come from.
7. Context and early warning. A two-axis regime read (trend strength x volatility) labels conditions; a turbulence detector watches for clustering of outer-band breaches and flags, in advance, when coverage is likely to degrade; a coiled-spring marker notes when a compressed range begins to expand; and an optional higher-timeframe row shows whether the larger trend agrees.
WHY THESE PARTS BELONG TOGETHER (one engine, not a bundle)
This is a single forecasting loop, not a collection of separate indicators sharing a chart. Each part is a required step, and removing any one breaks the whole:
- The forecast path produces an expected price and a drift. Without it there is no quantity whose error can be measured.
- The conformal band converts that path's own recent errors into prediction intervals. Without the forecast there is no error to bound; without the band the forecast is an unqualified guess.
- The online self-calibration adjusts the band to hold the target hit-rate as conditions change. Without it the intervals slowly drift out of calibration and the stated confidence becomes false.
- The live coverage readout verifies the loop is actually working, overall and per regime. It is the proof step a formula-based band cannot offer.
- The context layers (regime, turbulence early-warning, graded breaches, compression-release, higher-timeframe agreement) all read the same forecast errors and exist only to tell you WHEN the interval is most trustworthy and when it is about to fail.
So the components are not combined for convenience; they form a closed measure-and-correct cycle - forecast, bound the error, recalibrate, verify - which is precisely why they are published as one script rather than several overlays.
WHAT MAKES IT DIFFERENT
Conformal prediction is a distribution-free framework - its coverage guarantee holds for any underlying distribution given exchangeable errors, with no assumption that returns are Gaussian. It is standard in machine-learning uncertainty quantification but essentially absent from charting tools, which lean almost entirely on standard-deviation or ATR multiples. Pairing it with a parameter-free online recalibrator, a self-weighting forecast centre, and an on-chart coverage readout - including a per-regime breakdown - is the original contribution here. No moving-average envelope, regression channel or volatility band can state "I targeted 90% and have actually delivered 90% over the last 250 bars, and here is exactly where I don't" - this one can, and shows it.
WHAT YOU SEE ON THE CHART
- A multi-zone channel around a forecast centre line, shaded from the high-probability core out to the rare-excursion edge, coloured by forecast direction, and adaptive to dark or light chart backgrounds.
- A widening forward cone, optionally filled with a faint cloud of resampled paths.
- Right-side labels marking the forecast and the 90 / 95% edges as price levels.
- Small triangles when price breaks beyond the outer band; a ring when that breach is also high-quality (graded on displacement, close position, volume, range expansion and structure); an amber diamond when a quiet range starts to wake up.
- A dashboard with the live forecast, the 90% band range and where price sits within it, the full calibration table, the per-regime coverage, a reliability score, the forecast bias, the sample count, the calibration mode, and an optional higher-timeframe row.
- A plain-language "how to read" key, so the chart is approachable without any statistics background.
HOW TO READ AND USE IT
Mean reversion: when price reaches the outer (90 / 95%) zone in a ranging regime, it is statistically stretched and tends to revert toward the centre line. The "band position" readout and the calibration table tell you how stretched, and how trustworthy that edge currently is.
Trend continuation: a sustained walk along one side of the channel, especially with the cone tilted that way and the higher-timeframe row aligned, indicates a directional regime rather than noise.
Anomaly / breakout: a plain triangle is a volatility event; a ringed one is the same event confirmed as high-quality. A turbulence flag warns that the bands may be about to lose calibration.
Reliability and regime: treat the bands as most actionable when reliability is high, the calibration rows read "calibrated", and turbulence is quiet. The per-regime coverage tells you which conditions the channel is currently most trustworthy in.
SETTINGS OVERVIEW
- Forecast path (Auto / Kalman / Linear Regression / EMA / Anchored VWAP) and smoothing lengths.
- Calibration: residual window, recency window, volatility normalisation, parameter-free DtACI on/off (with a manual ACI rate as fallback), coverage-evaluation window.
- Forward projection length, cone momentum decay, optional bootstrap cloud.
- Anomaly sensitivity, swing pivot length, coiled-spring thresholds, turbulence sensitivity.
- Higher-timeframe context, price source, and full theme controls.
The price source is selectable and volume is borrowed where a symbol reports none, so it works across futures, equities, forex and crypto on any timeframe. Defaults read well intraday; longer windows suit higher timeframes.
HONESTY AND LIMITATIONS
- Non-repainting: each bar's forecast uses only prior bars, each error is recorded only after its band is scored, anomalies confirm on bar close, and the higher-timeframe row uses the last confirmed higher-timeframe value. Historical bands do not change after the fact.
- Conformal coverage is a statistical expectation over a window, not a per-bar guarantee. In a sharp regime break the realised hit-rate will dip until the window and calibrator re-adapt - and the dashboard, including its per-regime breakdown, shows that dip honestly rather than hiding it.
- The bands describe the distribution of short-horizon forecast error. They are a probabilistic context for price, not a prediction of direction and not a trading system.
- Calibration needs enough samples; on a fresh chart the channel needs its warm-up window before the figures are meaningful, and the cone needs a few extra bars beyond that.
This script is for research and education. It is not financial advice and not a solicitation to trade. Markets carry risk; test any tool on your own data and timeframe, and make your own decisions.
指標

Auto Andrews' Pitchfork Adaptive Channel# Auto Andrews' Pitchfork — Adaptive Median-Line Channel, Regime & Calibration
## What it is
On TradingView an Andrews' Pitchfork is a manual drawing tool: you place three points by hand and it draws a median line with two parallel tines. This script automates that geometry and, more importantly, surrounds the raw lines with the decision context a drawn pitchfork can never give you — whether the channel currently fits the market, whether a touch is likely to revert or break, and how the median and tines have actually behaved on the symbol you are looking at.
It detects the swing pivots, builds the channel, auto-selects the variation (Standard / Schiff / Modified Schiff) whose median best bisects the recent price path, and then runs a regime, reversion, break-strength and calibration stack on top of that one channel. It works on any symbol and any timeframe; every raw-data series is user-selectable in Settings.
## Why these components are combined (how the parts work together)
A bare auto-pitchfork only answers "where are the lines." On its own it shows the same picture in a quiet range, where price rotates back to the median, and in a strong trend, where price rides a tine and keeps going — the classic median-line failure. Every layer in this script exists to remove one specific blind spot of the bare geometry, and each layer feeds the next. They are not independent indicators stacked together; they are all derived from, or applied to, the same auto-built channel.
- **Auto-geometry (pivot detection + variation fit)** draws the channel and chooses the variation that best fits the actual price path, so the median is meaningful rather than an arbitrary hand placement.
- **Regime (efficiency ratio + ADX + volatility clustering)** decides whether a tine touch should be expected to fade (revert) or be ridden (continue) — the question the geometry alone cannot answer.
- **Reversion math (variance ratio + Ornstein-Uhlenbeck half-life)** is the statistical check on that decision: is the series actually mean-reverting, and if so, in roughly how many bars does a stretch to the median decay.
- **Break-strength scoring** rates how decisive a move beyond a tine is — magnitude versus ATR, volume participation, range expansion, the close's position within the bar (an anti-wick check), and a compression-then-release pattern. This turns "price crossed the tine" into a graded Fade / Ride / Invalid read instead of a binary one.
- **Volume nodes (POC, HVN/LVN)** classify whether each tine sits on a high-volume acceptance shelf (reaction likely) or a low-volume gap (likely sliced through), so proximity becomes a quality read.
- **Confluence (anchored VWAP, volume POC, higher-timeframe swing levels)** marks where the auto-geometry agrees with independent reference levels.
- **Calibration** measures, past-only, how often the median and each tine were actually respected on this symbol, reported with Wilson confidence intervals and a containment percentage, so the reliability read is earned from data rather than assumed.
The histogram of these reads is the synthesis: the dashboard ranks and states the channel's current condition in plain terms, but every figure is descriptive context, never a trade instruction.
## How to use it
1. Add it to any chart and set your data sources under "Data Source (any market)." For symbols with no native volume (some cash indices and FX feeds), enter a volume-bearing proxy in "Borrow volume from symbol."
2. Read the channel as a map: the median is equilibrium, the tines are the channel edges, and the warning lines mark over-extension.
3. Read the Status row: FADE means expect rotation inside the channel; RIDE means a strong break in a trend (the tine is being ridden); INVALID means the channel broke and a re-anchor is expected.
4. Use Regime, Half-life and Var-ratio to judge whether a tine touch is a fade or a continuation; use the volume-node tag and Confluence to judge whether a level is likely to hold; use Respect and Containment to judge whether the fork fits this symbol at all.
5. Treat every value as probabilistic context to combine with your own analysis and risk management.
## Optional context (off by default)
Two optional layers extend the tool without cluttering the default view:
Higher-timeframe context forks overlay lightweight median-and-tine outlines of the same auto-geometry on 5× and/or 15× the chart timeframe, so you can see how the current channel sits inside the larger structure. Only the higher-timeframe pivots are pulled (non-repainting, confirmed bars), and the outlines are drawn in time coordinates so they align across resolutions. They are intentionally minimal — no fills, glow, or analytics — because the full regime, break-strength and calibration stack stays on the current-timeframe fork, which is the one the dashboard describes. Enable them only when you want the multi-scale picture; on very high chart timeframes a 15× resolution can be non-standard and that outline will not populate.
Re-anchor on break lets a fresh fork begin building from post-break structure whenever the channel is invalidated, rather than only when new prominent pivots form. The broken channel stays on screen (dashed) until enough post-break pivots confirm to render the new one — there is an inherent pivot-confirmation lag, so the new fork appears a few bars after the break, not at the exact break bar. A minimum-bars guard prevents repeated re-anchoring in choppy conditions.
## Settings for any market
The High, Low and Price source inputs select the raw series the engine runs on, so it is not tied to one instrument. The volume-borrow input is blank by default and only activates on symbols that truly report no native volume. All optional layers degrade gracefully when their data is unavailable, and a data-health read flags when volume is unreliable.
## Originality
This is an original implementation. The contribution is not any single layer but the closed loop built around an automatically generated pitchfork: auto-geometry feeds a regime and break-strength engine that classifies the channel state, a half-life and variance-ratio core that quantifies reversion, volume-node context that grades each tine, and a past-only calibration tracker that reports how the lines have actually behaved — all from the one channel, rather than as separate tools placed side by side.
## Limitations (honest)
Pivots confirm after the configured right-bars lag and are non-repainting by construction. Volume-based layers require real volume. Calibration figures are descriptive of past behaviour only — they are not a backtest and not a probability of future results. Every read is probabilistic context.
## Disclaimer
This is a study / indicator for chart analysis and education only. It is not a strategy, not a recommendation, and not financial advice. It places no orders and guarantees no result. Markets involve risk, and a level's past behaviour does not assure future behaviour. Do your own research and manage your own risk.
指標

Wedge Polaris [JOAT]Wedge Polaris
Wedge Polaris is a multi-pattern auto-detector. It identifies five distinct converging-channel pattern families from zigzag pivots — Ascending Triangle, Descending Triangle, Symmetric Wedge, Rising Wedge, Falling Wedge — and on confirmed breakout projects a three-target ladder (Fibonacci times ATR times historical-duration blend). Pattern statistics, breakout probabilities, target hit / miss tracking, completed-pattern history, and a right-side bias gauge are all surfaced on the chart.
What makes it different
Most wedge / triangle indicators detect a single pattern type. This script classifies five families using slope analysis of the top and bottom channels.
Collinearity tolerance is adaptive. It scales with ATR percentile so the script is strict in low-volatility regimes (clean pivots) and forgiving in high-volatility regimes (noisier pivots) without being retuned.
Breakout probability is computed from the standard-normal CDF on the z-scored duration of the current pattern against a rolling history of completed patterns. Class-conditional bull / bear probabilities are blended with net-volume polarity inside the pattern.
A strong-break filter requires the breakout candle's body Z-score to exceed three AND its 25th or 75th body percentile to be on the correct side of the boundary. This distinguishes decisive expansion from noise probes.
A completed-pattern history strip tracks the last ten patterns with their outcomes (Target 1 hit, Stop hit, expired) so you can see the recent quality of the detector on the current instrument.
How it works
Zigzag pivots are tracked via standard ta.pivothigh and ta.pivotlow with parallel arrays.
Collinearity is tested between the two outer pivots and a middle pivot. Tolerance widens in high-volatility environments.
Two collinear lines (one for highs, one for lows) form a channel. Convergence, alignment, and inside-the-channel tests confirm a valid pattern.
Slope analysis classifies the pattern family.
On breakout confirmation, target lines are projected. T1 equals entry plus or minus 0.5 times width. T2 equals entry plus or minus 1.0 times width. T3 equals entry plus or minus (1.618 times width plus atr-z times ATR). SL is symmetric at width times the user SL multiplier.
Each completed pattern's duration and direction is appended to a 200-entry history buffer, which feeds the probability statistics.
Reading the chart
Pattern channels: two lines plus a linefill between them. Line style differentiates pattern type (solid for triangles, dashed for wedges, dotted for channels).
Completed-pattern ghost outlines fade for a user-configurable number of bars after the pattern ends.
A pattern stats label at the channel midpoint reads, for example: WEDGE 23 bars P(bull) 64% P(break) 78% ATR x.xx.
A three-target ladder on confirmed breakout: entry / SL / T1 / T2 / T3 horizontal lines plus price-only right-edge labels (no arrows, no shout text). Linefills shade the risk and reward zones.
Volume confluence: if breakout-bar volume exceeds 1.5 times the 20-bar SMA, target labels append VOL+.
A right-side bias gauge: 21-segment vertical band with a pointer.
Optional right-side breakout-probability gauge (separate from bias gauge).
A completed-pattern history strip above past pattern midpoints.
A strong-break flash: bgcolor pulse on the strong-break bar.
Signals
Pattern formed
Bullish / bearish breakout
Strong bullish / strong bearish breakout
Target 1 / Target 2 / Target 3 hit
Stop loss hit
All gated on barstate.isconfirmed or barstate.ishistory. No future references.
Inputs
Zigzag : zigzag length.
Collinearity : base tolerance (as a fraction of price).
Breakout : SL width multiplier, target line extension bars.
Visual : bullish / bearish colors, bias gauge, breakout probability gauge, pattern stats label, target ladder.
On-chart : completed-pattern history, ghost outlines extension bars, line-style differentiation.
Dashboard : position, size.
How traders use this
Pattern plus volume : a confirmed breakout with the VOL+ tag and a high P(bull) reading is a higher-probability continuation entry.
Mean-reversion fades : when a wedge's third or later touch happens at the convergence apex with low P(break), the pattern often fails to break. Fade trades inside the channel are possible.
R-multiple management : once target 1 prints, common practice is to move stops to breakeven and let the remainder run for T2 / T3. The target ladder makes this straightforward.
Pattern history : the strip lets you assess whether the detector is performing well on the current instrument and timeframe before sizing up new signals.
Limitations
Pivot detection inherits the right-bar delay of ta.pivothigh and ta.pivotlow. Patterns are confirmed only after the pivot-right-window passes.
Collinearity tolerance is a heuristic. Extremely volatile or extremely clean charts may need tuning of the base tolerance.
The class-conditional probability statistics need a minimum sample (five completed patterns) before they are meaningful.
Pattern recognition is fundamentally interpretive. Even confirmed patterns fail.
Compatibility
Pine Script v6 open-source indicator. Imports TradingView/ta/12 for ta.atr2 (series-period ATR used in duration-adaptive target projection). Any symbol, any timeframe. No request.security calls.
Defaults
7-bar zigzag, 0.5 percent base collinearity tolerance, mint / red colors, top-right medium dashboard. For very fast charts shorten the zigzag length. For slow charts lengthen it and tighten the collinearity tolerance.
指標
