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. Gösterge

Gösterge

[ 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. Gösterge

[ 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: Gösterge

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.
Gösterge

Gösterge

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.
Gösterge

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.
Gösterge

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.
Gösterge

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.
Gösterge

Celestial Mean Reversion Envelopes [Pineify]Celestial Mean Reversion Envelopes
This indicator identifies mean reversion opportunities by wrapping an adaptive moving average in standard deviation envelopes and signaling when price snaps back inside after piercing a band. Rather than using a fixed-period moving average as the baseline, the central line adapts its speed based on how frequently price is setting new highest highs or lowest lows — it tracks price quickly in trending conditions and almost freezes in ranges, so the bands shift organically with market character.
Key Features
Adaptive mean that responds to trend intensity rather than time alone — sluggish during consolidation, responsive during strong moves
Standard deviation envelopes calibrated to actual recent volatility, not fixed ATR multiples
Buy and sell signals generated on band crossunders/crossovers, confirming the reversal rather than anticipating it
Translucent overbought/oversold shading between the mean and each band for quick visual context
Built-in alerts for both reversion directions
How It Works
The calculation runs in two stages: first building the adaptive mean, then constructing the envelopes around it.
Extreme tracking — On each bar, the indicator checks whether a new highest high or lowest low has formed over the lookback window. Bars where a fresh extreme appears are marked with a value of 1; all other bars get 0. The SMA of these binary values over the same window gives the fraction of recent bars that produced a new extreme.
Squaring the fraction — Raising that fraction to the power of 2 produces a nonlinear smoothing coefficient. When trends are strong and new extremes appear on most bars, the coefficient approaches 1 and the adaptive mean tracks price closely. In a choppy range where few new extremes form, the coefficient collapses near zero and the mean barely moves. This technique is inspired by TRAMA (Trend Regularity Adaptive Moving Average) by e2e4mfck.
Adaptive mean update — Each bar the mean nudges toward the source price by the amount determined by the coefficient. The result is an average that effectively switches between "responsive" and "parked" behavior depending on what the market is doing.
Standard deviation envelopes — The upper and lower bands are placed at ±(StdDev × multiplier) from the adaptive mean, where StdDev is computed over the same lookback period. This makes the band width proportional to recent volatility: wider when price has been swinging, tighter during quiet periods.
Signal generation — A buy signal fires when source crossesunder the lower band (price dipped below, then closed back above it). A sell signal fires on a crossover of the upper band. The crossunder/crossover logic requires price to actually breach and then retrace — a bar that merely touches the band without closing through it does not trigger.
How the Components Work Together
The adaptive mean solves a problem that conventional envelope indicators ignore: when a market trends hard, a static EMA or SMA falls behind, making the upper band a poor reference for "too far, too fast." Because the adaptive mean accelerates during trends, the envelopes stay anchored to current price levels rather than lagging. This means the bands are more likely to represent genuine statistical extremes rather than just momentum riding.
The standard deviation layer adds a second dimension. Instead of a fixed pip or percentage offset, the band width expands when the market is volatile and contracts when it is calm — naturally suppressing signals during low-volatility compression and allowing wider moves during active sessions before flagging exhaustion.
Together these two layers create a filter that roughly says: "price reached a statistically unusual distance from where the trend currently sits, then pulled back." That combination reduces fakeout signals compared to using static bands on a lagging baseline.
Trading Ideas and Insights
On higher timeframes (daily, 4H), buy signals at the lower band that coincide with a key support level or volume spike may offer higher-confidence entries. Look for the adaptive mean to be flattening — it suggests the trend is pausing rather than reversing.
In intraday trading, signals that appear after a sharp impulsive leg tend to perform better than signals generated inside a choppy range. The adaptive mean will often be steeply sloped after an impulse, indicating the signal is against the micro-trend — exercise more caution and use tighter risk.
When price oscillates between the bands repeatedly without triggering signals, the market is likely in a low-volatility squeeze. A breakout attempt that immediately pulls back (triggering a sell or buy signal) at the edge of that range can mark the failed breakout early.
The gradient fill zones serve as a running reference for where price stands relative to the mean. Price persistently in the upper (red) fill with a rising adaptive mean suggests a strong trend; consider fading only when price crosses back into the neutral zone.
Past performance of any signal pattern does not guarantee future results. Always combine signals with broader context — structure, volume, and higher-timeframe bias. These signals indicate potential exhaustion; they do not predict reversal magnitude.
Unique Aspects
The squaring of the trend-regularity fraction is the core differentiator. Most adaptive averages use linear coefficients; squaring creates a much sharper distinction between trending and ranging states, so the mean spends more time "frozen" during ranges and snaps to price quickly when momentum genuinely kicks in.
Signals require price to close back inside the band, not just touch it — this one-bar confirmation step reduces noise from wicks that briefly pierce a band and immediately reverse without a real close-to-close move.
Band width is purely standard-deviation based rather than ATR-derived, which means the scaling responds to the actual statistical dispersion of the source series rather than the high-low range. On instruments with many gaps this can produce meaningfully different widths than ATR bands.
How to Use
Add the indicator to any chart. It overlays directly on the price pane.
The blue line is the adaptive mean. When it is rising steeply the market is in an upward trending mode; when flat or slightly sloped, it is ranging.
The red-shaded zone above the mean is the overbought area; the green-shaded zone below is the oversold area. Price spending extended time in one zone suggests momentum, not necessarily exhaustion.
A green BUY label below a bar means price closed back above the lower band after briefly breaking it — potential reversion entry. A red SELL label above a bar means the opposite.
To set alerts, use the "Buy Alert" or "Sell Alert" conditions from the indicator's alert panel (Once Per Bar Close recommended to avoid premature triggers on intrabar wicks).
Customization
Adaptive Mean Length (default: 99) — Controls both the highest/lowest lookback and the SMA averaging window for the smoothing coefficient. Higher values slow the mean considerably and widen bands; lower values increase reactivity but also produce more frequent and less reliable signals.
Envelope Multiplier (default: 2.5) — Scales the standard deviation distance. 2.0 suits instruments with tighter typical ranges; raise to 3.0+ on highly volatile assets to avoid constant band touches that don't represent genuine extremes.
Source (default: close) — Change to hl2 or hlc3 to incorporate high and low into the baseline; close is typically sufficient for most reversion setups.
Color inputs — Adjust bullish/bearish/mean colors and toggle the gradient fill on or off depending on visual preference.
Conclusion
Celestial Mean Reversion Envelopes pairs an adaptive mean that adjusts its responsiveness to trend regularity with volatility-scaled deviation bands, targeting the specific moment when a stretched move closes back inside its statistical boundary. The approach is best suited to traders who wait for confirmation — the crossunder/crossover trigger ensures you're acting on a completed reversal bar, not an open wick. As with any mean-reversion tool, it works best when context confirms the extension is exhaustion rather than breakout continuation.
Gösterge

Anchored Trend Channels [MQLSoftware]Anchored Trend Channels is a structural overlay that maps each phase of price action between confirmed swing points as its own parallel trend channel. Instead of fitting one curve or band to all of price history, it breaks the chart into discrete pivot-to-pivot segments and renders each one as a self-contained anchored channel with its own slope, width, and angle. The active channel projects forward with a dashed extension so future support and resistance levels are visible at a glance.
A second, finer regression channel (Micro) lives inside the currently forming Macro segment to show local momentum and its relationship to the broader trend. A compact right-side panel reads off the resulting structure, the active segment angle, the segment chain, multi-timeframe context, and three optional structural events.
This is a visual analytical tool intended for chart reading and structure mapping. It does not execute trades and does not provide financial advice.
Key Features
Pivot-anchored Macro channels that segment price action into discrete trend phases (one channel per phase, anchored on confirmed swing pivots)
Active segment with a forward-extending dashed projection of about 20 bars, showing where the channel boundaries would lie if the trend continues
Adaptive Micro regression channel inside the active segment, with R-squared fit quality readout
Trend Bias scoring weighted by segment length and angle, combined with net price move across the analysis window
Acceleration metric showing how much the Micro angle deviates from the Macro angle (faster, slower, or flat)
Right-side panel with Macro angle, segment chain visualization, Micro R-squared, MTF context, and three structural signal states
Non-Repaint Mode toggle for users who prefer closed-bar-only updates on the active segment
Three optional structural event markers (Segment Break, Macro Pullback, Micro Continuation) with a configurable cooldown to avoid clustering
Core Concept
Most channel and trend indicators on TradingView take one of two approaches. They either fit a single continuous curve to all of price (linear regression channels, ATR-trailing bands, smoothed moving averages with deviation bands) or they detect individual trendlines through two pivots and project them indefinitely. Both approaches have known limitations. A single continuous channel cannot describe a market that has clearly changed phase. Two-pivot trendlines drift, get broken, and need constant manual maintenance.
This indicator builds on a third approach: piecewise channels anchored on confirmed pivots. Each finished segment is a closed, immutable object that describes one phase of price action between two opposite swing points. The chain of segments left behind is a structural history of how the trend developed, where it accelerated, where it reversed.
The indicator adds three specific algorithmic elements on top of that base.
1. Quality Filters at Segment Birth. Before a new segment is committed, two filters check that the pivot move is structurally meaningful. The pivot-to-pivot price distance must exceed a configurable ATR multiple (default 2.5x), and the bar count must exceed a minimum length (default 8 bars). Pivots that fail either check are skipped, so the visible chain reflects real phase changes, not noise.
2. Pivot-Anchored Geometry with Max-Deviation Width. Each segment's basis line is the straight line between its two anchor pivots. The channel half-width is the maximum deviation of any bar inside the segment from that basis line, scaled by a user multiplier and floored by an ATR-based minimum. This produces channels that visibly contain the price action that built them, rather than mathematical fits that ignore visible swings.
3. Trend Bias from Weighted Segments Plus Net Move. Most chain-based indicators classify direction by counting up-segments versus down-segments. That gives equal weight to a 30-bar trending move and a 5-bar choppy retracement. This indicator weights each segment by the product of its bar count and its absolute angle, then combines that with the net price move across the analysis window measured in ATR units. The result is a Trend Bias label (Strong Bull, Bullish, Mixed, Bearish, Strong Bear) that reflects which side has accumulated the actual structural progress, not just the count of segments.
Anatomy of the Display
Historical segments are drawn as parallel green or coral channels between confirmed past pivots. They are immutable once committed and form a left-to-right chain that visually traces the structure of the trend.
The active segment is the right-most channel, drawn in bright color with a wider glow layer. It anchors on the most recent confirmed pivot and extends to the current bar. The dashed projection continues the channel about 20 bars to the right at the current slope, so users see where price would touch the upper and lower boundaries if the segment kept its angle.
The Micro channel is a 20-bar linear regression with standard-deviation bands, rendered in cyan or pink depending on its own direction. It only appears when the regression's R-squared fit quality clears a user threshold, so it auto-hides when local price action is too noisy for a meaningful regression.
H and L pivot markers sit at the pivot anchor points. H labels mark confirmed high pivots, L labels mark confirmed low pivots.
The right-side panel groups the data into Trend Bias (top), Macro Active Segment (angle, direction, bars in segment, segment chain), Micro Channel (angle, direction, R-squared, acceleration), Signals (three states), and MTF (current angle of two higher timeframes).
Acceleration in the panel is the Micro angle minus the Macro angle. A positive number means the local momentum is steeper than the surrounding trend phase (often early-stage continuation). A negative number means the local momentum is flattening relative to the surrounding trend phase (often late-stage or stalling).
Optional Structural Event Markers
Three structural events can be displayed as on-chart markers. These describe what is happening to the channel geometry. They are not trade entries.
Segment Break (BRK). Price closes beyond the opposite boundary of the active segment. In an active uptrend channel, this is a close below the lower boundary. In a downtrend channel, a close above the upper boundary. This marks a violation of the active phase structure.
Macro Pullback (PB). Price closes within 0.2 ATR of the band on the same side as the trend direction. In an uptrend, price closes near the lower boundary. In a downtrend, price closes near the upper boundary. This marks a touch back to the channel boundary in the direction of the active phase.
Micro Continuation (CONT). The Micro channel breaks its own boundary in the same direction as the Macro segment, while the segment is still in its early stage (3 to 25 bars in). This marks a moment when local momentum aligns with the broader trend phase early in its life.
All three event types are gated by a configurable cooldown (default 15 bars) to prevent clustering. Each event is computed on closed bars only.
Multi-Timeframe Panel Row
The MTF row at the bottom of the panel shows the active segment angle on two higher timeframes. The two HTFs are selected automatically from the standard timeframe ladder based on the current chart timeframe. For example, on a 15m chart the panel reads 4H and 1D. On a 1H chart it reads 1D and 1W. HTF values are read with `lookahead=barmerge.lookahead_off` and a one-bar offset, which is the standard non-repainting pattern for higher-timeframe reads.
Notes on Repainting
Historical segments do not repaint. They are built from confirmed pivots (`ta.pivothigh` and `ta.pivotlow` with a right-bars parameter). A pivot is only confirmed several bars after it forms, so historical segments remain anchored in place forever once committed.
The active segment updates as new bars print. With Non-Repaint Mode ON (default), it recalculates only on closed bars, so its boundaries remain stable intra-bar. With Non-Repaint Mode OFF, it updates on every tick for users who prefer maximum responsiveness and accept the visual jitter.
Pivot detection has an inherent delay equal to the pivot lookback (default 30 bars on Very Long sensitivity). A pivot becomes visible after that many bars have closed past it. This is a property of all pivot-based indicators, not a flaw specific to this script.
All signal markers and alerts are gated by `barstate.isconfirmed`. They fire exactly once per closed bar and never intra-bar.
MTF panel data uses `lookahead=barmerge.lookahead_off` with a one-bar offset on every series, which is the canonical non-repainting pattern for higher-timeframe context.
Typical Analysis Workflow
A common analytical workflow may include:
Reading the Trend Bias label and color in the panel header to anchor an overall directional view
Checking the segment chain in the panel against the visible historical channels on the chart to confirm structure is consistent
Watching the active segment's dashed projection to identify forward levels where the channel boundaries are heading
Comparing the Micro channel direction and angle against the Macro segment direction and angle (Acceleration row) to read whether local momentum aligns with the broader phase
Cross-checking the MTF row to see whether higher timeframes are in the same structural direction or in conflict
Treating Segment Break, Macro Pullback, and Micro Continuation markers as structural events for context, then combining that read with other forms of analysis and risk management
Configuration
Pivot Sensitivity - Short (5), Medium (10), Long (18), or Very Long (30). Lower values produce more segments of shorter average length. Higher values produce fewer, longer-lived segments. Very Long is the default and produces the cleanest premium look.
Min Segment Size (x ATR) - Minimum price distance between consecutive pivots, measured in ATR. Pivots below this threshold are skipped. Higher values produce fewer, more significant segments.
Min Segment Length (bars) - Minimum bar count between consecutive pivots. Short segments are skipped.
Channel Width Multiplier - Multiplier on the max-deviation width. 1.0 means the channel just contains the price action that built it. 1.2 to 1.5 adds visible breathing room.
Min Band Width (x ATR) - Floor on the channel half-width. Prevents razor-thin channels on short segments where deviation is small.
Max Segments Stored - FIFO cap on historical segments (default 15). Older segments are removed as new ones form.
Regression Length (Micro) - Number of bars in the Micro regression window (default 20).
Std Dev Multiplier (Micro) - Width of the Micro band in standard deviations.
Min R-squared to Show (Micro) - Hides the Micro channel when regression fit quality is below this threshold.
Signal Cooldown (bars) - Minimum bars between consecutive same-type signal markers.
Non-Repaint Mode - When ON (default), the active channel uses closed-bar data only. When OFF, it updates live with each tick.
Show toggles - Macro segments, Micro channel, panel, status badge, endpoint labels, pivot markers, signal markers, basis lines, channel fills, MTF row.
Markets and Timeframes
The indicator can be applied across multiple markets and timeframes:
Forex
Stocks and Indices
Commodities
Cryptocurrencies
Because slope is ATR-normalized and channel width is ATR-floored, the visual behavior remains consistent across instruments and timeframes. The Pivot Sensitivity preset can be tuned per chart for the cleanest read on a given symbol and timeframe.
Alerts
Three alert conditions are available:
Segment Direction Changed - fires when the active segment direction flips between uptrend and downtrend
Segment Break - fires when price closes beyond the opposite boundary of the active segment
Micro Continuation - fires when the Micro channel breaks its own boundary in the same direction as the active Macro segment, in the early portion of the segment
All alerts evaluate on confirmed bars to avoid intra-bar oscillation. Gösterge

Auto Trendlines & Market Structure - MTFAuto Trendlines & Market Structure - MTF
Auto Trendlines & Market Structure - MTF is a visual analytical indicator that automatically draws support and resistance trendlines through swing pivots and classifies the resulting structure into one of seven states: Uptrend, Downtrend, Expanding, Contracting, Range, HH Trending, or LL Trending. A compact panel in the top-right shows how that classification compares across the current chart timeframe and three higher timeframes.
The goal is to remove the subjectivity of manual trendline drawing while keeping the chart readable: only the two currently relevant lines (one from recent pivot highs, one from recent pivot lows) are drawn as active, while older invalidated lines fade into a dashed historical layer for context.
This is a visual analytical tool intended for chart reading and structure mapping. It does not execute trades and does not provide financial advice.
Key Features
Auto-detected trendlines through the two most recent valid pivot highs (resistance) and pivot lows (support)
Adaptive pivot lookback that scales with ATR-relative volatility, with optional fixed-length mode
Seven-class structure classification rather than a binary up/down trend
Multi-timeframe panel scanning the current TF plus three higher TFs
Validation logic that rejects lines penetrated by older pivots beyond an ATR-based tolerance
Historical line trail (dashed) preserved when an active trendline gets broken or replaced
Two-layer neon line rendering and gradient channel fill scaled by ATR
Core Concept
Most automatic trendline scripts simply connect the two most recent pivots and call it a trendline. This produces noisy output in choppy markets and resists no contradiction from older swings. This indicator adds three layers on top of that base.
1. Pivot Validation. Before a candidate trendline becomes active, it is checked against up to four older pivots in the same direction. If any of them sits more than 0.3 ATR above a resistance line (or below a support line), the candidate is rejected. This filters out lines that look correct on the latest two pivots but conflict with established structure.
2. ATR-Normalized Slope. Slope is stored not in raw price-per-bar units but in ATR-per-bar units. This makes slope comparable across instruments and timeframes: a normalized slope of 0.1 means roughly one-tenth of an ATR per bar regardless of whether the chart is EURUSD on 15m or BTCUSD on 4H. Strength buckets (Weak / Moderate / Strong / Very Strong) are then defined on this normalized scale.
3. Seven-Class Structure Classification. Instead of collapsing everything into "up or down", the indicator combines the slope sign of both lines:
Both up — Uptrend
Both down — Downtrend
Resistance up, support down — Expanding (broadening)
Resistance down, support up — Contracting (converging)
Both flat within threshold — Range
Only support active — LL Trending (one-sided structure)
Only resistance active — HH Trending (one-sided structure)
This classification surfaces structural states that a single trend label cannot describe — particularly Expanding and Contracting, which often precede volatility expansions or breakouts.
Trendline Lifecycle
Each line goes through a defined lifecycle:
Built from the two newest valid pivots in its direction
Projected to the right and rendered with a colored core plus a wider transparent glow
Replaced when a newer pivot pair forms a more recent line — the previous line is then frozen as a dashed historical reference
Invalidated when price closes more than 0.5 ATR beyond the line — at that moment the line stops projecting, freezes at the breakpoint, and a break alert can fire
The historical trail is capped at 80 frozen lines (FIFO) so the chart does not accumulate clutter on long histories.
Multi-Timeframe Panel
A compact panel in the top-right corner displays the current trend classification across the current timeframe and three higher timeframes. The three HTFs are selected automatically from the standard ladder (1m, 5m, 15m, 1H, 4H, 1D, 1W, 1M, 3M, 12M) based on the active chart timeframe — for example, on a 1H chart the panel shows 4H, 1D, 1W.
Each row shows:
Timeframe label
Block-bar strength gauge
Class name (Uptrend / Downtrend / Expanding / Contracting / Range / HH Trending / LL Trending / Building)
Strength tier (Weak / Moderate / Strong / Very Strong)
The panel also shows the current chart's HH and LL line levels and the absolute and percentage channel width when both lines are active. HTF data is pulled with non-repainting parameters so the panel stays consistent on confirmed bars.
Typical Analysis Workflow
A common analytical workflow may include:
Reading the structure class on the chart timeframe to understand the immediate state
Comparing it to the three higher timeframes in the panel to detect alignment or conflict
Watching the channel width as the structure transitions between Expanding, Contracting, and Range
Using line breaks and the dashed historical trail to time potential structure shifts
Combining the structure read with other forms of analysis and risk management
Configuration
Pivot Lookback Mode — Adaptive (default) scales the pivot length with ATR-relative volatility (between 5 and 10 bars on each side). Fixed lets you set a single lookback between 3 and 15 bars.
Show Trend Lines — Toggles the active two-layer neon trendlines.
Show Channel Fill — Fills the area between active lines with a gradient. Only rendered when both lines are active and the structure is Uptrend, Downtrend, or Range (skipped during Expanding and Contracting to avoid visual confusion).
Show MTF Panel — Toggles the multi-timeframe panel.
Show Pivot Markers — Triangle markers at the most recent pivots, capped at 6 to avoid clutter.
Show Trend Status — Large class badge above price.
Show Line Labels — "HH" and "LL" anchor markers at the right end of each active line.
Line Width (Core) — Width of the inner core line. The outer glow is always rendered at core + 7.
Markets and Timeframes
The indicator can be applied across multiple markets and timeframes:
Forex
Stocks and Indices
Commodities
Cryptocurrencies
Because slope is ATR-normalized and pivot lookback is volatility-adaptive, the visual behavior remains consistent across instruments and timeframes without manual re-tuning.
Alerts
Three alert conditions are available:
Trend Class Changed — fires when the structure classification transitions between any of the seven states
Resistance Break — fires when price closes more than 0.5 ATR above the active resistance line
Support Break — fires when price closes more than 0.5 ATR below the active support line
All alerts evaluate on confirmed bars to avoid intra-bar oscillation.
Notes on Repainting
Active trendlines are anchored to confirmed pivot highs and pivot lows, which are themselves only validated after a pivot lookback window has fully passed. Once an active line is drawn its anchor points do not move. The MTF panel uses confirmed higher-timeframe values with a one-bar offset, so its readings stay consistent across historical and realtime bars. Alerts trigger only on confirmed bars.
Important Notes
This indicator is an analytical visualization tool. It does not execute trades and does not provide financial advice. All outputs are informational and should be interpreted within the context of independent market analysis and proper risk management.
Past behavior of any technical indicator does not guarantee future results.
If you find this indicator useful, feel free to add it to your favorites and share your feedback in the comments. Community feedback helps improve future updates. Gösterge

Pythagorean Time Price Geometry Ver 1.0Pythagorean Time Price Geometry — Ver 1.0
By Timepricedecoder
Overview
This indicator applies W.D. Gann's Time = Price principle using Pythagorean geometry to project natural time cycles and price grid levels directly on the chart.
Gann believed that financial markets move in geometric harmony — that price and time are not independent variables, but two sides of the same equation. When they balance, the market reaches a natural turning point.
This script operationalises that idea using the Pythagorean theorem — the ancient mathematical relationship where in a right-angled triangle, the square of the hypotenuse equals the sum of squares of the other two sides (a² + b² = c²). In market terms:
Side A (time) — the number of bars in the anchor swing
Side B (price) — the range of the anchor swing (High − Low)
Side C (hypotenuse) — the natural cycle projection derived from both
By selecting a Pythagorean Triple (sets of whole numbers satisfying a² + b² = c², such as 3-4-5, 5-12-13, 8-15-17), the script scales the time-price relationship into a precise geometric ratio. This ratio then defines the grid cell size, the cycle length, and the angle of the diagonal — all derived from a single anchor swing.
The result is a self-organising grid that maps where price should find support or resistance, and when time cycles are due to complete — giving the trader a structured, geometry-based framework rather than arbitrary indicator levels.
When time and price arrive at the same Pythagorean node simultaneously — the market is squaring — and that is where the highest-probability signals are generated.
Core Concepts
Time = Price Squaring
Price range and time duration are treated as the two legs of a right triangle. When they balance — the market is at a Square — reversals or accelerations are most likely.
Pythagorean Nodes
From the anchor swing (High → Low or Low → High), the script calculates:
Sq — Square of the swing (time leg = price leg). Highest grade signal
Hyp — Hypotenuse projection. Major cycle marker
½Hyp — Half Hypotenuse. Minor cycle node
½Sq — Early warning zone
These project forward as repeating time cycles across the chart.
Harmonic Grid
Price is divided into cells derived from the Pythagorean triple ratio (B/A × Range). The grid repeats both in time (columns) and price (rows), creating a natural map of support, resistance, and time confluence.
Signal Tiers
🟨 BUY/SELL-Sq — Time node + Price grid level align. Strongest signal
🟩 BUY/SELL-T — Time node only. Moderate signal
⬜ BUY/SELL-P — Price grid level only. Weakest, disabled by default
Confluence Zones ⚡
⚡ — Quarter cycle node
⚡⚡ — Half cycle node
⚡⚡⚡ — Full cycle node (highest confluence)
Recommended Settings
StyleGann NumberDivisorTripleSwing WidthScalping221/44-3-5NarrowShort Term441/24-3-5NormalMedium Term881/23-4-5NormalLong Term176Full3-4-5Wide
InstrumentType SettingNotesOptionsOptionsGrid origin auto-adjustedIndicesIndicesUse 88, 1/2 divisorStocksStocksUse Adaptive stabilityFuturesFuturesUse 44 or 88
Grid Stability
Strict — Anchors rarely shift. Best for trending markets
Adaptive — Default. Balances stability and responsiveness
Relaxed — Reanchors more freely. Best for ranging markets
How To Use
Let the script auto-detect the swing anchor (or set manually)
Watch for Sq labels on vertical cycle lines — these are key dates
Enter on BUY-Sq / SELL-Sq signals with candle confirmation
Use ⚡⚡⚡ confluence zones as high-alert turning point windows
The active zone box shows current grid cell position (Upper = bullish bias, Lower = bearish bias)
Disclaimer
This script is published for educational purposes only. It does not constitute financial advice. Past signal accuracy does not guarantee future results. The swing detection uses Daily OHLC data with lookahead enabled — results may differ slightly on live bars versus historical bars. Always use proper risk management. Trade at your own risk. Gösterge

Channel Breakout [EXCAVO]Automatic Convergent Channel Detection with Multi-Filter Breakout Confirmation
The Channel Breakout automatically detects convergent channel patterns — wedges, flags, and triangles — by fitting trendlines through confirmed swing pivots on both boundaries simultaneously. When price breaks out with volume and momentum confirmation, the indicator signals the direction with colored channel lines and an entry label on the breakout candle.
This is not a basic highest/lowest channel. The boundaries are built from verified pivot points, and a convergence filter ensures only genuinely contracting channels qualify — expanding ranges and sideways boxes are excluded.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▸ HOW TO USE
Step 1 → Add the indicator. It begins scanning for convergent channel
patterns using swing pivots on the current timeframe.
Step 2 → Wait for a channel to form. The indicator draws the upper and
lower boundary lines in blue while price remains inside.
Step 3 → Watch for the breakout signal. When price closes beyond either
boundary with confirmation, channel lines turn blue (bull) or
red (bear), and an arrow label appears on the breakout candle.
Step 4 → Check the dashboard. It shows the current pattern state,
breakout strength (Strong / Medium / Weak), and the directional
bias score that built up while price was inside the channel.
Step 5 → Read the strength rating. Strong breakouts combine high volume,
deep body penetration, and RSI alignment. Weak breakouts show
fewer confirming factors and may warrant additional analysis.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▸ HOW IT CALCULATES
◆ Pivot Detection
Swing highs and lows are identified with ta.pivothigh / ta.pivotlow using a
configurable lookback (Pivot Detection Length, default 5 bars each side). Only
confirmed, closed pivots are used — no repainting. All recent pivots within the
Max Channel Width lookback are stored and passed to the trendline fitting engine.
◆ Best-Fit Trendline Algorithm
For the upper boundary, the engine tests every pair of stored pivot highs (a, b).
For each candidate line through (a, b), it counts how many other pivot highs lie
within ATR × Touch Tolerance of the line while no pivot exceeds it by more than
ATR × Max Deviation. The line with the most qualifying touches becomes the upper
boundary. The same process runs independently for pivot lows to find the lower
boundary. Both boundaries must exist with at least Min Touches (default 2) to
form a valid channel.
◆ Convergence Filter
Once both boundaries are found, the engine measures channel width at the earliest
shared bar (widthStart) and at the current bar (widthNow):
convRate = 1 − (widthNow / widthStart)
A channel is only accepted when convRate >= Min Convergence Rate (default 0.02).
This rejects expanding wedges and flat ranges, keeping only contracting patterns.
◆ Breakout Detection and Strength Score
On each confirmed bar close, the engine projects both boundary lines to the current
bar. A bull breakout fires when close > upper boundary; a bear breakout when
close < lower boundary. The breakout strength score blends five components:
penetration depth relative to ATR (25%), candle body ratio (15%), body commitment
relative to the broken boundary (15%), volume vs SMA-20 spike (25%), and RSI
alignment above/below 50 (20%). Score >= 65 = Strong, >= 35 = Medium, < 35 = Weak.
◆ Confirmation Filters
Three optional filters gate the breakout signal. Volume Spike Multiplier requires
the breakout bar's volume to exceed 20-bar SMA by a configurable factor. Volume
Contraction Filter requires that average volume inside the channel was lower than
before the channel formed — confirming energy compression. Momentum Confirmation
requires RSI > 50 for bull breakouts and RSI < 50 for bear breakouts. Any filter
can be disabled for forex or low-volume instruments.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▸ WHAT MAKES IT DIFFERENT
◆ Pivot-Confirmed Boundaries
Most auto-channel scripts use ta.highest / ta.lowest, which anchors lines to the
highest wick in a window regardless of pattern shape. This indicator builds
boundaries only through confirmed swing pivot points, the same anchor logic a
trader would use when drawing manually.
◆ Convergence-Only Filter
The convRate filter rejects any channel that is not actively narrowing. Sideways
ranges, expanding wedges, and parallel channels are all excluded. Only patterns
where price is compressing toward a decision point qualify.
◆ Best-Fit Touch Counting
The engine evaluates every pair of pivots and selects the line with the highest
touch count, not just the first two pivots it finds. A channel supported by four
touches is stronger than one supported by two, and the algorithm reflects that
by preferring denser confirmation.
◆ Multi-Component Strength Score
The breakout strength is not a simple volume check. It combines five independent
signals — penetration depth, body ratio, body commitment relative to the broken
level, volume spike, and momentum direction — into a single 0-100 score that
classifies the breakout as Strong, Medium, or Weak.
◆ Directional Bias Score
While price is inside the channel, the dashboard tracks a real-time directional
bias built from channel slope (35%), RSI deviation from 50 (35%), and price
position within the channel range (30%). This gives a probabilistic lean on
which side of the channel is more likely to break before the signal fires.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▸ DASHBOARD
Real-time panel (top right) with key state metrics:
Status - Active (channel forming) / Bull Breakout / Bear Breakout / Scanning
Direction - directional bias with arrow and % while channel is active (e.g. ▲ 64%); BULLISH or BEARISH after breakout
Strength - Strong / Medium / Weak (breakout strength score); — while channel is forming
Convergence - narrowing rate of the active channel in %; — when no channel
Legend table (bottom left) explains every visual element. Toggle in Dashboard settings.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▸ SETTINGS
Main Settings
Pivot Detection Length - 5 (bars left/right for swing pivot confirmation; lower = more sensitive)
Min Touches per Boundary - 2 (minimum pivot touches required per trendline)
Max Channel Width (bars) - 120 (maximum lookback for channel search)
Min Convergence Rate - 0.02 (minimum narrowing ratio; higher = stricter contraction)
Filters
Volume Spike Mult - 1.2 (breakout bar volume vs SMA-20; set 0.5 to disable on forex)
Volume Contraction Filter - ON (require declining volume inside the channel)
Momentum Confirmation - ON (RSI > 50 for bull, < 50 for bear)
Visual
Show Channel Patterns - ON (draw boundary lines)
Show Pattern Background - OFF (subtle bgcolor while inside active channel)
Channel Lines
Line Width - 2 (boundary line thickness; 1-4)
Risk Management
Show Entry Labels - ON (arrow label on the breakout candle)
Dashboard
Show Dashboard - ON
Position - Top Right (Top Left / Top Right / Bottom Left / Bottom Right)
Font Size - Small (Small / Normal)
Advanced
Touch Tolerance (ATR) - 0.15 (pivot distance to count as a touch; 0.10-0.25)
Max Deviation (ATR) - 0.30 (maximum pivot overshoot from the line)
Min Channel Width (ATR) - 0.5 (minimum channel width filter)
Alerts
JSON Alerts - OFF (structured JSON payload for 3Commas, Wunderbit, and similar bots)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▸ ALERTS
Bull Breakout - price closes above the upper channel boundary with confirmation
Bear Breakout - price closes below the lower channel boundary with confirmation
Any Breakout - either direction; use for a single alert covering both signals
New Pattern - a new convergent channel has been detected and is now active
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Best regards,
EXCAVO
Disclaimer
Trading involves significant risk. This indicator is a technical analysis tool
and does not constitute financial advice, investment recommendations, or a
guarantee of future results. Past indicator behavior does not guarantee future
performance. Always use proper risk management and your own judgment.
Gösterge

Lumina Trend Channels & Bands [Pineify]Pineify - Lumina Trend Channels & Bands
Lumina Trend Channels & Bands is an overlay indicator that builds a volatility-adjusted trend channel around a Volume-Weighted Moving Average (VWMA). VWMA forms the baseline, while ATR bands define how far price must move before trend state changes.
Key Features
VWMA midpoint weighted toward higher-volume closes.
ATR-based upper and lower bands that adapt to current range.
Persistent trend state while price remains inside the channel.
Triangle markers on the first cross above the upper band or below the lower band.
How It Works
The script calculates a VWMA of close, then adds and subtracts ATR multiplied by the Band Multiplier. A close above the upper band sets bullish state; a close below the lower band sets bearish state. Between the bands, the prior state is preserved.
Compute the VWMA baseline.
Measure ATR and scale it by the Band Multiplier.
Plot upper and lower channel bands around the VWMA, then mark the first crossover or crossunder.
How the Components Work Together
VWMA supplies the directional anchor, while ATR decides how much evidence price needs before a breakout is treated as meaningful. In high volatility the bands widen and demand a stronger close; in quiet conditions the channel tightens and reacts sooner. The cloud fill emphasizes the active side of the trend.
Trading Ideas and Insights
A bullish triangle may indicate continuation after price clears the upper boundary.
A bearish triangle may flag downside momentum when price loses the lower band.
Inside-channel movement is a drift zone. Wait for bar close on live bars; fast reversals can lag, and ranges can whipsaw.
Unique Aspects
Trend state is retained inside the ATR channel, reducing flip-flopping around the VWMA.
The asymmetric cloud emphasizes the active trend side while keeping the opposite band visible.
How to Use
Add the indicator to a clean price chart.
Use the midline and channel to judge bullish, bearish, or undecided territory.
Treat triangles as potential breakout starts, then look for confirmation.
No built-in alert conditions are included in this version.
Customization
Trend Baseline Length (default: 50) - VWMA lookback. Higher values smooth the channel but add lag.
Volatility (ATR) Length (default: 14) - ATR lookback for band width.
Band Multiplier (default: 2.0) - Channel distance. Higher values reduce breakouts; lower values are more sensitive.
Bullish/Bearish Trend Colors - Adjust line, cloud, and marker colors.
Conclusion
Lumina Trend Channels & Bands is for traders who want a clean VWMA trend channel with volatility-aware breakout markers. Use it as context alongside structure, volume, and risk management rather than as a standalone system.
Gösterge

Structured Head and Shoulder Pattern (MastersinMarkets)Overview
This proprietary indicator automates the detection of classic Head and Shoulders (H&S) and Inverse Head and Shoulders patterns using a rigorous structural approach. Designed for traders who prioritize geometric symmetry and statistical quality, it filters out "noisy" or low-probability formations that often lead to false breakouts.
Core Logic
The script utilizes a multi-stage validation engine to confirm pattern integrity:
Pivot Analysis: Identifies high-fidelity swing points using a configurable "Swing Strength" to ensure only significant market turns are considered.
Symmetry Scoring: A proprietary algorithm evaluates patterns based on price symmetry (Shoulder height similarity), time symmetry (duration between peaks), and neckline slope.
ATR Volatility Scaling: The "Min Pattern Size" filter ensures the pattern is large enough relative to current market volatility to be considered structurally significant.
Key Features
Dynamic Quality Score: Every detected pattern is assigned a score (0–100). Only those meeting your "Min Quality Threshold" are displayed, helping you focus on high-probability setups.
Flexible Necklines: Allows for both horizontal and sloping necklines with a "Max Slope" constraint to maintain structural validity.
Visual Structure Mapping: Automatically plots the connecting lines of the pattern and extends the neckline for clear breakout monitoring.
Real-time Alerts: Integrated alerts trigger the moment a validated pattern completes its Right Shoulder.
How It Works
Detection: The script looks for a sequence of five swing points (High-Low-High-Low-High for bearish setups).
Validation: It checks if the "Head" is higher than both "Shoulders" and if the distance between swings meets the minimum bar count.
Scoring: It calculates the $Price\_Symmetry$, AMEX:TIME \_Ratio$, and $Slope\_Score$.
Execution: If the cumulative score exceeds the user-defined threshold (e.g., 60), the pattern is drawn on the chart.
Disclaimer
Trading involves significant risk. This indicator is a tool for technical analysis and does not constitute financial advice. Past performance, including high-quality symmetry scores, does not guarantee future results. Always use proper risk management and consider market context before executing trades. Gösterge

Wedge Reversal Detector [AGPro Series]Wedge Reversal Detector
🔷 Overview
Wedge Reversal Detector is a focused chart-pattern engine built for one specific structure: the rising wedge and falling wedge. Instead of scanning every possible reversal pattern, drawing broad support and resistance, or behaving like a generic breakout dashboard, this script studies the geometry of a wedge itself: confirmed pivot boundaries, slope convergence, pattern maturity, reversal break quality, projected reaction zone, and invalidation context.
The goal is to make wedge analysis cleaner and more objective on a live chart. A valid wedge is not treated as just two random trendlines. The script requires a confirmed pivot structure, a meaningful initial width, a narrowing final width, and the correct slope relationship for either a rising wedge or a falling wedge. Once a qualified structure is active, it draws the converging boundaries directly on the chart and waits for a reversal-side break.
The detector also includes two visual preparation layers. The developing-wedge preview layer can draw dashed boundaries before the structure is fully armed. The Wedge Radar layer keeps the latest compression window visible when no confirmed candidate is active. Radar projection is capped so higher-timeframe charts stay clean, and low-compression radar states can remain boundary-only until the structure becomes visually meaningful. Break labels, reaction zones, and invalidation guides remain reserved for stricter confirmed candidates. This keeps the chart visually informative without weakening the actual confirmation logic.
The visual layer includes compact boundary tags that label the upper and lower rails directly on the right side of the structure. These tags are designed as chart annotations, not signal spam: they identify whether the rail is acting as a rejection rail, compression rail, reclaim rail, break rail, or invalidation rail. A single optional compression tag can also summarize the current radar or wedge state.
🔶 Why This Is Different
Many wedge indicators stop at pattern drawing. Others become broad pattern scanners that mix wedges with channels, double tops, double bottoms, triangles, support and resistance zones, and unrelated reversal signals. Wedge Reversal Detector intentionally stays narrower.
Its edge is the sequence:
1. Detect a qualified rising or falling wedge from confirmed pivots.
2. Measure whether the boundaries are genuinely converging.
3. Grade wedge maturity before any break occurs.
4. Confirm the reversal-side break with an optional close-based rule and ATR buffer.
5. Score break quality using maturity, boundary expansion, candle structure, close location, and volume participation.
6. Project a concept-native reaction zone from the wedge width.
7. Display a clean invalidation guide so the structure remains readable after the break.
This makes the script a wedge lifecycle tool, not a general reversal scanner.
💎 Unique Edge
The most important difference is that the script treats a wedge as a living geometric compression structure. It does not simply connect the latest two highs and lows and call the pattern complete. A candidate must pass span, width, convergence, and slope requirements before it becomes active.
For rising wedges, the script looks for rising pivot highs and rising pivot lows where the lower boundary is climbing faster than the upper boundary. This creates upward compression, which is the core geometry behind a rising wedge. For falling wedges, it looks for falling pivot highs and falling pivot lows where the upper boundary is falling faster than the lower boundary. This creates downward compression, which is the core geometry behind a falling wedge.
That difference matters because many weak wedge tools confuse ordinary channels with wedge compression. This script separates those structures by requiring the final width to be materially smaller than the starting width.
🔹 Methodology
The engine begins with confirmed pivot highs and pivot lows. The user controls the pivot confirmation length, which allows the detector to be tuned for intraday, swing, or higher-timeframe charts.
From the latest confirmed swing pair, the script builds two boundary lines:
- Upper boundary from confirmed pivot highs
- Lower boundary from confirmed pivot lows
The detector then evaluates:
- Pattern span in bars
- Initial boundary width measured against ATR
- Final boundary width relative to the starting width
- Upper boundary slope
- Lower boundary slope
- Correct rising-wedge or falling-wedge geometry
Only when those requirements align does the pattern become an active wedge.
🔸 Break Quality Model
A wedge break is scored only after the reversal-side boundary is broken. The break quality score is built from multiple factors:
- Wedge maturity
- Distance beyond the broken boundary
- Candle body participation
- Close location inside the break candle
- Volume ratio versus recent average volume
The score is translated into a simple grade so the chart stays easy to read. This does not claim that a break must continue. It gives the user a structured read of how strong the confirmed break appears under the script's own rules.
🎯 Projected Reaction Zone
After a confirmed wedge reversal break, the script projects a reaction zone using the initial wedge width. This zone is not a generic support/resistance box. It is tied directly to the wedge geometry and appears only after the structure confirms. The goal is to show the next area where price may naturally react after escaping the compression.
The zone width and projection length are configurable, so users can keep the chart compact or allow more forward context depending on timeframe and style.
🧭 Invalidation Context
The script also draws an invalidation guide after a confirmed break. For a bullish falling-wedge break, invalidation is tracked below the opposite wedge boundary with an ATR buffer. For a bearish rising-wedge break, invalidation is tracked above the opposite wedge boundary with an ATR buffer.
This keeps the post-break structure organized without adding trade instructions or turning the script into a strategy.
📊 Panel
The compact AGPro panel summarizes the current wedge lifecycle:
- Wedge Type
- Maturity
- Break Quality
- Target Zone
Panel location, panel theme, and panel font size are adjustable from settings. The first panel row uses the AGPro standard: one merged blue header row containing only the panel title.
⚙️ Key Settings
- Pivot Confirmation Length controls how strict the swing structure is.
- Minimum Wedge Span filters out tiny patterns.
- Maximum Final Width Ratio controls how much convergence is required.
- Developing Wedge Preview Ratio controls how early dashed formation boundaries can appear.
- Wedge Radar controls the latest-window visual radar that prevents panel-only charts while waiting for confirmed wedge geometry.
- Radar Projection Bars limits how far radar boundaries extend into future bars.
- Radar Fill Threshold keeps low-compression radar structures from creating oversized filled areas.
- Boundary Tags add compact right-side rail annotations so the structure is easier to read without covering candles.
- Compression Tag shows one status label for radar compression or armed-wedge maturity.
- Boundary Break Buffer ATR adds confirmation distance beyond the wedge boundary.
- Volume Confirmation Ratio contributes to break quality scoring.
- Projection Length Bars controls how long the reaction zone extends forward.
- Label Font Size and Label Offset ATR help maintain a clean chart presentation.
🧩 How It Differs From Other AGPro Tools
This script is intentionally separate from AGPro channel, breakout, liquidity, and broad reversal tools.
It is not a channel map. Channel tools organize parallel or multi-family structure. Wedge Reversal Detector only studies converging wedge geometry.
It is not a double top or double bottom detector. Those patterns are based on repeated horizontal rejection and neckline behavior. This script is based on converging diagonal boundaries.
It is not a broad reversal scanner. It does not combine every reversal pattern into one dashboard. It stays focused on wedge compression, wedge maturity, reversal break, projected reaction zone, and invalidation.
It is not a generic breakout quality tool. Break quality is evaluated only after a valid rising or falling wedge exists.
🔔 Alerts
The script includes alerts for:
- Bullish falling wedge break
- Bearish rising wedge break
- High quality wedge break
- Wedge invalidation
These alerts are event notifications for the detected structure, not automated trading instructions.
✨ Best Use Case
Wedge Reversal Detector is best suited for traders who already watch chart patterns, market structure, compression, and failed trend continuation. It helps reduce manual drawing by highlighting qualified wedge structures, then keeping the chart organized through the confirmation, projection, and invalidation phases.
The result is a clean, premium, wedge-specific workflow designed for public chart reading: fewer random lines, fewer noisy labels, and a clearer view of whether the wedge structure is still forming, breaking, projecting, or invalidating.
Gösterge

Gaussian Channel System [GCS]## DESCRIPTION
Gaussian Ribbon Engine (GRE) is a multi-layer trend analysis system built on the Arnaud Legoux Moving Average (ALMA), which applies a Gaussian (bell curve) weighting function to price data instead of the linear or exponential weights used by traditional moving averages.
**Mathematical Foundation**
ALMA uses a Gaussian kernel — the same bell-curve distribution found in statistics and physics — to weight the prices in its lookback window. The Gaussian function is parameterized by two values: offset (which shifts the bell curve left or right, controlling responsiveness vs. smoothness) and sigma (which controls the width of the bell curve, determining how sharply weights decay from the center). The formula applies: w(i) = exp(-((i - offset * (N-1))^2) / (2 * sigma^2 * N^2)), where each price bar receives a weight according to its position on the Gaussian curve. This produces a moving average with mathematically optimal noise filtering properties.
GRE constructs five ALMA layers with increasing periods (default 9, 21, 55, 100, 200), creating a visual ribbon. When all five layers align in order (fastest on top for bullish, fastest on bottom for bearish), the market is in full directional agreement. The spread between the outermost layers, measured as a percentage and compared to its own historical average, identifies squeeze (convergence) and expansion (divergence) conditions.
**9-Point Confluence Scoring**
The scoring matrix evaluates: price vs. Layer 1, Layer 1 vs. 2, Layer 2 vs. 3, Layer 3 vs. 4, Layer 4 vs. 5 alignment, Layer 1 slope direction, Layer 3 slope direction, RSI above/below 50, and DI+/DI- directional movement. Signals fire when the score crosses the configurable threshold with ADX confirmation.
**Features**
- Five-layer ALMA ribbon with Gaussian kernel weighting
- Adjustable offset (0-1) and sigma parameters for fine-tuning the Gaussian bell shape
- Ribbon spread analysis with squeeze and expansion detection
- 9-point confluence scoring with visual dot notation in dashboard
- ATR-based dual take-profit levels (TP1 and TP2)
- Squeeze breakout signals when ribbon compresses then expands
- ADX and volume confirmation filters
- Full color-coded dashboard with regime classification
- Multiple alert conditions
--- Gösterge

Double Top / Bottom Quality [AGPro Series]Double Top / Bottom Quality
Double Top / Bottom Quality is a disciplined, rules-based detector for the two most iconic reversal chart patterns: the Double Top (M-shape) and the Double Bottom (W-shape). Unlike basic pattern finders that fire on any two similar swings, this indicator scores every candidate pattern on a transparent 0–100 Quality Score across four independent factors — and only confirms patterns that pass a user-defined minimum. The result is a cleaner chart with fewer, higher-conviction setups.
Every confirmed pattern delivers a full trading lifecycle: a neckline flip S/R zone (resistance → support on a Double Bottom; support → resistance on a Double Top) and a measured-move target projection band. Pending, confirmed, target-hit and invalidated states are all tracked with disciplined cleanup, so the chart never becomes cluttered.
🔹 WHAT THE INDICATOR DOES
It detects classic Double Top and Double Bottom reversal structures using pivot-based swing analysis with ATR-normalised equality, depth and time-window filters. Each valid candidate is then scored on four independent quality factors. Only candidates that exceed the user-defined minimum score and break the neckline on close are confirmed. Once confirmed, the pattern draws its neckline flip zone and target projection band, labels the setup with its letter grade and score, and tracks the outcome until target hit or invalidation.
🔹 UNIQUE EDGE — WHY IT IS DIFFERENT
Most Double Top / Double Bottom scripts simply connect two similar swings and draw a line. This indicator adds a transparent 4-component Quality Score so every setup is rated before confirmation, not just flagged. Three factors that most scripts ignore are treated as first-class inputs here:
• Pattern Symmetry — the left leg and the right leg of the M / W must be comparable in time, or the pattern is penalised
• Break Volume Confirmation — the neckline break bar is compared to its rolling volume average, and thin breaks score lower
• Depth Quality — shallow, flat patterns are filtered out in favour of deep, decisive reversals
The full lifecycle visualisation (pending → confirmed → target hit) and same-region deduplication are also uncommon in this pattern category, and together they produce a chart that reads cleanly even on long history.
🔹 METHODOLOGY
• Pivot detection via ta.pivothigh / ta.pivotlow with user-configurable length
• Equality check: the two peaks (or troughs) must be within a configurable ATR tolerance
• Time-window filter: minimum and maximum bars allowed between the two pivots
• Depth filter: the vertical distance from peaks to neckline must exceed a minimum ATR threshold
• Neckline: lowest low between the two peaks for a Double Top, or highest high between the two troughs for a Double Bottom
• Confirmation trigger: daily close beyond the neckline
• Invalidation: price exceeds the pattern extreme before the neckline break
• Cooldown: after confirmation, new patterns in the same price region are suppressed for N bars to prevent clustering
🔹 QUALITY SCORE (0–100)
Each confirmed pattern receives a transparent score based on four equally-weighted factors (25 points each):
1. Peak / Trough Equality — how close the two extremes are to each other, measured in ATR units
2. Break Volume Confirmation — break-bar volume relative to the 20-bar average
3. Pattern Symmetry — ratio of the shorter leg to the longer leg (time-based)
4. Depth Quality — pattern height relative to ATR (deeper = higher score)
Score → Grade mapping:
• 85–100 = A
• 70–84 = B
• 55–69 = C
• <55 = D
🔹 SIGNALS, ZONES & ALERTS
Once a pattern confirms, the indicator renders:
• A solid neckline that extends to the right edge
• A neckline flip zone (rectangular S/R band at the neckline level)
• A target projection zone at the measured-move price (pattern height projected from neckline)
• A grade label (A / B / C) and numeric score on the pattern
Two alert types are available: "Confirmed Pattern" fires on confirmation, and "Target Hit" fires when the measured-move target is reached.
🔹 KEY INPUTS
• Pivot Length, ATR Length
• Peak / Trough Equality tolerance (ATR)
• Min / Max bars between peaks
• Minimum Pattern Depth (ATR)
• Break Volume Multiplier
• Cooldown bars
• Minimum Quality Score filter
• Show Pending Patterns toggle
• Show Neckline Flip Zone / Target Zone toggles
• Zone Width (ATR)
• Stale Cleanup Distance, Max Active Zones
• Label size, Panel position / theme / size
• Alert toggles
🔹 HOW TO USE
• Choose a liquid market and a timeframe that matches your trading style (4H and 1D are particularly well-suited to classic reversal patterns)
• Watch for Pending patterns (dashed lines) — these mark candidates awaiting a neckline break
• A Confirmed pattern with grade B or higher is the typical entry signal; aggressive traders may use C-grade while conservative traders may filter to A-grade only
• Use the neckline flip zone as a logical stop-loss reference (above it for Double Tops, below for Double Bottoms)
• Use the target projection zone as a take-profit reference based on the classical measured-move rule
• Combine with higher-timeframe trend, volume profile or an independent confluence tool for best results
🔹 LIMITATIONS & TRANSPARENCY
• Pivot-based detection means patterns confirm with a natural lag equal to the pivot length
• No strategy is 100% reliable — Quality Score filters improve average conviction but do not guarantee outcomes
• Very low-liquidity markets may produce unstable pivots; a longer pivot length helps
• Measured-move targets are a classical reference, not a prediction
• Historical statistics shown in the panel are pattern-completion counts on the loaded chart; they are not a guaranteed forward performance estimate
🔹 RISK DISCLOSURE
This script is provided for educational and analytical purposes only. It is not financial advice and does not constitute a recommendation to buy, sell or hold any asset. Trading involves substantial risk of loss; past pattern performance is not indicative of future results. Always perform your own research and use appropriate risk management.
Open-source under the Mozilla Public License 2.0 — contributions and feedback are welcome. Gösterge

AG Pro Reversal Pattern Quality Scanner [AGPro Series]AG Pro Reversal Pattern Quality Scanner
Overview / What it does
AG Pro Reversal Pattern Quality Scanner is an overlay tool designed to detect and visualize selected classical reversal structures directly on the chart while adding a structured quality layer to each valid setup. The script focuses on four widely recognized reversal formations: Double Top, Double Bottom, Head & Shoulders, and Inverse Head & Shoulders.
Instead of marking every possible structural resemblance, the script applies a filtered detection workflow based on pivot structure, pattern width, peak or trough equality, pullback depth, neckline logic, and an internal quality model. The goal is not simply to identify a shape, but to highlight formations that display more balanced structure and more usable context.
Each detected pattern can be displayed with a pattern box, a projected neckline, and a quality label that summarizes the pattern type, directional bias, quality score, and grade. This makes the script suitable for traders who want a structured visual map of potential reversal zones rather than a raw pattern-highlighting tool with no ranking logic.
The indicator is built for chart reading and workflow support. It does not attempt to forecast future price movement with certainty, and it should not be interpreted as a standalone trade system. Its role is to help users organize reversal structures, compare them visually, and focus on higher-quality formations when reviewing price action.
Unique Edge
The main distinction of this script is that it does not treat all reversal patterns as equivalent. A detected pattern is further evaluated through a composite quality framework that considers structural symmetry, pullback depth, and volume behavior during formation and break conditions.
For Double Top and Double Bottom structures, the script checks whether the two peaks or troughs remain sufficiently close to each other within a defined tolerance and whether the intermediate pullback is large enough to make the structure meaningful. For Head & Shoulders and Inverse Head & Shoulders structures, the script evaluates shoulder symmetry, time symmetry, and relative positioning of the head against the shoulders.
The volume component is not used as a promise of confirmation. It is used as an additional contextual factor inside the quality score. In general terms, contracting volume during formation and stronger participation during the break candidate can improve the overall score when those conditions are present.
Another important part of the design is visual prioritization. The script does not only draw the structure. It also attempts to keep the chart readable by organizing labels, neckline extensions, and pattern boxes in a way that preserves interpretation. The result is a cleaner reversal-pattern map that aims to be more practical than a simple shape detector.
Methodology
The script begins with swing pivot detection. These pivots act as the structural foundation for all pattern candidates. Once enough pivot highs and lows are available, the script evaluates whether recent pivot sequences fit the requirements of one of the supported reversal structures.
For Double Top detection, the script checks whether two recent highs are similar enough, whether the interim low forms a valid neckline reference, whether the pattern width stays within defined limits, and whether price has broken below the neckline. For Double Bottom detection, the logic is mirrored on the bullish side through two similar lows, an interim high as the neckline reference, and a bullish break condition above that neckline.
For Head & Shoulders detection, the script evaluates a sequence of three pivot highs where the middle high must exceed the two shoulders. It then estimates neckline structure from the lows between those highs and applies symmetry and pullback checks before accepting the setup. Inverse Head & Shoulders applies the same structural concept in reverse using pivot lows.
After a valid break condition is detected, the script calculates a composite quality score. This score is based on user-controlled weights for volume behavior, symmetry, and pullback depth. The final output is normalized into a 1 to 10 quality scale, then translated into a grade label for easier scanning.
Signals & Alerts
The script can generate pattern-based alert conditions for:
- Double Top
- Double Bottom
- Head & Shoulders
- Inverse Head & Shoulders
These alerts are tied to the script’s internal structural conditions and neckline break logic. As with any chart-based alert workflow, users should confirm that the selected settings match their market, timeframe, and execution style.
Visual output can include:
- Pattern boxes
- Neckline lines
- Neckline labels
- Pattern quality labels
- Break candle highlighting
- Information panel with detection statistics
The quality label is intended to summarize the detected structure, not to guarantee outcome quality. A higher score means the pattern aligned more closely with the script’s internal criteria. It does not mean the setup must succeed.
Key Inputs
The script includes adjustable inputs for both detection behavior and presentation. Key controls include:
- Swing Pivot Length
- Peak / Trough Equality tolerance
- Minimum Pullback Between Peaks or Troughs
- Minimum and Maximum Pattern Width
- Minimum Quality to Display
- Weighting of volume, symmetry, and pullback depth inside the quality score
- Box, neckline, and pattern-label visibility
- Global label size
- Panel font size
- Panel position
- Neckline extension length
- Pattern-specific alert toggles
These controls make it possible to adapt the scanner to different chart densities, volatility profiles, and personal visual preferences.
Limitations & Transparency
This indicator is a rule-based pattern scanner. It is not a predictive engine, and it does not claim that all detected formations will lead to continuation or reversal. Classical chart structures can fail, invalidate, or behave differently depending on volatility, trend strength, liquidity conditions, timeframe, and broader market context.
Pattern recognition on live charts is inherently sensitive to pivot settings and bar structure. Small changes in pivot length, equality tolerance, or minimum pullback can materially change how many formations appear. Because of that, users should treat the script as a configurable analytical framework rather than a universal template.
The quality score is an internal ranking model built from the script’s own criteria. It is meant to help compare setups inside the same framework. It should not be interpreted as an objective probability model, a performance promise, or a substitute for independent trade management.
Volume analysis also depends on the reliability and characteristics of the symbol’s reported data. On some instruments, volume may be less informative or behave differently than expected. Users should evaluate this in the context of their own market.
Risk Disclosure
This script is provided for chart analysis, workflow organization, and educational use. It does not provide financial advice, investment advice, or guaranteed trade signals. All trading and investment decisions remain the sole responsibility of the user.
Reversal patterns can fail even when they appear clean and well-structured. Breaks can reverse, neckline moves can trap participants, and high-scoring formations can still underperform. Risk management, confirmation process, position sizing, and overall strategy design remain essential.
Use this tool as a structured visual aid inside a broader decision-making process, not as a standalone reason to enter or exit a position. Gösterge

Gösterge

Spline Quantile Regression Channel [LuxAlgo]The Spline Quantile Regression Channel indicator implements an advanced non-linear regression model to fit a flexible, multi-level channel over recent price action. Unlike standard linear regression which identifies the mean trend, this tool fits specific price percentiles (quantiles) using cubic splines, providing robust support and resistance zones that adapt to market volatility and non-linear structures.
🔶 USAGE
The indicator is designed to provide a sophisticated view of the current trend and its extremes. By fitting cubic splines to specific quantiles, the script offers a "bendable" channel that can follow complex price movements more accurately than traditional straight-line regressions.
🔹 Trend Identification
The median line (default 0.5 quantile) represents the central tendency of the price action. When the spline is sloping upward, it indicates a non-linear bullish regime; a downward slope indicates a bearish regime.
🔹 Support and Resistance
The upper and lower bands represent the specified extremes (e.g., the 90th and 10th percentiles). These act as dynamic boundaries:
Prices reaching the upper band often indicate overextended conditions within the current lookback period.
Prices reaching the lower band suggest the asset is trading at the lower end of its recent distribution.
🔹 Forecasting
The indicator projects the calculated spline into the future using a dashed line. This forecast is a mathematical extrapolation of the current non-linear trend, helping traders visualize where the price distribution is headed if the current momentum and curvature persist.
🔶 DETAILS
The script employs several advanced mathematical concepts to ensure accuracy and stability:
Cubic Spline Basis: The model uses a piecewise polynomial basis ($1, x, x^2, x^3$) combined with truncated power functions at "knots." This allows the curve to change its curvature locally, adapting to swings that a simple polynomial cannot capture.
Quantile Optimization: Instead of minimizing squared errors (OLS), the script uses an Iteratively Reweighted Least Squares (IRLS) solver to minimize the "check function." This allows the script to target specific percentiles of the price data.
Numerical Stability: To prevent matrix overflows common in high-degree polynomial calculations, the script standardizes price data (Z-score) and scales time coordinates between 0 and 1 before performing matrix inversion.
🔶 SETTINGS
🔹 Spline Configuration
Lookback Period: The number of historical bars used to fit the spline regression. Larger windows result in a more "macro" trend, while smaller windows react quickly to recent changes.
Internal Knots: Determines the "flexibility" of the spline. More knots allow the curve to follow price swings more tightly, while fewer knots yield a smoother, more rigid curve.
🔹 Optimization
IRLS Iterations: The number of optimization passes for the solver. Higher values improve the accuracy of the quantile fit, especially in volatile markets.
Forecast Length: The number of bars to project the calculated spline into the future.
🔹 Quantile Levels
Upper Quantile: The specific percentile for the upper band (e.g., 0.95 for the top 5%).
Median Quantile: The central percentile (typically 0.5 for the median).
Lower Quantile: The specific percentile for the lower band (e.g., 0.05 for the bottom 5%).
🔹 Visuals
Colors: Individual color settings for the upper, median, and lower bands.
Line Width: Controls the thickness of the polylines rendered on the chart.
Gösterge
