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.
Linear
[ A L P H A X ] Slope Spectrum ProAlphaX Slope Spectrum Pro — Multi-Period Regression Oscillator, Adaptive Signal Line, Momentum Acceleration, Statistical Regime Detection, Classic & Hidden Divergence & Conviction Dashboard
AlphaX Slope Spectrum Pro is a professional-grade trend momentum oscillator built on a proprietary multi-period linear regression engine that scans across an entire range of lookback periods simultaneously and synthesizes them into a single adaptive oscillator value per bar. Rather than relying on a fixed-period momentum calculation, Slope Spectrum Pro measures the statistical slope of price across every period in the scan range and combines them using inverse-variance weighting — giving more influence to periods whose regression fits are more consistent, and less to those where price has been noisy. The result is a momentum oscillator that is simultaneously responsive and robust. On top of this engine sits a complete analytical layer: an adaptive signal line that changes speed with market conditions, a momentum acceleration histogram, statistical regime detection bands, classic and hidden divergence detection, regime-filtered entry signals with main chart overlay, and a live 10-row conviction dashboard.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📸 Visual Overview
AlphaX Slope Spectrum Pro in the oscillator pane — gradient-colored slope line with gradient fill, acceleration histogram in the background, adaptive signal line, regime threshold bands, divergence markers, bull/bear signal dots, main chart triangles, and the conviction dashboard
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔬 The Slope Engine — Multi-Period Regression Core
At the foundation of Slope Spectrum Pro is a multi-period linear regression scanner . On every bar, the engine runs a complete set of linear regressions across every period from your configured minimum to maximum, stepping at your chosen interval. With default settings of Min Period 10, Max Period 100, and Step Size 5, this means 19 independent regressions are computed and synthesized per bar.
Each regression fits a straight line to the logarithm of price over the lookback window and extracts the slope of that fit — a dimensionless measure of directional momentum at that timescale. Positive slope means upward momentum. Negative slope means downward momentum. Steeper slope means stronger momentum.
Inverse-Variance Weighting:
When Inverse-Variance Weighting is enabled, each regression period's slope is weighted by the inverse of its residual variance — how consistently price tracked the regression line over that lookback. A period where price followed its regression cleanly gets high weight. A period where price bounced erratically around the fitted line gets low weight. The result is that cleaner, more consistent trend periods contribute more to the final oscillator value than noisy, choppy periods — the oscillator becomes naturally less sensitive to random price fluctuations and more responsive to genuine directional momentum.
What the oscillator value means:
A value above zero means the weighted regression slope is net positive — more periods are trending upward than downward across the scanned range.
A value below zero means the weighted slope is net negative — dominant downward trend momentum.
The magnitude reflects how steep the consensus slope is. A large positive value means strong, consistent upward momentum. A value near zero means flat or contested momentum.
The oscillator is plotted as a gradient-colored line that transitions dynamically from bear red to bull green based on its rolling 200-bar min/max range — the stronger the current momentum relative to recent history, the brighter the color. A gradient fill between the oscillator line and the zero line reinforces the directional bias visually.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
〰 Adaptive Signal Line
The signal line tracks the slope oscillator — but instead of a fixed-period EMA, Slope Spectrum Pro uses an adaptive alpha-based EMA that changes its effective length based on current market conditions.
How it adapts:
The adaptation measures trend strength as how many standard deviations the current oscillator value is from its recent mean. When the oscillator is far from its mean — a clear, developing trend — the signal line shortens and reacts faster, following the oscillator closely. When the oscillator is near its mean — a ranging or choppy condition — the signal line lengthens, smoothing out minor oscillations and reducing false crossovers.
In a strong trend: the signal is tight. Crossovers happen quickly and reflect real momentum shifts.
In chop or range: the signal is loose. It takes a more significant oscillator move to produce a crossover, filtering out noise automatically.
The current effective signal length is shown live on the dashboard as EMA~N — you can see exactly how tight or loose the signal is at any moment. Adaptive speed can be toggled off for a consistent fixed-length signal.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚡ Momentum Acceleration Histogram
Behind the oscillator line, a background acceleration histogram plots the rate of change of the slope oscillator — how fast momentum is building or fading right now.
Green columns — acceleration is positive. The slope oscillator is increasing. Momentum is building in the bullish direction.
Red columns — acceleration is negative. The slope oscillator is decreasing. Momentum is fading or building in the bearish direction.
Reading the acceleration alongside the main oscillator gives you a two-layer picture:
Oscillator above zero + green acceleration = strengthening bull momentum . The best time to enter or hold long.
Oscillator above zero + red acceleration = bull momentum peaking and fading . Consider reducing exposure or preparing to exit.
Oscillator below zero + red acceleration = strengthening bear momentum . Best time to hold or enter short.
Oscillator below zero + green acceleration = bear momentum fading . Watch for a potential reversal or crossover signal.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 Statistical Regime Detection
Slope Spectrum Pro automatically classifies the current market environment into one of three regimes using a rolling statistical framework built from the oscillator's own mean and standard deviation:
Bull Regime — the oscillator is above the upper band (mean + N standard deviations). Background tints subtly green. Only bullish signals fire when regime filtering is enabled.
Bear Regime — the oscillator is below the lower band (mean − N standard deviations). Background tints subtly red. Only bearish signals fire when regime filtering is enabled.
Range Regime — the oscillator sits between the two bands. Background is a very faint neutral gray. No directional regime is confirmed. Regime-filtered signals are suppressed entirely.
Thresholds are calculated as oscillator mean ± (standard deviation × sensitivity multiplier) over the configured lookback. Increasing the sensitivity multiplier raises the bar required to enter Bull or Bear regime — only the strongest trend episodes qualify. Lowering it makes transitions more frequent.
This system directly controls signal quality when Regime-Filtered Signals is enabled — crossovers opposing the active regime direction are silently blocked before they ever reach the chart.
Regime bands on the oscillator — Bull threshold above, Bear threshold below, background tint reflecting the current zone
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
◆ Divergence Engine — Classic and Hidden
Slope Spectrum Pro detects four divergence types by comparing confirmed oscillator pivot highs and lows against confirmed price pivot highs and lows. All detections are confirmed on bar close only — no repainting.
Classic Divergences — Reversal Signals:
Classic Bull Divergence (DIV ▲) — price makes a lower low while the slope oscillator makes a higher low. Selling pressure is weakening even though price is still falling. A reversal upward may be building.
Classic Bear Divergence (DIV ▼) — price makes a higher high while the slope oscillator makes a lower high. Buying pressure is weakening even though price is still rising. A reversal downward may be building.
Hidden Divergences — Trend Continuation Signals:
Hidden Bull Divergence (H ▲) — price makes a higher low while the oscillator makes a lower low. Price held higher ground during the pullback — the uptrend is intact and continuation upward is probable.
Hidden Bear Divergence (H ▼) — price makes a lower high while the oscillator makes a higher high. Price failed to rally as high as before even as the oscillator rebounded — the downtrend is intact and continuation downward is probable.
Classic divergences warn of potential reversals. Hidden divergences confirm that pullbacks within a trend are likely to resume. Both are marked on the oscillator at the pivot bar with compact DIV or H labels. The divergence pivot lookback is configurable. Hidden divergence can be toggled independently from classic divergence.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 Entry Signals — Oscillator and Main Chart Overlay
Crossover signals fire when the slope oscillator crosses above or below the adaptive signal line, confirmed on bar close:
Bull Signal (●) — oscillator crossed above signal line. A small green dot appears on the oscillator.
Bear Signal (●) — oscillator crossed below signal line. A small red dot appears on the oscillator.
Regime filtering: When enabled, bull crossovers during a Bear Regime are blocked. Bear crossovers during a Bull Regime are blocked. Only signals aligned with the current statistical regime are displayed — this single filter eliminates a significant category of false signals.
Main chart overlay: When Overlay Candle Color is enabled:
A ▲ green triangle appears below the bar on the main chart at every bull signal.
A ▼ red triangle appears above the bar on the main chart at every bear signal.
Candles on the main chart are colored using the same gradient as the oscillator — chart candles reflect the current slope momentum state at a glance.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📋 Live Conviction Dashboard
A real-time 10-row readout of the oscillator's full internal state, updating on every bar close:
SAMPLES — number of regression periods computed per bar based on Min, Max, and Step settings.
MODE — INV-VAR WEIGHTED or SIMPLE AVERAGE aggregation.
OSC VALUE — live slope oscillator value to six decimal places, green above zero, red below.
REGIME — ▲ BULL ZONE, ▼ BEAR ZONE, or — RANGING. Row highlighted in the corresponding color.
MOMENTUM — ▲ BUILDING (acceleration positive) or ▼ FADING (acceleration negative). Row highlighted accordingly.
SIGNAL — ▲ BULL CROSS / ▼ BEAR CROSS when a crossover fired this bar, or ▲ ABOVE SIG / ▼ BELOW SIG for ongoing position.
SIG SPEED — current effective signal length as EMA~N, showing how tight or loose the adaptive signal is in real time.
DIVERGENCE — highest-priority active divergence: ▲ BULL DIV, ▼ BEAR DIV, ▲ HIDDEN BULL, ▼ HIDDEN BEAR, or — NONE. Row highlighted when active.
CONVICTION — a 0–4 confluence score. Each of the following adds 1 point: regime and oscillator sign agree; regime and acceleration agree; regime and signal side agree; any divergence is active. Score labels — LOW / MIXED (0–1), MODERATE (2), HIGH CONVICTION (3), MAX — ALL ALIGNED (4).
OSC (sigma) — the oscillator value expressed as standard deviations from its recent mean. Shows statistically how far momentum has moved from neutral — +2.5s means 2.5 standard deviations into bull territory.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚡ Key Features
🔬 Multi-period regression engine — 19 independent regressions per bar (default) synthesized into one adaptive oscillator value
⚖ Inverse-variance weighting — consistent regression periods carry more weight; noisy periods are automatically discounted
〰 Adaptive signal line — effective EMA length speeds up in trends, slows in chop; current length shown live as EMA~N
⚡ Momentum acceleration histogram — rate-of-change of the oscillator, showing whether momentum is building or fading right now
📊 Statistical regime detection — three-zone classification (Bull / Bear / Range) using rolling mean ± standard deviation bands
🔒 Regime-filtered signals — crossovers opposing the current statistical regime are automatically suppressed
◆ Classic divergence — bull and bear reversal divergence between price pivots and oscillator pivots, bar-close confirmed
◆ Hidden divergence — trend continuation signals when price and oscillator diverge in the trend direction
🎯 Main chart overlay — bull/bear triangles on price chart and gradient candle coloring reflecting live slope momentum
🎨 Dynamic gradient oscillator color — live transition from bear to bull based on rolling 200-bar normalization
📋 Live 10-row conviction dashboard — samples, mode, osc value, regime, momentum, signal, signal speed, divergence, conviction score, sigma reading
🏆 4-point conviction scoring — real-time confluence count across regime, acceleration, signal, and divergence alignment
🔔 10 alert conditions — crossovers, classic and hidden divergences, confluence long/short, zero line crosses
🎨 14 user-configurable color inputs — every visual element independently themeable with AlphaX brand defaults
✅ Confirmed on bar close — no repainting on any signal, divergence, or regime transition
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙ Settings Reference
Slope Engine
Max Period — upper bound of the regression scan range (default: 100)
Min Period — lower bound of the scan range (default: 10)
Step Size — increment between scanned periods (default: 5). Smaller = more samples, smoother oscillator.
Inverse-Variance Weighting — weight each period by its regression consistency (default: on)
Source — price input for all regressions (default: close)
Adaptive Signal Line
Base Signal Length — signal EMA length in neutral conditions (default: 7)
Adaptive Speed — toggle adaptive EMA alpha on or off
Momentum Acceleration
Show Acceleration Histogram — toggle the background column histogram
Acceleration Smoothing — EMA smoothing period for acceleration (default: 3)
Regime Detection
Show Regime Bands — toggle threshold lines and background tinting
Regime Lookback — rolling window for mean and standard deviation (default: 200)
Regime Sensitivity (σ×) — standard deviation multiplier for thresholds (default: 0.5)
Divergence Engine
Show Divergences — toggle all divergence detection
Divergence Pivot Length — bars on each side to confirm a divergence pivot (default: 5)
Show Hidden Divergences — toggle hidden divergence independently
Entry Signals
Show Crossover Signals — toggle oscillator signal dots
Regime-Filtered Signals — suppress signals opposing the current regime
Overlay Candle Color — toggle main chart triangles and gradient candle coloring
Dashboard
Show Dashboard — toggle the dashboard panel
Position — Top Right, Top Left, Bottom Right, Bottom Left
Theme
Bull Primary / Bright / Dim — three shades of the bullish color family
Bear Primary / Bright / Dim — three shades of the bearish color family
Neutral / Neutral Light — neutral and secondary text colors
Accel Bull / Accel Bear — acceleration histogram column colors
Divergence Bull / Divergence Bear — classic divergence marker colors
Hidden Div Bull / Hidden Div Bear — hidden divergence marker colors
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚀 How to Trade with AlphaX Slope Spectrum Pro — Step by Step
Step 1 — Establish the regime and directional bias
Check the REGIME row. ▲ BULL ZONE = the market is in a statistically confirmed trend upward. ▼ BEAR ZONE = confirmed trend downward. — RANGING = no directional edge. Only trade in the direction of the active regime.
Check OSC (sigma). A reading above +2s means deep bull territory. Below −2s means deep bear territory. Near zero = flat momentum, no edge.
Step 2 — Read acceleration for entry timing
In a Bull Regime, wait for the acceleration histogram to turn green (▲ BUILDING on the dashboard). This means the slope oscillator is accelerating — momentum is growing, not just present.
The ideal entry timing: Bull Regime + oscillator above zero + acceleration building + oscillator above signal line.
Entering while acceleration is red (▼ FADING) in a bull regime risks entering as the current wave is losing steam.
Step 3 — Enter on a signal crossover
A bull signal dot (oscillator crosses above signal line) with regime filtering enabled is your entry trigger — counter-trend crossovers are already blocked automatically.
If Overlay is enabled, the ▲ triangle on the main chart confirms the exact entry bar.
The faster the adaptive signal (lower EMA~N), the tighter the crossover timing. In strong trends the signal shortens and reacts more quickly.
Step 4 — Upgrade conviction with divergence
A bull signal crossover occurring simultaneously with or just after a Classic Bull Divergence (DIV ▲) = high-probability reversal setup.
A bull signal crossover during an uptrend following a Hidden Bull Divergence (H ▲) = high-probability trend continuation setup.
Check CONVICTION. Score of HIGH CONVICTION (3) or MAX — ALL ALIGNED (4) means multiple independent factors agree. These are the setups to prioritize.
Step 5 — Exit when momentum confirms the move is ending
Acceleration histogram turning red (▼ FADING) while you are long = first sign the current wave is losing force. Begin monitoring for exit.
A bear signal crossover (oscillator crosses below signal line) = exit trigger.
A regime shift from Bull Zone to Ranging or Bear Zone = structural move is over. Exit and reset.
A Classic Bear Divergence appearing while you are in a long position = warning. Price is printing new highs the oscillator is not confirming. Reduce size or prepare to close.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔔 Alert Conditions
SSP — Bull Crossover — oscillator crossed above the adaptive signal line
SSP — Bear Crossover — oscillator crossed below the adaptive signal line
SSP — Classic Bull Divergence — price lower low, oscillator higher low confirmed
SSP — Classic Bear Divergence — price higher high, oscillator lower high confirmed
SSP — Hidden Bull Divergence — price higher low, oscillator lower low (trend continuation)
SSP — Hidden Bear Divergence — price lower high, oscillator higher high (trend continuation)
SSP — CONFLUENCE LONG — bull crossover occurring with bull or hidden bull divergence simultaneously
SSP — CONFLUENCE SHORT — bear crossover occurring with bear or hidden bear divergence simultaneously
SSP — Zero Line Cross Up — oscillator crossed above zero (macro bull momentum shift)
SSP — Zero Line Cross Down — oscillator crossed below zero (macro bear momentum shift)
All alert messages include {{ticker}} and {{interval}} for webhook integration.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
👥 Who This Is For
🧠 Systematic and quantitative traders — the regression engine, inverse-variance weighting, and statistical regime framework provide a mathematically grounded, objective momentum reading with no arbitrary indicator parameters to tune
📈 Trend traders on any instrument and timeframe — the multi-period scan adapts naturally to any market's momentum characteristics without manual recalibration
🔍 Divergence traders — four divergence types covering both reversals and trend continuations, all confirmed on bar close
⚡ Momentum traders — the acceleration histogram adds a layer no standard oscillator provides: not just where momentum is, but whether it is growing or shrinking right now
🎯 Precision entry traders — regime filtering, adaptive signal speed, and the conviction score ensure signals are only shown when multiple independent conditions agree simultaneously
🎨 Traders who customize their charts — 14 fully user-configurable color inputs, compatible with any chart theme
🔔 Alert-driven traders and bot operators — 10 alert conditions including a dedicated confluence alert for maximum-conviction setups
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📝 Notes
All signals are confirmed on bar close only. Slope Spectrum Pro does not repaint.
The oscillator value is in units of log-price per bar. The absolute value is very small (typically 0.000001 to 0.001 range) — what matters is the sign, the direction of change, and where it sits relative to regime thresholds and zero.
Wider Min–Max scan ranges produce a smoother oscillator capturing broader trend consensus. Narrower ranges are more reactive to short-term changes. Smaller Step Size = more periods sampled per bar = smoother result.
Regime Sensitivity is the most impactful setting after the scan range. At 0.5σ (default) the regime bands trigger relatively frequently. At 1.0–1.5σ, only very strong trend episodes qualify — signals become rarer but higher quality.
On very low timeframes the nested regression loop may be computationally intensive. Default settings are optimized for timeframes from 1 minute upward on standard instruments.
All theme color defaults are designed for dark chart backgrounds. Adjust Theme inputs if using a light background.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ Disclaimer
This indicator is a technical analysis and visualization tool intended for educational and informational purposes only. It does not constitute financial advice or a recommendation to buy or sell any financial instrument. All signals are generated from historical and real-time price data using mathematical calculations — their accuracy or profitability is not guaranteed. Past performance does not guarantee future results. Always conduct your own analysis, use proper risk management, and consult a licensed financial advisor before making any trading decisions. The author accepts no responsibility for any losses incurred from the use of this indicator.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Built for traders who want to know not just where momentum is — but how it got there, how strong it is, and whether it is still building.
Pine Script® indicator
Dynamic Support & Resistance V3Dynamic SRT V3 by Anonycryptous inspired by Ilja V.
Compared to the previous version, a completely new and accelerated concept.
Dynamic SRT V3 is a professional structural mapping suite that identifies high-density liquidity zones through a dual-engine calculation process. By merging a 6-Tiered Pivot Architecture with a Validated Diagonal Scoring Engine, it provides a surgical view of market boundaries, allowing traders to distinguish between minor price fluctuations and major institutional walls.
*How the Engine Operates
This indicator functions as a mathematical filter for price action, operating on two distinct layers:
-1. Tiered Institutional Anchors (Horizontal)
Instead of looking at a single fractal period, V3 tracks six different "memory depths" simultaneously (ranging from 5 to 200 bars).
The Concept: Markets move in cycles. Small cycles (Pivot 1-2) represent retail positioning, while large cycles (Pivot 5-6) represent institutional buy/sell walls.
State-Aware Logic: Each level uses an ATR-Volatility Buffer to determine its current state. If price is above the level, it acts as Support (Green); if below, it is Resistance (Red). If price is currently slicing through it, the level turns Grey (Neutral), signaling a "No-Trade Zone" or a consolidation phase.
-2. Slope-Intercept Validation Engine (Diagonal)
The dynamic trendlines are not just simple "peak-to-peak" connectors. They are calculated using a Linear Regression Scoring System.
*The Concept: A trendline's strength is defined by its "cleanliness."
-The Filter: Unlike standard tools, V3 uses a Price-Action Scan. It calculates the path of a potential trendline and automatically discards it if it cuts through the bodies of intermediate candles. This ensures that the wedges and channels you see are statistically valid structural boundaries.
-Strategic Application: LTF vs. HTF
*Performance & User Manual
-Optimized Execution: V3 utilizes Last-Bar Offloading. It scans 1000+ bars of history in milliseconds by executing the heavy diagonal math only on the most recent candle, ensuring zero chart lag.
-Price Tags: Dynamic labels are pinned professionally above the levels. Use these as your Take-Profit (TP) or Stop-Loss (SL) targets.
-Customization: Adjust the Touch Tolerance in the settings to make the trendlines more or less strict depending on the asset's "wickiness" (e.g., higher for BTC, lower for Forex).
*Lower Timeframes (1m – 15m): Scalping & Intraday
-LTF Focus: Prioritize Pivot Levels 1, 2, and 3. These are highly reactive and will map the micro-pullbacks of the current session.
-Early Signal: Look for price to reject a Dynamic Trendline while a micro-pivot (Level 1) is acting as support. This provides an aggressive "Early Entry" with a very tight risk-to-reward ratio.
-The Trap: Avoid trading when the LTF candles are consistently Grey, as this indicates the market is trapped inside a static pivot zone.
-Higher Timeframes (1H – Daily): Swing & Position Trading
*HTF Focus: Prioritize Pivot Levels 5 and 6. These represent the "Major Floors and Ceilings" of the weekly or monthly trend.
-The Macro Wall: If price hits a Level 6 Pivot (200-bar lookback), expect a significant reaction. Institutional orders are often clustered at these depths.
-Structural Confluence: The most powerful HTF setup is "The Confluence Cross." This occurs when a diagonal Resistance Trendline and a horizontal Level 5/6 Resistance meet at the same price point. This is the mathematical "End of Trend" zone where heavy reversals typically begin.
! Notice: This tool is for institutional-grade structural mapping and educational purposes only. It is not financial advice. Structural levels are areas of high probability, not guaranteed reversal points. Always trade with a stop-loss.
Pine Script® indicator
Multi-Timeframe EMA SMA HMA LR Proximity & Alerts [HYPR-run]DESCRIPTION:
Nine moving averages from Weekly down to chart timeframe on one chart.
Weekly 10 SMA, Daily 50/100/200 EMA/SMA, 4hr 200 SMA, plus chart-TF
10 EMA, 200 SMA, Hull MA, and Linear Regression. See where price sits
relative to every meaningful institutional level without switching
timeframes.
The proximity filter is the key feature. Enable all nine MAs, set a
threshold, and only lines near current price appear. The Daily 200 SMA
at 20% away? Hidden. When price drops toward it, the line shows up
automatically. Your chart stays clean and the levels that matter are
always visible.
DISCOVERING EDGE
We have found that managing risk in mature assets with the 50d, 100d,
200d, and 10w is highly effective, simple and a methodology shared
amongst experienced investors and traders. This indicator interprets
that positioning across 16 configurations with a 7-tier color gradient,
so you see structural health at a glance. "Oh, it's bouncing on the
50dma right now, there may be a set-up in play..."
POSITIONAL CONTEXT vs STATIC MA OVERLAY
Static overlays show every MA with no interpretation of what the
positioning means. This indicator color-codes 16 above/below
configurations weighted by MA significance (200d and 10w are
heavyweights), surfaces bounce/reject events ranked by importance,
and shows % distance to each curve so you know exactly how much of a
move is needed for price to converge.
- Events fire independently of display toggles; a hidden 200d SMA
that price just bounced off still shows "Bouncing 200d" in the
dashboard.
- 7-tier positioning gradient weighted by MA significance (200d and
10w are heavyweights) shows structural health in one glance.
- Webhook alerts on configurable MA cross (9 options from 10w to
linear regression) with full bar filter.
FEATURES
- 9 moving averages from Weekly down to chart timeframe
- Proximity filter: hides irrelevant MAs far from price
- Bounce/reject detection at each MA level
- Two alert systems: XO/XU cross + bounce/reject on selected MA
- Bounce/reject alerts fire when price wicks into selected MA (support/resistance hold)
- Dashboard: row 1 positioning context (above/below each MA), row 2 live events (bouncing, rejecting, XO, XU)
- Dashboard dark/light theme toggle for any chart background
- Polyline rendering (smooth lines, no staircase artifacts)
- End-of-line labels with % distance from price
- Toggle each MA independently
HOW IT WORKS
Higher timeframe MAs are pulled via request.security and rendered as
polylines for smooth display on any chart timeframe. The proximity check
runs on every bar: if the distance between price and a given MA exceeds
the threshold %, the polyline is not drawn. When price approaches, the
line appears. Alerts fire independently of display toggles.
DASHBOARD
Two-row dynamic dashboard that updates every bar.
- Row 1 (positioning): which MAs price is above or below, grouped with
"&" separators. The Weekly 10 SMA is separated as the anchor by a
pipe. 7-tier color gradient based on how many of the four key MAs
(50d, 100d, 200d, 10w) price is above, with heavyweight distinction
(200d and 10w carry more weight than 50d/100d): bright green (all
four), green (3/4 with both heavyweights), dark green (3/4 missing a
heavyweight), yellow (2/4), dark red (1/4 with a heavyweight), red
(1/4 only lightweight), bright red (none)
- Row 2 (events): up to 3 simultaneous events, most significant MA first
(w10 → d200 → d100 → d50 → 4h200). Bouncing (support holding),
rejecting (resistance holding), XO (crossover), XU (crossunder). Color
intensity uses a 2D significance matrix: MA weight x event type.
Brightgreen for a w10 bounce; yellow for a d200 cross; darkgreen for
idle above d50. Dark gray when idle
- Runs independently of display toggles; events fire for all MAs even if
the line is hidden by the proximity filter
DEFAULT CONFIGURATION
Weekly 10 SMA (white), Daily 50 EMA (yellow), and Daily 200 SMA (purple)
are on by default. Proximity filter on at 5%. These three levels are the
most commonly watched institutional reference points.
POSITIONING TABLE (row 1, all 16 configurations)
BADGE COLOR (header, positioning x event combination)
ALERTS
Two alert systems. XO/XU fires when price crosses the selected MA with a
full bar filter (body >= 66.6% of range, rejects doji/wick-heavy bars).
Bounce/Reject fires when price wicks into the selected MA from the correct
side and closes confirming support (bounce) or resistance (reject). Both
fire JSON payloads; works with any webhook receiver.
CREDITS
No external libraries or third-party code used.
Pine Script® indicator
Adaptive Linear Regression Structure [MarkitTick]💡 This indicator, is a sophisticated analytical tool designed to bridge the gap between classical statistical modeling and modern price action theory. By leveraging high-performance Ordinary Least Squares (OLS) calculations, it dynamically identifies the most statistically significant market structures—specifically linear regression channels—based on historical pivot points. Unlike static channels that rely on arbitrary lookback periods, this script scans a historical "horizon" of structural pivots to find the model with the highest mathematical "fit," providing traders with a non-repainting, objective view of trend exhaustion and volatility boundaries.
✨ Originality and Utility
● Dynamic Model Selection
Most linear regression indicators require the user to manually define a start and end point, or they use a fixed lookback period. This script is original because it treats the starting point of the regression as a variable. It scans multiple historical pivots (Highs and Lows) and performs a competitive analysis between different potential channels. The channel that is eventually displayed is the one that achieves the highest performance score, calculated via a combination of the Coefficient of Determination ($R^2$) and the natural log of the duration. This ensures the channel is both mathematically reliable and structurally relevant.
● Market Structure Integration
The utility of the indicator is enhanced by its "Market Structure Registry." Instead of calculating regressions on every single bar blindly, the script identifies "Pivot Highs" and "Pivot Lows" to use as anchors. This aligns the statistical modeling with the way professional traders view the market, focusing on major turning points rather than noise.
● Institutional-Grade Telemetry
The inclusion of a real-time HUD (Heads-Up Display) dashboard provides traders with immediate transparency into the model's health. By displaying the $R^2$ value and Z-Score, the indicator moves beyond simple "lines on a chart" and offers a quantitative assessment of how well the current price action respects the established trend.
🔬 Methodology and Concepts
● The OLS Kernel
At the heart of the script is a custom-built OLS (Ordinary Least Squares) method. It calculates the slope ($\beta$) and the intercept ($\alpha$) of the best-fit line through the closing prices of the selected period. The mathematical goal is to minimize the sum of the squared errors ( LSE:SSE $), ensuring the median line represents the "true" equilibrium of price over that duration.
● Heuristic Performance Scoring
The indicator does not just look for the highest correlation. It uses a "Performance Score" heuristic:
Score = $R^2$ * ln(Duration)
This formula rewards models that maintain a high degree of linearity over longer periods. A short-term channel with a high $R^2$ might be dismissed in favor of a long-term channel that has a slightly lower $R^2$ but significantly more structural weight.
● Volatility-Adjusted Envelopes
The upper and lower boundaries are not arbitrary. They are calculated based on the standard deviation of the residuals (the distance between actual price and the regression line). By applying a user-defined "Deviation Factor," the script creates volatility bands that expand or contract based on how "noisy" the trend is.
🎨 Visual Guide
● The Regression Channel
• Median Vector: A solid line representing the linear mean of the current trend. It is colored Cyan for bullish slopes and Orange for bearish slopes.
• Volatility Bands: Two solid lines flanking the median. These represent the "Deviation Factor" boundaries (defaulting to 2.0 standard deviations).
• Fill Core: A transparent background fill between the upper and lower bands, allowing for easy visualization of the "fair value" zone. The color dynamically shifts between Cyan and Orange based on the trend bias.
● Signal Labels
• LONG Labels: Cyan labels appearing below price when a "Mean Reversion" setup is detected (price crossing above the lower band).
• SHORT Labels: Orange labels appearing above price when a "Mean Reversion" setup is detected (price crossing below the upper band).
• Details: Labels include the Entry Price (EP), Take Profit (TP) at the median, and a suggested Stop Loss (SL).
● Telemetry Dashboard (HUD)
• Model Quality (R²): A value between 0.0 and 1.0. Values above 0.7 indicate a very strong trend.
• Trend Bias: Explicitly states "BULLISH" or "BEARISH."
• Deviation (Z-Score): Measures how many standard deviations the current price is away from the mean.
• Duration: Displays how many bars the current model covers.
📖 How to Use
● Mean Reversion Strategy
The primary use case is identifying overextended price action. When price moves outside the volatility bands (high Z-Score) and then crosses back inside, it suggests a return to the median "equilibrium" price.
• Bullish Entry: Look for a Cyan "LONG" label when price recovers from the lower band.
• Bearish Entry: Look for an Orange "SHORT" label when price pulls back from the upper band.
● Trend Strength Assessment
Use the $R^2$ value in the dashboard to filter trades. If the $R^2$ is low (e.g., below 0.5), the market is in a "Random Walk" phase, and the regression lines may be less reliable. High $R^2$ values suggest a "Trending" phase where the channel boundaries act as significant support and resistance.
● Dynamic Take Profits
The median line (the Cyan/Orange vector) serves as a dynamic take-profit target. Since the line is based on a linear slope, the price target adjusts every bar to reflect the ongoing trend.
⚙️ Inputs and Settings
● Algorithmic Core
• Scan Horizon: Determines how many historical pivots the script should evaluate. A higher number increases the "search depth" but requires more processing.
• Deviation Factor: Controls the width of the channel. A value of 2.0 covers approximately 95% of price action if the distribution is normal.
• Structural Sensitivity: Controls the lookback for the Pivot High/Low detection. Smaller values find more "local" structures; higher values find "major" structures.
● Signal Processing
• Quality Threshold (R²): This is a "gatekeeper" setting. If no model reaches this minimum quality, the indicator will not display a channel, protecting the user from weak or chaotic patterns.
🔍 Deconstruction of the Underlying Scientific and Academic Framework
● Statistical Basis (OLS)
The indicator is grounded in the Gauss-Markov theorem. By calculating the slope via the covariance of time and price divided by the variance of time, it provides the "Best Linear Unbiased Estimator" (BLUE) of the current price trajectory.
● Information Theory & Heuristics
The scoring mechanism (using the natural log of N) draws inspiration from Information Criteria (like AIC or BIC). In statistical modeling, increasing the sample size ($N$) usually improves the model's reliability but can introduce "lag." By using the log of duration, the script balances the benefit of a larger sample size against the need for current relevance.
● Standardized Residuals (Z-Scores)
The "Z-Metric" displayed in the dashboard is a calculation of:
$Z = (Price - Estimated Price) / Standard Error$
This standardizes the distance of price from the mean across different assets and timeframes, allowing for a universal interpretation of "overbought" or "oversold" conditions based on the specific volatility of the current trend.
⚠️ Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. I expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion.
Pine Script® indicator
Linear Regression [Anchored, Band, Signals]OVERVIEW
This indicator is a statistical analysis tool that plots linear regression channels alongside dynamic deviation bands. It aims to provide a flexible framework for observing price distribution and momentum quality without making predictive claims.
ORIGINALITY
This indicator provides advanced options for linear regression-based analysis.
📌 Allows setting the calculation window length based on a fixed bar count or an anchored timeframe.
📌 Draws regression channels in either linear or logarithmic scales.
📌 Identifies historical highest and lowest limits in addition to standard deviation levels.
📌 Displays the non-repainting history of the channel via the "Historical Plots" option.
📌 Calculates Pearson's R (correlation strength) and the Theta (θ) angle (the slope of the channel).
📌 Generates Long and Short signals using two distinct filters and four different channel strategies.
📌 Generates alerts based on signals.
📌 Includes dynamic visualization options. Also displays the precise values of the calculated metrics in the Data Window.
WHAT IS LINEAR REGRESSION?
Linear regression is an analytical method used to calculate a dependent variable based on independent variables when a cause-and-effect relationship exists between them. In this context, the dependent variable is the price, and the independent variable is the time or bar_index. It aims to model the potential behavior of price action based on this relationship. A regression channel is calculated based on the sample deviation and its multiples. Consequently, it is widely utilized to determine dynamic support and resistance levels.
REPAINTING AND THE SOLUTION
Repainting can be briefly defined as the alteration of past data values in subsequent bars. Because a standard regression channel is recalculated by shifting the array with every new bar, drawings based purely on line functions inherently repaint. However, this indicator overcomes the repainting issue through its "Historical Plots" feature. This option allows users to dynamically observe the true historical states of the channel levels. The signal mechanics of the indicator are also built strictly upon this non-repainting framework to ensure execution integrity.
APPLICATIONS
The data provided by this tool can be applied in various observational contexts. When prices stretch significantly toward the outer deviation bands, it highlights mathematical extremes that traders often view as potential mean-reversion zones. Conversely, when the price breaks outside the primary boundaries with a high Theta angle, it signals a statistically significant momentum shift. By utilizing the built-in Pearson's R correlation, observers can quantitatively filter out sideways, low-momentum periods (choppy markets) and focus solely on established directional trends.
HOW TO USE
Begin by defining the calculation scope in the settings, choosing either a fixed bar count or an anchored timeframe (e.g., Daily, Weekly). Select the appropriate scale (Linear or Logarithmic) to match your chart. Toggle the visibility of the central regression line and deviation bands (Upper, Lower, Optional, Highest, Lowest) as needed. In the "Signals" section, you can select a specific channel strategy and apply minimum thresholds for Pearson's correlation and the Theta angle. Enable the "Bands (Historical Plots)" option to visually audit the past states of the channel without current-bar distortion.
MECHANICS
At its core, the script utilizes the least-squares method to compute the slope and intercept of the price data. To keep the code modular and efficient, the architecture relies on several user-defined functions (e.g., f_calc_dynamic for historical rolling arrays, f_calc_slope_current for real-time line states, and f_scale_converter for logarithmic adjustments).
SIGNALS & EXECUTION LOGIC
It is important to note that the signal structure built here is a highly subjective approach to linear regression trading. In this sense, the current methodology is merely a "search for an answer" rather than a definitive solution. It aims to provide users with as flexible and customizable a workspace as possible.
Filters:
This indicator utilizes a state-machine (dir) to prevent consecutive redundant signals and to manage immediate directional reversals. All entry conditions can be independently gated by two optional mathematical filters: Pearson's R (minimum correlation strength) and Theta (θ) (minimum slope angle).
Channel Strategies:
The script features 5 distinct channel strategy options with specific entry and exit conditions:
1. None (Pure Trend)
• Logic: Ignores channel bands entirely and relies purely on trend momentum.
• Entry: Triggered when the mathematical Theta (θ) angle crosses the user-defined threshold
• Exit: Triggered when the Theta angle crosses the 0 line, indicating a trend exhaustion or directional shift.
2. Deviation | Break-Out
• Logic: Uses the current, dynamically calculated upper and lower standard deviation bands to catch momentum breakouts.
• Entry: Triggered when the close price crosses over the upper band (Long) or under the lower band (Short).
• Exit (Fakeout Protection): Triggered when the close price crosses back inside the respective entry band. This acts as a trailing stop to cut losses early during false breakouts.
3. Deviation | Mean Reversion
• Logic: Uses the current dynamic deviation bands to anticipate a price rebound towards the mean.
• Entry: Triggered when the close price crosses over the lower band (Long) or under the upper band (Short). Upon entry, a volatility-adjusted hard stop is dynamically recorded (Entry Band ± 1 Standard Deviation).
• Exit: Triggers either as a Take-Profit when the price wick (high for Longs, low for Shorts) hits the central Regression Line, OR as a Stop-Loss if the price breaches the recorded hard stop to prevent infinite drawdowns.
4. Highest & Lowest | Break-Out
• Logic: Uses 1-bar delayed ( ) highest and lowest recorded deviation lines to provide stable, non-repainting levels for breakout confirmation.
• Entry: Triggered when the close price crosses over the historical highest line (Long) or under the historical lowest line (Short).
• Exit (Fakeout Protection): Triggered when the close price crosses back inside the respective entry line.
5. Highest & Lowest | Mean Reversion
• Logic: Uses the stable 1-bar delayed highest and lowest lines to trade rebounds.
• Entry: Triggered when the close price crosses over the lowest line (Long) or under the highest line (Short). Similar to Option 3, a hard stop is recorded at the exact moment of entry.
• Exit: Triggers as a Take-Profit upon a wick touch to the central Regression Line, OR as a Stop-Loss upon breaching the recorded hard stop.
DISCLAIMER
This indicator is strictly a statistical observation tool, not a predictive financial model. Linear regression mathematically describes past price action; it does not forecast future movements. The mathematical filters and deviation bands provided are subjective interpretations of market data and should only be used as supplementary components within a broader, independent risk management framework.
Pine Script® indicator
Jamallo s - Trend Snipermy first indicator from 2022.
Trend Sniper uses two dynamic lines to identify trend direction and signal trade entries. The first line is a volatility-adaptive moving average that weights price movement based on the ratio of body size to wick range — reacting faster during strong directional moves and slower during chop. The second line is a linear regression of closing prices over a longer period, acting as the trend baseline.
Pine Script® indicator
LSMA SD | GForgeLSMA SD | GForge
LSMA SD is a trend-following oscillator built for swing trading on higher timeframes. It generates rules-based long and exit signals by measuring where price sits within a statistically-defined volatility envelope anchored to a regression-based trend line.
Core Calculation
The basis line is a Least Squares Moving Average. Unlike a standard moving average which weights past prices, LSMA computes the mathematically optimal straight-line fit across a defined lookback window. This means the basis reflects the actual gradient of a trend — its slope tells you the rate and direction of price movement, not a smoothed echo of where price has been. A short EMA pass is applied to the raw LSMA output as a robustness measure, absorbing single-bar snap artifacts that occur when outlier candles enter or exit the regression window. This is not a smoothing aesthetic — it directly addresses a known fragility in raw LinReg endpoints.
The default source is hlc3 — the average of high, low, and close — rather than close alone. This distributes the regression input across the full bar range, reducing sensitivity to end-of-session price mechanics such as stop runs and last-minute order flow that can distort the trend line without reflecting genuine directional movement.
A Standard Deviation envelope is then constructed around the LSMA basis at a fixed multiplier. The band width is driven entirely by actual price volatility — it widens during high-volatility periods and tightens during quiet ones. There is no secondary adaptive scaling layer. This is intentional: additional dynamic scaling introduces a second noisy signal on top of the basis movement, which in practice degrades signal quality.
The Oscillator
The oscillator expresses where price currently sits within the SD bands on a 0–100 scale. A reading of 0 means price is at the lower band. A reading of 100 means price is at the upper band. A reading of 50 means price is sitting directly on the LSMA trend line itself — the neutral zone between the two signal thresholds represents price consolidating around the regression basis.
Long signals fire when the oscillator crosses above the long threshold (default 74), meaning price has broken decisively into the upper band zone — a momentum confirmation in the direction of the trend, not a mean-reversion trigger. Exit and short signals fire when the oscillator crosses below the short threshold (default 33).
This is a trend-continuation system, not a reversal indicator.
Parameters
The indicator is intentionally low-parameter. LSMA Length sets the regression window. StdDev Length sets the band width lookback and can differ from the LSMA length. StdDev Multiplier sets the fixed band scale. Endpoint Smoothing controls how aggressively window-edge artifacts are absorbed — setting it to 1 disables it entirely. Fewer parameters means less surface area for curve-fitting to historical data.
Default settings are optimised for BTC on the 1D timeframe. Optimize thresholds and lengths for different assets and timeframes before use.
Risk Warning
This indicator is provided for informational and educational purposes only. Past performance, including any results visible on historical bars, does not guarantee or imply future returns. All trading involves risk. You should not make trading decisions based solely on any single indicator. Always apply independent analysis and appropriate risk management.
Developed by GForge
Pine Script® indicator
Volume Weighted Intra Bar LR KurtosisThis indicator analyzes market character by decomposing total
Excess Kurtosis ("Fat Tails") of a SINGLE BAR into four distinct,
interpretable components based on a Linear Regression model.
Key Features:
1. **Intra-Bar LR Kurtosis Decomposition:** For each bar on the chart,
the indicator analyzes the underlying price action on a smaller
timeframe ('Intra-Bar Timeframe'). It fits a Linear Regression
line through the intra-bar data to decompose the 4th Moment:
- **Trend Kurtosis (Gold):** Peakedness of the regression line
itself. High values indicate the price path within the bar
moves in sudden jumps, steps, or gaps (discontinuous path).
- **Residual Kurtosis (Red):** Excess Kurtosis of the noise
around the regression line. Captures "Hidden Tail Risk" or
extreme outliers within the bar relative to the trend.
- **Within-Bar Kurtosis (Blue):** Fat tails derived from the
microstructure of individual intra-bar candles.
- **Interaction Variance (Dark Grey):** The comovement of variance
and mean deviations (volatility clustering relative to trend).
- **Interaction Skewness (Darker Grey):** The comovement of skewness
and mean deviations (asymmetry relative to trend).
2. **Visual Decomposition Logic:** Total Excess Kurtosis is the
primary metric displayed. Since statistical moments are additive,
this indicator calculates the *exact* Total Kurtosis and partitions
the columns based on the Law of Total Moments.
3. **Dual Display Modes:** The indicator offers two modes to
visualize this decomposition:
- **Absolute Mode:** Plots the *total* kurtosis as a
stacked column chart. Stacking logic groups components to
ensure visual clarity of the magnitude.
- **Relative Mode:** Plots the direct *contribution ratio*
(proportion) of each component relative to the total sum,
ideal for identifying the dominant driver (Trend vs. Noise).
4. **Calculation Options:**
- **Normalization:** An optional 'Normalize' setting
transforms inputs into logarithmic space, analyzing the
kurtosis of *returns* rather than absolute prices.
- **Volume Weighting:** An option (`Volume weighted`) applies
volume weighting to all regression and moment calculations,
emphasizing high-participation moves.
5. **Kurtosis Cycle Analysis:**
- **Pivot Detection:** Includes a built-in pivot detector
that identifies significant turning points (peaks/valleys) in
the *total* kurtosis line. (Note: This is only visible
in 'Absolute Mode').
- **Flexible Pivot Algorithms:** Supports various underlying
mathematical models for pivot detection provided by the
core library.
6. **Note on Confirmation (Lag):** Pivot signals are confirmed
using a lookback method. A pivot is only plotted *after*
the `Pivot Right Bars` input has passed, which introduces
an inherent lag.
7. **Multi-Timeframe (MTF) Capability:**
- **MTF Analysis Lines:** The entire intra-bar analysis can be
run on a higher timeframe (using the `Timeframe` input),
with standard options to handle gaps (`Fill Gaps`) and
prevent repainting (`Wait for...`).
- **Limitation:** The Pivot detection (`Calculate Pivots`) is
**disabled** if a Higher Timeframe (HTF) is selected.
8. **Integrated Alerts:** Includes comprehensive alerts for:
- Kurtosis magnitude (High Positive / High Negative).
- Character changes (Trend Jumps vs. Noise Outliers).
- Total Kurtosis pivot (High/Low) detection.
**Caution: Real-Time Data Behavior (Intra-Bar Repainting)**
This indicator uses high-resolution intra-bar data. As a result, the
values on the **current, unclosed bar** (the real-time bar) will
update dynamically as new intra-bar data arrives. This behavior is
normal and necessary for this type of analysis. Signals should only
be considered final **after the main chart bar has closed.**
---
**DISCLAIMER**
1. **For Informational/Educational Use Only:** This indicator is
provided for informational and educational purposes only. It does
not constitute financial, investment, or trading advice, nor is
it a recommendation to buy or sell any asset.
2. **Use at Your Own Risk:** All trading decisions you make based on
the information or signals generated by this indicator are made
solely at your own risk.
3. **No Guarantee of Performance:** Past performance is not an
indicator of future results. The author makes no guarantee
regarding the accuracy of the signals or future profitability.
4. **No Liability:** The author shall not be held liable for any
financial losses or damages incurred directly or indirectly from
the use of this indicator.
5. **Signals Are Not Recommendations:** The alerts and visual signals
(e.g., crossovers) generated by this tool are not direct
recommendations to buy or sell. They are technical observations
for your own analysis and consideration.
Pine Script® indicator
Volume Weighted LR KurtosisThis indicator analyzes market character by decomposing total
Excess Kurtosis ("Fat Tails") into four distinct, interpretable
components based on a Linear Regression model.
Key Features:
1. **Four-Component Kurtosis Decomposition:** The indicator
separates market tail risk based on the 'Estimate Bar Statistics' option.
It leverages the Law of Total Moments to provide an additive
breakdown of the 4th Statistical Moment:
- **Trend Kurtosis (Gold):** Peakedness of the regression line
itself. High values indicate the trend moves in sudden jumps,
steps, or gaps (discontinuous path).
- **Residual Kurtosis (Red):** Excess Kurtosis of the noise
around the regression line. This captures the "Hidden Tail Risk"
(extreme outliers relative to the trend).
- **Within-Bar Kurtosis (Blue):** Fat tails derived from the
microstructure of individual bars (requires 'Estimate Bar Statistics').
- **Interaction Variance (Dark Grey):** The comovement of variance
and mean deviations (volatility clustering relative to trend).
- **Interaction Skewness (Darker Grey):** The comovement of skewness
and mean deviations (asymmetry relative to trend).
2. **Visual Decomposition Logic:** Total Excess Kurtosis is the
primary metric displayed. Since statistical moments are additive,
this indicator calculates the *exact* Total Kurtosis and partitions
the area to visualize the contribution (weight) of each
structural source to the overall tail risk.
3. **Dual Display Modes:** The indicator offers two modes to
visualize this decomposition:
- **Absolute Mode:** Displays the *total* kurtosis as a
stacked area chart, allowing to see the magnitude of tail risk.
Stacking logic groups components to ensure visual clarity.
- **Relative Mode:** Displays the direct *contribution ratio*
(proportion) of each component relative to the total sum,
ideal for identifying the dominant driver of the risk.
4. **Calculation Options:**
- **Normalization:** An optional 'Normalize' setting
transforms inputs into logarithmic space, analyzing the
kurtosis of *returns* rather than absolute prices.
- **Volume Weighting:** An option (`Volume weighted`) applies
volume weighting to all regression and moment calculations,
emphasizing high-participation moves.
5. **Kurtosis Cycle Analysis:**
- **Pivot Detection:** Includes a built-in pivot detector
that identifies significant turning points (peaks/valleys) in
the *total* kurtosis line. This helps identify extremes in
market fragility or structural changes.
- **Flexible Pivot Algorithms:** Supports various underlying
mathematical models for pivot detection provided by the
core library.
6. **Note on Confirmation (Lag):** Pivot signals are confirmed
using a lookback method. A pivot is only plotted *after*
the `Pivot Right Bars` input has passed, which introduces
an inherent lag.
7. **Multi-Timeframe (MTF) Capability:**
- **MTF Kurtosis Lines:** The kurtosis lines can be
calculated on a higher timeframe, with standard options
to handle gaps (`Fill Gaps`) and prevent repainting
(`Wait for...`).
- **Limitation:** The Pivot detection (`Calculate Pivots`) is
**disabled** if a Higher Timeframe (HTF) is selected.
8. **Integrated Alerts:** Includes comprehensive alerts for:
- Kurtosis magnitude (High Positive / High Negative).
- Kurtosis character changes/emerging/fading.
- Total Kurtosis pivot (High/Low) detection.
---
**DISCLAIMER**
1. **For Informational/Educational Use Only:** This indicator is
provided for informational and educational purposes only. It does
not constitute financial, investment, or trading advice, nor is
it a recommendation to buy or sell any asset.
2. **Use at Your Own Risk:** All trading decisions you make based on
the information or signals generated by this indicator are made
solely at your own risk.
3. **No Guarantee of Performance:** Past performance is not an
indicator of future results. The author makes no guarantee
regarding the accuracy of the signals or future profitability.
4. **No Liability:** The author shall not be held liable for any
financial losses or damages incurred directly or indirectly from
the use of this indicator.
5. **Signals Are Not Recommendations:** The alerts and visual signals
(e.g., crossovers) generated by this tool are not direct
recommendations to buy or sell. They are technical observations
for your own analysis and consideration.
Pine Script® indicator
Volume Weighted Intra Bar LR SkewnessThis indicator analyzes market character by decomposing total
skewness (asymmetry) of a SINGLE BAR into four distinct,
interpretable components based on a Linear Regression model.
Key Features:
1. **Intra-Bar LR Skewness Decomposition:** For each bar on the chart,
the indicator analyzes the underlying price action on a smaller
timeframe ('Intra-Bar Timeframe'). It fits a Linear Regression
line through the intra-bar data to decompose the 3rd Moment:
- **Trend Skewness (Green/Red):** Asymmetry originating from
the slope of the intra-bar regression line. Indicates if the
price path within the bar is geometrically trend-driven.
- **Residual Skewness (Yellow):** Asymmetry of the noise
around the regression line. Captures "Tail Risk" or sudden
shocks within the bar that deviate from the main path.
- **Within-Bar Skewness (Blue):** Asymmetry derived from the
microstructure of individual intra-bar candles.
- **Interaction Skewness (Dark Grey):** Asymmetry caused by
the correlation between price levels and volatility within
the bar (e.g., volatility expanding as price drops).
2. **Visual Decomposition Logic:** Total Skewness is the
primary metric displayed. Since statistical moments are additive,
this indicator calculates the *exact* Total Skewness and partitions
the columns based on the Law of Total Moments.
3. **Dual Display Modes:** The indicator offers two modes to
visualize this decomposition:
- **Absolute Mode:** Plots the *total* skewness as a
stacked column chart. Stacking logic groups components with
the same sign to ensure visual clarity.
- **Relative Mode:** Plots the direct *contribution ratio*
(proportion) of each component relative to the total sum,
ideal for identifying the dominant driver (Trend vs. Noise).
4. **Calculation Options:**
- **Normalization:** An optional 'Normalize' setting
transforms inputs into logarithmic space, analyzing the
skewness of *returns* rather than absolute prices.
- **Volume Weighting:** An option (`Volume weighted`) applies
volume weighting to all regression and moment calculations,
emphasizing high-participation moves.
5. **Skewness Cycle Analysis:**
- **Pivot Detection:** Includes a built-in pivot detector
that identifies significant turning points (peaks/valleys) in
the *total* skewness line. (Note: This is only visible
in 'Absolute Mode').
- **Flexible Pivot Algorithms:** Supports various underlying
mathematical models for pivot detection provided by the
core library.
6. **Note on Confirmation (Lag):** Pivot signals are confirmed
using a lookback method. A pivot is only plotted *after*
the `Pivot Right Bars` input has passed, which introduces
an inherent lag.
7. **Multi-Timeframe (MTF) Capability:**
- **MTF Analysis Lines:** The entire intra-bar analysis can be
run on a higher timeframe (using the `Timeframe` input),
with standard options to handle gaps (`Fill Gaps`) and
prevent repainting (`Wait for...`).
- **Limitation:** The Pivot detection (`Calculate Pivots`) is
**disabled** if a Higher Timeframe (HTF) is selected.
8. **Integrated Alerts:** Includes comprehensive alerts for:
- Skewness magnitude (High Positive / High Negative).
- Character changes (Trend vs. Noise dominance).
- Total Skewness pivot (High/Low) detection.
**Caution: Real-Time Data Behavior (Intra-Bar Repainting)**
This indicator uses high-resolution intra-bar data. As a result, the
values on the **current, unclosed bar** (the real-time bar) will
update dynamically as new intra-bar data arrives. This behavior is
normal and necessary for this type of analysis. Signals should only
be considered final **after the main chart bar has closed.**
---
**DISCLAIMER**
1. **For Informational/Educational Use Only:** This indicator is
provided for informational and educational purposes only. It does
not constitute financial, investment, or trading advice, nor is
it a recommendation to buy or sell any asset.
2. **Use at Your Own Risk:** All trading decisions you make based on
the information or signals generated by this indicator are made
solely at your own risk.
3. **No Guarantee of Performance:** Past performance is not an
indicator of future results. The author makes no guarantee
regarding the accuracy of the signals or future profitability.
4. **No Liability:** The author shall not be held liable for any
financial losses or damages incurred directly or indirectly from
the use of this indicator.
5. **Signals Are Not Recommendations:** The alerts and visual signals
(e.g., crossovers) generated by this tool are not direct
recommendations to buy or sell. They are technical observations
for your own analysis and consideration.
Pine Script® indicator
Volume Weighted LR SkewnessThis indicator analyzes market character by decomposing total
skewness (asymmetry) into four distinct, interpretable components
based on a Linear Regression model.
Key Features:
1. **Four-Component Skewness Decomposition:** The indicator
separates market asymmetry based on the 'Estimate Bar Statistics' option.
It leverages the Law of Total Moments to provide an additive
breakdown of the 3rd Statistical Moment:
- **Trend Skewness (Green/Red):** Asymmetry originating from
the slope of the regression line itself. Indicates if the
trend path is geometrically skewed.
- **Residual Skewness (Yellow):** Asymmetry of the noise
around the regression line. Captures "Tail Risk" (e.g.,
sudden spikes against the trend).
- **Within-Bar Skewness (Blue):** Asymmetry derived from the
microstructure of individual bars (requires 'Estimate Bar Statistics').
- **Interaction Skewness (Dark Grey):** Asymmetry caused by the
correlation between price levels and volatility (e.g.,
volatility expanding as price moves in one direction).
*Dominance of this component indicates an unstable, emotional market.*
2. **Visual Decomposition Logic:** Total Skewness is the
primary metric displayed. Since statistical moments are additive,
this indicator calculates the *exact* Total Skewness and partitions
the area to visualize the contribution (weight) of each
structural source to the overall market bias.
3. **Dual Display Modes:** The indicator offers two modes to
visualize this decomposition:
- **Absolute Mode:** Displays the *total* skewness as a
stacked area chart, allowing to see the magnitude of tail risk.
Stacking logic groups components with the same sign to ensure
visual clarity.
- **Relative Mode:** Displays the direct *contribution ratio*
(proportion) of each component relative to the total sum,
ideal for identifying the dominant driver of asymmetry.
4. **Calculation Options:**
- **Normalization:** An optional 'Normalize' setting
transforms inputs into logarithmic space, analyzing the
skewness of *returns* rather than absolute prices.
- **Volume Weighting:** An option (`Volume weighted`) applies
volume weighting to all regression and moment calculations,
emphasizing high-participation moves.
5. **Skewness Cycle Analysis:**
- **Pivot Detection:** Includes a built-in pivot detector
that identifies significant turning points (peaks/valleys) in
the *total* skewness line. This helps identify extremes in
market sentiment or structural bias.
- **Flexible Pivot Algorithms:** Supports various underlying
mathematical models for pivot detection provided by the
core library.
6. **Note on Confirmation (Lag):** Pivot signals are confirmed
using a lookback method. A pivot is only plotted *after*
the `Pivot Right Bars` input has passed, which introduces
an inherent lag.
7. **Multi-Timeframe (MTF) Capability:**
- **MTF Skewness Lines:** The skewness lines can be
calculated on a higher timeframe, with standard options
to handle gaps (`Fill Gaps`) and prevent repainting
(`Wait for...`).
- **Limitation:** The Pivot detection (`Calculate Pivots`) is
**disabled** if a Higher Timeframe (HTF) is selected.
8. **Integrated Alerts:** Includes comprehensive alerts for:
- Skewness magnitude (High Positive / High Negative).
- Skewness character changes/emerging/fading.
- Total Skewness pivot (High/Low) detection.
---
**DISCLAIMER**
1. **For Informational/Educational Use Only:** This indicator is
provided for informational and educational purposes only. It does
not constitute financial, investment, or trading advice, nor is
it a recommendation to buy or sell any asset.
2. **Use at Your Own Risk:** All trading decisions you make based on
the information or signals generated by this indicator are made
solely at your own risk.
3. **No Guarantee of Performance:** Past performance is not an
indicator of future results. The author makes no guarantee
regarding the accuracy of the signals or future profitability.
4. **No Liability:** The author shall not be held liable for any
financial losses or damages incurred directly or indirectly from
the use of this indicator.
5. **Signals Are Not Recommendations:** The alerts and visual signals
(e.g., crossovers) generated by this tool are not direct
recommendations to buy or sell. They are technical observations
for your own analysis and consideration.
Pine Script® indicator
Volume Weighted Intra Bar LR CorrelationThis indicator analyzes market character by providing a detailed
view of correlation. It applies a Linear Regression model to
intra-bar price action, dissecting the total correlation of
each bar into three distinct components.
Key Features:
1. **Three-Component Correlation Decomposition:** The indicator
separates correlation based on the 'Estimate Bar Statistics' option.
- **Standard Mode (`Estimate Bar Statistics` = OFF):** Calculates
correlation based on the selected `Source` (this results
mainly in 'Trend' and 'Residual' correlation).
- **Decomposition Mode (`Estimate Bar Statistics` = ON):** The
indicator uses a statistical model ('Estimator') to
calculate *within-bar* correlation.
(Assumption: In this mode, the `Source` input is
**ignored**, and an estimated mean for each bar is used
instead).
This separates correlation into:
- **Trend Correlation (Green/Red):** Correlation explained by the
regression's slope (Directional Alignment).
- **Residual Correlation (Yellow):** Correlation from price
oscillating around the regression line (Mean-Reversion/Cointegration).
- **Within-Bar Correlation (Blue):** Correlation from the
high-low range of each bar (Microstructure/Noise).
2. **Visual Decomposition Logic:** Total Correlation is the
primary metric displayed. Since Correlation Coefficients are not
linearly additive, this indicator plots the *exact* Total
Correlation and partitions the area underneath based on the
Covariance Ratio. This ensures the displayed total correlation
remains mathematically accurate while showing relative composition.
3. **Dual Display Modes:** The indicator offers two modes to
visualize this decomposition:
- **Absolute Mode:** Displays the *total* correlation as a
stacked area chart, partitioned by the ratio of
the three components.
- **Relative Mode:** Displays the direct *energy ratio*
(proportion) of each component relative to the total (0-1),
ideal for identifying the dominant market character.
4. **Calculation Options:**
- **Normalization:** An optional 'Normalize' setting
calculates an **Exponential Regression Curve** (log-space),
making the analysis suitable for growth assets.
- **Volume Weighting:** An option (`Volume weighted`) applies
volume weighting to all regression and correlation calculations.
5. **Correlation Cycle Analysis:**
- **Pivot Detection:** Includes a built-in pivot detector
that identifies significant turning points (highs and lows) in
the *total* correlation line. (Note: This is only visible
in 'Absolute Mode').
- **Flexible Pivot Algorithms:** Supports various underlying
mathematical models for pivot detection provided by the
core library.
6. **Note on Confirmation (Lag):** Pivot signals are confirmed
using a lookback method. A pivot is only plotted *after*
the `Pivot Right Bars` input has passed, which introduces
an inherent lag.
7. **Multi-Timeframe (MTF) Capability:**
- **MTF Correlation Lines:** The correlation lines can be
calculated on a higher timeframe, with standard options
to handle gaps (`Fill Gaps`) and prevent repainting
(`Wait for...`).
- **Limitation:** The Pivot detection (`Calculate Pivots`) is
**disabled** if a Higher Timeframe (HTF) is selected.
8. **Integrated Alerts:** Includes comprehensive alerts for:
- Correlation magnitude (High Positive / High Inverse).
- Correlation character changes/emerging/fading.
- Total Correlation pivot (High/Low) detection.
**Caution! Real-Time Data Behavior (Intra-Bar Repainting)**
This indicator uses high-resolution intra-bar data. As a result, the
values on the **current, unclosed bar** (the real-time bar) will
update dynamically as new intra-bar data arrives. This behavior is
normal and necessary for this type of analysis. Signals should only
be considered final **after the main chart bar has closed.**
---
**DISCLAIMER**
1. **For Informational/Educational Use Only:** This indicator is
provided for informational and educational purposes only. It does
not constitute financial, investment, or trading advice, nor is
it a recommendation to buy or sell any asset.
2. **Use at Your Own Risk:** All trading decisions you make based on
the information or signals generated by this indicator are made
solely at your own risk.
3. **No Guarantee of Performance:** Past performance is not an
indicator of future results. The author makes no guarantee
regarding the accuracy of the signals or future profitability.
4. **No Liability:** The author shall not be held liable for any
financial losses or damages incurred directly or indirectly from
the use of this indicator.
5. **Signals Are Not Recommendations:** The alerts and visual signals
(e.g., crossovers) generated by this tool are not direct
recommendations to buy or sell. They are technical observations
for your own analysis and consideration.
Pine Script® indicator
Volume Weighted LR Z ScoreThis indicator calculates the Volume Weighted Linear Regression
Z-Score (VWLRZS). Unlike a standard Z-Score which measures
deviation from a static mean, this oscillator measures the
statistical distance of price from a dynamic Volume-Weighted
Linear Regression Line (Analysis of Residuals).
Key Features:
1. **Volatility Decomposition:** The indicator separates volatility
based on the 'Estimate Bar Statistics' option.
- **Standard Mode (`Estimate Bar Statistics` = OFF):** Calculates
standard Regression Residuals using the selected `Source`
for both the regression line (baseline) and the signal.
- **Decomposition Mode (`Estimate Bar Statistics` = ON):**
Uses a hybrid statistical approach:
a) **The Model (Baseline):** Uses an estimator to calculate
the 'within-bar' mean and fits the Linear Regression
through these statistical centers. This creates a
stable, trend-following expectation model.
b) **The Signal (Observation):** Compares the actual `Source`
(e.g., Close) against this regression line.
(Result: A Z-Score that measures deviations from the current
trend slope rather than a flat average).
2. **Visual Decomposition Logic:** Total Standard Deviation (of
Residuals) is the primary metric displayed. Since Standard
Deviations are not linearly additive (sqrt(a+b) != sqrt(a)+sqrt(b)),
this indicator calculates the *exact* Total Z-Score and partitions
the area underneath based on the Variance Ratio. This ensures the
displayed total volatility remains mathematically accurate while
showing relative composition.
3. **Normalization (Exponential Regression):** Includes an optional
'Normalize' mode. When enabled, the indicator calculates the
Linear Regression on logarithmic data. Mathematically, this
transforms the baseline into an **Exponential Regression Curve**,
making it ideal for analyzing assets with compounding growth
characteristics (constant percentage trend).
4. **Full Divergence Suite (Class A, B, C):** The indicator's
primary feature is its integrated divergence engine. It
automatically detects and plots all three major divergence
classes between price and the Z-Score:
- Regular (A): Signals potential trend exhaustion and reversals.
- Hidden (B): Signals potential trend continuations during pullbacks.
- Exaggerated (C): Signals weakness at double tops/bottoms.
5. **Divergence Filtering and Visualization:**
- **Price Tolerance Filter:** Divergence detection is enhanced
with a percentage-based price tolerance (`pivPrcTol`) to
filter out insignificant market noise, leading to more
robust signals.
- **Persistent Visualization:** Divergence markers are plotted
for the entire duration of the signal and are visually
anchored to the oscillator level of the confirming pivot.
- **Flexible Pivot Algorithms:** Supports various underlying
mathematical models for pivot detection provided by the
core library
6. **Note on Confirmation (Lag):** Divergence signals rely on a
pivot confirmation method to ensure they do not repaint.
- The **Start** of a divergence is only detected *after* the
confirming pivot is fully formed (a delay based on
`Pivot Right Bars`).
- The **End** of a divergence is detected either instantly
(if the signal is invalidated by price action) or with
a delay (when a new, non-divergent pivot is confirmed).
7. **Multi-Timeframe (MTF) Capability:**
- **MTF Calculation:** The Z-Score line *itself* can be calculated on a
higher timeframe, with standard options to handle gaps
(`Fill Gaps`) and prevent repainting (`Wait for...`).
- **Limitation:** The Divergence detection engine (`pivDiv`)
is designed for the active timeframe. Using it in MTF mode
is not recommended as step-data can lead to inaccurate
pivot detection.
8. **Integrated Alerts:** Includes a comprehensive set of built-in
alerts for the Z-Score crossing the neutral line, the configured
Threshold levels, and the start/end of all divergence types.
---
**DISCLAIMER**
1. **For Informational/Educational Use Only:** This indicator is
provided for informational and educational purposes only. It does
not constitute financial, investment, or trading advice, nor is
it a recommendation to buy or sell any asset.
2. **Use at Your Own Risk:** All trading decisions you make based on
the information or signals generated by this indicator are made
solely at your own risk.
3. **No Guarantee of Performance:** Past performance is not an
indicator of future results. The author makes no guarantee
regarding the accuracy of the signals or future profitability.
4. **No Liability:** The author shall not be held liable for any
financial losses or damages incurred directly or indirectly from
the use of this indicator.
5. **Signals Are Not Recommendations:** The alerts and visual signals
(e.g., crossovers) generated by this tool are not direct
recommendations to buy or sell. They are technical observations
for your own analysis and consideration.
Pine Script® indicator
Regression ChannelAn enhanced version of TradingView's Linear Regression Channel that displays multiple upper and lower deviation channels with support for both linear and exponential regression models.
Getting Started & Usage
This indicator overlays a regression channel with up to 4 customizable standard deviation levels above and below the regression line. By default, it uses linear regression, but you can switch to an exponential regression model for curved price trends.
For detailed explanations of the statistical concepts and additional usage examples, please visit the documentation .
Pine Script® indicator
Quantum Regression Oscillator [ICN]The Problem: The Lag of Standard Oscillators
Most traders rely on the Relative Strength Index (RSI) or MACD to gauge momentum. While these are legendary tools, they suffer from a critical flaw: Lag. They calculate what has happened, often giving signals after the move is already halfway done.
The Quantum Regression Oscillator (QRO) was built to solve this. It is not a simple average; it is a predictive engine.
The "Quantum" Math (How It Works)
Instead of using standard smoothing (like SMA or EMA) which drags data backward, the QRO uses Linear Regression Analysis on the RSI data itself.
Linear Regression Core : The script calculates the "Line of Best Fit" for momentum in real-time. This allows the oscillator to react to price changes faster than price itself in some instances, effectively "predicting" the next tick of momentum.
Dynamic Volatility Bands : Unlike fixed bands (e.g., 70/30 on RSI), the QRO uses standard deviation bands that expand and contract with market volatility. This means "Overbought" is not a fixed number—it adapts to the market's energy.
Visual Guide : Reading the Oscillator
1. The Quantum Line (The Main Curve)
What it is : The smooth, fast-moving line oscillating between 0 and 100.
How to read it:
Crossing Midline (50) : The baseline for trend. Above 50 is Bullish Momentum; Below 50 is Bearish Momentum.
Slope : Because it uses regression, the angle of the line is a signal itself. A sharp turn often precedes price action.
2. The Dynamic Bands (The Shaded Zones)
What they are: The Blue (Lower) and Red (Upper) zones.
How to read it:
Oversold (Blue Zone) : When the line enters the Blue zone, price is statistically overextended to the downside. This is a "Sniper Buy" zone.
Overbought (Red Zone) : When the line enters the Red zone, price is statistically overextended to the upside. This is a "Sniper Sell" zone.
3. Divergence Detection
The QRO is excellent at spotting divergences. If Price makes a Higher High but the QRO makes a Lower High (while in the Red Zone), a reversal is mathematically probable.
Integration with the ICN Suite
While this oscillator is powerful as a standalone tool, it is the "Engine" behind the Institutional Confluence Nexus .
Standalone : Use it to spot divergences and momentum shifts with zero lag.
With ICN : The main chart indicator reads data from this oscillator to generate "Sniper" and "Pullback" signals automatically.
Settings & Customization
QRO Length: The lookback period for the base RSI calculation.
Regression Length: The sensitivity of the linear regression curve (Lower = Faster/More Noise, Higher = Smoother/More Lag).
Smoothing: Additional filtering to remove market noise.
For Developers (Open Source)
I believe in the power of open-source education. Developers can view the source code to learn:
How to implement ta.linreg (Linear Regression) on top of other indicators.
How to create dynamic bands using ta.stdev (Standard Deviation).
How to create smooth color gradients using plot transparency.
Disclaimer:
This tool is a mathematical aid for technical analysis. It does not predict the future. Always use proper risk management.
Pine Script® indicator
LogTrend Retest EngineLogTrend Retest Engine (LTRE)
LogTrend Retest Engine (LTRE) is an advanced trend-continuation overlay designed to identify high-probability breakout retests using logarithmic regression , volatility-adjusted deviation bands , and market regime filtering .
Unlike traditional channels or moving averages, LTRE models price behavior in log space , allowing it to adapt naturally to exponential market moves common in crypto, indices, and long-term trends.
🔹 How It Works
Logarithmic Regression Core
Performs linear regression on log-transformed price and time
Produces a structurally accurate trend midline that scales with price growth
Volatility-Adjusted Deviation Bands
Dynamic upper and lower zones based on statistical deviation
ATR weighting expands or contracts bands as volatility changes
Adaptive Lookback (Optional)
Automatically adjusts regression length using volatility pressure
Faster response in high-volatility environments, smoother in consolidation
🔹 Market Regime Detection
LTRE actively filters conditions using:
R² trend strength (trend quality, not just slope)
Volatility compression vs expansion
User-defined minimum trend strength threshold
Signals are disabled during ranging or low-quality conditions .
🔹 Breakout → Retest Signal Logic
LTRE does not chase breakouts.
Signals trigger only when:
1. Price breaks cleanly outside the deviation band
2. Market regime is confirmed as trending
3. Price performs a controlled retest within a user-defined tolerance
BUY
Break above upper band → retest → trend confirmed
SELL
Break below lower band → retest → trend confirmed
This structure is designed to reduce false breakouts and late entries.
🔹 Visual & Projection Tools
Clean midline and deviation bands
Optional filled zones
Optional future trend projection for forward structure planning
On-chart statistics for trend strength and volatility compression
🔹 Best Use Cases
Trend continuation & pullback strategies
Crypto, Forex, Indices, and equities
Works best on 15m and higher timeframes
⚠️ Disclaimer
LTRE is a decision-support tool , not a complete trading system. Always use proper risk management and confirm signals with additional structure, volume, or higher-timeframe context.
Built for traders who wait for structure — not noise.
Pine Script® indicator
Bollinger Bands Regression Forecast [BigBeluga]🔵 OVERVIEW
The Bollinger Bands Regression Forecast combines volatility envelopes from Bollinger Bands with a linear regression-based projection model .
It visualizes both current and future price zones by extrapolating the Bollinger channel forward in time, giving traders a statistical forecast of probable support and resistance behavior.
🔵 CONCEPTS
Classic Bollinger Bands use a moving average (basis) and standard deviation (deviation) to form dynamic envelopes around price.
This indicator enhances them with linear regression slope detection , allowing it to forecast how the band may expand or contract in the future.
Regression is applied to both the band’s basis and deviation components to predict their trajectory for a user-defined number of Forecast Bars .
The resulting forecast creates a smoothed, funnel-shaped projection that dynamically adapts to volatility.
▲ and ▼ markers highlight potential mean reversion points when price crosses the outer bounds of the bands.
🔵 FEATURES
Forecast Engine : Uses linear regression to project Bollinger Band movement into the future.
Dynamic Channel Width : Adapts standard deviation and slope for realistic volatility modeling.
Auto-Labeled Levels : Displays live upper and lower forecast values for quick reference.
Cross Signals : Marks potential overbought and oversold zones with ▲/▼ signals when price exits the band.
Trend-Adaptive Basis Color : Basis line automatically switches color to represent short-term trend direction.
Customizable Colors and Widths for complete visual control.
🔵 HOW TO USE
Apply the indicator to visualize both current Bollinger structure and its forward projection.
Use ▲/▼ breakout markers to identify short-term reversals or volatility shifts.
When price consistently rides the upper band forecast, the trend is strong and likely continuing.
When regression shows narrowing bands ahead, expect a volatility contraction or consolidation period.
For range traders, outer projected bands can be used as potential mean reversion entry points .
Combine with volume or momentum filters to confirm whether breakouts are genuine or fading.
🔵 CONCLUSION
Bollinger Bands Regression Forecast transforms classic Bollinger analysis into a predictive forecasting model .
By merging volatility dynamics with regression-based extrapolation, it provides traders with a forward-looking visualization of likely price boundaries — revealing not only where volatility is but also where it’s heading next.
Pine Script® indicator
Volume Weighted Volatility RegimeThe Volume-Weighted Volatility Regime (VWVR) is a market analysis tool that dissects total volatility to classify the current market 'character' or 'regime'. Using a Linear Regression model, it decomposes volatility into Trend, Residual (mean-reversion), and Within-Bar (noise) components.
Key Features:
Seven-Stage Regime Classification: The indicator's primary output is a regime value from -3 to +3, identifying the market state:
+3 (Strong Bull Trend): High directional, upward volatility.
+2 (Choppy Bull): Moderate upward trend with noise.
+1 (Quiet Bull): Low volatility, slight upward drift.
0 (Neutral): No clear directional bias.
-1 (Quiet Bear): Low volatility, slight downward drift.
-2 (Choppy Bear): Moderate downward trend with noise.
-3 (Strong Bear Trend): High directional, downward volatility.
Advanced Volatility Decomposition: The regime is derived from a three-component volatility model that separates price action into Trend (momentum), Residual (mean-reversion), and Within-Bar (noise) variance. The classification is determined by comparing the 'Trend' ratio against the user-defined 'Trend Threshold' and 'Quiet Threshold'.
Dual-Level Analysis: The indicator analyzes market character on two levels simultaneously:
Inter-Bar Regime (Background Color): Based on the main StdDev Length, showing the overall market character.
Intra-Bar Regime (Column Color): Based on a high-resolution analysis within each single bar ('Intra-Bar Timeframe'), showing the micro-structural character.
Calculation Options:
Statistical Model: The 'Estimate Bar Statistics' option (enabled by default) uses a statistical model ('Estimator') to perform the decomposition. (Assumption: In this mode, the Source input is ignored, and an estimated mean for each bar is used instead).
Normalization: An optional 'Normalize Volatility' setting calculates an Exponential Regression Curve (log-space).
Volume Weighting: An option (Volume weighted) applies volume weighting to all volatility calculations.
Multi-Timeframe (MTF) Capability: The entire dual-level analysis can be run on a higher timeframe (using the Timeframe input), with standard options to handle gaps (Fill Gaps) and prevent repainting (Wait for...).
Integrated Alerts: Includes 22 comprehensive alerts that trigger whenever the 'Inter-Bar Regime' or the 'Intra-Bar Regime' crosses one of the key thresholds (e.g., 'Regime crosses above Neutral Line'), or when the 'Intra-Bar Dominance' crosses the 50% mark.
Caution: Real-Time Data Behavior (Intra-Bar Repainting) This indicator uses high-resolution intra-bar data. As a result, the values on the current, unclosed bar (the real-time bar) will update dynamically as new intra-bar data arrives. This behavior is normal and necessary for this type of analysis. Signals should only be considered final after the main chart bar has closed.
DISCLAIMER
For Informational/Educational Use Only: This indicator is provided for informational and educational purposes only. It does not constitute financial, investment, or trading advice, nor is it a recommendation to buy or sell any asset.
Use at Your Own Risk: All trading decisions you make based on the information or signals generated by this indicator are made solely at your own risk.
No Guarantee of Performance: Past performance is not an indicator of future results. The author makes no guarantee regarding the accuracy of the signals or future profitability.
No Liability: The author shall not be held liable for any financial losses or damages incurred directly or indirectly from the use of this indicator.
Signals Are Not Recommendations: The alerts and visual signals (e.g., crossovers) generated by this tool are not direct recommendations to buy or sell. They are technical observations for your own analysis and consideration.
Pine Script® indicator
Volume Weighted Intra Bar LR Standard DeviationThis indicator analyzes market character by providing a detailed view of volatility. It applies a Linear Regression model to intra-bar price action, dissecting the total volatility of each bar into three distinct components.
Key Features:
Three-Component Volatility Decomposition: By analyzing a lower timeframe ('Intra-Bar Timeframe'), the indicator separates each bar's volatility into:
Trend Volatility (Green/Red): Volatility explained by the intra-bar linear regression slope (Momentum).
Residual Volatility (Yellow): Volatility from price oscillating around the intra-bar trendline (Mean-Reversion).
Within-Bar Volatility (Blue): Volatility derived from the range of each intra-bar candle (Noise/Choppiness).
Layered Column Visualization: The indicator plots these components as a layered column chart. The size of each colored layer visually represents the dominance of each volatility character.
Dual Display Modes: The indicator offers two modes to visualize this decomposition:
Absolute Mode: Displays the total standard deviation as the column height, showing the absolute magnitude of volatility and the contribution of each component.
Normalized Mode: Displays the components as a 100% stacked column chart (scaled from 0 to 1), focusing purely on the percentage ratio of Trend, Residual, and Noise.
Calculation Options:
Statistical Model: The 'Estimate Bar Statistics' option (enabled by default) uses a statistical model ('Estimator') to perform the decomposition. (Assumption: In this mode, the Source input is ignored, and an estimated mean for each bar is used instead).
Normalization: An optional 'Normalize Volatility' setting calculates an Exponential Regression Curve (log-space).
Volume Weighting: An option (Volume weighted) applies volume weighting to all intra-bar calculations.
Multi-Component Pivot Detection: Includes a pivot detector that identifies significant turning points (highs and lows) in both the Total Volatility and the Trend Volatility Ratio. (Note: These pivots are only plotted when 'Plot Mode' is set to 'Absolute').
Note on Confirmation (Lag): Pivot signals are confirmed using a lookback method. A pivot is only plotted after the Pivot Right Bars input has passed, which introduces an inherent lag.
Multi-Timeframe (MTF) Capability:
MTF Analysis: The entire intra-bar analysis can be run on a higher timeframe (using the Timeframe input), with standard options to handle gaps (Fill Gaps) and prevent repainting (Wait for...).
Limitation: The Pivot detection (Calculate Pivots) is disabled if a Higher Timeframe (HTF) is selected.
Integrated Alerts: Includes 9 comprehensive alerts for:
Volatility character changes (e.g., 'Character Change from Noise to Trend').
Dominant character emerging (e.g., 'Bullish Trend Character Emerging').
Total Volatility pivot (High/Low) detection.
Trend Volatility pivot (High/Low) detection.
Caution! Real-Time Data Behavior (Intra-Bar Repainting) This indicator uses high-resolution intra-bar data. As a result, the values on the current, unclosed bar (the real-time bar) will update dynamically as new intra-bar data arrives. This behavior is normal and necessary for this type of analysis. Signals should only be considered final after the main chart bar has closed.
DISCLAIMER
For Informational/Educational Use Only: This indicator is provided for informational and educational purposes only. It does not constitute financial, investment, or trading advice, nor is it a recommendation to buy or sell any asset.
Use at Your Own Risk: All trading decisions you make based on the information or signals generated by this indicator are made solely at your own risk.
No Guarantee of Performance: Past performance is not an indicator of future results. The author makes no guarantee regarding the accuracy of the signals or future profitability.
No Liability: The author shall not be held liable for any financial losses or damages incurred directly or indirectly from the use of this indicator.
Signals Are Not Recommendations: The alerts and visual signals (e.g., crossovers) generated by this tool are not direct recommendations to buy or sell. They are technical observations for your own analysis and consideration.
Pine Script® indicator
Volume Weighted LR Standard DeviationThis indicator analyzes market character by decomposing total volatility into three distinct, interpretable components based on a Linear Regression model.
Key Features:
Three-Component Volatility Decomposition: The indicator separates volatility based on the 'Estimate Bar Statistics' option.
Standard Mode (Estimate Bar Statistics = OFF): Calculates volatility based on the selected Source (dies führt hauptsächlich zu 'Trend'- und 'Residual'-Volatilität).
Decomposition Mode (Estimate Bar Statistics = ON): The indicator uses a statistical model ('Estimator') to calculate within-bar volatility. (Assumption: In this mode, the Source input is ignored, and an estimated mean for each bar is used instead). This separates volatility into:
Trend Volatility (Green/Red): Volatility explained by the regression's slope (Momentum).
Residual Volatility (Yellow): Volatility from price oscillating around the regression line (Mean-Reversion).
Within-Bar Volatility (Blue): Volatility from the high-low range of each bar (Noise/Choppiness).
Dual Display Modes: The indicator offers two modes to visualize this decomposition:
Absolute Mode: Displays the total standard deviation as a stacked area chart, partitioned by the variance ratio of the three components.
Normalized Mode: Displays the direct variance ratio (proportion) of each component relative to the total (0-1), ideal for identifying the dominant market character.
Calculation Options:
Normalization: An optional 'Normalize Volatility' setting calculates an Exponential Regression Curve (log-space), making the analysis suitable for growth assets.
Volume Weighting: An option (Volume weighted) applies volume weighting to all regression and volatility calculations.
Multi-Component Pivot Detection: Includes a pivot detector that identifies significant turning points (highs and lows) in both the Total Volatility and the Trend Volatility Ratio. (Note: These pivots are only plotted when 'Plot Mode' is set to 'Absolute').
Note on Confirmation (Lag): Pivot signals are confirmed using a lookback method. A pivot is only plotted after the Pivot Right Bars input has passed, which introduces an inherent lag.
Multi-Timeframe (MTF) Capability:
MTF Volatility Lines: The volatility lines can be calculated on a higher timeframe, with standard options to handle gaps (Fill Gaps) and prevent repainting (Wait for...).
Limitation: The Pivot detection (Calculate Pivots) is disabled if a Higher Timeframe (HTF) is selected.
Integrated Alerts: Includes 9 comprehensive alerts for:
Volatility character changes (e.g., 'Character Change from Noise to Trend').
Dominant character emerging (e.g., 'Bullish Trend Character Emerging').
Total Volatility pivot (High/Low) detection.
Trend Volatility pivot (High/Low) detection.
DISCLAIMER
For Informational/Educational Use Only: This indicator is provided for informational and educational purposes only. It does not constitute financial, investment, or trading advice, nor is it a recommendation to buy or sell any asset.
Use at Your Own Risk: All trading decisions you make based on the information or signals generated by this indicator are made solely at your own risk.
No Guarantee of Performance: Past performance is not an indicator of future results. The author makes no guarantee regarding the accuracy of the signals or future profitability.
No Liability: The author shall not be held liable for any financial losses or damages incurred directly or indirectly from the use of this indicator.
Signals Are Not Recommendations: The alerts and visual signals (e.g., crossovers) generated by this tool are not direct recommendations to buy or sell. They are technical observations for your own analysis and consideration.
Pine Script® indicator
Volume Weighted Linear Regression BandThe Volume-Weighted Linear Regression Band (VWLRBd) is a volatility channel that uses a Linear Regression line as its dynamic baseline. Its primary feature is the decomposition of total volatility into two distinct components, visualized as layered bands.
Key Features:
Volatility Decomposition: The indicator separates volatility based on the 'Estimate Bar Statistics' option.
Standard Mode (Estimate Bar Statistics = OFF): The indicator functions as a standard (Volume-Weighted) Linear Regression Channel. It plots a single set of bands based on the standard deviation of the residuals (the error between the Source price and the regression line).
Decomposition Mode (Estimate Bar Statistics = ON): The indicator uses a statistical model ('Estimator') to calculate within-bar volatility. (Assumption: In this mode, the Source input is ignored, and an estimated mean for each bar is used for the regression). This mode displays two sets of bands:
Inner Bands: Show only the contribution of the 'residual' (trend noise) volatility, calculated proportionally.
Outer Bands: Show the total volatility (the sum of residual and within-bar components).
Regression Baseline (Linear / Exponential): The central line is a (Volume-Weighted) Linear Regression curve. An optional 'Normalize' mode performs all calculations in logarithmic space, transforming the baseline into an Exponential Regression Curve and the bands into constant percentage deviations, suitable for analyzing growth assets.
Volume Weighting: An option (Volume weighted) allows for volume to be incorporated into the calculation of both the regression baseline and the volatility decomposition, giving more influence to high-participation bars.
Multi-Timeframe (MTF) Engine: The indicator includes an MTF conversion block. When a Higher Timeframe (HTF) is selected, advanced options become available: Fill Gaps handles data gaps, and Wait for timeframe to close prevents repainting by ensuring the indicator only updates when the HTF bar closes.
Integrated Alerts: Includes a full set of built-in alerts for the source price crossing over or under the central regression line and the outermost calculated volatility band.
DISCLAIM_
For Informational/Educational Use Only: This indicator is provided for informational and educational purposes only. It does not constitute financial, investment, or trading advice, nor is it a recommendation to buy or sell any asset.
Use at Your Own Risk: All trading decisions you make based on the information or signals generated by this indicator are made solely at your own risk.
No Guarantee of Performance: Past performance is not an indicator of future results. The author makes no guarantee regarding the accuracy of the signals or future profitability.
No Liability: The author shall not be held liable for any financial losses or damages incurred directly or indirectly from the use of this indicator.
Signals Are Not Recommendations: The alerts and visual signals (e.g., crossovers) generated by this tool are not direct recommendations to buy or sell. They are technical observations for your own analysis and consideration.
Pine Script® indicator
Volume Weighted Linear Regression ChannelThis indicator plots a dynamic channel around a Linear Regression trendline. It provides a framework for identifying the prevailing trend and assessing price extremes based on volatility.
Key Features:
Linear Regression Baseline: The channel's centerline is a (Volume-Weighted) Linear Regression line. This line represents the 'best fit' for the recent price action, serving as a responsive baseline for the trend.
Volatility Decomposition: The indicator's primary feature is its ability to decompose volatility, controlled by the 'Estimate Bar Statistics' option.
Standard Mode (Estimate Bar Statistics = OFF): Calculates a standard linear regression channel. The bands represent the standard deviation of the residuals (the error) between the Source price and the regression line.
Decomposition Mode (Estimate Bar Statistics = ON): The indicator uses a statistical model ('Estimator') to calculate within-bar volatility. (Assumption: In this mode, the Source input is ignored, and an estimated mean for each bar is used for the regression). This mode displays two sets of bands:
Inner Bands: Show only the contribution of the 'residual' (trend noise) volatility, calculated proportionally.
Outer Bands: Show the total volatility (the sum of residual and within-bar components).
Volume Weighting: An option (Volume weighted) allows for volume to be incorporated into the calculation of both the linear regression and the volatility decomposition, giving more influence to high-participation bars.
Trend Projection: The calculated channel is plotted as a projection, which can be extended forward (Extend Forward) and backward (Extend Backward) in time to provide a visual guide for potential support and resistance.
Integrated Alerts: Includes a full set of built-in alerts for the Source price crossing over or under the calculated upper band, lower band, and the central regression line.
DISCLAIMER
For Informational/Educational Use Only: This indicator is provided for informational and educational purposes only. It does not constitute financial, investment, or trading advice, nor is it a recommendation to buy or sell any asset.
Use at Your Own Risk: All trading decisions you make based on the information or signals generated by this indicator are made solely at your own risk.
No Guarantee of Performance: Past performance is not an indicator of future results. The author makes no guarantee regarding the accuracy of the signals or future profitability.
No Liability: The author shall not be held liable for any financial losses or damages incurred directly or indirectly from the use of this indicator.
Signals Are Not Recommendations: The alerts and visual signals (e.g., crossovers) generated by this tool are not direct recommendations to buy or sell. They are technical observations for your own analysis and consideration.
Pine Script® indicator






















