Regression Trend [MiesOnCharts]Regression Trend - Mies
What it does
This indicator fits a linear regression line to price over a rolling window and draws a corridor around it based on the statistical error of that fit. The corridor is what decides the trend state. As long as price stays inside it, nothing changes. When price closes outside one side, the whole thing flips color and a triangle marks the bar.
The result is a trend line that carries its own tolerance band with it, so you can see at a glance both where the fitted trend sits and how much room price has before the state changes.
How it works
A least squares regression is fitted across the lookback window. That gives the center line.
Around it, the script computes the standard error of the estimate, which is the typical distance between actual price and the fitted line. It comes from the correlation between price and time:
r is the correlation of the source with bar index over the window
residual variance is the price variance scaled by (1 - r²)
the standard error is the square root of that, adjusted for the degrees of freedom of the fit.
This is the part that makes the corridor behave differently from a standard deviation band. The width responds to how well price is actually tracking the trend, not just to raw volatility. A strong, clean trend produces a high correlation, small residuals, and a narrow corridor, so the indicator stays sensitive.
Choppy price that wanders around the line produces a weak fit, a wide corridor, and a much higher bar for triggering a state change. The indicator effectively demands more evidence in exactly the conditions where evidence is thin.
The bands sit at the center line plus and minus a multiple of that standard error. A close above the upper band turns the state bullish, a close below the lower band turns it bearish, and everything in between leaves the previous state untouched. That hysteresis is intentional. It is what stops the indicator from flipping every time price crosses its own mean.
On the chart
Regression line, green when the state is bullish, red when bearish, gray before the first breakout
Upper and lower standard error bands with a light fill between them, colored to match the current state Triangle below the bar when the state flips bullish Triangle above the bar when the state flips bearish.
Display controls to hide the fill, or the bands entirely, if you want a bare trend line
Two alert conditions, one for each direction
Settings
Source sets which series gets fitted. Close is the standard choice. HL2 or a smoothed input will give a calmer line and fewer flips.
Regression Window sets how many bars the fit covers. Shorter windows follow recent structure and react fast. Longer windows describe the broader trend and produce fewer, slower signals. This is the main setting for matching the tool to your timeframe.
SE Band Multiplier controls how far price has to move from the fitted line before the state changes. Lower values tighten the corridor and generate more signals. Higher values require a more decisive break and filter more noise, at the cost of entering later.
Display group toggles the bands and the fill, and adjusts band opacity.
How to use it
The most direct use is as a trend filter. Trade only in the direction the line is colored and treat the opposite flip as your exit or your cue to step aside.
The corridor itself gives you two readable things. Its width tells you how well price is respecting the trend, so a corridor that has narrowed over recent bars means the fit is tightening and the move is orderly. A corridor that has ballooned means the fit has broken down and the state you are looking at is stale. The center line works as a dynamic reference within an established regime, since a pullback toward it is price returning to its own fitted mean rather than to an arbitrary level.
It pairs well with a volume or momentum check. A corridor break tells you the move is statistically unusual relative to the current fit, but it says nothing about whether there is participation behind it.
Behavior worth understanding
The regression is recalculated on every bar, and the corridor plotted on each bar is that bar's own fit. This is a running envelope, not a fixed channel anchored to a pivot, so the bands will look wavier than a manually drawn regression channel. The reference moves with price, which is what keeps the state stable through a sustained run.
Signals are evaluated on the live bar, so a flip can appear and then vanish before the bar closes. Wait for bar close if you need signals that hold.
Limitations
Linear regression assumes price is moving in a straight line across the window, which is never fully true. The fit degrades at sharp reversals and around gaps, and the corridor is slow to acknowledge a turn right after a strong move because that extension is still inside the window. Treat this as a description of current trend structure, not a forecast.
Disclaimer
The indicator provided is not financial advice. Always conduct your own research and consider multiple factors before making trading decisions. Trade at your own risk. Indicator

Adaptive Regression Breakout Map | GainzAlgoThe Adaptive Regression Breakout Map (ARBM) is an advanced volatility and trend-tracking system designed to identify periods of extreme market compression and automatically map out high-probability breakout trades.
Rather than relying on traditional lagging indicators, ARBM utilizes a continuous statistical baseline to measure market "squeezes." Once a breakout is confirmed, the indicator shifts from analysis into execution mode, drawing a dynamic visual map on your chart that outlines precise Entry, Stop Loss, and Take Profit (TP1, TP2, TP3) levels, complete with automated trailing stop logic and a live performance dashboard.
How It Works
At its core, the ARBM operates on a dual-engine architecture:
Statistical Compression (The Squeeze): The script calculates a rolling linear regression baseline and wraps it in standard deviation bands. It continuously measures the width of this channel and compares it to a historical lookback period. When the bandwidth drops into a historically low percentile, the bands change color, signaling that the market is in a "squeeze" and building energy for a move.
Auto-Trendlines: Alongside the statistical bands, the script plots dynamic, auto-trendlines across recent pivot highs (cyan) and lows (magenta). These holographic lines track geometric compression and leave a visual history on the chart.
The Breakout Trigger: A signal is generated when the price violently escapes either the statistical standard deviation bands or the geometric auto-trendlines while the market is in a confirmed contraction state.
Dynamic Trade Mapping: Upon a breakout, the script calculates targets based on the volatility (bandwidth) at the time of the breakout. It plots the trade directly on your chart and actively trails the stop loss as targets are hit.
The Settings and Selections
The indicator is highly customizable, divided into four primary control groups:
Regression Model:
Regression Length: The lookback period for the linear regression baseline.
Deviation Multiplier: The width of the statistical bands (similar to Bollinger Bands).
Contraction Metrics:
Lookback Period: How far back the script looks to determine if the current channel is historically narrow.
Contraction Threshold %: The percentile the bandwidth must drop below to trigger a "squeeze" state.
Target Architecture:
TP1, TP2, TP3 Multipliers: Determines how far away your take profit targets are, dynamically scaled by multiplying the width of the channel at the time of the breakout.
Trendlines Overlay:
Show Holographic Trendlines: Toggle the geometric trendlines on or off.
Pivot Length: Determines how sensitive the script is when identifying the swing highs and lows used to draw the trendlines.
How to Use It
Trading with the ARBM is highly visual and systematic:
Wait for the Squeeze: Watch the regression channel. When the bands turn gray, volatility has compressed, and the market is consolidating.
Wait for the Signal: Look for a "Breakout, Long" or "Breakout, Short" label to appear. This confirms price has broken structure with momentum.
Follow the Map: The script will immediately draw your Entry (Blue), Stop Loss (Red), and three Take Profit targets (Green dashed lines).
Manage the Trade: The indicator handles trade management visually.
When TP1 is hit, the Stop Loss line automatically moves to your Entry price (Breakeven), and a label confirms the trail.
When TP2 is hit, the Stop Loss trails to TP1.
When TP2 is hit, the Stop Loss trails to TP1.
The trade closes entirely if TP3 or the trailing stop is hit. (Note: Hitting TP1 secures a win for the system's tracking, even if the remainder is stopped out at breakeven).
Monitor Performance: A stylized dashboard in the top right corner tracks the total number of signals, the historical Win Rate, and the Trade-by-Trade Sharpe Ratio, allowing you to quickly validate the settings for any given asset or timeframe.
Final Thoughts
The Adaptive Regression Breakout Map removes the guesswork from breakout trading. By combining continuous statistical volatility tracking with futuristic geometric trendlines, it mathematically identifies when a market is ready to move. Furthermore, by drawing the exact risk-to-reward parameters on the chart and tracking its own historical performance, it forces strict risk management and objective trade execution.
Indicator

Linear Regression Drag-Drop,custom deviations & gridOverview
This indicator lets you draw a precise linear regression channel between any two points in time that you choose — simply drag two time anchors onto the chart. Unlike PulseWire's built-in regression tool, which is locked to a fixed lookback, this script gives you full manual control over the exact start and end of the regression window, plus a deviation-based channel, an optional mirrored grid, and a live stats table to help you judge the quality of the fit.
How It Works
Two draggable time anchors. You place a Start Time and an End Time directly on the chart. The script finds the bars closest to each timestamp and runs a least-squares linear regression on price between them.
Deviation channel . Around the regression line, the script plots four deviation bands (1x–4x). You can choose how the deviation is calculated:
StdDev — the statistical standard error of the residuals (how far price actually strayed from the line).
Points (Pips) — a fixed pip value you define, useful when you want consistent, comparable band widths across different sessions or instruments rather than a value that changes with volatility.
Grid. A second set of lines can be drawn as a mirror image of the regression channel, anchored at the end point. You can choose:
Mirror Lines — the mirror slopes in the opposite direction, useful for spotting counter-trend zones.
Zero Slope — the mirror is flattened to horizontal, useful for marking flat reaction levels.
None — hide the mirror set entirely.
A vertical shift input lets you offset the whole mirrored grid up or down by a multiple of the deviation, so it doesn't have to originate from the same anchor point as the main channel.
Fill and time markers . The area between the deviation bands is shaded, and vertical lines mark your two chosen times, so the exact regression window is always visible at a glance.
Stats table. A table (position and appearance configurable) shows:
Slope (%/day) — the trend's daily rate of change, normalized as a percentage of the starting price, so it's comparable across instruments and timeframes.
R² — how well the straight line actually fits price over that window (color-coded green/yellow/red).
Deviation — shown directly in pips.
Bars — the number of bars in the regression window.
How To Use
Drag the Start Time and End Time anchors onto the swing points, session boundaries, or range you want to analyze. The information table is there to help you judge whether a setup is high-probability before you act on it — not every regression window is worth trading, and the table is your filter:
Deviation tends to fit best on AUD/USD and EUR/USD when the pip size is set to a multiple of 10. Other currency pairs (JPY pairs, for example) will usually need a different pip size to get a well-scaled channel — adjust to taste per instrument.
Slope (%/day) gives you a quick read on trend strength: roughly 0.15% = a slow trend, 0.5% = a moderate trend, 1%+ = a steep trend. Use this as a guide for how aggressively price is moving through the window, not as a hard rule.
R² is helps quality check. A high R² means price tracked the line cleanly (more reliable for directional/continuation reads); a low R² means the window was choppy and the line is describing a range rather than a trend (better suited to mean-reversion reads at the deviation bands).
Grid mode adds a second dimension to your analysis: use Mirror Lines to project counter-trend/reversal zones, and Zero Slope to mark horizontal reaction levels. Combined with the ability to freely drag your time anchors to any two points on the chart, this turns the indicator into a fast, repeatable way to test different swing points and see how price is likely to react at the resulting grid levels.
Like any regression-based tool, its usefulness comes from context and repetition. The more windows and instruments you test it against, the better your feel for which slope/R²/deviation combinations mark genuinely high-probability points versus noise — the power of this indicator unfolds with practice.
Notes
This tool describes historical price behavior over a chosen window; it does not predict future price with certainty. Always combine it with your own risk management and additional confluence.
Deviation bands are descriptive statistics, not guaranteed support/resistance — treat penetrations of the outer bands as information, not automatic signals.
Indicator

Regression Market Profile [BOSWaves]Regression Market Profile - Curve-Following Distribution Analysis with TPO Letters, Heatmap, and Profile Modes
Overview
Regression Market Profile is a regression-anchored market profile system that maps the distribution of price activity relative to a best-fit regression curve rather than within fixed horizontal price boundaries, where row assignment, POC identification, value area construction, and interior visualization are all derived from how far actual price deviated from the regression prediction on each bar rather than from absolute price levels.
Instead of constructing a profile against a static price range, this system fits either a linear or polynomial regression to recent price history and measures each bar's deviation from the fitted curve, distributing that activity into horizontal rows centered on the regression line. As the curve bends and trends through price space, the entire profile follows it, revealing where price consistently clustered above or below the regression prediction and identifying the deviation offset with the highest time-at-price concentration as a dynamic POC that moves with the trend rather than anchoring to a fixed session boundary.
This creates a market profile framework that adapts to the prevailing directional structure of price rather than imposing a fixed container. The interior visualization communicates distribution in three configurable modes: a heatmap that reveals how the distribution migrated across time columns, a profile extending from the right edge showing the cumulative distribution shape, and TPO letter boxes that follow the regression curve encoding chronological time progression through gradient coloring. Standard deviation bounds, value area boundaries, and a dual-line POC glow all follow the curve simultaneously, providing a complete structural reference system that moves with the trend rather than remaining static.
Price is therefore evaluated not for its absolute level but for its position relative to the regression expectation, with the profile revealing which deviation offsets attracted the most sustained activity throughout the regression window.
Conceptual Framework
Regression Market Profile is founded on the principle that meaningful participation clustering should be measured relative to the expected price path defined by recent price history rather than within arbitrary time or price containers that carry no relationship to the actual directional structure of the market.
Traditional market profile approaches anchor distributions to calendar sessions or fixed price ranges, producing profiles that reflect where price traded within a time box rather than where it clustered relative to its own trend. This framework replaces fixed-container profiling with regression-relative distribution measurement, where each bar's contribution to the profile is determined by how far actual price deviated from the best-fit curve rather than where it sat in absolute price space. The profile therefore reveals the structural tendencies of price relative to its own trend dynamics rather than its behavior within an externally imposed boundary.
Three core principles guide the design:
Profile distribution should be measured as deviation from a fitted regression curve rather than as absolute price position, ensuring the profile captures participation clustering relative to trend expectation rather than within arbitrary price boundaries.
The interior visualization mode should be configurable between temporal migration analysis, cumulative distribution shape, and chronological letter encoding, allowing the same structural data to be interpreted through different analytical lenses depending on the trader's workflow.
All structural reference elements including POC, value area, standard deviation bounds, and centerline should follow the regression curve continuously rather than anchoring to static horizontal levels, maintaining relevance to the current trend structure throughout the regression window.
This shifts market profile analysis from session-bounded horizontal distribution tracking into regression-relative participation mapping where the profile reveals structural clustering tendencies within the context of the prevailing trend curvature.
Theoretical Foundation
The indicator combines matrix-based polynomial and linear regression fitting to recent HL2 price data, rolling standard deviation for channel scaling and SD bound construction, deviation-based row assignment for distribution building, POC identification through maximum row count, value area expansion from POC outward, and three distinct interior visualization systems that present the same distribution data through different geometric representations following the regression curve.
The regression is computed using ordinary least squares matrix operations: the design matrix is constructed with powers of bar index up to the polynomial degree, transposed and multiplied to form the normal equations, inverted, and multiplied by the price vector to produce regression coefficients, which are then applied to generate the full prediction array. Standard deviation of the HL2 series over the regression window provides the channel scaling unit and drives the SD bound envelopes. Row assignment divides the channel height by the number of rows and places each bar's deviation from its predicted value into the corresponding row bin. POC and value area use the same maximum-count and outward-expansion logic as conventional market profile, applied to the curved row counts.
Four internal systems operate in tandem:
Regression Engine : Computes linear or polynomial best-fit predictions for all bars in the lookback window using matrix least squares, providing the curved baseline that all distribution measurements, row positioning, and visual elements follow.
Distribution Construction System : Measures each bar's deviation from its regression prediction, assigns it to a horizontal row within the standard deviation channel, accumulates row counts across the full window, and derives POC and value area from the resulting distribution.
Interior Visualization Engine : Renders the distribution data inside the channel in one of three modes: curved polygon cells per time column normalized independently for heatmap temporal migration display, curved profile bars extending from the right edge scaled to global row counts for distribution shape display, or TPO letter boxes positioned at the regression-relative row boundaries with gradient chronological coloring for time period encoding.
Structural Reference System : Draws the dual-line POC glow following the regression curve at the POC row offset, value area boundary polylines at the VA top and bottom offsets, standard deviation envelope polylines at one through three sigma above and below the curve, and a dashed centerline following the regression prediction directly.
This design ensures the distribution and all structural reference elements continuously adapt to the regression curve while the three interior modes provide complementary analytical perspectives on the same underlying participation data.
How It Works
Regression Market Profile evaluates price through a sequence of regression-aware distribution and visualization processes:
Regression Calculation : On the last bar, the design matrix is constructed from bar index values raised to polynomial powers up to the configured degree. Ordinary least squares solves for the coefficient vector and applies it to produce a prediction array covering all bars in the lookback window.
Channel Scaling : The standard deviation of HL2 over the regression window multiplied by the configured channel width defines the maximum deviation distance, establishing the vertical extent of the distribution channel centered on the regression curve.
Row Assignment and Count Accumulation : Each bar's actual HL2 is compared to its regression prediction and the deviation is assigned to a horizontal row bin derived from the channel height divided by the row count. Row counts accumulate across all bars in the window.
POC Identification : The row with the maximum accumulated count is identified as the Point of Control, representing the deviation offset from the regression curve where price spent the most time during the lookback window.
Value Area Construction : Starting from the POC row, adjacent rows are added in order of greater count until the cumulative total reaches the configured value area percentage of all bar counts, defining the high-activity zone around the POC.
Interior Rendering - Heatmap Mode : The lookback window is divided into time columns and each column builds its own per-row counts, normalized independently so each column's internal distribution is shown on its own scale. Curved polygon cells are rendered for each occupied cell with hot-cold gradient coloring by normalized density.
Interior Rendering - Profile Mode : Each row's global count is expressed as a fraction of the maximum row count and scaled to a configurable proportion of the total regression length. Curved polygon bars extend leftward from the right edge by the scaled bar length, forming a profile shape that follows the regression curve.
Interior Rendering - Letters Mode : Each bar is assigned a sequential alphabetical letter based on its time period index relative to the TPO timeframe. Letters are accumulated per row and rendered as individual boxes positioned at the regression-relative row boundaries, with gradient coloring that progresses from cold to hot as the letter index advances chronologically.
POC Polyline Rendering : A wide low-opacity glow polyline and a thinner full-opacity core polyline follow the regression curve at the POC deviation offset, providing a continuously curving reference for the maximum activity level throughout the window.
Value Area and SD Bound Rendering : Dotted polylines follow the regression curve at the value area high and low offsets and at one, two, and three standard deviation distances above and below the curve, with opacity increasing with distance from the curve.
Together, these elements form a continuously recomputed regression-relative distribution system where every visual element adapts to the current curve shape and all three interior modes present the same participation data from different analytical perspectives.
Interpretation
Regression Market Profile should be interpreted as a regression-relative structural distribution system where clustering above or below the fitted curve reveals directional bias tendencies and participation concentration within the prevailing trend:
Regression Centerline : The dashed curve following the best-fit prediction represents the trend's expected price path. Price consistently above it indicates sustained positive deviation bias; price consistently below indicates sustained negative deviation bias.
POC Line : The dual glow and core polyline following the curve at the maximum activity offset marks the deviation level where price spent the most time relative to the regression prediction, representing the most accepted deviation from expected trend behavior during the window.
Value Area Boundaries : Dotted polylines above and below the POC line mark the deviation range containing the configured percentage of total activity, identifying the zone of concentrated acceptance around the POC.
Standard Deviation Bounds : One, two, and three sigma dotted envelopes around the curve mark statistically extreme deviation distances, with progressively greater opacity indicating greater statistical rarity of price reaching those offsets.
Heatmap Mode : Each time column displays its own normalized distribution, with hot colors indicating the most active deviation level within that column and cold colors indicating less active levels. Reading across columns from left to right reveals how the distribution migrated as the window progressed.
Profile Mode : Curved bars extending from the right edge show the cumulative distribution shape across the full window, with longer bars indicating deviation levels with greater total activity and hot coloring marking the densest regions.
Letters Mode : Sequential alphabet letters fill the channel rows at their regression-relative positions, with gradient coloring from cold early-window letters to hot late-window letters encoding chronological time progression. Single-letter rows indicate price visited that deviation level in only one time period, functioning as regression-relative single prints.
POC Offset Interpretation : A POC positioned above the regression centerline indicates that price has consistently traded at a positive deviation from expectations, reflecting bullish structural bias within the window. A POC below the centerline indicates bearish structural bias.
POC offset direction, value area extent, distribution shape across modes, and SD bound interactions collectively provide more structural context than any element in isolation.
Signal Logic & Visual Cues
Regression Market Profile does not generate discrete buy or sell signals but provides continuous structural reference through distribution-derived levels:
POC Reaction : Price returning to the deviation level corresponding to the POC polyline encounters the most accepted level within the regression window, frequently acting as magnetic reference for reversion or continuation assessment.
Value Area Boundary Interaction : Price moving outside the value area boundaries enters statistically less accepted deviation territory, suggesting either trend extension beyond typical participation or the beginning of structural repositioning relative to the regression curve.
Standard deviation bound interactions provide additional reference for statistically extreme deviation events that historically attract mean reversion activity back toward the regression curve and POC.
Strategy Integration
Regression Market Profile fits within regression-informed structural analysis and distribution-based approaches:
POC Reversion Framing : Use the POC polyline as a dynamic reversion target when price has extended to the outer standard deviation bounds, with the curved POC providing a continuously updating level that reflects the trend's accepted center rather than a static price.
Value Area Acceptance Testing : Monitor whether price is trading within or outside the value area boundaries to assess whether current price activity represents accepted trend behavior or extended deviation warranting mean reversion consideration.
Heatmap Migration Analysis : Use temporal migration visible in heatmap mode to assess whether distribution is shifting toward positive or negative deviation over the course of the window, providing directional bias evidence from the distribution's evolution rather than from price alone.
Profile Shape Assessment : Use profile mode to assess distribution symmetry around the regression curve. A distribution skewed above the centerline suggests persistent positive bias; skew below suggests persistent negative bias. A symmetric bell shape suggests balanced acceptance around the regression expectation.
Single Print Monitoring in Letters Mode : Treat single-letter rows in letters mode as regression-relative thin participation levels that price is likely to revisit, analogous to single prints in conventional market profile.
Regression Mode Selection : Use Linear mode for markets trending in a consistent direction where a straight best-fit line accurately represents the price path. Use Polynomial mode for markets with visible curvature in their trend structure where the quadratic bend better fits the actual price trajectory.
Technical Implementation Details
Regression Engine : Matrix OLS computation using design matrix construction, normal equation formation, matrix inversion, and coefficient application for linear or polynomial curve fitting to HL2
Channel Construction : Rolling standard deviation-scaled channel with configurable width multiplier providing deviation row boundaries
Distribution System : Deviation-based row assignment with global count accumulation, POC maximum identification, and outward value area expansion
Heatmap Engine : Per-column count normalization with curved polygon cell rendering using hot-cold gradient by normalized density
Profile Engine : Global count-scaled curved bar polylines extending from the right edge by proportional bar length
Letters Engine : TPO timeframe-ratio letter assignment with per-row accumulation and gradient chronological box rendering at regression-relative boundaries
Structural System : Dual-line POC glow, dotted VA boundary polylines, three-sigma dotted SD envelopes, and dashed centerline all following the regression curve via chart.point arrays
Performance Profile : All rendering triggered only on the last bar with full object cleanup and rebuild on each update, polyline-based curved geometry for all structural elements
Optimal Application Parameters
Timeframe Guidance:
1 - 5 min : Intraday regression profiling with shorter length and tighter channel for fast-adapting curve that captures intraday trend structure
15 - 60 min : Session-level distribution analysis with balanced length and moderate channel width for meaningful participation mapping across typical session trends
4H - Daily : Swing-level regression profiling with longer lookback and polynomial mode for curve-following distribution across multi-session directional structures
Suggested Baseline Configuration:
Length : 200
Mode : Polynomial
Channel Width (SD×) : 3.0
Inner Display : Letters
Rows : 12
TPO Timeframe : 30
Value Area % : 70
Show POC : Enabled
Show Value Area : Enabled
Show SD Bounds : Enabled
These suggested parameters should be used as a baseline; their effectiveness depends on the instrument's trend characteristics, volatility profile, and preferred distribution granularity, so fine-tuning is expected for optimal performance.
Parameter Calibration Notes
Use the following adjustments to refine behavior without altering the core logic:
Curve fits too loosely to recent price : Decrease Length to shorten the regression window, producing a curve that adapts more quickly to recent price structure. Switch to Polynomial mode if the trend has visible curvature that a linear fit cannot capture.
Curve too reactive to short-term price movement : Increase Length to smooth the regression across more history, producing a more stable curve that reflects longer-term directional structure and reduces sensitivity to recent fluctuations.
Channel too narrow or wide : Adjust Channel Width to scale the standard deviation multiplier, expanding the channel to capture more price activity within the distribution or contracting it to focus on the core deviation range.
Distribution too coarse or granular : Adjust Rows to increase or decrease the number of horizontal price bins, calibrating vertical resolution to the channel height and the instrument's typical deviation behavior within the regression window.
Heatmap columns too few or many : Adjust Heatmap Columns to control the time resolution of the migration display, with fewer columns showing broader temporal patterns and more columns revealing finer migration detail at the cost of visual density.
Profile bars too short or long : Adjust Profile Width to scale the maximum bar length as a fraction of the regression window, calibrating how far the longest bars extend from the right edge relative to the available chart space.
Too few or many letters per row : Adjust TPO Timeframe to change the time period each letter represents. Higher timeframes produce fewer, broader letters; lower timeframes produce more letters with finer time resolution.
Adjustments should be incremental and evaluated across multiple session types rather than isolated market conditions.
Performance Characteristics
High Effectiveness:
Trending markets where the regression curve accurately represents the directional price path and the distribution reveals consistent deviation bias that reflects genuine structural tendencies
Instruments with smooth, curving price trends where polynomial mode produces a better-fitting curve than a straight line and the distribution around the curve is more meaningful than a session-anchored profile
Market profile-informed approaches that benefit from a continuously adapting POC and value area that follow the trend rather than anchoring to fixed session boundaries
Distribution analysis workflows where heatmap temporal migration or profile shape provides directional bias evidence from participation patterns rather than from price indicators alone
Reduced Effectiveness:
Choppy, directionless markets where the regression curve has no clear shape and the distribution is uniform across rows, reducing the interpretive value of POC location and value area extent
Markets with frequent sharp reversals where the regression window spans multiple opposing structural moves, producing a curve that represents none of them accurately and a distribution without meaningful clustering
Extremely short lookback windows where the matrix regression calculation is underdetermined or the distribution contains too few bars per row to produce statistically meaningful counts
Instruments with discontinuous price action including frequent gaps where the HL2 series used for regression produces curves that follow gap-distorted price paths rather than genuine trend structures
Integration Guidelines
Confluence : Combine with BOSWaves structural tools, momentum oscillators, or volume analysis to validate POC and value area interactions with broader analytical context before acting on regression-relative distribution levels
POC Offset Bias : Monitor the position of the POC relative to the centerline across successive sessions as a structural bias indicator. A POC consistently above the centerline across multiple regression windows suggests a persistent positive deviation tendency in the current trend phase.
Mode Selection by Objective : Use Letters mode for structural time-at-price analysis analogous to conventional market profile. Use Heatmap mode to assess how distribution shifted over the regression period. Use Profile mode to quickly assess distribution shape and skew relative to the centerline.
Regression Mode Discipline : Commit to a regression mode based on the instrument's observed trend curvature rather than switching between modes reactively. Polynomial mode adds a second degree of freedom that can overfit short-term noise if the lookback window is too short.
Window Length Stability : Maintain a consistent regression length when using the POC and value area as ongoing structural references. Changing the length significantly shifts the curve and redistributes the profile, making successive POC comparisons unreliable.
Disclaimer
Regression Market Profile is a professional-grade regression-relative distribution and market profile analysis tool. It uses ordinary least squares curve fitting with deviation-based participation mapping but does not predict future price movements. Results depend on market conditions, instrument trend characteristics, parameter selection, and disciplined execution. BOSWaves recommends deploying this indicator within a broader analytical framework that incorporates order flow context, structural analysis, and comprehensive risk management. Indicator

Arbor_Gradient_Boosting_GainzAlgoGainzAlgo is excited to bring the ability to perform gradient boosting and feature importance selection to Pine Script. Currently, there are no native capabilities within Pine Script for gradient boosting or feature importance selection. Arbor fills this significant gap by introducing a from-scratch Gradient Boosting Machine (GBM) engineered with XGBoost-style mechanics.
Designed to support both classification and regression tasks, and building on our Random Forest approach to Pinescript, Arbor utilizes depth-1 stumps, meaning it performs one split per round without column subsampling.
Because PulseWire automatically lists the exported types and function parameters, the following outlines the core mechanics and capabilities you unlock by importing Arbor.
Core Mechanics
Arbor brings advanced machine-learning concepts directly into your Pine Script workflows:Advanced Training: Utilizes Newton leaf steps (second-order hessian weighting) and the exact XGBoost gain formula.
Regularization & Pruning: Integrates L2 regularization (lambda), minimum gain pruning (gamma), and minimum child weight checks to manage model complexity and prevent overfitting.
Stochasticity: Implements Fisher-Yates row subsampling to provide genuine round-to-round stochasticity matching XGBoost's subsample behavior.
Reproducibility: You can pass an optional seed to any fit function to ensure reproducible training runs across reloads.
Model Tiers
The library supports models scaled across three specific feature tiers:
GBM (1 Feature): Built for rapid classification or regression implementations.
GBM3 (3 Features): Purpose-built specifically for classification tasks.
GBM4 (4 Features): Supports both classification and regression, and uniquely offers XGBoost-style, gain-based feature importance evaluation.
Library "Arbor_Gradient_Boosting_GainzAlgo"
Arbor — gradient boosting for Pine Script. From-scratch GBM v2
with XGBoost-style mechanics: Fisher-Yates row subsampling, Newton leaf steps
(second-order hessian weighting), exact XGBoost gain formula with L2
regularization (lambda), minimum gain pruning (gamma), and minimum child
weight. Trees are depth-1 stumps (one split per round) and there is no
column (feature) subsampling — this is an XGBoost-style boosting scheme,
not a full XGBoost reimplementation. Supports classification and regression
across three feature tiers:
- GBM (1 feature) : gbm_fit / gbm_predict
classification or regression via is_classifier
- GBM3 (3 features) : gbm3_fit / gbm3_predict
classification only
- GBM4 (4 features) : gbm4_fit / gbm4_predict / gbm4_importance_pct
classification or regression with XGBoost-style
gain-based feature importance
All variants use Newton leaf steps, exact gain formula, L2 regularization,
Fisher-Yates shuffle subsampling, and gamma/min_child_weight pruning. Pass
an optional seed to any fit function for reproducible training runs.
gbm_fit(feat, target, n_rounds, lr, n_thresh, is_classifier, lambda, gamma, min_child_w, subsample, seed)
Fits a single-feature gradient-boosted stump ensemble using
XGBoost-style mechanics: Newton leaf steps (second-order hessian weighting),
exact gain formula with L2 regularization, gamma pruning, minimum child
weight, and Fisher-Yates row subsampling. Each round fits one depth-1 stump
(this is not a full multi-level tree, and there is no column subsampling).
Supports both binary classification (log-odds + sigmoid) and regression (MSE).
Parameters:
feat (array) : Array of feature values, one per training row
target (array) : Array of targets — 0.0/1.0 for classification, continuous for regression
n_rounds (int) : Number of boosting rounds / stumps to fit
lr (float) : Learning rate / shrinkage applied to each round's leaf contribution
n_thresh (int) : Candidate split thresholds to scan per round
is_classifier (bool) : True = binary classification, False = squared-error regression
lambda (float) : L2 leaf regularization — Ridge-style shrinkage toward zero (XGBoost default: 1.0)
gamma (float) : Minimum gain required to accept a split — prunes weak splits (XGBoost default: 0.0)
min_child_w (float) : Minimum hessian sum per child node — prevents tiny noisy splits (XGBoost default: 1.0)
subsample (float) : Fraction of rows randomly sampled per round via Fisher-Yates (default: 1.0 = all rows)
seed (int) : Optional seed for the row-subsampling shuffle — pass a fixed value for reproducible fits across reloads (default: na = unseeded/random each time)
Returns: Fitted GBM object ready for gbm_predict()
gbm_predict(model, x)
Scores a single feature value against a fitted GBM ensemble.
Parameters:
model (GBM) : A GBM object previously returned by gbm_fit()
x (float) : Feature value to score (same feature definition used in training)
Returns: Predicted probability if classifier, raw predicted value if regressor
gbm3_fit(feat1, feat2, feat3, target, n_rounds, lr, n_thresh, lambda, gamma, min_child_w, subsample, seed)
Fits a 3-feature gradient-boosted classifier using XGBoost-style
mechanics: Newton leaf steps, exact gain formula, L2 regularization, gamma
pruning, minimum child weight, and Fisher-Yates row subsampling. Selects the
best (feature, threshold) pair each round and boosts in log-odds space.
Each round fits a single depth-1 stump; there is no column subsampling.
Parameters:
feat1 (array) : Array of feature 1 values, one per training row
feat2 (array) : Array of feature 2 values, one per training row
feat3 (array) : Array of feature 3 values, one per training row
target (array) : Array of binary targets (0.0 or 1.0), one per training row
n_rounds (int) : Number of boosting rounds
lr (float) : Learning rate / shrinkage
n_thresh (int) : Candidate thresholds scanned per feature per round
lambda (float) : L2 leaf regularization (Ridge shrinkage, XGBoost default: 1.0)
gamma (float) : Minimum gain to accept a split (XGBoost default: 0.0)
min_child_w (float) : Minimum hessian sum per child node (XGBoost default: 1.0)
subsample (float) : Row sampling fraction per round via Fisher-Yates (default: 1.0)
seed (int) : Optional seed for the row-subsampling shuffle — pass a fixed value for reproducible fits across reloads (default: na = unseeded/random each time)
Returns: Fitted GBM3 object ready for gbm3_predict()
gbm3_predict(model, x1, x2, x3)
Scores 3 feature values against a fitted GBM3 classifier.
Parameters:
model (GBM3) : GBM3 object from gbm3_fit()
x1 (float) : Current value of feature 1
x2 (float) : Current value of feature 2
x3 (float) : Current value of feature 3
Returns: Predicted probability
gbm4_fit(feat1, feat2, feat3, feat4, target, n_rounds, lr, n_thresh, is_classifier, lambda, gamma, min_child_w, subsample, seed)
Fits a 4-feature gradient-boosted ensemble with Newton steps, exact gain
formula, L2 regularization, gamma pruning, minimum child weight, Fisher-Yates
row subsampling, and gain-based feature importance tracking.
Supports both binary classification and regression. Each round fits a single
depth-1 stump; there is no column subsampling.
Parameters:
feat1 (array) : Array of feature 1 values, one per training row
feat2 (array) : Array of feature 2 values, one per training row
feat3 (array) : Array of feature 3 values, one per training row
feat4 (array) : Array of feature 4 values, one per training row
target (array) : Array of targets — 0.0/1.0 for classification, continuous for regression
n_rounds (int) : Number of boosting rounds
lr (float) : Learning rate / shrinkage
n_thresh (int) : Candidate thresholds scanned per feature per round
is_classifier (bool) : True = binary classification, False = regression
lambda (float) : L2 leaf regularization (Ridge shrinkage, XGBoost default: 1.0)
gamma (float) : Minimum gain to accept a split (XGBoost default: 0.0)
min_child_w (float) : Minimum hessian sum per child node (XGBoost default: 1.0)
subsample (float) : Row sampling fraction per round via Fisher-Yates (default: 1.0)
seed (int) : Optional seed for the row-subsampling shuffle — pass a fixed value for reproducible fits across reloads (default: na = unseeded/random each time)
Returns: Fitted GBM4 object with importance scores, ready for gbm4_predict() / gbm4_importance_pct()
gbm4_predict(model, x1, x2, x3, x4)
Scores 4 feature values against a fitted GBM4 ensemble.
Parameters:
model (GBM4) : GBM4 object from gbm4_fit()
x1 (float) : Current value of feature 1
x2 (float) : Current value of feature 2
x3 (float) : Current value of feature 3
x4 (float) : Current value of feature 4
Returns: Predicted probability if classifier, raw predicted value if regressor
gbm4_importance_pct(model, feat_idx)
Returns normalized feature importance as % of total gain for one feature.
Importance = accumulated gain credited to this feature across all boosting rounds,
matching XGBoost's xgb.importance() Gain column definition.
Parameters:
model (GBM4) : GBM4 object from gbm4_fit()
feat_idx (int) : Feature index to query (0-3)
Returns: Percentage of total ensemble gain attributed to this feature (0.0–100.0)
GBM
Holds a fitted gradient-boosted stump ensemble (1 feature).
Fields:
thresh (array) : Split threshold for each round's stump
left_val (array) : Newton leaf value when feature < threshold
right_val (array) : Newton leaf value when feature >= threshold
base_score (series float) : Log-odds of training mean (classifier) or mean (regressor)
lr (series float) : Learning rate stored for inference
is_classifier (series bool) : True = sigmoid probability output, False = raw regression output
GBM3
Holds a fitted 3-feature gradient-boosted stump ensemble (classification only).
Fields:
stump_feat (array) : Which feature index (0-2) each round's stump split on
thresh (array) : Split threshold for each round's stump
left_val (array) : Newton leaf value when feature < threshold
right_val (array) : Newton leaf value when feature >= threshold
base_score (series float) : Log-odds of training mean
lr (series float) : Learning rate stored for inference
GBM4
Holds a fitted 4-feature gradient-boosted ensemble with gain-based importance.
Fields:
stump_feat (array) : Which feature index (0-3) each round's stump split on
thresh (array) : Split threshold for each round's stump
left_val (array) : Newton leaf value when feature < threshold
right_val (array) : Newton leaf value when feature >= threshold
importance (array) : Accumulated gain per feature (indices 0-3), raw — normalize via gbm4_importance_pct()
base_score (series float) : Log-odds (classifier) or mean (regressor)
lr (series float) : Learning rate stored for inference
is_classifier (series bool) : True = sigmoid probability output, False = raw regression output Library

Smart Ichimoku | GainzAlgoOverview
Most Ichimoku indicators give you the same signal everyone else gets, a raw cloud cross with no filter, no context, and no target. This indicator rethinks the system from the ground up by combining a smoothed Ichimoku cloud with an inline logistic regression classifier that scores every cloud break in real time, then projects statistically-derived price targets the moment a confirmed signal fires.
The result is a cleaner, higher conviction version of one of the most respected trend frameworks in technical analysis.
The Foundation: Why Smooth the Ichimoku?
Traditional Ichimoku uses simple high-low midpoints (Donchian midlines) for its Tenkan, Kijun, and Senkou components. This makes the cloud visually choppy and prone to false crosses on noisy, volatile instruments like crypto or high-beta equities.
This indicator replaces all three components with Hull Moving Averages (HMA), which are designed to be simultaneously smooth and responsive, reducing lag without the whipsaw of standard smoothing. The cloud body itself becomes cleaner, the baseline is less noisy, and the cross events that trigger signals are more structurally meaningful.
All default periods match classic Ichimoku settings (9 / 26 / 52 / 26 displacement) so the logic stays true to the original system, it's just rendered with better math underneath.
The Signal: Logistic Regression Cloud Break Classifier
Here's where this indicator separates itself. A cloud cross alone is not a signal, it's a candidate. What actually matters is whether the market conditions at the moment of the cross are consistent with a real, sustained breakout or breakdown.
The classifier answers that question with a probability score.
How it works
At the exact bar where price exits the cloud body, four normalized features are computed and fed into a logistic regression model:
1. RSI (centered at 50, scaled by 25)
Measures momentum. On a bearish break, is RSI already extended to the downside? On a bullish break, is it pointing up? RSI near 50 adds little conviction; RSI at 30 on a bear break adds a lot.
2. Stochastic Oscillator (centered at 50, scaled by 25)
Short-term overbought/oversold confirmation. Works similarly to RSI but captures faster-cycle momentum, giving the model a second read on the same question.
3. Z-Score (price vs 20-bar mean, normalized by standard deviation)
Measures how statistically extended price is relative to recent history. A cloud break accompanied by a Z-Score of -2 is much more meaningful than one at Z = -0.2. This feature effectively asks: "Is this break happening from an already-stretched position?"
4. Cloud Break Depth (normalized by ATR)
How far did price close through the cloud boundary, relative to recent volatility? A close that barely clips the edge is very different from one that punches through by a full ATR. This is the most direct measure of breakout conviction.
The Math
Each feature is multiplied by a weight and summed into a single score (z). That score is passed through the sigmoid function:
P = 1 / (1 + e^(-z))
This compresses the output to a probability between 0 and 1. If the probability clears the threshold (default 0.60), the break is confirmed and a signal fires. Below threshold, the cross is rejected — instead of being ignored, it's labeled with a risk tier so you can see exactly how close (or far) it came to confirming.
The probability score is displayed as a small percentage label directly on the signal bar so you always know how strong the classifier rated that particular break.
Self-Calibrating Weights — No Manual Tuning
Unlike a typical multi-feature model, none of the four weights are set by hand. Each one is derived automatically from that feature's own rolling correlation with next-bar returns, recalculated continuously over a user-set lookback window (the "Self-Calibration Window," default 100 bars).
In practice this means: if RSI has been a genuinely useful predictor of direction on this instrument and timeframe recently, its weight rises on its own. If Z-Score has been mostly noise in the current regime, its weight shrinks toward zero — automatically, without anyone touching a slider.
This was a deliberate design choice. Letting people hand-tune regression weights invites a lot of well-intentioned guesswork that usually overfits to a handful of recent candles. By having the model score its own features based on demonstrated, rolling predictive power, the classifier adapts to changing market conditions instead of running on opinions baked in at setup time.
Rejected Crosses: Risk-Tiered Labels
Not every cloud cross clears the threshold, and that's the point. Rather than silently discarding rejected crosses, this indicator labels every one of them with a risk tier so you know exactly what the model saw and how close it came to confirming:
Low Risk: Probability fell just short of the threshold (within 10 points below). A near-miss — the break had real conviction behind it, it simply didn't clear the bar.
Moderate Risk: Probability landed meaningfully below threshold (10–25 points). A weaker break with mixed signals underneath it.
High Risk: Probability came in far below threshold (25+ points). A break with little to no underlying conviction — most consistent with chop or noise.
Each label shows its tier and the actual probability (e.g. "Low Risk ▼ 54%"), so nothing is a black box. A cluster of Low/Moderate Risk labels in one zone often signals a contested area that's likely to resolve into a real breakout once it's worked through — useful context even though no trade signal fired. These labels can be toggled off entirely in settings if you'd rather only see confirmed signals.
The Targets: Mean, Median, Mode
Once a confirmed break fires, three dashed horizontal target lines project from the signal bar. These are not arbitrary multiples, they are derived from the actual statistical distribution of bar-to-bar price moves over the lookback window.
Mean (Yellow): The average absolute bar move over the lookback period, scaled by the target multiplier. This is the "expected" target under normal conditions.
Median (Cyan): The 50th percentile of historical moves. Because move distributions are right-skewed (a few large moves pull the mean up), the median is typically more conservative than the mean and often a more realistic first target.
Mode (Hot Pink): The most frequently occurring move size, derived by bucketing historical moves into ATR-width bins and finding the most populated bin. This represents what the market most commonly does — not what it averages, not the middle value, but the single most likely outcome based on observed frequency.
Together, the three targets give you a realistic range rather than a single arbitrary level — grounded in what this instrument has actually done over the recent past. Bull and bear target sets are tracked independently, so a new bearish break won't erase an active bullish target set still in play, and vice versa.
The Target Multiplier (default 3×) scales all three targets proportionally. Lower it for tighter, shorter-term targets; raise it for swing trades or higher-volatility instruments.
Reading the Chart
Green triangle (▲) below bar: Confirmed bullish cloud break. Price has exited the top of the cloud with sufficient classifier probability. Three upward target lines appear.
Pink triangle (▼) above bar: Confirmed bearish cloud break. Price has exited the bottom of the cloud with sufficient classifier probability. Three downward target lines appear.
Percentage label: The LR probability score for that break (e.g. "73%"). Higher is stronger.
Risk-tiered label (amber/orange/red): A cloud cross that was rejected, with its tier and probability shown.
Yellow dashed line: Mean target
Cyan dashed line: Median target
Hot pink dashed line: Mode target (thicker, as it represents the highest-frequency outcome)
Settings Guide
Smooth Ichimoku
Tenkan / Kijun / Senkou Period: Standard Ichimoku periods. Default 9/26/52 follows the classic system. Shorter periods = more sensitive, more signals. Longer = slower, fewer but stronger signals.
Displacement: How far forward the cloud is projected. Default 26.
Break Classifier
Self-Calibration Window: How many past bars the model uses to learn each feature's weight from its recent correlation with price moves. Shorter windows adapt faster to regime changes but can be noisier; longer windows are more stable but slower to react. Default 100.
Break Probability Threshold: The minimum probability required to confirm a signal. Default 0.60. Raise toward 0.75+ for fewer, higher-conviction signals. Lower toward 0.50 to see more cloud breaks confirmed (effectively turns the filter off at 0.50).
Targets
Lookback (bars): How many bars of historical move data to use for the distribution calculation. Default 60. Longer lookback = more stable targets based on longer-term behavior. Shorter = more reactive to recent volatility.
Target Multiplier: Scales all three target lines proportionally from the signal close. Default 3×. Adjust based on your timeframe and typical holding period.
Risk Labels
Show Risk Labels on Rejected Crosses: Toggles the Low/Moderate/High Risk labels on rejected cloud crosses. Off by default for a cleaner chart; turn on to see every cross the model evaluated, not just the confirmed ones.
How to Use It
As a trend confirmation tool: Use the cloud direction (cyan dominant = bullish structure, pink dominant = bearish) as your bias filter, and only trade signals that align with the cloud color. Bull signals below a cyan cloud, bear signals above a pink cloud.
As a breakout entry trigger: Wait for price to consolidate inside or near the cloud, then take the confirmed break as an entry signal. The probability label tells you how much conviction the model has at that moment.
Using rejected crosses as context: A string of Low Risk labels in a zone suggests the cloud is being tested seriously without quite breaking — often a precursor to a real move once the level finally gives.
For target setting: Use the median as a conservative first target, the mean as a mid-range objective, and the mode as a guide to where the most "normal" move tends to land. The hot pink mode line is often the most useful for setting realistic profit expectations.
For alerts — Four alert conditions are built in: "Confirmed Bull Break," "Confirmed Bear Break," "Rejected Bull Cross," and "Rejected Bear Cross." Set them on your preferred timeframe and let the classifier notify you rather than watching the chart.
Timeframe Notes
This indicator works across all timeframes but behaves differently depending on context:
1H–4H: Good balance of signal frequency and reliability. Recommended starting point.
Daily: Fewer signals, higher structural significance. Best for swing traders.
15m and below: More signals, more noise. Consider raising the threshold to 0.65–0.70 and reducing the lookback to 30. Watch the risk-tiered labels here in particular — they're most useful for filtering chop on fast timeframes.
Example on the Daily with SPY ETF:
Example on the 4 Hour with BTCUSD;
Example on the 15 Minute with QQQ:
A Note on the Model
The logistic regression here is not trained on historical data in the machine learning sense, and it no longer relies on manually-set weights either. Each feature's weight is derived from its own rolling correlation with subsequent price action, recalculated continuously. Think of it less as a black-box ML model and more as a structured, self-adjusting way to combine four momentum and positioning indicators into a single probability score, similar to our Directional Logistic Oscillator.
The advantage over a traditional multi-condition filter (RSI < 40 AND stoch < 30 AND...) is that the sigmoid function produces a continuous probability rather than a binary pass/fail, which means the model degrades gracefully, a break with three strong features and one neutral one still scores well, rather than getting blocked by an arbitrary threshold on the weak feature. And because every rejected cross is shown with its tier and score rather than discarded silently, nothing the model does is hidden from you.
We hope you enjoy! Indicator

Indicator

Regression-Slope Divergence with Reliability ScoringRegression-Slope Divergence with Reliability Scoring
Most divergence tools tell you a divergence exists. This one tells you whether that divergence has historically mattered on the symbol and timeframe you're actually looking at — and states the conclusion in plain words on the chart.
What it plots
A normalised momentum oscillator with stretch bands and divergence markers, plus a verdict panel that scores those divergences in real time. By default the chart stays minimal — just the oscillator and the verdict panel — with an optional key-info table and a per-direction track-record grid you can switch on in settings.
Why these components are combined, and how they work together
Three classical pieces are fused into a single pipeline — not stacked as independent signals:
Linear-regression slope of price — the direction price is genuinely trending.
RSI-based momentum, z-score normalised — the direction momentum is trending.
A binomial-proportion confidence test — whether the disagreement between the two has preceded a favourable move often enough to beat a same-zone baseline.
Components 1 and 2 only become a signal where they disagree — that disagreement is the divergence. Component 3 is the layer that makes this original: it records every past divergence on the current instrument, measures how often the expected move actually followed within a fixed look-ahead, compares that to what a random entry from the same stretched zone would have achieved, and wraps a confidence interval around the result. The parts are interdependent — remove any one and the script can no longer answer its core question, "is this divergence worth trading here?"
How to read it
The verdict panel translates the statistics into four states:
GREEN — edge confirmed: these divergences have beaten a same-spot baseline here. Worth acting on.
RED — no edge here: they've lost to a coin-flip from the same spot. Skip them, or try a higher timeframe (counter-trend divergence often fails on fast timeframes).
AMBER — unproven: edge not statistically established yet; treat as low-confidence.
GREY — learning: still collecting completed samples.
It also shows whether a signal is live right now and a reward-vs-risk figure — the average best move vs the average worst move after a signal, in ATR. Below 1:1 means signals have hurt more than they've helped. The optional grid breaks the record down into Bullish / Bearish with hit-rate, baseline, edge and reward:risk.
A divergence itself is simply price making a higher high / lower low while the momentum line does the opposite.
What's original
Off-the-shelf divergence indicators fire and leave you to guess. This one keeps a self-updating, confidence-scored track record against a same-zone baseline and tells you, in words, whether the current setup has earned your attention on this specific market.
Universal across markets
It reads only the chart's own price (the source is configurable in settings), so it runs on any symbol, any timeframe, in any market with no external data. Defaults are tuned for NIFTY futures; change the source and lengths for other instruments.
Outputs for other scripts
Generic EXP_* values — oscillator, signal, probability, edge, edge lower-bound, sample count, regime, trend strength and verdict tier — are published to the Data Window so other indicators can read them via input.source().
Concept credits
Relative-strength momentum and average true range — J. W. Wilder. Binomial score confidence interval — E. B. Wilson. Trend-efficiency regime measure — P. Kaufman. Least-squares regression — classical statistics.
Disclaimer
For research and education only. This is not financial advice, not a recommendation to buy or sell, and not a guarantee of future results. All performance shown is in-sample and past-only. Markets carry risk — do your own research and manage your own risk. Indicator

Indicator

Adaptive Volumetric Reversion Channel Fade ValidatorAdaptive Volumetric Reversion Channel — Fade Validator (AVRC)
What it is
AVRC is an anchored, volume-weighted regression channel that frames mean-reversion ("fade") setups and then gates, scores and validates them — so you can see whether fading stretched price actually has an edge on your symbol and timeframe instead of taking it on faith. It is a study / analysis framework, not a strategy and not a signal service.
Why these components are combined (the mashup rationale)
Fading an extreme asks three different questions, and no single classic tool answers all three. AVRC coordinates several non-redundant lenses on one shared geometry (an anchored regression channel) and one shared volatility unit (residual σ), so each lens can check the others rather than echoing it:
WHERE is price stretched? A volume-weighted regression centerline with residual-σ bands is drawn against a slower macro trend-relative volume map — volume binned by σ-distance from a longer regression line. Whether the tactical band sits in a thin (fast-traversed) or thick (heavily-traded) macro node tells you if a fade is likely clean or absorbed. This cross-read is the connective tissue between the two layers.
Is a reversion ACTUALLY firing? Independent "tells" at the band — a close-back rejection, a band-confluent momentum divergence, an equal-high/low liquidity sweep, and the macro-density read. Because these tells are correlated, their agreement is shrunk by a design-effect correction so echoes can't masquerade as independent confirmation.
Is the market in a reverting STATE? A regime gate (variance-ratio test + a reversion-trust correlation) only passes fades when price increments offset rather than compound. An entry-time ride-risk score (macro-trend alignment, the two-centerline spread, an already-walking band, momentum, mean-reversion half-life, and multi-timeframe trend consensus) flags fades likely to be "walked" rather than reverted.
The components share one geometry and one volatility unit, and each can veto the others. The goal is to suppress low-quality fades more than to generate them.
How the validation layer works (what makes this more than a drawing)
Every fade is logged and, a fixed horizon later, resolved: its forward return is measured in ATR units and tabulated Gate ON vs Gate OFF — follow-through %, a Wilson 95% interval, whipsaw %, and mean R per fade. Outcomes are additionally split Reverted vs Rode, by macro node (thin/thick), and by ride-risk (low/high at the running median). The panel's Edge line synthesizes this into a single read: is Gate ON's follow-through interval clearing the ungated baseline with positive mean R and enough samples? Per-fade rows also export to the Data Window for your own analysis. Every filter has to earn its place against the ungated baseline.
How to use it
Set the Price source (top of settings). Defaults are tuned for an intraday index future; the source is user-selectable so the framework runs on any symbol or market. Volume-based parts (heatmap, profile, POC) need a real volume feed.
Read the panel top-down: Now (live setup) → State (regime + spread + compression) → the A/B scoreboard (Gate OFF, Gate ON, Revert, Ride) → Edge verdict.
A fade arms when price tags the outer band and at least one tell prints, then passes only if the regime (and optional ride-risk) gate agrees. Target is the centerline or the nearest untested POC.
If Gate ON does not beat Gate OFF on follow-through and mean R with non-overlapping intervals and enough samples, the edge isn't there on this symbol/timeframe — change them, don't force it. The signal is clearest on higher intraday timeframes; 1-minute is mostly noise.
What is original here
The original work is the coordination: a shared-σ, timeframe-adaptive regression channel used as a reversion frame; a trend-relative volume map cross-read against the band; decorrelated tells fused by a design-effect shrink; a statistical regime gate; an entry-time ride-risk score; and a built-in A/B + forward-return validation harness — combined so each lens can veto the others and the tool reports its own hit rate. It is not a re-skin of any single indicator.
Concept credits (techniques are standard; this implementation is original)
Volume-weighted least-squares & polynomial regression; residual-σ channels; anchored VWAP (all standard); Volume Profile / Value Area / Point of Control — Market Profile (Steidlmayer / CBOT); Variance-Ratio test — Lo & MacKinlay (1988); design effect / effective sample size — Kish (1965); proportion confidence interval — Wilson (1927); mean-reversion half-life — Ornstein–Uhlenbeck process; ATR, RSI, Parabolic SAR — Wilder; Stochastic — Lane; Supertrend (classic, MTF context). Builds on established open-source regression-channel and anchored-VWAP techniques.
Settings (all defaults are on; tuned for an intraday index future)
Data/Source · Volatility unit · Macro volume heatmap · Tactical channel & bands · Interrelation & band-walk · Ride-risk filter · Density cross-read · Reversion tells · Regime gate · POC targets · Fade signal · Validation & export · Dashboard & theme (auto light/dark) · MTF trend context. The two signal-suppression gates (walk-gate, ride-gate) ship off so the indicator shows its signals and lets the validation panel tell you whether enabling them helps.
Disclaimer
For research and education only. NOT financial advice, NOT a recommendation, and NOT a guarantee of future results. All statistics shown are in-sample on loaded history, close-to-close at the horizon, without costs or slippage — a study aid, not a backtest. Mean reversion fails in trends and during regime breaks. Do your own research and manage your own risk. Indicator

Volumetric Regression Heatmap [LuxAlgo]The Volumetric Regression Heatmap indicator is a sophisticated market analysis tool that combines dynamic linear regression with volume profile density to visualize fair value and liquidity zones. By projecting volume-weighted heatmaps within a trend-following channel, it allows traders to identify where the bulk of trading activity has occurred relative to the current price trajectory.
🔶 USAGE
The indicator provides a multi-layered view of market structure. The central heatmap shows the "hottest" areas of volume concentration, acting as a magnet for price, while the outer bands represent statistical extremes.
🔹 Mean Reversion Signals
The script includes a built-in signal system designed for sideways or "flat" markets. When the indicator detects a "Contraction" state (determined by the ratio of channel height to standard deviation), it plots small circles at the +2/-2 standard deviation levels.
Green Circles: Potential long opportunities when price crosses below the lower signal band during a flat market.
Red Circles: Potential short opportunities when price crosses above the upper signal band during a flat market.
🔹 Future Projections & Profile
The heatmap extends beyond the current bar, providing a "Future Projection" zone. This allows traders to anticipate where support and resistance levels will be in the coming sessions. To the right of the projection, a Bookmap-style volume profile histogram displays the total volume distribution, helping to identify high-volume nodes (HVN) and low-volume nodes (LVN) at a glance.
🔶 DETAILS
🔹 Dynamic Auto-Adjusting Period
Unlike standard regression channels that use a fixed lookback, this tool features an adaptive engine. It calculates the ratio between short-term and long-term volatility (ATR).
In high-volatility environments, the channel period shrinks to become more reactive.
In low-volatility or ranging environments, the period expands to capture a broader structural view.
🔹 Volumetric Delta Histograms
The script calculates the approximate buying and selling volume for every candle within the lookback period. This data is visualized as histograms extending from the outer bands:
Top Band (Green): Displays buying pressure delta.
Bottom Band (Red): Displays selling pressure delta.
This allows traders to see not just where price is, but the intensity of the volume driving it toward the channel extremes.
🔶 SETTINGS
🔹 Core Settings
Source: The price source used for the regression calculation.
Base Period: The anchor length for the regression fit.
Dynamic Auto-Adjusting Period: Enables/disables the volatility-based adaptive lookback.
🔹 Heatmap Settings
Grid Rows Each Side: Determines the vertical resolution of the heatmap bands.
Gradient Smoothing: Applies a smoothing algorithm to the volume distribution for a cleaner visual gradient.
Colors 1-5: Customizable colors ranging from low-volume areas to high-volume "hot" zones.
🔹 Mean Reversion Signals
Signal Band (SD Multiplier): The standard deviation level required to trigger a signal.
Flat Slope Threshold: Controls how "flat" the channel must be to allow signals to appear, preventing counter-trend signals in strong trending markets.
🔹 Delta Histograms
Histogram Height Scale: Adjusts the vertical magnitude of the delta bars.
Histogram Bar Width: Sets the thickness of the individual delta lines.
🔹 Style & Options
Future Projection Length: How many bars to project the heatmap into the future.
Show Volume Profile Histogram: Toggles the right-sided volume distribution boxes.
🔹 Dashboard
Dashboard: Toggles the on-screen analytics panel.
Position/Size: Adjusts the location and scale of the dashboard UI.
Indicator

Event HorizonEvent Horizon is a historical analog projection fan designed to answer one practical question:
What has price tended to do after market conditions similar to the current one?
Instead of using a fixed crossover, oscillator threshold, or trend flip, this indicator builds a market fingerprint from the current chart, searches historical bars for similar conditions, and projects how those past analogs moved forward. The result is a visual forward fan showing possible path behavior, consensus direction, dispersion, confidence, and the closest historical analog path.
The goal is not to predict the future with certainty. The goal is to give traders a structured way to compare the current setup against similar historical environments and quickly see whether the analogs are aligned, scattered, bullish, bearish, or not useful.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
What makes this script different
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Most projection tools draw a channel, regression, moving average extension, or volatility cone from a fixed formula.
Event Horizon uses a historical analog engine. Each bar is converted into a multi-factor feature profile, then compared against prior market states using weighted Euclidean similarity. The closest historical analogs are used to create a forward projection fan.
The script combines:
• Historical analog matching
• Weighted Euclidean distance
• Regime-aware scoring
• Volatility and trend-state filtering
• Consensus projection logic
• Closest historical path overlay
• Agreement and confidence scoring
• Directional historical event dots
• A visual fan that shows uncertainty instead of one hard prediction
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
How it works
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1. Market fingerprint
The script measures the current market using multiple dimensions, including:
• Recent price movement
• Trend slope
• ATR expansion and compression
• Candle range and body behavior
• Wick imbalance
• Position relative to recent structure
• Breakout distance
• Volume ratio and volume trend
• ATR percentile
• ADX / trend strength
• Historical shape samples
This creates a multi-dimensional profile of the current setup.
2. Historical analog search
The current profile is compared to historical profiles on the same chart. Similarity is calculated with weighted Euclidean distance, so higher-value features such as trend, volatility regime, and price-shape behavior can matter more than smaller candle details.
Closer historical examples receive stronger match scores.
3. Regime awareness
The script also classifies the current environment into regimes such as trend, compression, volatility expansion, volume shock, or range/chop. Historical examples from incompatible regimes are penalized, helping reduce weak comparisons.
4. Forward projection
Once the best analogs are selected, the script looks at what actually happened after those historical setups. Those forward moves are normalized and projected from the current anchor point.
5. Consensus and confidence
The indicator summarizes the analog group with:
• Directional bias
• Agreement percentage
• Dispersion
• Confidence score
• Edge state: TRADEABLE, CAUTION, or NO EDGE
• Historical self-test statistics
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
How to read the fan
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
The colored fan shows the projected analog field.
The colored median shows the consensus path of the analog set.
The white line shows the closest visible historical analog path. It is not a guaranteed target. It is the path taken by the most similar past setup selected by the engine.
The wider the fan, the more disagreement there is between analogs.
The tighter the fan, the more historically aligned the analogs are.
The confidence and edge label are important. A bullish-looking fan with low confidence or high dispersion should be treated differently than a bullish fan with strong agreement and cleaner regime structure.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Historical dots
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Historical event dots help visually review where prior projection events occurred.
• Bullish projection dots appear below price
• Bearish projection dots appear above price
• Mixed or neutral readings are visually separated
This makes it easier to inspect whether the indicator has been identifying useful directional conditions on the current symbol and timeframe.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
How to use it
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
For newer traders:
1. Start on the Daily or 4H chart.
2. Look at the colored median.
3. Check whether the white analog path agrees with the median.
4. Check confidence and agreement.
5. Avoid forcing trades when the label says NO EDGE or when dispersion is high.
A stronger bullish read usually has:
• Median path rising
• White analog path also rising
• Agreement above roughly 65%
• Confidence above roughly 70
• Low or medium dispersion
• Edge state showing TRADEABLE or CAUTION, not NO EDGE
A weaker or avoidable read usually has:
• Median and white path disagreeing
• Agreement near 50%
• High dispersion
• Low confidence
• Range/chop regime
• NO EDGE label
For experienced traders:
Use the fan as an analog-based context layer. It is most useful when combined with your own structure, liquidity, trend, support/resistance, volume, or macro view. The script is designed to show whether historical analog behavior supports or conflicts with the trade idea you already see on the chart.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Suggested settings
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Balanced stocks / ETFs:
• Mode: Current Bar Projection
• Visual Mode: Cinematic
• Fan Style: Hybrid Swarm + Contours
• Horizon: 30
• Memory Lookback: 1800
• Max Analogs: 30
• Minimum Analogs: 6
• Pre-Event Window: 20
• Shape Samples: 6
• Path Scale: 1.0
Crypto:
• Horizon: 24
• Memory Lookback: 2000 to 2500
• Path Scale: 0.75 to 0.90
• Flexible direction matching
Intraday:
• Horizon: 20 to 24
• Minimum Analogs: 8
• Path Scale: 0.75 to 1.0
• Use liquid symbols only
Trend continuation:
• Direction Matching: Strict
• Mirror Opposite Direction: Off
• Path Scale: 1.0
Reversal / exhaustion:
• Direction Matching: Flexible
• Mirror Opposite Direction: On
• Path Scale: 0.75
• Shorter horizon preferred
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Best use cases
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Event Horizon is best suited for:
• Liquid stocks
• Major ETFs
• Index products
• Major crypto pairs
• Trend continuation setups
• Post-compression expansion
• Structure breaks
• Swing-trade context
• Daily and 4H analysis
It is less suitable for:
• Illiquid symbols
• Very new tickers with limited history
• Low-volume penny stocks
• Earnings gaps
• Binary news events
• Extremely short scalping timeframes
• Markets with sudden one-off catalysts
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Important notes
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
This is an analog projection tool, not a standalone buy/sell system.
Historical similarity does not guarantee future behavior. Market structure, liquidity, volatility, news, and macro conditions can change quickly. The fan should be used as a decision-support layer, not as a guaranteed forecast.
The strongest readings occur when the median, white analog path, agreement, confidence, and regime state all point in the same direction.
The weakest readings occur when analogs are scattered, confidence is low, dispersion is high, or the script identifies a no-edge environment.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Summary
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Event Horizon turns historical market behavior into a forward analog projection fan.
It helps traders see:
• What similar past setups did next
• Whether those analogs agree or disagree
• Whether the current regime supports the projection
• Whether the projected path is tight or scattered
• Whether the setup has enough confidence to matter
Use it to add historical context, probability awareness, and regime-based discipline to your chart analysis.
Indicator

Dual Log Regression Channels [BigBeluga]Dual Log Regression Channels is a highly advanced multi-timeframe mathematical modeling terminal engineered for PulseWire. It maps, projects, and blends two independent logarithmic regression channels directly onto your asset layout screen to deliver an institutional-grade perspective on trend structure, market cycles, and structural volume distributions.
By separating price discovery parameters into a long-term Macro Channel and an execution-focused Short Term Channel, this tool effectively resolves the classic trader conflict of assessing structural trend directions while looking for immediate micro execution setups. Rather than treating market space as flat, standard geometric lines, this engine runs an advanced curve-fitting algorithm over your data to follow the exponential nature of capital expansion and distribution.
🔵 INTUITIVE SYSTEM ARCHITECTURE & ENGINE FEATURES
1. Logarithmic Regression Curve Optimization
Non-Linear Structural Tracking: Standard linear regression struggles with volatile crypto or high-growth equity trends over massive lookback structures. This script continuously converts incoming data matrices into mathematical log-space, computes a best-fit ordinary least squares (OLS) linear progression, and converts the output back into exponential value curves.
Dual Horizons Convergence Layer: Tracks an extensive trend anchor block (defaulting to 300 bars) simultaneously with a highly responsive, high-velocity swing lookback matrix (defaulting to 50 bars). This exposes localized micro contractions occurring right at major macro boundary extremes.
Visual Deviation Spacing Bands: Channels automatically map out distinct volatility boundaries based on real-time Standard Deviation multipliers. This defines predictable mathematical risk corridors where asset expansions typically exhaust and snap back toward the median baseline.
2. Predictive Channel Extension & Real-Time Trend Direction Arrows
Dynamic Origin Trend Arrows: The engine processes a dedicated directional diagnostic framework at the precise historical start (origin node) of each lookback channel. It generates sharp, high-visibility glyph trend arrows ( ⇗ for structural uptrends and ⇘ for structural downtrends). These arrows offer an instant, real-time assessment of the mathematically calculated baseline slope, entirely bypassing visual guesswork when channels run relatively flat.
Forward-Projected Space Models: When enabled, both the Macro and Short-Term structural bands project forward into the future chart space blank zone (e.g., 50 bars ahead for Macro, 20 bars for Short-Term). This lets you visually identify intercept locations and major trend crossroads long before price action arrives.
3. Adaptive Embedded Channel Volume Profiles (VP)
Integrated Block Volume Binning Matrix: Moving beyond basic fixed or visible range volume profiles, this module segments and collects transacted volume profiles exclusively inside the exact coordinate boundaries of each respective channel.
Dynamic Coordinate-Aligned Shading Bars: The volume profile rows scale and project outward utilizing advanced polyline geometry arrays, maintaining structural alignment with the slope of the moving channel boundaries.
Point of Control (POC) Trailing Baselines: Automatically tracks and renders a crisp, high-visibility solid horizontal baseline ( POC Line ) marking the exact price bin location that attracted the highest volume concentration throughout that lookback phase.
4. Volumetric Delta Tracking Panels
Buy vs. Sell Volume Accumulation Blocks: Aggregates total execution volume during the lookback period, classifying volume based on bar polarity.
Net Order Flow Delta Percentages: Computes and prints the precise net mathematical buying/selling pressure delta inside the channel. This reveals quiet accumulation behavior or hidden distribution trends directly alongside your spatial boundary drawings.
🔵 SYSTEMATIC EXECUTION STRATEGIES & RISK INTERPRETATION
Confluence Zone Intercept Trading: Look for setups where the Short Term Channel’s outer standard deviation boundaries align directly with the Macro Channel's major structural lines. When a high-velocity micro asset trend exhausts itself at a long-term macro floor or ceiling, it marks a highly efficient, asymmetric inflection zone for trend continuation entries or macro reversals.
Volume Profile POC Mean Reversion Matrix: The volume profile POC lines show where massive institutional blocks shifted hands inside that channel's lifespan. If the market stretches thin near an upper outer boundary but net volumetric volume indicators begin shifting toward seller control, look for a swift mean-reversion move down toward the high-liquidity POC baseline node.
Trend Acceleration vs. Overextended Breakouts: When an asset forces a candle close completely outside the projected log channel boundaries, it flags an exceptional shift in trend velocity. If the Volume Delta percentage prints an explosive spike in that direction, it supports a trend acceleration play. If volume is thin, it warns you of a predatory, overextended fakeout structure that is likely to snap back into the central channel values.
🔵 INTERFACE CONFIGURATION AND PARAMETERS
Lookback & Deviation Tuning Blocks: Customize historical calculation boundaries and volatility widths separately for both trend layers to match any asset class or time frame preference.
Volume Profile Customization: Control the precise resolution of the volume profile by adjusting row count bins and max bar widths to match your specific layout.
Clean Workspace Overrides: Toggle visibility filters to hide median baselines, remove raw background asset lines, or completely customize color theme hex codes to fit cleanly within your setup without causing visual clutter.
Transform your charting environment from basic straight lines into an exponential, volume-weighted structural map with the Dual Log Regression Channels terminal. Indicator

Machine Learning: Volume-Weighted Mean Reversion [Dots3Red]█ MACHINE LEARNING: VOLUME-WEIGHTED MEARN REVERSION KERNEL REGRESSION
Nadaraya-Watson kernel regression is a non-parametric machine learning method. Unlike moving averages which apply fixed, predefined weights to historical bars, kernel regression derives each bar's weight from a mathematical function — the kernel — that measures how relevant that bar is to the current estimate. No hardcoded coefficients. No assumed shape. The model adapts purely from the data.
This script introduces a fundamental extension to the standard method: volume as a second weighting dimension . The result is a regression curve that gravitates toward price levels where real market participation occurred — not toward price levels where a clock happened to tick.
█ WHY KERNEL REGRESSION IS MACHINE LEARNING
The term machine learning describes algorithms that derive structure from data rather than from manually specified rules. Kernel regression satisfies this definition formally. The estimator computes:
ŷ = Σ [ w(i) × close ] / Σ
where each weight w(i) is determined by a kernel function — not by the programmer. The model decides, from the data, how much each historical bar should influence the current estimate. This is the same mathematical family as K-Nearest Neighbors, which weights neighbors by proximity. It is cited as a foundational non-parametric ML method in Bishop (2006) and Hastie et al. (2009), and is described as an attention mechanism in deep learning literature — the same concept behind transformer models. The claim is accurate, not cosmetic.
█ THE CORE INNOVATION — VOLUME WEIGHTING
Every existing Nadaraya-Watson implementation on PulseWire uses a pure time kernel:
• Standard NW: w(i) = K(i/h)
This means a bar with 10,000 shares traded and a bar with 10,000,000 shares traded receive identical weight if they are the same number of bars away. A thin overnight drift and a high-volume institutional session influence the regression equally. That is statistically incorrect — volume is a direct measure of how much informational content a price bar carries.
This script uses a volume-weighted kernel:
• This script: w(i) = vol_norm(i) × K(i/h)
where vol_norm(i) is the bar's volume normalized against the peak volume in the lookback window, raised to a configurable power exponent. The regression estimate is therefore:
ŷ = Σ [ vol_norm(i) × K(i/h) × close ] / Σ
High-volume bars anchor the curve. Low-volume bars — thin sessions, overnight drift, holiday trading — contribute minimally. The regression finds where the market actually agreed on price, not just where the clock recorded a tick.
█ THREE KERNEL FUNCTIONS
All three apply the same volume weighting. The choice controls how rapidly influence decays with time distance:
• Rational Quadratic (default) — heavier tail than Gaussian. Bars from 40–60 periods ago still contribute meaningfully if they had high volume. Best for daily and weekly charts where old high-volume levels remain structurally relevant.
• Gaussian — standard bell curve decay. Weight drops sharply with distance. Best for intraday charts where recency matters more than historical anchors.
• Epanechnikov — hard cutoff at the bandwidth boundary. Anything beyond h periods receives zero weight. Produces the most locally sensitive regression. Best for fast charts requiring tight responsiveness.
█ SIGNAL LOGIC
The envelope bands are placed at a configurable multiple of ATR, standard deviation, or a fixed percentage above and below the regression line. Three band width methods are available to match different volatility contexts.
Two signal modes are available:
• Reversion mode (default) — a signal fires when price crosses back through the band after an extension. The ▲ label appears on the bar where price returns inside the lower band. The ▼ label appears on the bar where price returns inside the upper band. This confirms reversion has begun rather than anticipating it.
• Extension mode — enable Signal on extension close to fire a signal the moment price closes outside a band. This is an early warning — useful for alerts before the reversion bar arrives.
Additional signal filters: minimum bars between signals to prevent repeat firing, optional slope direction gate so signals only fire when the regression slope agrees with the signal direction.
█ WHAT YOU SEE ON THE CHART
Regression line
The volume-weighted fair value curve. Cyan when slope is rising, magenta when falling. This is where the model estimates price should be given the recent history of high-participation price levels.
Envelope bands
Upper and lower boundaries built from ATR, standard deviation, or a fixed percentage. The upper band is tinted red — resistance zone. The lower band is tinted green — support zone.
Bar coloring — 4 states
• Bright red — price closed above the upper band. Extended, statistically stretched above fair value.
• Bright green — price closed below the lower band. Extended, statistically stretched below fair value.
• Dim silver — price inside bands, regression rising or falling, i.e normal bullish or bearish context.
The contrast between fully saturated outside-band bars and dimmed inside-band bars makes overextension immediately visible without reading the scale.
Signal labels
▲ REVERT or ▼ REVERT with VW=XX% showing the volume weight of the signal bar. A signal at VW=85% fired on a high-participation bar. A signal at VW=9% fired on a thin bar — lower confidence.
Signal bar highlighting
Two additional layers available: a background flash on the signal bar and a thick vertical line through the bar's full range. Both are independently toggleable. The vertical line uses width=4 — the maximum Pine Script allows — making the signal bar visually distinct even when zoomed out.
Dashboard
Displays: current regression value, slope direction, band width, Bar Vol Weight meter (▰▰▰▱▱▱) showing how much influence the current bar has on the regression, active kernel type, volume weighting status, percentage distance from the regression midline, and non-repainting mode status.
█ NON-REPAINTING
When Non-Repainting Mode is enabled (default), all calculations use a bar offset. The current bar's close does not enter its own regression estimate. Historical signals visible on closed bars will not change as new bars form. Disable this to see a predictive (repainting) version where the current bar participates in its own estimate — useful for visual exploration but not recommended for backtesting or alerts.
█ HOW TO USE
Core use case — mean reversion
This is a mean reversion tool. It works best when price is oscillating rather than trending directionally. The recommended workflow:
1 — Confirm a ranging regime with a separate regime classifier before acting on signals.
2 — Wait for price to reach or pierce the upper or lower band (bars turn bright red or green).
3 — Check the VW% in the signal label. Higher volume weight on the signal bar = higher confidence.
4 — Enter on the reversion signal (▲ or ▼ label). Stop beyond the wick of the signal bar.
5 — Target the regression midline as the primary exit. The % from mid dashboard row tracks progress in real time.
Timeframe guidance
The volume-weighting advantage increases with timeframe because higher timeframes produce more meaningful volume data per bar. H4 and Daily are the strongest timeframes for this tool. For intraday use, reduce the Volume Weight Power to 0.3–0.5 to soften the impact of individual volume spikes.
Quick-start settings by asset class
• Stocks daily: Window=100, Bandwidth=8, Vol Power=1.0, ATR×2.0
• Crypto daily: Window=80, Bandwidth=6, Vol Power=0.7, ATR×1.8
• Forex H4: Window=100, Bandwidth=10, Vol Power=1.0, ATR×1.5
• Indices H1: Window=120, Bandwidth=12, Vol Power=0.8, Stdev×2.0
█ SETTINGS REFERENCE
Kernel Settings
• Lookback Window — number of historical bars in the regression. Larger = smoother, more lag.
• Bandwidth (h) — controls how fast kernel weight decays with time. Higher = older bars still contribute.
• Kernel Type — Gaussian / Rational Quadratic / Epanechnikov. See kernel section above.
• RQ Alpha (α) — Rational Quadratic only. Lower = smoother mixture of length scales.
• Non-Repainting Mode — uses offset. Recommended ON for backtesting.
Volume Weighting
• Enable Volume Weighting — toggle the core innovation on or off. OFF = standard NW.
• Volume Normalization Window — peak volume reference window. Match or exceed the lookback window.
• Volume Weight Power — exponent on the volume weight. 1.0 = linear. 2.0 = quadratic. 0.5 = softer.
• Volume Weight Floor — minimum weight for any bar. Prevents zero-volume bars from being ignored entirely.
Envelope Bands
• Band Width Method — ATR (volatility-adaptive), Stdev (statistical), or Percent (fixed).
• ATR Length — period for ATR calculation.
• ATR / Stdev Mult — multiplier applied to ATR or standard deviation.
• Percent Offset % — used when Percent method is selected.
Signals
• Signal on band crossover — enable signals on band cross events.
• Signal on extension close — fire signal when price closes outside a band (early warning mode).
• Require slope change — only signal when regression slope direction agrees.
• Min bars between signals — gap guard to prevent repeat signals.
Visuals
• Dashboard — regression stats and live metrics table.
• Signal labels — ▲/▼ REVERT labels with volume weight percentage.
• Band fill — fill between upper and lower bands.
• Background flash — bright background color on signal bars.
• Vertical line on signal bar — thick line through full bar height at signal.
• Large dot marker — additional plotchar layer on signal bars.
• Dashboard position — Top Right / Top Left / Bottom Right / Bottom Left.
█ ALERTS
Seven alert conditions are available:
• Long signal — reversion through lower band
• Short signal — reversion through upper band
• Any signal — either direction
• Extended below lower band — early warning before reversion fires
• Extended above upper band — early warning before reversion fires
• Regression slope turned bullish
• Regression slope turned bearish
█ DISCLAIMER
This indicator is a decision-support tool. It does not constitute financial advice and does not guarantee future results. Past statistical patterns do not predict future price behavior. Always use proper risk management.
Method: Nadaraya-Watson Kernel Regression (Non-Parametric ML)
Innovation: Volume × Time Kernel Weighting
Kernels: Gaussian · Rational Quadratic · Epanechnikov
Signals: Mean Reversion (band crossover or extension)
Repainting: Configurable — non-repainting mode available Indicator

Regression Trend Reversal Signals & Forecasts [AlgoAlpha]🟠 OVERVIEW
Regression Trend Reversal Signals & Forecasts combines multiple regression methods into a single trend and reversal framework. It allows traders to choose between Linear Regression, Theil-Sen Regression, LOESS smoothing, Nadaraya-Watson smoothing, Polynomial Regression, and a Kalman Filter to estimate the underlying price path.
The selected regression line acts as the center of a dynamic channel. The channel width is based on the standard deviation of the distance between price and the regression line, allowing it to adapt to changing market conditions.
The script also identifies potential reversal conditions when price extends beyond the channel and then shows signs of rejection. In addition, it can project the current regression slope forward to provide a simple forecast of the current trend path.
🟠 CONCEPTS
Regression Line — A statistical estimate of the underlying price trend. Different methods can be selected, ranging from straight-line regressions to adaptive smoothing techniques.
Theil-Sen Regression — A robust regression method that uses median slopes from all point pairs, reducing the influence of outlier price spikes.
LOESS Regression — A locally weighted regression that fits nearby observations more heavily than distant observations to create a smooth trend curve.
Nadaraya-Watson Smoothing — A kernel-weighted averaging method that estimates trend by assigning larger weights to recent observations.
Kalman Filter — A recursive estimation method that continuously updates the trend estimate as new prices arrive.
Polynomial Regression — A curved regression model that can capture non-linear trend structures using higher-order polynomial functions.
Regression Deviation Bands — Channel boundaries calculated from the standard deviation of price relative to the regression line.
Regression Slope — The rate of change of the regression estimate used to determine trend direction and forecast projections.
🟠 FEATURES
Regression Channel — Dynamic bands expand and contract based on how far price deviates from the regression line.
Trend Flip Signals — Generates directional markers when the regression trend changes from rising to falling or from falling to rising.
Reversal Signals — Marks potential bullish and bearish reversals when price extends beyond the channel and begins rejecting those extremes.
Forecast Projection — Extends the current regression slope into future bars and optionally displays projected channel boundaries.
🟠 HOW TO USE
Select a regression method that matches the market behavior you want to analyze. Linear and Theil-Sen are suited to directional trends, while LOESS, Nadaraya-Watson, and Kalman provide smoother adaptive estimates.
Use the regression line as the primary trend reference. Rising regression values indicate strengthening conditions, while falling values indicate weakening conditions.
Monitor the channel boundaries for extended price movement away from the regression estimate.
Watch for bullish reversal markers below the lower band after downside extensions and bearish reversal markers above the upper band after upside extensions.
Use trend flip signals as confirmation that the regression slope has changed direction.
Compare price location within the channel to gauge whether price is trading near trend equilibrium or at an extreme deviation.
Use the forecast projection as a continuation estimate of the current regression slope rather than a prediction of future market behavior.
🟠 CONCLUSION
Regression Reversal Signals combines multiple regression techniques, adaptive deviation channels, reversal detection, and forward projections into a single framework. By allowing traders to switch between several trend estimation methods, it provides different perspectives on trend structure and price deviation. The indicator helps identify trend direction, potential reversals, and areas where price has moved unusually far from its estimated path. Indicator

Polynomial/Linear Regression Volume Profile [BigBeluga]Polynomial/Linear Regression Volume Profile is a state-of-the-art charting framework that blends advanced statistical modeling with localized volume distribution analysis. By evolving past traditional, static horizontal volume profiles, this indicator dynamically curves the volume profile matrix around mathematical trend baselines, giving you a hyper-localized view of value zones, support, and resistance across the trend’s lifecycle.
Equipped with a switchable Ordinary Least Squares (OLS) calculation engine, traders can analyze price distribution relative to a straight path (Linear) or an adaptive structural arc (Polynomial).
🔵 RECURSIVE REGRESSION BASELINES
Adaptive Curve Fitting Engine: Choose between a straight-line trend tracking framework (Linear) or an advanced second-degree curved path (Polynomial). This non-linear baseline curves dynamically to track real institutional momentum shifts, avoiding the lag or rigid delays typical of standard moving averages.
Symmetric Grid Segmentation: The indicator slices the regression space into dynamic parallel layers above and below the center line. These tracking cells act as a structural map of the trend, automatically expanding or contracting based on the mathematical bounds of the lookback period.
Standard Deviation Wave Bands: Plots dedicated tracking envelopes at 1, 2, and 3 Standard Deviations. This maps statistical extremes instantly, highlighting key valuation zones directly on the chart.
🔵 CURVED ORDER FLOW PROFILE
Dynamic Trend-Anchored Volume Profile: Traditional volume profiles are anchored strictly to vertical price grids. This framework bends the profile horizontally along the path of the regression curve. This ensures volume is localized directly relative to the trend's value matrix rather than arbitrary static prices.
Dynamic Point of Control Matrix (POC): The tool calculates cumulative transaction weights across each regression row. The absolute highest volume cluster is highlighted across the entire lookback window as a vivid Point of Control (POC) baseline, serving as a primary target magnet for price discovery.
Gradient Density Mapping: Volume bins are colored with a responsive heat-map gradient. Low-volume zones fade into deep baseline tones, while high-volume institutional interest areas light up dynamically, reflecting heavy positional accumulation.
🔵 DATA INTERFACE & CONTROLS
Regression Matrix Dashboard (Top-Right): A neat information center providing live metrics, including current trend direction (Bullish/Bearish), the numerical value of the POC level, the exact transactional volume resting at that key node, and structural $\pm3\text{ SD}$ channel limits.
Precision Profile Scaling: Adjust the profile width parameters to limit or extend how far back profile bins stretch across your chart space to prevent layout clutter.
Complete Style Personalization: Individualized visual controls allow you to switch line architectures (Solid, Dashed, Dotted) across baselines, boundaries, and POC paths.
🔵 STRATEGIC APPLICATION
Trading the Trend Value Nodes: Treat the dynamic POC line as a trend anchor. In a strong bullish trend, pullback entries occurring at a highly concentrated, heat-mapped POC node represent low-risk, high-probability entry criteria.
Mean Reversion at Statistical Boundaries: When price extends completely out to the dynamic outer channel limit and volume density in that outer bin thins out, look for a swift mean-reversion snapback toward the baseline.
Volume Profile Breakouts: Low-volume zones (gaps in the curved profile) indicate price levels that the market skipped quickly due to high momentum. If price breaks past a thick volume node into a low-volume zone, it is likely to sprint quickly toward the next major heat-mapped node.
Structural Regime Tracking: Use the upper-right dashboard to instantly evaluate macro status. If the matrix shifts between Bullish and Bearish while price hovers consistently near a high-volume POC, it implies heavy institutional distribution is occurring before the next major expansion.
Polynomial/Linear Regression Volume Profile redefines volume structure. By wrapping the laws of order flow directly around mathematical curves, it gives trend traders an elite perspective to trade with precision, statistical logic, and institutional order flow visibility. Indicator

Structural Inefficiency Radar [JOAT]Structural Inefficiency Radar
Introduction
Structural Inefficiency Radar measures regression fair value, residual z-score, path asymmetry, volatility clustering, and repair/extension force.
This open-source indicator is designed as a context tool, not a standalone trading system. It focuses on explaining the current market state with restrained visuals and confirmed-bar logic where signals are used.
Core Concepts
1. Regression Fair Value
A linear regression spine represents statistical fair value.
2. Residual Z-Score
Distance from fair value is normalized by residual standard deviation.
3. Path Asymmetry
Upward and downward path movement are compared to detect directional distortion.
4. Repair and Extension Force
Deviation, slope, asymmetry, and clustering determine whether price is extending or repairing.
z = (close - fairValue) / residualDeviation
Features
Fair-value spine
Inner and outer inefficiency bands
Residual z-score
Repair and extension scoring
E+ and E- labels plus repair markers
Input Parameters
Regression and residual windows
Deviation gate
Repair quality gate
Cooldown
Bands, candles, and HUD toggles
How to Use This Script
Use the spine and bands to frame structural stretch. Extension labels indicate directional inefficiency; gold markers indicate fair-value repair.
Limitations
The script uses historical OHLCV data and cannot know future prices.
Signals and states can be late during fast reversals because confirmed-bar logic is used to reduce repainting.
Model outputs should be interpreted with market context, risk controls, and independent analysis.
No visual state should be treated as a certain trade outcome.
Originality Statement
SIR is original in combining regression residuals, path asymmetry, clustering, repair force, and extension force.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice, investment advice, or a recommendation to buy or sell any financial instrument. All calculations are derived from historical market data and may produce inaccurate readings in some market conditions. No indicator can predict future market behavior. Use proper risk management and independent judgment.
-Made with passion by jackofalltrades
Indicator

Bitcoin Compressing Power Law ChannelBitcoin Compressing Power Law Channel
Most Bitcoin power-law channels draw bands of a fixed width around a long-term trendline. This one is different: the channel width is not constant. It starts wide and compresses exponentially as Bitcoin matures, modeling the idea that long-term volatility around the trend tends to shrink over time. That decaying width is the core idea of this indicator.
Why a compressing channel
A standard power-law channel assumes the spread between its upper and lower bounds stays the same across Bitcoin's entire history. In practice, an asset's relative volatility tends to fall as it grows larger and more liquid. This indicator captures that by letting the channel narrow over time toward a configurable floor, so the bounds reflect a maturing market rather than a permanently fixed range.
How it works
The model assumes log(price) scales linearly with log(days since the genesis block), producing a fair-value trendline: logFair = intercept + slope * log10(days). A lower bound is offset below that line, and the upper bound is placed above the lower bound at a distance set by the channel width.
The width itself is the original part: width = minWidth + startWidth * exp(-decaySpeed * yearsSinceGenesis). Early in Bitcoin's history the exponential term is large and the channel is wide. As years pass, that term shrinks toward zero and the width converges to a minimum floor (minWidth). The result is a channel whose envelope tightens over time instead of staying fixed.
What it plots
Three lines in price space (upper, middle, lower) with a shaded fill between the upper and lower bounds. Optionally, a 200 SMA of the current timeframe and a 200 SMA from the weekly timeframe, each toggleable. The weekly SMA is requested from a higher timeframe with lookahead disabled, so it does not repaint using future data. A normalized "Decay Channel Oscillator" is exposed in the Data Window, showing where the current close sits within the channel on a 0 to 1 scale (0 = lower bound, 1 = upper bound).
Inputs
Every model parameter is adjustable: the genesis date, the power-law intercept and slope, the lower offset, the initial and minimum channel widths, and the decay speed that controls how fast the channel compresses. Colors for each line, the fill, and both SMAs are configurable.
How to use it
Apply it to a Bitcoin chart on a longer timeframe such as Daily or Weekly, where a power-law model is most meaningful. The middle line is the model's central estimate; the upper and lower lines describe the expected long-term range, narrowing as time goes on. The Data Window oscillator lets you read how stretched price is within the channel numerically.
Parameters and calibration
The default intercept and slope are starting values that approximate Bitcoin's historical power-law fit. They are not fixed truths. You should re-evaluate them and adjust them, along with the offset, widths, and decay speed, to suit your own analysis and the data range you are studying. Different calibrations will move the channel and change how aggressively it compresses.
Limitations and cautions
This is a model, not a prediction. The power-law relationship is an empirical observation that may break down at any time, and the decay parameters are assumptions, not facts. The compressing width is a hypothesis about volatility maturing over time; it may not hold. This indicator is built for Bitcoin and is not intended for other assets. Nothing here forecasts future prices, and the past behavior of the channel does not guarantee anything about how price will behave going forward.
The code is open-source under the Mozilla Public License 2.0. You are welcome to study it and build on it. Indicator

Kinetic Inertia Field [JOAT]Kinetic Inertia Field
Introduction
Kinetic Inertia Field models price like a noisy particle using velocity, acceleration, jerk, kinetic energy, potential displacement, and equilibrium deviation.
This open-source indicator is designed as a context tool, not a standalone trading system. It focuses on explaining the current market state with restrained visuals and confirmed-bar logic where signals are used.
Core Concepts
1. Velocity and Acceleration
Log returns are normalized by volatility to create velocity, then differentiated into acceleration and jerk.
2. Kinetic Energy
Inverse volatility acts as a mass proxy and squared velocity creates energy context.
3. Equilibrium Displacement
A regression/VWAP blend creates a fair path and ATR-normalized displacement.
4. Inertia Field
Energy, acceleration, and displacement combine into inertial up, inertial down, or elastic state.
kineticEnergy = 0.5 * mass * velocity * velocity
Features
Velocity, acceleration, and jerk model
Kinetic and potential energy scoring
Regression/VWAP equilibrium
Energy rails and impulse trace
K+ and K- labels plus snapback markers
Input Parameters
Velocity smoothing
Volatility memory
Equilibrium horizon
Energy and inertia gates
Cooldown and display toggles
How to Use This Script
Use K+ and K- as confirmed high-energy state changes. Gold markers show elastic snapback conditions.
Limitations
The script uses historical OHLCV data and cannot know future prices.
Signals and states can be late during fast reversals because confirmed-bar logic is used to reduce repainting.
Model outputs should be interpreted with market context, risk controls, and independent analysis.
No visual state should be treated as a certain trade outcome.
Originality Statement
KIF is original in applying kinetic energy, potential displacement, and inertia scoring to price-state analysis.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice, investment advice, or a recommendation to buy or sell any financial instrument. All calculations are derived from historical market data and may produce inaccurate readings in some market conditions. No indicator can predict future market behavior. Use proper risk management and independent judgment.
-Made with passion by jackofalltrades
Indicator

Orion Regression Field [JOAT]Orion Regression Field
Introduction
Orion Regression Field builds a weighted regression valuation field with standard error bands, curvature options, compression detection, and reprice signals.
This open-source indicator is designed as a context tool, not a standalone trading system. It focuses on explaining the current market state with restrained visuals and confirmed-bar logic where signals are used.
Core Concepts
1. Weighted Regression
Recent bars can receive more influence while still preserving a full model window.
2. Standard Error Bands
Inner and outer bands show statistical distance from the modeled path.
3. Curvature and Confidence
Optional curvature and R2-style confidence control when the field is considered reliable.
4. Pinch and Reprice
Compression and outer-band reactions create filtered reprice events.
mid = weightedRegression(close, len); band = standardError * multiplier
Features
Weighted regression midline
Inner and outer SEE bands
Optional curvature
Pinch shading and projection field
Filtered reprice labels
Input Parameters
Regression window and projection bars
Curvature toggle and weight floor
Minimum R2 confidence
Inner and outer band multipliers
Pinch ratio and cooldown
How to Use This Script
Use the field as statistical fair-value context. Outer band interaction means stretch, not automatic reversal.
Limitations
The script uses historical OHLCV data and cannot know future prices.
Signals and states can be late during fast reversals because confirmed-bar logic is used to reduce repainting.
Model outputs should be interpreted with market context, risk controls, and independent analysis.
No visual state should be treated as a certain trade outcome.
Originality Statement
Orion is original in combining weighted regression, curvature, standard error fields, compression context, and filtered reprice logic.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice, investment advice, or a recommendation to buy or sell any financial instrument. All calculations are derived from historical market data and may produce inaccurate readings in some market conditions. No indicator can predict future market behavior. Use proper risk management and independent judgment.
-Made with passion by jackofalltrades
Indicator

Helios Pullback Framework [JOAT]Helios Pullback Framework
Introduction
Helios Pullback Framework evaluates pullback quality using ALMA trend stack, regression trajectory, pullback depth, wick recovery, liquidity capture, compression, and HTF bias.
This open-source indicator is designed as a context tool, not a standalone trading system. It focuses on explaining the current market state with restrained visuals and confirmed-bar logic where signals are used.
Core Concepts
1. ALMA Trend Stack
Fast and slow ALMA lines define execution and institutional spines.
2. Regression Trajectory
A regression envelope provides dynamic path context rather than static zones.
3. Pullback Quality
Pullback depth, wick recovery, phase impulse, and stretch are scored.
4. Liquidity Capture
Confirmed sweeps of recent highs or lows contribute only when aligned with bias.
score = bias + pullDepth + wickRecovery + sweep + compression + htf
Features
ALMA trend stack
Regression trajectory envelope
Pullback depth and wick recovery scoring
Liquidity capture markers
Sparse P+ and P- labels
Input Parameters
ALMA lengths
Volatility and trajectory length
HTF and optional session gate
Signal score, cooldown, and max stretch
Display toggles
How to Use This Script
Use P+ and P- labels as pullback-quality events inside an existing bias. Gold circles mark liquidity capture without full confirmation.
Limitations
The script uses historical OHLCV data and cannot know future prices.
Signals and states can be late during fast reversals because confirmed-bar logic is used to reduce repainting.
Model outputs should be interpreted with market context, risk controls, and independent analysis.
No visual state should be treated as a certain trade outcome.
Originality Statement
Helios is original in replacing supply/demand boxes with a cleaner model that scores pullback elasticity, trajectory, and liquidity capture.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice, investment advice, or a recommendation to buy or sell any financial instrument. All calculations are derived from historical market data and may produce inaccurate readings in some market conditions. No indicator can predict future market behavior. Use proper risk management and independent judgment.
-Made with passion by jackofalltrades
Indicator

Predictive Breakout Channels | GainzAlgoAbout the Indicator
The Predictive Breakout Channels indicator is a predictive machine-learning engine designed to map institutional market structure and calculate the statistical probability of impending breakouts. Instead of relying on traditional lagging indicators, the system dynamically anchors itself to major market pivots using a rolling Linear Regression Channel framework.
By evaluating a combination of localized trend correlation, relative strength, institutional volume distribution, and variance metrics, the engine projects real-time target zones while simultaneously calculating a directional probability score directly on the chart the moment a breakout occurs.
Dynamically anchors to institutional pivot structures
Uses a rolling Linear Regression Channel
Evaluates trend correlation, RSI, and variance metrics
Projects real-time ATR-based target zones
Calculates breakout probability scores directly on-chart
Designed to distinguish genuine breakouts from fakeouts
The Core Theory of Breakouts
Markets spend the majority of their time consolidating rather than trending. During these equilibrium phases, liquidity pools accumulate on both sides of the range while volatility compresses beneath the surface.
A breakout represents the structural transition from equilibrium into expansion.
When institutional order flow aggressively consumes localized liquidity, price breaches structural boundaries and volatility rapidly expands outward. The challenge for traders has never been identifying that a breakout occurred — the real challenge is determining whether the move has enough structural backing to sustain itself or whether it is simply a liquidity trap designed to reverse shortly afterward.
The Predictive Breakout Channels engine was specifically designed to address that exact problem.
The Logic Engine — ANOVA & The Power of Variance
To help solve the fakeout problem, this engine incorporates ANOVA, short for Analysis of Variance.
Originally developed by legendary statistician Ronald Fisher, ANOVA has historically served as one of the foundational statistical tools used throughout medical research, behavioral science, and high-level quantitative analysis. Its purpose is to determine whether differences between groups of data are statistically meaningful or simply random noise.
In this indicator, that same statistical framework is adapted directly to price action.
The engine continuously evaluates the structural differences between groups of candle data — including highs, lows, and closes — in real time in order to measure the quality and significance of underlying market expansion.
The Niche Secret — F-Statistic & Volatility Compression
Quantitative modeling revealed a particularly powerful characteristic regarding variance measurements inside the ANOVA engine.
When the raw ANOVA F-Statistic becomes drastically elevated, or when the standardized Z-Score breaches extreme thresholds such as 2 standard deviations, it often signals a state of hyper-compressed market consolidation.
Think of it like winding a mechanical spring tighter and tighter.
As variance compresses to rare statistical extremes, market energy begins building beneath the surface. Eventually that stored pressure releases through aggressive volatility expansion.
This variance surge acts as a leading indicator for impending volatility before the actual breakout even occurs.
However, variance alone cannot determine directional bias. Because of this, the engine layers in additional confirmation modules such as RSI and Trend Correlation Length to help determine whether institutional momentum is favoring bullish or bearish continuation.
Indicator Settings & Customization
The system is fully modular, allowing traders to fine-tune the engine based on their preferred asset class, timeframe, or trading style.
Anchored LinReg Channel Settings: Customize left and right pivot lookbacks alongside standard deviation multipliers to control how the channel dynamically anchors itself to price structure.
ANOVA Confirmation: Fine-tune the lookback period and baseline Z-Score thresholds required for breakout validation.
Feature Filters: Adjust RSI and Trend Correlation baseline lengths to make directional probability scoring more aggressive or more selective.
High Variance Alert Label: Disabled by default. When enabled, the engine plots visual warning labels whenever variance compression reaches statistically elevated levels.
Include HTF Trend Filter: Controls whether breakout signals are filtered using higher timeframe trend conditions.
The Strategic Dilemma — Higher Timeframe Trend Filtering
The indicator includes a dedicated HTF Trend Filter toggle that leverages higher timeframe EMA spreads to determine whether lower timeframe breakout signals align with broader institutional trend conditions.
Choosing whether to enable this filter depends entirely on the type of market environment you prefer trading.
1. HTF Filter ON — Trend Following Regime
Filters out a significant amount of lower timeframe noise
Produces fewer but statistically stronger breakout signals
Aligns entries with broader institutional money flow
Increases overall follow-through probability
However, because the engine becomes heavily biased toward the macro trend, it may intentionally suppress counter-trend reversals or early-stage trend shifts.
2. HTF Filter OFF — Agile / Mean-Reversion Regime
Allows the engine to react dynamically in both directions
Captures sharp intraday reversals more aggressively
Performs well in swinging or range-bound environments
Increases breakout frequency substantially
The tradeoff is naturally higher exposure to lower timeframe noise and shorter average continuation during counter-trend conditions.
How to Trade with the Indicator
When price closes outside the Linear Regression Channel while simultaneously satisfying the statistical validation criteria, the engine prints a breakout entry signal alongside a projected probability score.
At the same time, the system projects 4 distinct ATR-based Target Zones labeled T1 through T4.
Aggressive Traders: May choose to execute immediately on the breakout close while targeting T2 or T3 with structural stops positioned back within the channel.
Conservative Traders: May choose to use the Probability Score as a filter or wait for a localized retest of the broken channel boundary before entering.
The High Variance Play
When the High Variance Alert label appears, traders should avoid impulsively chasing the immediate candle.
Instead, the label should be treated as an early warning that volatility expansion is rapidly approaching.
The preferred approach is to wait for the subsequent confirmed breakout signal, then trade the resulting momentum expansion into the projected target zones.
High variance does not predict direction
It predicts volatility expansion
Directional confirmation comes afterward through breakout validation
Wrapping It Up
The Predictive Breakout Channels indicator bridges quantitative data science with classic market microstructure principles.
By treating volatility as a measurable statistical property rather than a visual guessing game, the engine helps traders identify where the market is coiling, estimate the probability of expansion, and navigate breakout environments using structured statistical confirmation instead of emotion.
Whether used for momentum continuation, volatility expansion, or intraday breakout trading, the system was designed to provide traders with a clearer framework for distinguishing meaningful expansion from market noise. Indicator

Helix Regime Corridor [JOAT]Helix Regime Corridor
Introduction
Helix Regime Corridor is an open-source regime and entry-state indicator built around adaptive ATR bands, structural CHoCH events, regression context, transition memory, and risk rails. It is designed to show when price is moving under bullish control, bearish control, or a less decisive transition state.
The script solves the problem of treating every trend flip the same. It requires directional control, structure, volatility, and confluence scoring before marking a confirmed shift.
Core Concepts
1. Adaptive Regime Corridor
The central trend average and surrounding ATR bands adapt to current market volatility. The corridor shows whether price is operating above, below, or inside the active control area.
2. Confirmed Holds
The script can require price to hold beyond the corridor for a configurable number of bars. This helps reduce single-candle fakeouts.
3. CHoCH-Assisted Structure
Pivot highs and lows identify structural change. Bullish or bearish CHoCH events can support a new regime shift when price breaks prior structure.
4. Regression Context
An optional regression field provides broader directional context and helps identify whether the active shift is aligned with the recent linear price path.
5. Transition Memory
The script tracks transition behavior over a configurable memory window. This adds a probability-style context layer without claiming certainty.
Features
Adaptive ATR corridor: Volatility-adjusted bands frame bullish and bearish control.
Regime shift detection: Identifies confirmed changes into bullish or bearish control.
CHoCH structure: Optional structure-assisted entries using pivot confirmation.
Confluence scoring: Signals require score alignment rather than a single moving-average cross.
Risk rails: Entry, stop, TP1, TP2, and TP3 references can be drawn for confirmed shifts.
Candle tinting: Bars can be colored by current state.
Optional regression channel: Adds broader context when desired.
HUD: Shows regime, score, transition, ADX/ATR, regression, structure, and bias.
Alerts: Long shift, short shift, bull regime, bear regime, bullish CHoCH, and bearish CHoCH.
Input Parameters
Core: Operating Preset, Adaptive Average Length, ATR Length, ATR Band Multiplier, Confirmed Hold Bars.
Structure and Signals: Pivot Left, Pivot Right, Regression Context Length, Transition Memory, Directional Strength Length, Minimum Shift Score, Allow CHoCH-Assisted Entries, Signal Cooldown Bars.
Risk and Visuals: Structure Stop Lookback, Stop ATR Buffer, TP1 R, TP2 R, TP3 R, Rail Projection Bars, Adaptive Bands, Trend Cloud, Regression Channel, Candle Tint, Pivot Marks, HUD.
How to Use This Indicator
Step 1: Read the regime
Use the corridor and dashboard to identify whether price is under bullish control, bearish control, or a weaker transitional state.
Step 2: Wait for score confirmation
Long and short shifts are only marked when the configured confluence score is reached.
Step 3: Compare structure
CHoCH events help explain whether a shift is supported by structural change or only by band behavior.
Indicator Limitations
Pivot structure confirms after the required right-side bars complete.
Adaptive bands can lag sharp reversals because they are volatility-based.
Transition memory summarizes recent behavior; it does not forecast future price.
Risk rails do not account for spread, slippage, or order execution.
Originality Statement
Helix Regime Corridor is original in its combination of adaptive ATR control bands, hold confirmation, CHoCH structure, regression context, transition memory, confluence scoring, and risk rails. The components are combined to classify regime and produce cleaner shift states rather than simply plotting a trend band.
Disclaimer
This script is for educational and informational use only. It is not financial advice and does not recommend any trade. Trend and regime models can fail in ranges, news events, and abnormal volatility. Always manage risk independently.
Made with passion by jackofalltrades
Indicator
