Adaptive SuperTrend AI - Regime-Tuned [Dots3Red]📈 ADAPTIVE SUPERTREND AI — REGIME-TUNED
Classic SuperTrend uses one fixed ATR multiplier forever. That single number is a compromise: tight enough to track trends closely, it whipsaws during ranges; wide enough to survive ranges, it lags badly once a real trend starts. This script replaces the fixed multiplier with one that changes based on what kind of market is actually happening, using the same regime-detection engine shared across the Dots3Red catalog.
🧠 THE REGIME ENGINE
Every bar is classified into one of four states using ADX and the Choppiness Index together:
• 📈 TRENDING — ADX confirms directional strength and Choppiness confirms low chop
• 🔁 RANGING — the opposite: weak directional strength, high chop
• ⚡ VOLATILE — current ATR has expanded well beyond its baseline, regardless of direction or chop
• ❔ UNCERTAIN — none of the above conditions are clearly met
The raw regime reading is smoothed by taking the most frequent classification over a short lookback window, so a single noisy bar can't flip the regime label back and forth.
🤔 WHY RANGING GETS THE WIDEST BAND, NOT TRENDING
This is the part that looks backwards at first glance, so it's worth explaining directly. A ranging market chops back and forth around a mean — if the band were narrow here, ordinary noise would cross it constantly, causing false flips. So RANGING gets the widest multiplier (default 3.5×), letting normal chop stay inside the band. A TRENDING market is moving with genuine conviction, so a moderate multiplier (default 2.5×) tracks the move closely without giving back excessive profit before flipping on an actual reversal. VOLATILE conditions get the widest multiplier of all (default 4.5×) as a purely defensive setting, since sudden expansion is unpredictable by nature.
When the regime changes, the active multiplier doesn't jump to its new value instantly — it glides toward it over a configurable number of bars. This prevents the band from visibly teleporting on a regime transition, which would otherwise look jarring and could itself trigger a false flip right at the transition point.
The underlying band mechanics — the ratcheting upper/lower band logic, and a flip only when price closes beyond the active band — are the same as classic SuperTrend. Only the multiplier driving the band width is dynamic.
✅ THE CONFIDENCE LAYER
A SuperTrend flip is a single binary event: price crossed the band, direction changed. This script adds a secondary read on how convincing that flip actually is, using 8 independent checks against the new direction:
1. Close vs. a trend moving average
2. MACD histogram sign
3. Recent higher-high / lower-low structure
4. Close vs. the SuperTrend's own midline (hl2)
5. RSI side of 50
6. +DI vs. -DI dominance
7. Volume above its moving average on a trend-direction bar
8. Whether the regime is currently TRENDING
Every confirmed flip shows this count directly on its label — "▲ 6/8" means 6 of the 8 checks currently agree with the new uptrend. A flip with 7/8 agreement and one with 3/8 are treated identically by the raw band mechanics, but this layer gives a way to distinguish a well-supported flip from a marginal one at a glance.
🎯 FLIP WIN-RATE TRACKING
Each flip is graded once the following flip occurs: did price actually finish above the flip price (for an up-flip) or below it (for a down-flip) by the time direction changed again? This produces a running win rate — for example "58% (n=34)" — shown in the dashboard. It is a simple, honest measure of how the flips on this specific chart have actually played out, not a backtest or a promise about future flips.
🔒 NON-REPAINTING
Flips, confidence readings, and labels are all evaluated only on confirmed (closed) bars. A flip that appears on the chart will not later disappear or move to a different bar as new price data arrives.
🎨 VISUALS AND CUSTOMIZATION
The SuperTrend line and gradient fill are colored by current direction. Flip labels appear directly on confirmed flip bars with their confidence count. An optional background tint can shade the chart by current regime. All four core colors (bullish, bearish, volatile/warning, and uncertain/neutral) are fully customizable in settings, independent of the script's default palette.
The dashboard (position configurable) shows: current direction, current regime, the active ATR multiplier, the confidence count with a progress bar, the running flip win rate, and the raw ADX, Choppiness, and ATR ratio readings behind the regime classification.
🧭 HOW TO USE
👀 Reading the line and fill — the colored line and gradient fill show current direction at a glance. This is the same information classic SuperTrend gives you; the difference here is in how the band width behind that line was chosen.
🧠 Check the regime before trusting the band width — the dashboard's Regime row tells you why the band is currently as wide (or narrow) as it is. A band that looks unusually wide isn't a bug — it likely means the engine has classified the market as RANGING or VOLATILE and widened defensively. Knowing the current regime helps set expectations for how the band will behave if conditions stay the same.
✅ Use the confidence count to gauge flip quality, not to filter flips — every flip is real and non-repainting regardless of its confidence count. The count is a lens for judging how broadly supported a given flip is, not a gate that decides whether one occurs. A "▲ 7/8" flip and a "▲ 3/8" flip both mean the band was crossed; the number tells you how much independent agreement existed at that moment, which is useful context when deciding how much weight to put on that particular signal versus your own analysis.
🎯 Watch the flip win rate as a running self-check on this chart — because it only starts once flips have accumulated and been graded, treat an early or low-sample win rate as inconclusive rather than a verdict. It becomes more informative the longer the script runs on a given symbol and timeframe.
🔔 Regime changes are themselves informative — the alert for a regime change fires independently of any flip. A shift from RANGING to TRENDING, for example, can be useful context on its own, since it signals the band is about to glide toward a different multiplier even before any flip occurs.
🚫 This script describes band behavior, not entries or exits — it does not tell you when to open or close a position. Use it as one input alongside price action, structure, and whatever other analysis you already rely on.
⚙️ SETTINGS
📈 SuperTrend Core
• ATR Length
• Factor — Trending / Ranging / Volatile / Uncertain — the four regime-driven multipliers
• Factor Transition (bars) — how gradually the multiplier glides between regimes
🧠 Regime Engine
• ADX Length, Choppiness Length, ATR Baseline Period
• Trending / Ranging Thresholds — where the combined ADX+Choppiness score is classified
• Volatile ATR Multiple — how far above baseline ATR counts as volatility expansion
• Regime Smoothing — lookback window for the majority-vote smoothing
✅ Confidence Layer
• Trend MA Length, RSI Length, Structure Lookback — parameters for the 8 confidence checks
🎨 Visualization
• Gradient Fill, Flip Labels, Regime Background Tint — each toggleable independently
• Full color customization for all four regime/direction colors
🖥️ Dashboard
• Show/hide, position
📝 NOTES
The regime engine needs a short warm-up period before its smoothing window is fully populated; early bars on a fresh chart may show less stable regime labels than bars further along. The flip win rate starts empty and only becomes meaningful after several flips have occurred and been graded.
⚠️ DISCLAIMER
This is an analytical and visualization tool. It does not generate trade signals and does not constitute financial advice. Historical flip win rate does not guarantee future performance. Indicator

Hourly Liquidity Clock HOD/LOD Probability Map (AlgoForex) Most intraday tools tell you WHERE price may react. This one tells you WHEN.
Hourly Liquidity Clock builds a rolling statistical profile of the trading day
for the symbol you have open, and answers three questions:
• Which hour of the day most often contains the DAILY HIGH?
• Which hour most often contains the DAILY LOW?
• Which hour carries the largest average range?
── HOW IT WORKS ──────────────────────────────────────────────
For every completed day inside the lookback window (default 60 days) the script
records the hour in which the daily high and the daily low were printed, in the
timezone you select. Those counts are converted into a percentage of days.
In parallel it aggregates each clock hour independently: average high-to-low
range, and the share of hours that closed above their open (directional bias).
The three hours with the highest combined HOD + LOD count are labelled Power
Hours and tinted on the chart, so you can see at a glance whether the current
candle sits inside a historically decisive window or inside dead time.
Session ranges are drawn on top of this: Asia, London and New York boxes with
their high and low projected forward. When a projected level is traded through,
the level stops extending and a sweep marker is printed.
── HOW TO READ IT ────────────────────────────────────────────
HOD% column — share of days whose high formed in that hour. Brighter = higher.
LOD% column — share of days whose low formed in that hour.
BIAS column — green above 55%, red below 45%, neutral in between.
RANGE column — average range of that hour, in symbol price units.
A hour with a high HOD% and a low LOD% is a hour that historically completes
upside expansion. The mirror case marks downside expansion. Hours with low
values in both columns are consolidation windows.
── SETTINGS ──────────────────────────────────────────────────
Timezone — set this to your broker or server time so the hours match
the clock you actually trade on. Everything reprints.
Lookback (days) — 60 is a balance between sample size and adaptation.
Raise it for stable instruments, lower it after a regime
change.
Power Hours — how many hours are highlighted.
Sessions — three fully editable windows, name, time and colour.
Sweeps — markers and alert() calls on session high/low takes.
── NOTES ─────────────────────────────────────────────────────
Use a 1H timeframe or lower. On 4H and above an hour cannot be resolved and the
table will warn you.
The statistics need history. Give the chart enough bars for the lookback window
to fill, otherwise the sample is too small to read.
This is a timing and context tool. It produces no entries, no exits and no
buy/sell signals, and past hourly distributions do not guarantee future ones.
Nothing here is financial advice. Indicator

Regime Quadrant Map [XWiseTrade]Most "regime" indicators sort the market into two boxes: trending or ranging. But that single axis hides the variable that actually decides whether a trend is tradeable - volatility. A market drifting up in dead-calm conditions and a market ripping up in violent conditions are both "trending," yet they demand opposite tactics. Collapsing them into one label is why so many trend filters fail exactly when you lean on them. This indicator separates the two questions that a one-dimensional filter fuses together, and maps the result onto four regimes instead of two.
WHY VOLATILITY IS MEASURED AS AN ATR Z-SCORE, NOT RAW ATR
Raw ATR tells you nothing on its own - an ATR of 15 is enormous on one instrument and trivial on another, and huge in one era and small in the next. What matters is whether volatility is unusually high or low relative to this market's own recent behaviour. So ATR here is ranked against its own distribution over a lookback window and expressed as a Z-score: how many standard deviations above or below its own norm current volatility sits. That makes the reading self-referential and comparable across any symbol or timeframe, instead of an absolute number you'd have to re-learn for every chart.
WHY TREND IS MEASURED WITH EFFICIENCY RATIO, NOT A MOVING-AVERAGE SLOPE
A rising moving average tells you price is higher than it was - it does not tell you how price got there. Efficiency Ratio does: it divides the net directional move by the total distance price actually travelled to make it. A value near 1 means a clean, purposeful move; near 0 means price thrashed back and forth to end up in nearly the same place. Two charts with an identical slope can have completely different efficiency, and that difference - not the slope - is what separates a trend you can ride from a trap. Slope measures result; Efficiency Ratio measures quality.
THE FOUR QUADRANTS
Crossing the two axes gives four regimes, each with a distinct character:
- GRIND (trending + low volatility) - a steady, efficient directional move; the kind you can lean into.
- EXPANSION (trending + high volatility) - a violent directional move; momentum conditions, wider risk.
- COIL (ranging + low volatility) - compression; energy building, often ahead of a breakout.
- CHOP (ranging + high volatility) - whipsaw with no follow-through; the regime most accounts quietly bleed in.
HOW TO USE IT
Watch the regime label and background tint for the current quadrant, or read the two plotted lines directly against their dashed thresholds - the ATR Z-score line for the volatility axis, the Efficiency Ratio line for the trend axis. Both thresholds and both lookbacks are adjustable, so you can set what counts as "high volatility" or "trending" for your own instrument and timeframe. An alert fires whenever the market crosses into a new quadrant, so you don't have to watch it to know the regime shifted.
WHAT MAKES IT DIFFERENT
Standard regime tools reduce the market to a single trend-versus-range line and treat volatility as an afterthought. This one builds regime from two independent axes, measures volatility as a self-referential Z-score rather than an absolute number, measures trend by path efficiency rather than slope, and resolves the market into four actionable states instead of two - because "trending" alone was never enough to decide how to trade it.
These are descriptive regime classifications for discretionary use, not buy/sell signals. Indicator

AQR Momentum Factor [JOAT]AQR MOMENTUM FACTOR
A tribute to AQR Capital Management's seminal momentum-factor research — including Asness's classic "Value and Momentum Everywhere" framework. The script estimates cross-horizon momentum by ranking returns across five independent look-back horizons (default 1, 5, 20, 60, 120 bars — including the AQR-canonical 12-1 month equivalent), volatility-adjusting the result, and producing a composite momentum score in that fires Buy / Sell labels when the score crosses configurable thresholds.
Why cross-horizon ranking
A single momentum lookback is fragile. AQR's published research (Asness, Moskowitz, Pedersen, and others) shows that momentum is best estimated by agreement across horizons — when short-, medium-, and long-term momentum all point the same way, the signal is much more reliable than any single horizon alone. The script encodes that directly:
Five horizons — 1 / 5 / 20 / 60 / 120 bars by default (configurable independently).
At each horizon the return is percentile-ranked against its own trailing 252-bar (trading year) distribution.
The five percentile ranks are mapped from to (50% → 0; 100% → +1; 0% → −1).
The composite is the average of the five mapped ranks.
The output is bounded in and represents how unusual current momentum is relative to its own recent history, averaged across timeframes .
Volatility adjustment (optional but on by default)
The composite is divided by a volatility Z-score over a configurable window (default 60 bars), clamped at a Z cap (default 2.5) to avoid division-by-zero blow-ups. This dampens signals during high-volatility regimes — which is what AQR's "low-vol momentum" research finds is the genuinely tradeable component of the factor.
When vol-adjustment is off, the score is raw cross-horizon momentum. When it is on, the score is risk-adjusted momentum, which is the institutional read.
Signal engine
BUY — composite > buy threshold (default +0.70 → top ~15% across horizons).
SELL — composite < sell threshold (default −0.70).
Extreme High / Low alerts — composite > +0.90 / < −0.90. The script's strongest reads.
A configurable Min Bars Between Same-Side Signals (default 5) prevents clustering. A confirm-on-close toggle (default ON) ensures non-repaint signals.
Bar colouring — strict 2-hue discipline
The chart bars are coloured by the sign of the composite, with saturation proportional to magnitude. The "Bar Color Saturation Floor" input controls how aggressively the colour fades when momentum is weak — at 0 the bars are always full colour; at 1 they fade toward background when momentum is weak. The defaults (0.65) produce a clean institutional read where strong-momentum bars stand out and weak-momentum bars merge into the background.
A hidden composite-line plot (toggleable) opens a pane below the chart for users who want to see the score itself, or feed it to Data Window / webhook automation.
Visual system
Buy / Sell labels on threshold crosses (configurable size).
Bar colouring by signed momentum with saturation floor.
Hidden composite line (toggleable, pane).
Light regime background (off by default) — very subtle bgcolor sampled from bull/bear.
A locked Golden Blaze palette: gold bull / oxblood bear / off-white neutral on a dark-slate ground — the classic AQR institutional aesthetic. Strict 3-hue discipline + bg.
Dashboard
Monospaced table positionable to any of nine corners. Surfaces:
Composite score with signed value.
Per-horizon percentile ranks (h1 / h2 / h3 / h4 / h5).
Horizon agreement count (how many horizons agree with the composite sign).
Volatility Z value and adjustment factor in use.
Last signal direction with bars-ago.
Configuration: rank window, vol window, thresholds.
Alerts
Four alert conditions, each independently controllable:
BUY (composite crosses above buy threshold)
SELL (composite crosses below sell threshold)
Extreme Score (|composite| crosses extreme high or low)
Horizon Disagreement (off by default) — fires when horizons split (~half above 50%, half below). Useful as a "no edge" warning.
How to read it
Three reads, in order of conviction:
Extreme score with full horizon agreement — the highest-conviction read. All five horizons agree, the score is in the top 10% / bottom 10% of its own distribution, and vol-adjustment has not damped it. This is the institutional setup.
Buy / Sell with vol-adjustment active in a low-vol regime — the "low-vol momentum" setup AQR's research identifies as the strongest factor exposure. Pair with a directional execution tool.
Horizon disagreement alert — stand-aside signal. Some horizons say bull, some say bear; there is no momentum factor exposure available. Wait for agreement to return.
Suggested settings
Defaults (horizons 1/5/20/60/120, rank window 252, vol window 60, vol Z cap 2.5, ±0.70 thresholds, ±0.90 extreme) are tuned for daily charts on broad indices — the timeframes where momentum factor exposures are statistically most meaningful. For lower timeframes drop all horizons proportionally (1/5/15/30/60) and the rank window to 200. For weekly+ keep defaults; momentum on weekly is the canonical factor.
Originality / what's reused
The momentum factor is published academic finance — Jegadeesh & Titman 1993, Asness 1994, AQR's "Value and Momentum Everywhere" 2013. The 252-bar / one-year ranking window is the classical institutional convention. The implementation here — the five-horizon configurable engine, the ta.percentrank -based ranking pipeline, the linear remap, the volatility-Z adjustment with clamp, the saturation-floored bar-colouring with strict 2-hue discipline, the horizon-disagreement alert logic, and the AQR Golden Blaze palette — is JOAT-original. No third-party code reused. The script is a tribute to AQR's published methodology, not a direct replication of any proprietary AQR model.
Open source
Published open-source under the default Mozilla Public License 2.0. The horizon pipeline, the ranking engine, the vol-adjustment routine, the signal engine, and the dashboard are isolated modules. Forks welcome with credit.
Limitations
The 252-bar ranking window assumes a daily chart for the "trading year" interpretation; on lower timeframes the window represents a different real-world horizon. The momentum factor is well-documented historically but, like all factor exposures, it can underperform for extended periods — the dashboard's horizon-agreement count is the script's own early warning when the factor is breaking down. Vol-adjustment is on by default because it is statistically supported; turn it off only for research.
—
-made with passion by jackofalltrades
Indicator

Advanced Volatility1. Normalized ATR (%) - The Blue Line
What it is: The standard Average True Range (ATR) divided by the current closing price.
Why it matters: It tells you exactly what percentage the asset moves on an average bar. If the nATR is 2.0%, you know the asset swings roughly 2% per candle. This is incredibly useful for setting dynamic stop losses and take profits that scale mathematically with the asset's price, rather than guessing arbitrary dollar amounts.
2. BB Width (%) - The Orange Line
What it is: The distance between the Upper and Lower Bollinger Bands, divided by the Middle Band.
Why it matters: This acts as a highly effective "Squeeze" proxy. Volatility is cyclical; it contracts, then it expands. When you see the Orange line drop to extremely low historical levels, it means the Bollinger Bands are pinching tight. This contraction indicates that energy is building up, and a massive breakout/expansion move is imminent.
3. Historical Volatility (%) - The Fuchsia Line
What it is: A strict statistical calculation heavily used in options pricing (often referred to as HV or Realized Volatility). It calculates the standard deviation of logarithmic returns over a period, and annualizes it (multiplying by √252 trading days).
Why it matters: It gives you the "true" statistical variance of the asset. A rising Fuchsia line means the market is becoming highly chaotic and unpredictable, while a falling line means the market is returning to a stable, directional grind.
By layering all three of these metrics on one panel, you can easily spot when a market has compressed to zero (all lines dropping near the Zero Base) right before a massive trend erupts! Indicator

Indicator

Gabremoku CloudsGabremoku Clouds is a volume-driven equilibrium cloud built to highlight fair-value zones, directional acceptance, and compression/expansion phases in a cleaner and more forward-looking way than traditional cloud indicators. Instead of using classic Ichimoku spans or standard deviation bands, this script builds its structure around a custom volume-weighted equilibrium line and a surrounding cloud whose width is based on Volume-Weighted Average Spread (VWAS). The result is a cloud that reacts not only to price movement, but also to how price is distributed under volume, making it useful for reading consensus, imbalance, and market acceptance.
A key idea behind this indicator is that not all price movement has the same meaning. When volume concentrates inside a tighter range, the cloud compresses and signals balance or consensus. When price expands with broader spread and weaker concentration, the cloud widens and reflects uncertainty or directional transition. This gives the indicator a different purpose from standard volatility envelopes: it is designed less as a generic overbought/oversold tool and more as a market structure and equilibrium map.
The script also includes a 26-period forward projection of the equilibrium cloud. This projected area is calculated from current and historical information only, then shifted forward visually to provide a future reference zone without using lookahead logic. Its purpose is not to predict price in an absolute sense, but to suggest where balance may migrate next if the current slope and cloud conditions remain consistent.
What it helps identify
Trend acceptance when price holds above or below the cloud with supporting volume.
Fair-value reclaims when price rotates back into equilibrium after displacement.
Squeeze-to-expansion transitions when the cloud compresses and then releases into directional movement.
Exhaustion when price reaches a fresh extreme while volume momentum decelerates.
How to use it
Use the current cloud to judge whether price is trading in balance, in directional acceptance, or in transition.
Use the projected cloud as a forward reference area for continuation, reversion, or future balance.
Treat the signals as contextual tools, not standalone trade instructions. They work best when combined with price structure, market context, and risk management.
What is new
Gabremoku Clouds is not a mashup of existing tools. Its core logic is built around a custom equilibrium model that combines volume-weighted price location with volume-weighted spread behavior, then extends that structure into a forward cloud projection. The goal is to give traders a more informative cloud: one that reflects where value is forming now, how stable that value is, and where it may shift next. Indicator

Market Cycle Wave [Gabremoku]Market Cycle Wave is a price-based cycle indicator built to map broad market phases into a readable oscillator and a price-anchored overlay.
Instead of relying on a single signal, the script combines trend, momentum, volatility, and range-position data into a composite cycle score. That score is normalized and smoothed to create an intermediate Cycle Wave, while a slower Secular line provides broader context.
The script has two main views:
- an oscillator pane with the score histogram, Cycle Wave, Secular baseline, and major Cycle Peak / Cycle Trough labels.
- a price overlay with a cycle line, gradient aura, and a thinner secular context line.
The regime model classifies market conditions into Debt Accumulation, Deleveraging, Reflation, and Transition. The goal is not to generate standalone buy/sell signals, but to help traders read where price may sit inside a broader market cycle structure.
How to use it
This indicator works best on broad indices and diversified equity ETFs, where cycle behavior is usually cleaner than on highly erratic single names.
Typical use:
- Daily chart: monitor intermediate cycle shifts
- Weekly chart: study broader regime transitions
Practical reading:
- A rising blue cycle wave can suggest constructive expansion conditions
- A yellow rollover after a mature advance can suggest a weakening cycle structure
- Deep negative readings followed by green recovery can suggest reflation or post-stress repair
- The secular line helps show whether the shorter cycle is moving with or against the broader backdrop
The dashboard summarizes the current regime, state, direction, score, risk posture, and color legend directly on the chart.
How it works
The cycle model uses eight price-based factors:
- Fast EMA vs slow EMA relationship
- Fast EMA slope
- RSI momentum regime
- RSI extremes
- Position inside the rolling yearly range
- Distance from yearly extremes
- ATR volatility regime
- Price position vs the slow EMA
Each factor contributes to a composite score. That score is then normalized, smoothed, and accumulated over a rolling memory window to build a bounded cycle wave around a midpoint.
A second and slower baseline is built through longer smoothing to represent secular context. This creates two distinct layers:
- Cycle Wave: the intermediate cycle, more reactive to market swings
- Secular Baseline: the broader context, slower and less sensitive
Recent Cycle Peak and Cycle Trough labels are pivot-based, so the latest labels need confirmation from future bars. Indicator

Smart Trend Flow Pro [MarkitTick]💡 Navigating modern market structures requires a robust mechanism capable of filtering out transient noise while capturing the dominant directional vectors. The Smart Trend Flow pro is an advanced analytical framework designed to dynamically track market momentum and volatility, transforming complex price action into a highly readable, visual heatmap. By synthesizing trend identification with continuous volatility scaling, this tool aims to provide clarity in both ranging environments and high-expansion phases, allowing for more structured and disciplined market analysis.
✨ Originality and Utility
● A Paradigm Shift in Trend Visualization
Traditional channel-based indicators often suffer from severe lag or become entirely unreadable during periods of intense market contraction. The utility of this script lies in its adaptive ability to map structural boundaries and instantly correlate them with localized market energy. By discarding static thresholds in favor of a dynamic, self-adjusting baseline, the tool presents a unified view of both direction and conviction.
● Beyond Binary Signals
Standard indicators frequently rely on binary conditions—such as a simple moving average crossover—which ignore the underlying volatility context. This script pioneers a synthesized approach where the strength of a trend is continuously evaluated against its own historical variance. This allows users to visually differentiate between a low-conviction drift and a highly energized breakout, providing a much richer context for potential trade management and risk assessment.
🔬 Methodology and Concepts
● Dynamic Boundary Engine
At the core of the script is a reactive boundary detection mechanism. Rather than projecting fixed bands, the engine establishes fluid upper and lower parameters based on recent localized extremes. These boundaries can be structurally smoothed using various adaptive algorithms, effectively tuning the sensitivity of the channel to match the specific rhythm of the asset being analyzed.
● Volatility Normalization Process
To accurately gauge market energy, the framework continuously measures the distance between the established boundaries. This raw measurement is then subjected to a rigorous statistical normalization process. By evaluating current fluctuations against a rolling historical baseline, the engine maps the resulting variance onto a bounded curvilinear scale. This abstract transformation isolates the pure kinetic energy of the market, stripping away absolute price dependencies to provide a standardized metric of volatility expansion and contraction.
● Integrated State Tracking
The logical engine monitors the interaction between the closing prices and the smoothed boundary parameters. A structural shift is recognized only when price definitively breaches and sustains its position relative to these dynamic thresholds. This state-tracking ensures that the primary directional bias is maintained until a statistically significant reversal occurs, minimizing false positives during minor retracements.
🎨 Visual Guide
● Color-Coded Heatmap Candles
The primary visual feature is the complete transformation of the standard candlestick chart into a continuous heatmap. The colors directly correspond to the synchronized output of the trend direction and the normalized volatility metric.
Bullish Gradients: When the market establishes an upward bias, the candles transition through a cool-to-hot spectrum. Deep, cold colors represent low-volatility accumulation phases, while bright, hot neon colors signify intense, high-volatility bullish expansion.
Bearish Gradients: Conversely, downward structural shifts are mapped using a separate color spectrum. Dark, muted tones indicate slow, grinding bearish action, whereas vivid, hot colors highlight rapid, high-volatility sell-offs.
Neutral States: When the price resides within the core boundary parameters, demonstrating no clear directional dominance, the candles default to a flat, neutral gray to reduce visual noise.
● Signal Markers
Buy Labels: Distinct markers appear precisely below the price action when the engine confirms a definitive upward structural breach.
Sell Labels: Clear markers are printed above the price action upon the confirmation of a downward structural breach.
📖 How to Use
● Interpreting the Heatmap
The most effective way to utilize this tool is to read the candle colors as a topographical map of market energy. A transition from a neutral state into a cold bullish or bearish color suggests the early formation of a trend. As the colors heat up and transition toward their neon extremes, it confirms that the directional move is being supported by expanding volatility, which often characterizes the most robust phase of a trend.
● Managing Trend Exhaustion
Traders can monitor the intensity of the heatmap to gauge potential momentum decay. If a strong trend has been characterized by hot, neon colors, a gradual cooling off—where the colors revert to darker, colder shades—may indicate that the localized volatility is subsiding, suggesting potential consolidation or a pending structural shift.
● Confirming Breakouts
The printed Buy and Sell labels serve as structural confirmation points. These markers are best utilized not in isolation, but in confluence with the heatmap. A signal label accompanied by an immediate transition into a high-volatility color spectrum carries significantly more analytical weight than a signal that remains mired in a cold or neutral visual state.
⚙️ Inputs and Settings
● Channel Settings
Channel Length: Determines the primary lookback window for establishing the core upper and lower boundaries. Increasing this value creates a wider, slower-moving channel, while decreasing it makes the system highly sensitive to recent price action.
Channel MA Type: Allows the user to apply different smoothing algorithms to the boundaries. Options range from the standard baseline to advanced weighting methods, providing precise control over signal reactivity.
● Analytics Settings
Squeeze/Z-Score Length: Defines the historical window used to evaluate the relative volatility. A longer length provides a smoother, more macro-level volatility assessment, while a shorter length makes the heatmap highly reactive to sudden micro-expansions.
● Candle Heatmap Settings
Bullish/Bearish Color Controls: Fully customizable inputs allowing the user to define the exact hex values for the cold and hot extremes of both the bullish and bearish spectrums.
Neutral Market Base: The default color applied when the market is bound within the channel without a confirmed directional state.
● Signal Settings
Label Colors: Configurable color selections for the printed Buy and Sell confirmation markers.
🔍 Deconstruction of the Underlying Scientific and Academic Framework
● Topological Price Mapping
At a fundamental level, the script treats financial time-series data not as discrete data points, but as a continuous topological surface. By evaluating the highest and lowest ranges over a specified temporal window, it effectively creates a rolling bounding box that encapsulates the probable distribution of future price vectors. The application of sophisticated moving average algorithms to these boundaries acts as a low-pass filter, mathematically attenuating high-frequency noise and exposing the true underlying macroeconomic drift.
● Non-Linear Variance Scaling
The most complex aspect of the engine is its approach to variance. Standard deviation on its own is an unbounded metric, making it difficult to utilize in a standardized visual format. The script solves this by isolating the width of the bounding box and comparing it against its own moving average and standard deviation. This transforms the raw width into a standardized probabilistic metric.
● The Sigmoidal Activation Function
To achieve the seamless visual gradient, this standardized variance must be mapped onto a finite plane. The engine employs a logistic function—specifically, a sigmoidal activation curve—to compress the unbounded variance data strictly between a 0 and 100 scale. This non-linear mapping ensures that the visual heatmap remains highly sensitive to subtle shifts around the mean, while gracefully asymptotically compressing extreme, outlier volatility spikes, thereby maintaining absolute visual coherence regardless of the asset's inherent behavior.
⚠️ 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. Indicator

Indicator

Helios Volatility Forecast [JOAT]Helios Volatility Forecast
Helios Volatility Forecast is a Yang-Zhang volatility estimator with regime classification, a volatility cone (historical percentile bands), an HMA-smoothed forecast line, and a position-size suggestion. Volatility is classified into four regimes (LOW / NORMAL / ELEVATED / EXTREME) by percentile rank against its own history. Cross-pane elements paint a soft regime tint and a position-multiplier suggestion onto the price chart.
What makes it different
Most volatility indicators use a simple close-to-close standard deviation, which discards intraday range information and ignores overnight gaps. The Yang-Zhang estimator combines four components — overnight close-to-open variance, intraday open-to-close variance, and a Rogers-Satchell range term — into a single estimator that is more accurate than close-to-close for instruments that gap.
A 4-band volatility cone (5th, 25th, 50th, 75th, 95th percentile of the past 100 bars) is plotted around the current volatility, with gradient fills bracketing tails and the interquartile range.
A 4-regime classifier (LOW / NORMAL / ELEVATED / EXTREME by percentile thresholds at 25, 65, 90) drives a cross-pane tint on the price chart and a numeric position-size multiplier suggestion. The suggestion scales inversely with realized vol — wider sizes in low-vol regimes, halved sizes in extreme-vol regimes.
An HMA forecast line projects the smoothed vol trajectory ahead. Forecast-crossing-realized alerts fire when expansion or contraction is imminent.
How it works
Yang-Zhang formula combines overnight return, intraday return, and Rogers-Satchell range term, weighted by k = 0.34 / (1.34 + (len + 1) / (len - 1)).
Percentile rank of sigma_yz over a 100-bar history equals vol_pct.
Regime classification: LOW below 25, NORMAL 25 to 65, ELEVATED 65 to 90, EXTREME above 90.
HMA of sigma_yz equals the forecast. Forecast direction equals the sign of (forecast minus current).
Position-size multiplier equals clamp(1.5 minus vol_pct / 100, 0.3, 1.5).
Vol-of-vol (stdev of recent realized vol) feeds a regime stickiness indicator.
Reading the chart
In-pane : regime-tinted volatility line (vivid mint for LOW, neutral white for NORMAL, amber for ELEVATED, vivid red for EXTREME), HMA forecast line with direction-color flow, five vol-cone percentile lines.
Cross-pane : soft regime tint background on the price chart, plus a Size x0.50 EXTREME vol label updating each bar.
A vol-of-vol panel as a sub-strip at the top of the pane.
Five right-edge cone percentile labels (p5 / p25 / p50 / p75 / p95).
A current-vol percentile rank label.
Regime change timeline labels on the price chart at each regime transition.
Cross-pane vol-cone touch markers when vol crosses p95 (breakout) or p5 (contraction).
A regime stickiness indicator (how long the regime has been in its current state).
Forward expected-range lines on the price chart (close plus or minus forecast times ATR scalar).
Signals
Regime up / down (any percentile-bucket transition)
Extreme vol entry
Low vol entry
Vol breakout (sigma crosses above p95 of its own history)
Vol contract (sigma crosses below p5)
Vol Z-shock up / down (when vol z-score exceeds plus or minus 2)
Forecast cross up / down (forecast vs realized)
All gated on barstate.isconfirmed or barstate.ishistory. No future references. No lookahead_on.
Inputs
Volatility : Yang-Zhang window, regime percentile lookback, forecast HMA length.
Visual : bullish (low vol) color, bearish (extreme vol) color, elevated (amber) color, cone toggle, forecast toggle, cross-pane candles toggle, regime pulse toggle.
Dashboard : position, size.
How traders use this
Position sizing : scale entries inversely with the regime. Full size in LOW, default in NORMAL, half in ELEVATED, third in EXTREME. The multiplier label provides the suggested factor.
Volatility breakouts : vol crossing above p95 historically precedes large directional moves. Tighten trailing stops or reduce holding time.
Volatility contraction : vol crossing below p5 historically precedes range / chop. Reduce directional bias. Consider mean-reversion strategies.
Regime-aware stops : in ELEVATED or EXTREME regimes, ATR-based stops should be wider. In LOW regimes, tighter. The pos-mult label codifies this implicitly.
Limitations
Yang-Zhang assumes log-normal returns and lognormality breaks down during fat-tail events (it under-estimates vol in true crash regimes).
Percentile classification needs sufficient history. The default 100-bar lookback can be lengthened for stable instruments.
The position-size multiplier is a heuristic, not a portfolio-management recommendation. Combine with your own risk-management framework.
The HMA forecast lags slightly behind real-time changes. Treat as smoothed trend, not pinpoint prediction.
Compatibility
Pine Script v6 open-source indicator (pane plus cross-pane). Any symbol, any timeframe. Cross-pane elements use force_overlay=true. No request.security calls.
Defaults
20-bar Yang-Zhang window, 100-bar regime lookback, 5-bar HMA forecast, mint / red / amber palette, top-right medium dashboard.
Credits
Yang-Zhang estimator from D. Yang and Q. Zhang, Drift-Independent Volatility Estimation Based on High, Low, Open, and Close Prices , Journal of Business (2000).
Indicator

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

Indicator

Bollinger Bands Breakout Oscillator
A Bollinger-style volatility oscillator that measures bullish and bearish breakout pressure when price expands beyond the upper or lower band.
Bollinger Breakout Pressure Oscillator is a momentum and volatility-based oscillator designed to measure bullish and bearish pressure outside a Bollinger-style volatility envelope.
The indicator uses an EMA as the central baseline and calculates upper and lower bands using standard deviation. Instead of simply showing whether price is above or below the bands, it measures how much price has expanded beyond the upper or lower band over a selected lookback period.
Bullish pressure is calculated when price pushes above the upper band.
Bearish pressure is calculated when price pushes below the lower band.
The result is displayed as two separate oscillator readings:
- Bullish Breakout Pressure
- Bearish Breakout Pressure
A higher bullish reading suggests stronger upside expansion beyond the upper volatility band.
A higher bearish reading suggests stronger downside expansion beyond the lower volatility band.
The midline at 50 can be used as a reference zone to evaluate whether breakout pressure is becoming more significant.
This tool can help traders identify:
- Volatility expansion
- Bullish breakout pressure
- Bearish breakout pressure
- Momentum continuation
- Exhaustion after strong moves
- Directional imbalance outside the bands
Best used with price action, volume, VWAP, support and resistance, session structure, or trend filters. This indicator is not designed to predict reversals or guarantee breakout continuation. It should be used as a pressure-reading tool, not as a standalone trading system.
How it works:
The indicator builds a volatility envelope using an EMA baseline and standard deviation bands. It then compares price against the upper and lower bands over the selected lookback period.
When price moves above the upper band, bullish breakout pressure increases.
When price moves below the lower band, bearish breakout pressure increases.
The oscillator normalizes this pressure into a percentage-style reading, making it easier to compare breakout strength across different market conditions.
Inputs:
Length:
Controls the lookback period used for the EMA, standard deviation, and pressure calculation.
Multiplier:
Controls the width of the volatility bands. Higher values create wider bands and require stronger movement to register breakout pressure.
Source:
Defines the price source used in the calculation.
Bullish Color:
Sets the color for bullish breakout pressure.
Bearish Color:
Sets the color for bearish breakout pressure.
Limitations:
- Strong readings may appear after a move is already extended.
- Low readings do not always mean the market is inactive.
- The oscillator does not provide automatic entries, exits, stop loss, or take profit levels.
- Breakout pressure can fail during fake breakouts or sharp reversals.
- It should be combined with market structure, volume, or trend context. Indicator

Mercator Pressure [JOAT]Mercator Pressure
Introduction
Mercator Pressure is an open-source institutional-style pressure oscillator built to measure directional force using a blended model of candle pressure, close-location behavior, range expansion, optional volume impulse, and volatility-channel context. The goal is to capture not just whether momentum is positive or negative, but how forceful and structurally aligned that movement is.
The problem Mercator Pressure solves is shallow momentum interpretation. Many oscillators react to price movement but fail to distinguish between weak drift, strong displacement, location inside a volatility envelope, and divergence between price and internal force. Mercator Pressure combines those dimensions in one panel and adds confirmed divergence logic, threshold regimes, layered gradients, and a live dashboard.
Core Concepts
1. Weighted Candle Pressure Engine
The core model scores each bar using a weighted blend of body impulse, close location, range expansion, and optional relative volume impulse. This helps the oscillator react differently to high-conviction bars than to passive movement.
2. Volatility-Channel Context Engine
Pressure is not evaluated in isolation. The script also measures where price sits inside an adaptive volatility envelope and uses that context as part of the composite regime model.
3. Composite Regime and Signal Layer
The pressure and context models are blended into a smoothed composite oscillator and signal line. Regime state is then derived from threshold behavior and internal persistence.
4. Confirmed Divergence Detection
Both regular and hidden divergence are supported using pivot-confirmed logic, which keeps the divergence framework more stable than naive visual divergence methods.
5. Institutional Panel Styling
Mercator Pressure uses layered fills, gradient regime cues, restrained optional divergence markers, and a top-right dashboard rather than retail-style arrow spam.
Features
Multi-factor pressure engine: Body, close location, range expansion, and optional relative volume
Volatility envelope context: Internal force is blended with channel position
Composite oscillator and signal line: Regime interpretation is smoother and more stable
Regular and hidden divergence: Pivot-confirmed divergence conditions
Confirmed-bar event gating: Alerts and key events can be evaluated on closed bars
Layered gradient fills: Smooth panel depth instead of harsh histogram clutter
Regime background tint: Visual context in the panel
Top-right dashboard: Live state readout for regime, slope, context, and divergence
Optional divergence markers: Uses professional square and diamond markers, not arrows
Alertconditions: Regime flips, signal crosses, expansions, and divergences
How to Use This Indicator
Step 1: Read the Composite Line Versus Signal
When the composite line is above the signal and above key thresholds, internal pressure is supportive. The opposite applies during bearish pressure.
Step 2: Check Regime State
Use the dashboard and panel tint to determine whether the script sees a bullish, bearish, or neutral pressure regime.
Step 3: Watch Expansion Conditions
Expansion events are stronger than ordinary threshold crosses because they imply pressure is extending into a more forceful state.
Step 4: Use Divergence as Context
Divergence is best used as a warning or contextual signal, not as a blind reversal trigger.
Indicator Limitations
Divergence only confirms after pivots confirm, which introduces natural delay by design
Pressure is a proxy model derived from chart data, not exchange-level order flow
The composite engine is adaptive and may behave differently across very low-volatility versus very high-volatility symbols
This script is best used as a directional-quality filter or context tool, not a standalone trading system
Originality Statement
Mercator Pressure is original in the way it combines weighted candle pressure, volatility-envelope context, regime hysteresis, and pivot-confirmed divergence inside one coordinated panel. Its value comes from force measurement, contextualization, and divergence structure rather than from any one common oscillator formula.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Pressure and divergence readings are derived from historical price and volume behavior and do not guarantee future results.
- Made with passion by jackofalltrades
Indicator

Adaptive Wave Pressure Index [JOAT]Adaptive Wave Pressure Index
Introduction
Adaptive Wave Pressure Index is a normalized slope oscillator built to measure directional pressure through the relationship between regression slope and volatility. By scaling a manually calculated OLS slope with ATR, the script produces a dimensionless momentum reading that can be compared across instruments and timeframes much more cleanly than raw slope alone.
This indicator is designed for traders who want wave pressure, not just speed. It tracks directional force, smooths that force into fast and slow lines, colors the histogram using structural swing context, and adds divergence detection for potential exhaustion.
Why This Indicator Exists
Volatility-Normalized Momentum: Regression slope is scaled by ATR to improve comparability
Fast / Slow Pressure Read: Reveals acceleration and deceleration of directional force
Structure Overlay: Swing-sequence counts add context to histogram strength
Zone Framework: Overbought and oversold thresholds define pressure extremes
Divergence Layer: Flags when price reaches new extremes without matching pressure
Core Components Explained
1. Manual OLS Slope
rawSlope = f_olsSlope(regLength)
The script calculates slope directly from the last N closes rather than relying on a built-in regression shortcut. This provides more control over normalization and display logic.
2. ATR Normalization
normSlope = rawSlope / ta.atr(atrNormPeriod)
Dividing slope by ATR transforms it into a volatility-aware measure of pressure. A positive slope on a low-volatility asset and a positive slope on a high-volatility asset become more comparable after normalization.
3. Fast / Slow Pressure System
Two EMAs are applied to the normalized slope:
Fast Line: More responsive pressure state
Slow Line: More stable reference
Histogram: Spread between fast and slow, showing acceleration or fade
4. Structural Sequence Layer
The indicator also counts consecutive higher lows and lower highs in price. When structure strongly supports the current pressure direction, histogram colors intensify. This adds a valuable distinction between pressure that is statistically rising and pressure that is also structurally confirmed.
5. Divergence and Zone Logic
The script highlights:
Fast-line crosses of overbought and oversold thresholds
Fast/slow line crosses
Bullish and bearish divergences
Divergence lines are retained with a fixed cap so the pane stays readable over time.
Visual Elements
Histogram: Pressure spread with structural-intensity color logic
Fast Line: Main directional read
Slow Line: Reference pressure line
Zero Fill: Directional bias area fill
OB/OS Background: Soft zone shading for extreme pressure
Markers: Crosses and divergence markers
Dashboard: Raw slope, normalized slope, trend, structure sequence, divergence, and active zone
Input Parameters
Regression Length: Window for OLS slope calculation
ATR Norm Period: Volatility baseline used for normalization
Fast / Slow EMA: Pressure responsiveness controls
OB / OS Levels: Extreme pressure thresholds
Pivot Left / Right: Sensitivity for structural and divergence logic
How to Use This Indicator
Step 1: Read whether fast is above or below slow.
Step 2: Check the histogram to see whether pressure is expanding or contracting.
Step 3: Use the sequence readout to judge whether price structure agrees with the oscillator.
Step 4: Treat divergences as warnings that pressure may be weakening.
Step 5: Use OB/OS events to identify stretched pressure, especially after large runs.
Best Practices
Use on instruments with clean swings and sufficient range
Respect signals more when sequence direction agrees with fast/slow direction
Use divergence with structure, not by itself
Increase regression length for smoother wave pressure
Lower lengths react faster but create more noise
Indicator Limitations
Normalized slope improves comparison but does not eliminate market differences
Pressure can stay elevated in strong trends
Divergences can persist before price turns
Short settings increase false transitions
Structure counts are descriptive, not predictive
Technical Implementation
Built in Pine Script v6 using:
Manual OLS slope computation
ATR normalization
Dual-EMA pressure smoothing
Pivot-based structure counting
Capped divergence-line management
Confirmed-bar signal generation
Originality Statement
This indicator is original in the way it combines normalized regression slope, structural sequence intensity, and divergence management into a single wave-pressure framework. Its purpose is not just to show direction, but to show how forceful and how structurally supported that direction is.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Momentum and divergence tools can fail, especially during volatile transitions. Always use proper risk management and independent confirmation.
-Made with passion by officialjackofalltrades
Indicator

Volatility Compression Oscillator [JOAT]Volatility Compression Oscillator
Introduction
Volatility Compression Oscillator is a two-line momentum oscillator that measures where price is trading inside a dynamic volatility envelope, then tracks the compression and release of that positioning through line crosses, histogram rotation, and divergence. It is designed to show when price is quietly loading pressure, when that pressure starts to expand, and when expansion may be exhausting.
This script is useful for traders who want more than a standard bounded oscillator. It combines normalized price location, dual smoothing, histogram analysis, and divergence into one compact pane.
Why This Indicator Exists
Adaptive Normalization: Measures price against a volatility-sensitive envelope instead of a fixed formula
Two-Speed Momentum Read: Uses fast and slow lines to reveal early shifts in pressure
Compression / Release Logic: The histogram shows whether momentum is accelerating or fading
Exhaustion Markers: Histogram peaks and troughs help spot unstable extensions
Divergence Layer: Tracks when price makes a new swing but oscillator pressure does not confirm
Core Components Explained
1. Dynamic Volatility Envelope
offset = avgRange * scale * (1 + avgBody / avgRange)
The script centers the envelope around the candle midpoint average, then expands it with both average range and average body contribution. This makes the oscillator adaptive to both volatility and candle conviction.
2. Normalized Oscillator Calculation
rawOsc = 100 * (close - lowerBand) / bandWidth - 50
Price is transformed into a centered oscillator that measures whether price is trading in the upper or lower half of the active volatility envelope.
3. Dual-Smoothing Engine
The raw oscillator is processed through fast and slow smoothing chains. Their relationship drives the main trend reading:
Fast above slow = bullish pressure
Fast below slow = bearish pressure
Histogram expanding = pressure increasing
Histogram fading = pressure weakening
4. Signal Layers
The indicator produces several distinct signal families:
MA Cross Signals: Momentum handoff between fast and slow lines
OB/OS Crosses: Stretch events when Line 1 crosses the thresholds
Histogram Peaks / Troughs: Local exhaustion cues
Divergences: Price making a stronger swing while oscillator pressure weakens
5. Chart Cleanliness Controls
Divergence lines are retained with an internal cap so the script does not keep drawing indefinitely. This keeps the pane readable and reduces object-limit risk on long-running charts.
Visual Elements
Histogram Columns: Momentum spread between fast and slow lines
Fast Line: Main directional pressure line
Slow Line: Reference trend line
Zero Fill: Directional fill from Line 1 to the centerline
OB/OS Background: Soft shading in stretch conditions
Signal Markers: Circles, triangles, diamonds, and squares for different event types
Dashboard: Trend, line values, histogram value, regime, and divergence state
Input Parameters
Volatility Window: Lookback for midpoint, body, and range normalization
Band Scale %: Width multiplier for the adaptive envelope
OB / OS Levels: Stretch boundaries for Line 1
Line 1 / Line 2 Smoothing: Controls responsiveness of the dual-line engine
Pivot Length: Sensitivity for divergence and histogram turning points
Histogram Peak Levels: Defines stronger exhaustion zones
How to Use This Indicator
Step 1: Determine whether fast is above or below slow.
Step 2: Watch the histogram for acceleration or decay.
Step 3: Use MA crosses for timing only when they occur in sensible zones.
Step 4: Treat OB/OS signals as context for stretch, not automatic reversal commands.
Step 5: Respect divergences most when they align with histogram exhaustion.
Best Practices
Use higher pivot lengths when markets are noisy
Treat histogram turns near extremes as better-quality warnings
Use line crosses in the direction of the higher-timeframe trend
Avoid overreacting to every divergence in strong trends
Keep marker display on only if you actively trade the signal layer
Indicator Limitations
Oscillators can stay overbought or oversold in strong trends
Divergences are warning signs, not standalone trade systems
Short smoothing lengths will create more noise
Compression readings can fail to expand immediately
Signal quality depends heavily on market structure and instrument behavior
Technical Implementation
Built in Pine Script v6 using:
Adaptive volatility-band normalization
Dual-smoothed oscillator lines
Histogram spread calculation
Pivot-based divergence detection
Object-retention caps for divergence lines
Confirmed-bar signal logic
Originality Statement
This indicator is original in how it frames volatility compression and release through normalized envelope location, dual-line momentum, histogram exhaustion, and divergence management in one pane. Its value comes from synthesis and signal layering rather than from any single oscillator component alone.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Oscillator signals can fail, especially in volatile or trendless conditions. Always use proper risk management and independent judgment.
-Made with passion by officialjackofalltrades
Indicator

Adaptive Spectral Bands [JOAT]Adaptive Spectral Bands
Introduction
The Adaptive Spectral Bands indicator is a six-layer Hann Window FIR filter ribbon combined with volatility-adaptive ATR envelopes, a three-state regime classifier, and automated support/resistance zone discovery. The Hann window is a well-known digital signal processing technique that applies a raised cosine weighting function to price data, producing a filter with near-zero overshoot and a steep frequency rolloff. The result is a smoothed trend line that turns earlier at genuine inflection points without the lag spikes characteristic of exponential moving averages.
The core problem this solves: standard moving average ribbons use EMAs or SMAs which introduce phase lag proportional to their length, creating late entries. The Hann FIR ribbon resolves at the mathematically optimal balance between lag reduction and frequency separation — no other common moving average achieves this simultaneously.
Core Concepts
1. Hann Window FIR Filter
The filter applies raised cosine weights across a lookback window. Each weight is computed as:
hannFilt(src, length) =>
float filt = 0.0
float coef = 0.0
for i = 1 to length
float w = 1.0 - math.cos(2 * math.pi * i / (length + 1))
filt += src * w
coef += w
filt / coef
This produces a symmetric bell-shaped kernel. The six ribbon layers use progressively wider copies of this filter (base length, base + spacing, base + 2×spacing, etc.), creating a ribbon that visually encodes trend momentum — wide separations signal strong trends, compression signals consolidation.
2. Volatility-Adaptive ATR Bands
The outer bands expand and contract based on the current volatility percentile rank relative to a lookback period. This is not a fixed-multiplier Bollinger Band — the multiplier itself adapts:
float vol_rank = ta.percentrank(atr_14, i_adapt_len) / 100.0
float dyn_mult = i_base_mult * (1.0 + i_adapt_str * (vol_rank - 0.5) * 2.0)
float upper_band = h0 + dyn_mult * atr_14
float lower_band = h0 - dyn_mult * atr_14
During compression (low ADX, low ATR rank), bands tighten around the central Hann line. During expansion, bands widen, automatically containing breakout candles within the volatility envelope. This eliminates the problem of static bands that produce false breakouts in trending markets.
3. Three-State Volatility Regime Classifier
ADX is used as the regime signal, with two configurable thresholds:
Low Volatility / Compression: ADX below lower threshold. Ribbon layers are tightly stacked. Market is in accumulation or range contraction. Fade-the-band strategies may apply.
Transitional: ADX between thresholds. Directional conviction is building. Ribbon is beginning to separate.
Expansion / Trending: ADX above upper threshold. Ribbon layers are fully separated. Breakout confirmation. Momentum strategies applicable.
The background and candle colors change with regime, providing at-a-glance context without requiring a separate ADX panel.
4. Automated S/R Zone Discovery
When the leading Hann layer crosses the second layer, the local price extreme at that bar is recorded as a support or resistance level. These crossovers mark inflection points where trend direction is shifting — the price level at that bar frequently becomes a structural reference in subsequent sessions:
bool cross_up = ta.crossover(h0, h1)
bool cross_down = ta.crossunder(h0, h1)
if cross_up and bar_index - last_sr_bar >= i_sr_gap
sr_price := low
// create support zone box
Zones are spaced by a minimum bar count to avoid clustering. Old zones are managed by a shift-and-delete array pattern so the chart stays clean.
Features
Six-Layer Hann Ribbon: Progressively wider FIR filters creating a gradient ribbon from fast to slow
Adaptive ATR Bands: Volatility-rank-adjusted envelopes that breathe with market conditions
Three-State Regime Classifier: Low / Transitional / Expansion states with color coding
Auto S/R Zones: Ribbon crossover points recorded as support/resistance boxes with configurable spacing
Candle Coloring: Optional bar tinting by volatility regime (compression blue / expansion amber)
10-Row Dashboard: Displays regime label, ADX value, volatility rank, ribbon direction, band width, active S/R zone count, and more
Alerts: Ribbon crossover bullish, ribbon crossover bearish, regime change to expansion, regime change to compression
Input Parameters
Hann Filter:
Source: Price input for the filter (default: close)
Base Length: Core period of the Hann FIR filter (default: 20, range: 4–500). The six ribbon layers are derived from this.
Ribbon Spacing: Gap between each successive ribbon layer (default: 3). Larger values create a wider, more visible ribbon.
Show Ribbon: Toggle ribbon visibility (default: on)
Adaptive Bands:
Enable Adaptive Bands: Toggle ATR envelope rendering (default: on)
Base Multiplier: Core ATR distance for the bands (default: 2.0)
Volatility Lookback: Period for ATR percentile rank calculation (default: 50)
Adaptation Strength: 0 = fixed multiplier, 1 = maximum volatility adaptation (default: 0.4)
Volatility Regime:
ADX Length: Period for ADX computation (default: 14)
Low Threshold: ADX below this = Compression regime (default: 20)
High Threshold: ADX above this = Expansion regime (default: 35)
S/R Zones:
Auto S/R Zones: Enable ribbon-crossover-based zone discovery (default: on)
Min Zone Spacing: Minimum bar distance between consecutive S/R zones (default: 30)
Visualization:
Bullish / Bearish / Compression / Expansion colors: Fully customizable
Color Candles by Regime: Optional regime-based candle tinting (default: off)
Dashboard:
Position: Top Right, Top Left, Bottom Right, Bottom Left (default: Top Right)
How to Use This Indicator
Step 1: Identify the Regime
The dashboard shows the current regime label (Compression / Transitional / Expansion) and the ADX value. In compression, wait. In expansion, trade. The volatility rank shows where current ATR sits in its historical distribution — above 70th percentile is high volatility.
Step 2: Read the Ribbon Direction
When h0 (fastest layer) is above h1 and h1 above h2, the ribbon is bullish and fully aligned. A crossover of h0 over h1 is the initial signal; a full stack alignment is the confirmation.
Step 3: Respect the Adaptive Bands
Price touching the upper band in expansion often marks a continuation point — the band is expanding to contain the trend. The same touch during compression is a fade signal. The regime state determines which interpretation applies.
Step 4: Trade S/R Zone Retests
When price retraces to a recently discovered S/R zone, look for ribbon alignment in the same direction as the original break. The zone marks where the Hann crossover occurred, which is the most statistically significant structural inflection point available from the ribbon.
Originality Statement
This indicator is original in its combination of Hann Window FIR filter ribbons with adaptive ATR bands and regime-conditioned S/R zone discovery. Its use on PulseWire is justified because:
The Hann FIR filter produces strictly lower phase lag at equivalent frequency cutoff than EMA or DEMA — a mathematically demonstrable property that common Pine implementations do not exploit
Volatility percentile rank as the band multiplier modulator creates self-regulating envelopes that require no manual retuning between high and low volatility periods
Combining ADX regime state with ribbon structure separates directional signals from noise — the same crossover signal carries different weight in compression versus expansion
Auto S/R zone discovery from FIR crossovers creates an objective level-finding method anchored to frequency-domain turning points, not arbitrary pivot lookbacks
Limitations
The Hann FIR filter is a causal, finite impulse response filter — it responds to all price history within its window equally weighted by the cosine kernel. It cannot predict future turning points; it identifies them as they occur.
ADX is a lagging indicator. Regime classification based on ADX will sometimes enter expansion state after the move has partially occurred.
Auto S/R zones are derived from ribbon crossovers, which means they lag the actual price turn by the filter's inherent smoothing delay. Zones mark inflection areas, not exact price pivots.
On very short timeframes (sub-5m), Hann filter smoothing may be excessive relative to the noise level, making regime signals less reliable.
Disclaimer
This indicator is provided for educational and informational purposes only. It does not constitute financial advice or a recommendation to buy or sell any instrument. All trading involves risk of loss. Past performance of structural patterns does not guarantee future results. Always use proper risk management.
-Made with passion by jackofalltrades
Indicator

Volatility Terrain Engine [JOAT]
Volatility Terrain Engine
Introduction
Volatility Terrain Engine is a pane-based oscillator that measures the current volatility regime using the ratio between a fast ATR and a slow ATR, combined with a percentile rank of current volatility within a historical window. The indicator classifies every bar into one of three states — Expansion, Compression, or Transition — and identifies squeeze conditions (volatility compressing well below its average) and expansion bursts (volatility accelerating rapidly). The oscillator, centered at zero, makes it immediately clear whether volatility is expanding or contracting relative to its baseline.
Volatility regime is one of the most underappreciated dimensions of market analysis. A trend-following strategy applied during volatility compression produces poor results because the market is not moving directionally with sufficient energy. A mean-reversion strategy applied during volatility expansion gets stopped out repeatedly because the market is generating outsized moves. Identifying the current volatility terrain before applying any strategy is a prerequisite for selecting the appropriate approach.
Core Concepts
1. Fast/Slow ATR Ratio
The primary oscillator compares a short-period ATR (default 14) against a long-period ATR (default 100). Their ratio, centered at 1.0, is shifted to center at 0.0 by subtracting 1. Values above 0 mean recent volatility is expanding relative to the longer-term baseline; values below 0 mean it is contracting. This ratio is more informative than ATR alone because it provides context — the same ATR value means different things in a historically volatile versus historically calm market.
2. Percentile Rank
The ATR percentile rank answers: where does today's volatility sit within its historical distribution? A 90th percentile reading means volatility is higher than 90% of observations in the lookback period. This is used to classify whether the current environment is historically extreme or within normal parameters.
3. Squeeze and Expansion Burst Detection
A squeeze is defined as fast ATR falling below 82% of slow ATR and also below its own 20-bar average. This double condition filters single-bar dips. A squeeze represents stored energy — the market is coiling. An expansion burst is defined as the ATR ratio exceeding 1.25 with the fast ATR making successive higher values. This marks the initial stages of a volatility explosion.
4. Signal Line and Histogram
The oscillator is triple-processed: EMA of ratio → SMA signal → histogram. The histogram shows the divergence between the oscillator and its signal, providing a leading read on whether volatility momentum is building or fading.
Features
Volatility Regime Oscillator: Gradient-colored histogram bars centered at zero
Squeeze Detection: Dashboard alert and dot marker when squeeze conditions are active
Expansion Burst Markers: Dot markers when volatility breaks out from compression
ATR Percentile Band: Normalized ATR rank plotted as a secondary line
Zone Fills: Expansion and compression zones filled with transparent color
8-Row Dashboard: Regime, ATR values, ratio, percentile rank, squeeze status, oscillator values
Input Parameters
Fast ATR Period: Short-term volatility measurement (default: 14)
Slow ATR Period: Long-term volatility baseline (default: 100)
Percentile Lookback: Historical window for rank calculation (default: 252)
Signal Smoothing: Signal line period (default: 9)
Expansion, Compression, and Transition color inputs
How to Use This Indicator
Compression → Expansion Transition
The most significant signal is when a squeeze resolves into an expansion burst. This represents a volatility state change — the market has been coiling and is now releasing energy. The direction of that release is not predicted by this indicator; it must be determined using price structure and other context.
Oscillator Zero Cross
The oscillator crossing from negative to positive territory indicates that short-term volatility has exceeded the long-term baseline. This is not a trade signal — it is a condition indicator confirming that the market is entering a higher-energy phase.
High Percentile + Expansion
When the oscillator is in expansion territory and the ATR percentile rank is above 80, the market is experiencing historically significant volatility. Stops must be sized accordingly.
Limitations
ATR is backward-looking. Sudden volatility spikes from news events will appear in the oscillator only after those bars close
The squeeze condition uses fixed multipliers (0.82 for the ATR ratio threshold). Markets with different typical volatility profiles may require adjustments to these thresholds
The percentile lookback of 252 bars requires approximately one year of daily data or equivalent for the rank to be historically meaningful. On shorter data sets the rank will be computed on whatever bars are available but will be less statistically robust
This indicator classifies current conditions only. It does not predict when a squeeze will resolve or in which direction
Originality Statement
The dual-ATR ratio approach combined with percentile ranking provides more contextual information than either measure alone. The squeeze detection using a double condition (ratio below threshold and below its own moving average) produces more reliable squeeze identification than a single-condition approach. The four-state histogram coloring (expanding positive, fading positive, expanding negative, fading negative) provides more nuanced momentum information than standard positive/negative coloring.
Disclaimer
This indicator is for educational and informational purposes only. Volatility regime classification does not predict price direction. A squeeze does not guarantee a subsequent expansion, and the direction of any expansion is unknowable from volatility data alone. Always use appropriate risk management.
-Made with passion by officialjackofalltrades
Indicator

Confluence Signal Engine [JOAT]Confluence Signal Engine
Introduction
Most traders encounter a common trap: stacking multiple indicators that all claim to measure something different, yet each one is ultimately derived from the same price data. The result is not confirmation — it is correlated noise presented as agreement. The Confluence Signal Engine was built to address this directly.
This indicator assigns a composite score to the current market condition by evaluating six deliberately chosen dimensions of market behavior. Each dimension is designed to measure a fundamentally different property of price action. When multiple dimensions agree, that agreement carries more weight than any single indicator firing alone. The result is a single, normalised score between -1 and +1, accompanied by a visual confidence meter and a score breakdown table so you can see exactly what is driving the signal.
This is an overlay indicator — it plots directly on the price chart.
---
Core Concepts
The Six Scoring Dimensions
Each dimension returns one of three values: +1 (bullish contribution), -1 (bearish contribution), or 0 (neutral / insufficient data). These are summed and divided by 6.0 to produce the composite score.
D1 — EMA Alignment (Trend Direction)
Compares a fast EMA to a slow EMA. If the fast EMA is above the slow EMA, the trend dimension scores +1. If below, it scores -1. This is the structural backbone — a baseline read on which side of the trend the price currently sits.
D2 — Price Z-Score (Statistical Deviation)
Calculates how many standard deviations the current close is from a baseline EMA. A Z-score below the negative threshold suggests the price has deviated far enough below the mean to be considered statistically stretched — a potential reversion candidate, scored +1. A Z-score above the positive threshold scores -1. This dimension does not measure trend; it measures relative price position against recent statistical norms.
D3 — Volume Pressure (Demand Validation)
Uses a Volume RSI (RSI applied to volume over 8 bars, divided by 50) as a proxy for whether volume activity is elevated. When volume pressure exceeds the threshold, the candle's direction (close vs. open) determines the score: a bullish candle in high-volume conditions scores +1; a bearish candle scores -1. When volume is not elevated, this dimension returns 0, contributing nothing. This prevents volume noise on low-activity bars from polluting the signal.
D4 — RSI Momentum (Momentum Quality)
Evaluates both the current RSI value and its slope. A rising RSI above 50 scores +1 — confirming that momentum is positive and strengthening. A falling RSI below 50 scores -1. This differs from a simple RSI threshold because the slope requirement means momentum must be actively moving in the scored direction, not merely sitting above or below a level.
D5 — Structural Position (Range Placement)
Compares the current close to the midpoint of the highest high and lowest low over a configurable lookback period. Closing above the midpoint scores +1; closing below scores -1. This is a simple but useful structural context: is price holding in the upper or lower half of its recent range?
D6 — Volatility Context (Environment Quality)
Divides a fast ATR by a slow ATR to produce a volatility ratio. A low ratio (calm, contracting volatility) scores +1 — historically a more favorable environment for trend continuation. A high ratio (expanding, elevated volatility) scores -1, flagging that the current environment may be erratic. A ratio between the two thresholds is neutral. This dimension does not predict price direction; it assesses whether current conditions are conducive to acting on the other signals.
---
Composite Score and Confidence
compositeScore = (D1 + D2 + D3 + D4 + D5 + D6) / 6.0
confidence = math.abs(compositeScore) * 100
The composite score ranges from -1.0 (all six dimensions bearish) to +1.0 (all six dimensions bullish). The confidence value is simply the absolute magnitude — a score of ±1.0 represents 100% agreement across all dimensions, while a score near 0 represents disagreement or neutrality.
Signal thresholds:
Score > buy threshold (default 0.3) → bullish signal
Score < sell threshold (default -0.3) → bearish signal
Score > high-confidence threshold (default ±0.6) → high-confidence signal
Signals are gated by barstate.isconfirmed — they only fire on fully closed bars, preventing intra-bar repainting. State tracking also prevents the same directional signal from repeating consecutively without a change in direction first.
---
Visual Components
24-Cell Gradient Confidence Meter
A horizontal bar of 24 cells is displayed at the bottom of the chart. The left side is the bearish extreme, the center is neutral, and the right side is the bullish extreme. The current composite score position is highlighted within the meter, giving a continuous visual read of where the market sits in the conviction range — not just whether a signal has fired, but how strongly.
Score Breakdown Table
A table showing three columns for each dimension: dimension name, dimension number, and its current score (+1, -1, or 0). This allows you to see exactly which dimensions are contributing to the composite and which are neutral or conflicting.
Gradient Bar Coloring
Price bars are colored using a gradient that interpolates from a neutral color toward the signal color, weighted by the absolute value of the composite score. A high-confidence bull signal produces a strong green bar; a low-confidence or mixed signal produces a muted or neutral color. This keeps bar coloring proportional to actual conviction rather than using a binary flip.
---
Features
Six-dimension composite scoring system covering trend, statistics, volume, momentum, structure, and volatility
Composite score normalised to with confidence percentage
Non-repainting: all signals confirmed on bar close via barstate.isconfirmed
State-tracked signals prevent repeated same-direction firing
24-cell gradient confidence meter with continuous position display
Score breakdown table showing each dimension's individual contribution
Gradient bar coloring proportional to conviction level
Configurable thresholds for all six dimensions and signal levels
---
Input Parameters
EMA Fast / Slow (default 21 / 55) — D1 trend alignment
Z-Score Baseline EMA (default 50) — the mean used for Z-score calculation
Z-Score Window (default 50) — standard deviation lookback
Z-Score Threshold (default 1.5) — how many standard deviations trigger the score
Volume RSI Length (default 8) — RSI period applied to volume
Volume Threshold (default 1.2) — Volume RSI / 50 must exceed this to activate D3
RSI Length (default 14) — standard RSI period for D4
Structure Lookback (default 20) — bars used to define the high/low range for D5
ATR Fast / Slow (default 14 / 50) — periods for the volatility ratio in D6
Volatility Thresholds (default 0.8 / 1.5) — low and high boundaries for the ATR ratio
Buy Threshold (default 0.3) — minimum composite score to generate a long signal
Sell Threshold (default -0.3) — maximum composite score to generate a short signal
High-Confidence Threshold (default ±0.6) — score level at which a signal is classified as high-confidence
---
How to Use
Apply to any chart. The overlay paints directly on price bars.
Watch the confidence meter for the current composite score position. A score pressed toward either extreme with multiple dimensions aligned is a higher-quality read than one sitting near center.
Use the score breakdown table to understand why the composite score is what it is. If only 2 of 6 dimensions are contributing, the signal is weaker regardless of whether it crossed the threshold.
High-confidence signals (score beyond ±0.6 by default) indicate that four or more of the six dimensions are in agreement. These can be treated as stronger setups than threshold-level signals.
Combine the composite score read with your own price action, support/resistance, or higher-timeframe context before entering a trade. This indicator is a confluence tool, not a standalone entry system.
If several dimensions are conflicting (score near 0), the market is not in a clear state — no action is the appropriate response.
---
Limitations
No indicator can predict future price. The composite score reflects current market conditions based on recent historical data — not what will happen next.
Z-score and structural position dimensions are mean-reverting in nature, while EMA alignment and RSI momentum are trend-following. In strongly trending markets, D2 and D5 may produce persistent bearish readings even during a healthy uptrend, suppressing the composite score. This is by design — the indicator is more suited to environments where confluence across all dimensions is achievable.
Volume RSI (D3) is only reliable on instruments and timeframes with consistent, meaningful volume data. On synthetic instruments, indices, or very low-timeframe charts, volume data may be unreliable and D3's contribution should be weighted accordingly.
The volatility context dimension (D6) measures the environment , not direction. A low-volatility score of +1 does not mean the market is about to move up — only that conditions are historically more favorable for clean signals.
Signal state tracking prevents consecutive same-direction signals, which reduces noise but also means the indicator will not re-fire during a prolonged trending move. This is a deliberate design choice but should be understood before use.
Default thresholds were chosen for general applicability. Different asset classes, timeframes, and volatility regimes may benefit from threshold adjustment.
Past signal quality on any given instrument does not guarantee future performance.
---
Originality Statement
The core innovation of this indicator is the deliberate selection of six dimensions that measure fundamentally different market properties rather than multiple views of the same property. Standard multi-indicator approaches tend to combine RSI, MACD, and Stochastic — all of which are momentum oscillators derived from price, generating correlated signals that appear independent but are not.
This indicator separates the problem into distinct domains: trend direction (EMA alignment), statistical deviation from the mean (Z-score), demand-side pressure (Volume RSI), momentum quality and direction (RSI slope + level), structural placement within recent range (midpoint comparison), and environmental favorability (ATR ratio). Because these dimensions are largely uncorrelated with each other, genuine multi-dimension agreement represents a qualitatively different kind of confluence than stacking three oscillators. The 24-cell gradient meter goes further — it provides a continuous conviction read rather than a binary signal, treating market condition as a spectrum.
---
Disclaimer
This indicator is provided for educational and informational purposes only. It does not constitute financial advice, investment advice, or a recommendation to buy or sell any security. All trading involves risk, including the possible loss of principal. Past indicator performance does not guarantee future results. Always conduct your own research and consult a qualified financial professional before making any trading decisions.
-Made with passion by officialjackofalltrades
Indicator

Apex Volatility Squeeze & Breakout [Pineify]Apex Volatility Squeeze & Breakout
The Apex Volatility Squeeze & Breakout indicator is a dynamic volatility analysis tool that identifies market compression (squeeze) phases and highlights potential breakout opportunities in real time. Built on the well-established principles of Bollinger Bands and Keltner Channels, this indicator synthesizes both into a single, unified volatility channel with a clear three-state trend system — giving traders an intuitive and actionable view of market volatility conditions on any symbol and timeframe.
Key Features
Unified volatility channel combining Bollinger Band width and Keltner Channel (ATR) threshold
Three-state trend detection: Bullish, Bearish, and Squeeze (consolidation)
Smoothed bands using EMA to reduce noise and false signals
Color-coded volatility cloud with dynamic candle coloring
Built-in Buy and Sell breakout signal labels
Alert conditions for automated trading notifications
Fully customizable parameters for lookback period, multipliers, smoothing, and colors
How It Works
This indicator operates on a core concept: when volatility contracts, a breakout is imminent . Here is how the calculation pipeline works:
A Simple Moving Average (SMA) of the close price is calculated over the user-defined lookback period to establish the basis line.
Standard deviation of price is computed and scaled by a Band Multiplier to determine the upper and lower Bollinger-style volatility bands.
The Average True Range (ATR) is computed over the same period and scaled by a Squeeze Multiplier to establish the Keltner Channel threshold.
A squeeze state is detected when the Bollinger Band width (scaled standard deviation) is less than the Keltner Channel width (scaled ATR) — this means volatility has compressed below normal levels.
Both the upper band, lower band, and basis are smoothed using an Exponential Moving Average (EMA) to produce a clean, noiseless visual channel.
A trend state machine determines the current market phase: Bullish (+1) when price trades above the upper band outside a squeeze, Bearish (-1) when price trades below the lower band outside a squeeze, and Squeeze (0) when volatility is compressed.
Trading Ideas and Insights
The squeeze state is the most critical signal this indicator provides. When the bands contract and the channel turns orange (default squeeze color), the market is consolidating and building energy. Traders should watch closely for the following scenarios:
A bullish breakout occurs when price crosses above the upper smoothed band after a squeeze period, indicating upward momentum.
A bearish breakout occurs when price crosses below the lower smoothed band after a squeeze period, indicating downward momentum.
During the squeeze phase, traders may choose to reduce position sizes and wait for directional confirmation.
The color transition of the volatility cloud — from orange (squeeze) to green (bullish) or red (bearish) — provides a clear visual cue for trend changes.
How Multiple Indicators Work Together
This script merges two complementary volatility methodologies into a single coherent system:
Bollinger Bands (Standard Deviation) measure statistical volatility — how far price deviates from the mean. They expand during volatile markets and contract during quiet markets.
Keltner Channels (ATR) measure range-based volatility — the average true range of price movement. They provide a more stable, less reactive volatility baseline.
By comparing these two measures, the indicator identifies squeeze conditions: when the faster-reacting Bollinger Band width falls below the slower ATR threshold, it signals abnormal compression. This is the classic "squeeze" concept pioneered by John Carter's TTM Squeeze, adapted here with EMA smoothing for cleaner signals.
The EMA smoothing layer is applied on top of the raw bands to eliminate whipsaw noise. This creates a smoother channel that is easier to read and trade, especially on lower timeframes.
The trend state machine ties everything together by classifying the market into three clear phases, which then drive the dynamic coloring of the bands, cloud fill, and candle colors — creating a unified visual experience.
Unique Aspects
Unlike standard squeeze indicators that only display a binary squeeze/no-squeeze state, this indicator provides a full directional trend classification with three states, color-coded across all visual elements.
The EMA-smoothed volatility channel is visually cleaner than traditional Bollinger Bands or Keltner Channels, making it easier to identify trend direction at a glance.
The volatility cloud fill adapts its color in real time based on the current trend state, providing immediate visual feedback on whether the market is trending bullish, bearish, or consolidating.
Candle coloring is also driven by the volatility state, allowing traders to spot trend alignment without needing to inspect the bands directly.
How to Use
Add the indicator to your chart. It overlays directly on the price chart.
Watch for the orange squeeze zone — this indicates low volatility and a potential breakout ahead.
When the channel transitions from orange to green, the market is breaking out bullish. When it turns red, the breakout is bearish.
Use the BUY and SELL labels as entry signals when price escapes the squeeze zone and crosses the smoothed bands.
Set up alerts using the built-in alert conditions ("Bullish Volatility Breakout" and "Bearish Volatility Breakout") to receive notifications without watching the chart.
Combine with volume analysis or momentum oscillators for additional confirmation of breakout strength.
Customization
Lookback Length (default: 20) — The period for calculating the SMA, Standard Deviation, and ATR. Shorter periods make the indicator more reactive; longer periods produce smoother, more reliable signals.
Band Multiplier (StDev) (default: 2.0) — Controls the width of the volatility bands. Higher values create wider bands and fewer breakout signals.
Squeeze Multiplier (ATR) (default: 1.5) — Sets the threshold for squeeze detection. Lower values detect squeezes more aggressively; higher values require stronger compression.
Band Smoothing (default: 5) — The EMA smoothing period applied to the bands. Higher values produce smoother bands with more lag.
Color Settings — Fully customizable colors for bullish, bearish, and squeeze states.
Candle Coloring — Toggle on/off to color candles based on the current volatility trend state.
Conclusion
The Apex Volatility Squeeze & Breakout indicator offers traders a clean, intuitive way to identify low-volatility squeeze conditions and potential breakout points. By fusing Bollinger Band width analysis with Keltner Channel ATR thresholds and applying EMA smoothing, it delivers a unified volatility channel that is both visually elegant and analytically powerful. Whether you trade stocks, forex, crypto, or futures, this tool helps you spot the moments when the market is coiling for its next big move — and positions you to act on it with confidence. Indicator

Integrated Execution System [JOAT]Integrated Execution Strategy System
Introduction
The Integrated Execution Strategy System is a comprehensive open-source trading strategy that combines regime detection, directional bias analysis, momentum filtering, and structural confluence into a unified adaptive trading framework. This strategy is designed for traders who understand that successful trading requires adapting to market conditions and waiting for high-probability setups with multiple layers of confirmation.
Unlike simple strategies that rely on single indicators, this system integrates six distinct analytical layers: Market Regime Classification to avoid unfavorable conditions, Directional Bias Aggregation across multiple timeframes, Momentum Pressure analysis to gauge institutional participation, Structural Analysis for key levels, Volatility Engine for adaptive sizing, and Signal Qualification to ensure only the highest probability setups are taken. The strategy is built on the principle that edges in trading come from the confluence of multiple factors, not from any single signal.
[image [https://www.pulsewire.com/x/NTfmwzgw/
Why This Strategy Exists
This strategy addresses the critical challenge most traders face: adapting to changing market conditions. Most strategies work well in specific market regimes but fail when conditions change. This system solves that problem by:
Regime-Adaptive Logic: Automatically detects trending, ranging, and volatile market conditions and adjusts trading behavior accordingly
Multi-Layer Filtering: Requires confluence across trend, momentum, structure, and volume before entering trades
Institutional-Grade Risk Management: Dynamic position sizing, adaptive stops, and multi-target scaling based on market volatility
Multi-Timeframe Alignment: Confirms signals across higher timeframes to trade with the dominant market flow
Pressure and Flow Analysis: Measures buying/selling pressure to detect institutional participation
Structural Confluence: Identifies key swing levels and liquidity zones for optimal entry positioning
Each component addresses a specific aspect of trading: Regime detection tells us WHEN to trade, bias analysis tells us WHICH direction, momentum confirms the STRENGTH, structure provides the LEVEL, volatility determines the SIZE, and qualification ensures the QUALITY of the setup.
Core Components Explained
1. Market Regime Detection
The strategy classifies markets into four distinct regimes using ADX and ATR analysis:
// Regime classification
if vol_ratio >= i_vol_exp and adx < i_adx_trend
regime := 3 // Volatile
else if adx >= i_adx_trend
regime := 1 // Trending
else if vol_ratio <= i_vol_con
regime := 2 // Ranging
Regime types:
Trending (ADX > 25): Strong directional markets with momentum
Ranging (Low volatility, ADX < 25): Sideways markets suitable for range-bound strategies
Volatile (High volatility, ADX < 25): Chaotic markets where trading is reduced or avoided
Neutral: Transition periods between defined regimes
The strategy automatically reduces position sizing and tightens stops in volatile regimes while increasing size and allowing wider stops in trending regimes.
2. Directional Bias Aggregation
Bias is calculated using multiple indicators weighted by their reliability:
// Composite bias calculation
float bias_score = 0.0
if ma_bullish
bias_score += 30
if price_above_structure
bias_score += 20
if close > ma_trend
bias_score += 20
if plus_di > minus_di
bias_score += 30
Bias components:
Moving Average Relationships: Fast/slow MA alignment for trend direction
Price Position: Where price sits relative to key moving averages
ADX Directional Indicators: +DI vs -DI for momentum confirmation
Multi-Timeframe Alignment: Higher timeframe bias for trend confirmation
A bias score above the threshold (default 30) indicates directional conviction worth trading.
3. Momentum Pressure Analysis
Momentum is evaluated through multiple oscillators to ensure entry timing:
// Momentum scoring
int momentum_bull_score = 0
if rsi_bullish
momentum_bull_score += 1
if rsi_momentum_up
momentum_bull_score += 1
if macd_bullish
momentum_bull_score += 1
Momentum filters:
RSI Analysis: Momentum direction and overbought/oversold conditions
MACD Histogram: Trend acceleration and deceleration
Stochastic Oscillator: Entry timing and momentum strength
Volume Confirmation: Above-average volume for signal validity
Only when momentum aligns with directional bias do we consider entries.
4. Structural Market Analysis
Structure identifies key levels where institutions place orders:
// Structure analysis
bool above_swing_low = close > nz(last_swing_low, low)
bool below_swing_high = close < nz(last_swing_high, high)
bool sweep_high = not na(last_swing_high) and high > last_swing_high and close < last_swing_high
bool sweep_low = not na(last_swing_low) and low < last_swing_low and close > last_swing_low
Structural elements:
Swing Points: Key highs and lows that define market structure
Liquidity Sweeps: Price moves beyond swing levels that quickly reverse
Break of Structure: Confirmation of trend changes
Support/Resistance Zones: Areas of high probability reaction
Entries are favored when price aligns with structural levels and sweeps indicate institutional activity.
5. Volatility-Adaptive Risk Management
Risk management dynamically adjusts based on market conditions:
// Adaptive stop multiplier based on regime
float adaptive_stop_mult = i_atr_stop_mult
if i_adapt_stops
if volatile_regime
adaptive_stop_mult := i_atr_stop_mult * i_vol_stop_mult
else if ranging_regime
adaptive_stop_mult := i_atr_stop_mult * 0.85
else if trending_regime
adaptive_stop_mult := i_atr_stop_mult * 1.1
Risk features:
Adaptive Position Sizing: Larger sizes in high-conviction trends, smaller in volatile conditions
Dynamic Stop Losses: Wider in trending markets, tighter in ranging/volatile conditions
Multi-Target Scaling: Partial profits at predefined levels to reduce risk
Trailing Stops: Lock in profits when moves reach predefined thresholds
Volatility-Adjusted Targets: Larger profit targets in high-volatility environments
6. Signal Qualification System
The strategy uses a 14-point qualification system to ensure only high-quality setups:
// Total scores (max 14)
int bull_total = (
(bullish_bias ? 3 : 0) + momentum_bull_score + struct_bull_score + (trending_regime ? 2 : 0) +
(pressure_bull ? 1 : 0) + (sweep_low ? 1 : 0) + (squeeze_release ? 1 : 0) + (mtf_bias_long ? 1 : 0)
)
Qualification criteria:
Bias Strength (3 points): Strong directional conviction
Momentum (3 points): Multiple momentum indicators aligned
Structure (2 points): Price respecting key levels
Regime (2 points): Favorable market conditions
Pressure (1 point): Buying/selling pressure confirmation
Sweeps (1 point): Liquidity sweep patterns
Squeeze Release (1 point): Volatility breakout patterns
MTF Alignment (1 point): Higher timeframe confirmation
Only setups scoring 5+ (adjustable) are considered for trading.
Visual Elements
Directional Cloud: Dynamic cloud showing trend direction and strength
Signal Markers: Clear entry signals with quality grades (A-D)
Risk Levels: Visual stop loss and target levels
Structure Points: Marked swing highs and lows
Background Colors: Regime-based background shading
Dashboard: Real-time metrics including regime, bias, momentum, and signal quality
The dashboard displays:
1. Current market regime and strength
2. Directional bias score and alignment
3. Momentum state and pressure readings
4. Structural analysis and proximity to levels
5. Signal qualification score and grade
6. Active position sizing and risk metrics
7. Multi-timeframe alignment status
Input Parameters
Regime Detection:
ADX Period: Trend strength calculation period (default: 14)
Trend Threshold: Minimum ADX for trend regime (default: 25)
ATR Period: Volatility calculation period (default: 14)
Volatility Expansion/Contraction: Multipliers for regime detection (default: 1.4/0.6)
Bias Calculation:
Fast/Slow/Anchor MAs: Trend calculation periods (default: 21/55/200)
Bias Threshold: Minimum score for directional bias (default: 30)
Multi-Timeframe Settings: Higher timeframes for confirmation (default: 60m/240m/1D)
Risk Management:
Risk Per Trade %: Percentage of equity to risk (default: 1.0%)
ATR Stop Multiplier: Stop distance in ATR units (default: 2.0)
R:R Targets: Profit target multiples (default: 1.5x/2.5x)
Adaptive Sizing: Enable regime-based position sizing (default: true)
Signal Filters:
Minimum Qualification Score: Required confluence score (default: 5)
Signal Cooldown: Bars between signals (default: 1)
Volume Filter: Require above-average volume (default: true)
Bar Confirmation: Wait for bar close (default: true)
How to Use This Strategy
Step 1: Understand Market Regime
Check the dashboard for current market regime. Avoid trading in volatile regimes (red background) unless you have specific volatility-based strategies. Trending regimes (green) are optimal for directional trading, while ranging regimes (purple) suit mean-reversion approaches.
Step 2: Assess Directional Bias
Look for strong bias scores (60+) with multi-timeframe alignment. The bias should be clear across multiple timeframes before considering entries. Weak or conflicting bias suggests waiting for clarity.
Step 3: Confirm Momentum
Ensure momentum indicators support the directional bias. Look for RSI momentum in the direction of the trade, MACD histogram expanding, and stochastic crossovers aligned with the bias.
Step 4: Identify Structural Levels
Entries near structural levels (swing highs/lows) have higher probability. Look for liquidity sweeps that indicate institutional participation before entering in the opposite direction.
Step 5: Check Signal Qualification
Only take trades with qualification scores of 5 or higher. Premium signals (grade A, 75+ quality) offer the highest probability and can be sized more aggressively.
Step 6: Manage Risk Dynamically
Let the strategy's adaptive risk management adjust position sizes and stops based on market conditions. Don't override the system's risk calculations without strong reason.
Best Practices
Trade liquid instruments (major forex pairs, indices, large-cap stocks, major crypto) for reliable signals
Start with the default parameters and only adjust after understanding their impact
Pay attention to regime changes - they often signal strategy adjustments
Use the qualification score as your primary filter - higher scores mean higher probability
Be patient for A-grade setups rather than forcing mediocre trades
Monitor the multi-timeframe alignment - trades against higher timeframes have lower success rates
Let winners run to the second target when momentum is strong
Reduce size during volatile regimes or take a break entirely
Keep a trade journal to note which regime/bias combinations work best for each instrument
Consider economic news events that might trigger regime changes
Strategy Limitations
Like all strategies, performance varies across different market instruments and timeframes
Regime detection may lag during rapid market transitions
Multi-timeframe analysis requires sufficient historical data on all timeframes
The strategy is designed for swing trading and may not be optimal for scalping
Highly correlated instruments may produce similar signals across different pairs
Extreme market events (black swans) can overwhelm any risk management system
Backtested performance does not guarantee future results
The strategy requires discipline to follow all signals, including losing ones
Commissions and slippage can significantly impact performance on smaller timeframes
Success requires understanding the system's logic rather than blind execution
Technical Implementation
Built with Pine Script v6 featuring:
Modular architecture with separate calculation modules for each component
Advanced regime detection using ADX and ATR combinations
Multi-timeframe security requests with proper lookahead management
Dynamic risk management with adaptive position sizing
Comprehensive signal qualification scoring system
Real-time dashboard with 12 key metrics
Visual elements including directional cloud and risk levels
Export functions for integration with other indicators
Alert conditions for all major signal types
The code is fully open-source and can be modified to suit individual trading styles and preferences. All calculations use confirmed bars to prevent repainting.
Originality Statement
This strategy is original in its comprehensive integration of multiple analytical layers into a unified adaptive system. While individual components (ADX, moving averages, RSI, MACD, etc.) are established tools, this strategy is justified because:
It synthesizes six distinct analytical approaches into a cohesive decision framework
The regime-adaptive logic automatically adjusts strategy behavior based on market conditions
The qualification scoring system provides objective criteria for signal selection
Multi-timeframe bias aggregation ensures alignment with the dominant market trend
Structural analysis integration provides context for market microstructure
Volatility-adaptive risk management dynamically adjusts to market conditions
The comprehensive dashboard presents all critical metrics for informed decision-making
Each component contributes unique information: regime tells us when to trade, bias tells us direction, momentum provides timing, structure gives levels, volatility determines sizing, and qualification ensures quality
The strategy's value lies not in any single component but in how these elements work together to create a robust, adaptive trading system that can navigate different market environments while maintaining disciplined risk management.
Disclaimer
This strategy is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss and is not suitable for all investors.
Past performance does not guarantee future results. The backtested results shown are based on historical data and do not account for real-world factors such as slippage, liquidity issues, or psychological pressures that can affect trading performance.
The strategy's signals are mathematical calculations based on historical patterns and technical indicators. They do not predict future price movements with certainty. Market conditions can change rapidly, rendering previously successful patterns ineffective.
Always use proper risk management, including stop losses and position sizing appropriate for your account size and risk tolerance. Never risk more than you can afford to lose. Consider consulting with a qualified financial advisor before making investment decisions.
The author is not responsible for any losses incurred from using this strategy. Users assume full responsibility for all trading decisions made using this system.
-Made with passion by officialjackofalltrades
Strategy

Volatility Regime Engine [JOAT]Volatility Regime Engine
Introduction
The Volatility Regime Engine is a sophisticated volatility analysis tool designed to identify market cycles through expansion and contraction patterns. This indicator goes beyond simple volatility measurement by classifying volatility into distinct regimes, detecting squeeze patterns, and forecasting potential volatility shifts. It's built for traders who understand that volatility is not just noise but a predictable cycle that creates trading opportunities when properly understood.
Volatility is the lifeblood of markets - it creates opportunities, determines risk, and influences strategy selection. This engine provides institutional-grade volatility analysis that helps traders adapt their approach to current market conditions. Whether you're a day trader adjusting stop distances, a swing trader timing entries after volatility contractions, or a position trader sizing positions based on volatility forecasts, this tool provides the critical volatility intelligence needed for superior decision-making.
Why This Indicator Exists
Most traders treat volatility as a single number (like ATR) without understanding its cyclical nature and predictive properties. This indicator addresses that limitation by:
Regime Classification: Identifies whether volatility is expanding, contracting, or normal, allowing strategy adaptation
Squeeze Detection: Pinpoints volatility compression patterns that often precede significant price moves
Cycle Analysis: Tracks volatility cycles to identify optimal entry and exit timing
Forecasting Capability: Uses mean reversion principles to predict likely volatility shifts
Adaptive Multipliers: Provides dynamic stop loss and target multipliers based on current volatility
Historical Context: Places current volatility in percentile context for better decision making
The engine solves the critical problem of using static risk management in dynamic volatility environments. By understanding where you are in the volatility cycle, you can anticipate market behavior and position yourself accordingly.
Core Components Explained
1. Multi-Layer ATR Analysis
The indicator uses three ATR timeframes to capture volatility across different horizons:
// Multiple ATR timeframes
float atr_fast = ta.atr(i_atr_fast)
float atr_slow = ta.atr(i_atr_slow)
float atr_baseline = ta.sma(ta.atr(i_atr_slow), i_atr_baseline)
// ATR ratios
float atr_ratio = atr_baseline > 0 ? atr_slow / atr_baseline : 1.0
float atr_momentum = atr_fast / atr_slow
ATR layers:
Fast ATR (7 periods): Captures immediate volatility changes
Slow ATR (21 periods): Medium-term volatility trend
Baseline ATR (50 periods smoothed): Long-term volatility average
ATR Ratio: Current volatility relative to baseline (key for regime detection)
ATR Momentum: Short-term volatility acceleration/deceleration
The ATR ratio is the primary driver of regime classification - values above 1.4 indicate expansion, below 0.6 indicate contraction.
2. Squeeze Detection System
The indicator uses the classic TTM Squeeze concept with enhanced features:
// Squeeze state
bool squeeze_on = bb_lower > kc_lower and bb_upper < kc_upper
bool squeeze_off = bb_lower < kc_lower and bb_upper > kc_upper
// Squeeze duration tracking
var int squeeze_duration = 0
if squeeze_on
squeeze_duration := squeeze_duration + 1
else
squeeze_duration := 0
// Squeeze intensity (longer squeeze = more explosive release)
float squeeze_intensity = math.min(float(squeeze_duration) / 20.0 * 100, 100)
Squeeze components:
Bollinger Bands: Measure volatility through standard deviation
Keltner Channels: Measure volatility through ATR
Squeeze On: BB inside KC indicates volatility compression
Squeeze Duration: Time in compression - longer durations build more energy
Squeeze Intensity: Percentage score of compression buildup
Squeeze Release: Transition from compression to expansion
Squeeze releases are among the most reliable volatility signals - they often precede significant price moves.
3. Historical Volatility Analysis
For additional confirmation, the indicator calculates statistical volatility:
f_historical_vol(int period, int annual_days) =>
float log_return = math.log(close / close )
float hv = ta.stdev(log_return, period) * math.sqrt(annual_days) * 100
hv
float hv_current = i_use_hv ? f_historical_vol(i_hv_len, i_hv_annual) : 0
float hv_avg = i_use_hv ? ta.sma(hv_current, i_hv_len * 2) : 0
float hv_ratio = hv_avg > 0 ? hv_current / hv_avg : 1.0
HV features:
Log Returns Calculation: Statistically sound volatility measurement
Annualization: Converts to annualized volatility percentage
HV Ratio: Current volatility relative to historical average
HV Regime: High/low volatility classification
Confirmation Layer: Validates ATR-based regime detection
Historical volatility adds a statistical layer that confirms what the ATR analysis is showing.
4. Volatility Regime Classification
The indicator classifies volatility into four distinct states:
// Raw regime based on ATR ratio
int raw_vol_regime = 0
if atr_ratio >= i_exp_thresh
raw_vol_regime := 1 // Expansion
else if atr_ratio <= i_con_thresh
raw_vol_regime := -1 // Contraction
// Confirmed regime with bar count filter
var int regime_counter = 0
var int confirmed_vol_regime = 0
if raw_vol_regime == raw_vol_regime and raw_vol_regime != 0
regime_counter := math.min(regime_counter + 1, i_regime_confirm + 1)
else if raw_vol_regime != raw_vol_regime
regime_counter := 1
if regime_counter >= i_regime_confirm
confirmed_vol_regime := raw_vol_regime
Regime types:
Expansion (ATR ratio > 1.4): High volatility, wide ranges, increased risk
Contraction (ATR ratio < 0.6): Low volatility, narrow ranges, preparing for breakouts
Normal (0.6 < ATR ratio < 1.4): Balanced volatility, normal market conditions
Transitioning: Regime changes requiring confirmation before acting
Regime confirmation prevents whipsaws by requiring multiple bars in the same regime before classification.
5. Volatility Cycle Phases
Beyond simple regimes, the indicator identifies where you are in the volatility cycle:
// Cycle phases: 0=neutral, 1=building, 2=peak, 3=declining, 4=trough
var int vol_cycle_phase = 0
float atr_slope = atr_slow - atr_slow
float atr_accel = atr_slope - nz(atr_slope )
if confirmed_vol_regime == 1
if atr_accel > 0
vol_cycle_phase := 1 // Building expansion
else
vol_cycle_phase := 2 // Peak expansion
else if confirmed_vol_regime == -1
if atr_accel < 0
vol_cycle_phase := 3 // Declining to contraction
else
vol_cycle_phase := 4 // Trough contraction
Cycle phases:
Building Expansion: Volatility increasing, acceleration positive
Peak Expansion: High volatility but decelerating
Declining to Contraction: Volatility decreasing rapidly
Trough Contraction: Low volatility stabilizing
Neutral: Transition periods between phases
Cycle analysis helps anticipate the next phase and prepare strategy adjustments.
6. Adaptive Multipliers
The indicator provides dynamic multipliers for risk management:
// Dynamic stop multiplier based on regime
float adaptive_stop_mult = switch confirmed_vol_regime
1 => 1.5 // Wider stops in expansion
-1 => 0.8 // Tighter stops in contraction
=> 1.0 // Normal
// Dynamic target multiplier
float adaptive_target_mult = switch confirmed_vol_regime
1 => 2.0 // Larger targets in expansion
-1 => 1.2 // Smaller targets in contraction
=> 1.5 // Normal
Adaptive features:
Stop Multiplier: Adjusts stop distance based on volatility regime
Target Multiplier: Scales profit targets to volatility conditions
Risk Adjustment: Helps maintain consistent risk across volatility regimes
Export Functions: Available for integration with trading systems
These multipliers help maintain consistent risk-to-reward ratios across different volatility environments.
Visual Elements
Multi-Layer Histogram: Core volatility ratio with gradient coloring
Glow Effects: Intensity-based glow around extreme volatility
Squeeze Momentum: Separate plot showing squeeze building/release
Cycle Momentum: Volatility cycle acceleration/deceleration
Background Shading: Regime-based background colors
Signal Markers: Premium volatility signals with labels
Dashboard: Real-time volatility metrics and forecasts
The dashboard displays:
1. Current volatility regime and strength
2. Cycle phase and momentum
3. ATR ratio and percentage
4. Percentile ranking of current volatility
5. Squeeze status and duration
6. Quality score of current setup
7. Volatility forecast (expansion/contraction)
8. Adaptive multipliers for risk management
Input Parameters
ATR Settings:
Fast ATR Period: Short-term volatility (default: 7)
Slow ATR Period: Medium-term volatility (default: 21)
Baseline Period: Long-term volatility average (default: 50)
Regime Thresholds:
Expansion Threshold: ATR ratio for expansion regime (default: 1.4)
Contraction Threshold: ATR ratio for contraction regime (default: 0.6)
Regime Confirmation: Bars for regime confirmation (default: 3)
Squeeze Detection:
Bollinger Period: BB calculation period (default: 20)
Bollinger Multiplier: BB standard deviation (default: 2.0)
Keltner Period: KC calculation period (default: 20)
Keltner Multiplier: KC ATR multiplier (default: 1.5)
Visual Settings:
Color Scheme: Customizable colors for each regime
Glow Effects: Enable/disable visual enhancements
Dashboard Display: Show/hide metrics panel
Signal Labels: Control signal label frequency
How to Use This Indicator
Step 1: Identify Current Regime
Check the dashboard for the current volatility regime. In expansion (red), expect larger ranges and adjust stops wider. In contraction (blue), prepare for potential breakouts. Normal conditions (purple) allow standard trading approaches.
Step 2: Monitor Squeeze Patterns
Watch for squeeze onset (compression) and duration. Longer squeezes (high intensity) often lead to more explosive releases. The squeeze release signal is one of the most reliable volatility breakout patterns.
Step 3: Analyze Cycle Phase
Understanding the cycle phase helps anticipate the next move. Building expansion suggests continued volatility, while peak expansion warns of potential contraction ahead.
Step 4: Use Percentile Context
The ATR percentile shows how current volatility compares to historical levels. Extremely high percentiles (>90) suggest mean reversion to lower volatility, while low percentiles (<10) suggest expansion is likely.
Step 5: Apply Adaptive Multipliers
Use the provided stop and target multipliers to adjust your risk management to current conditions. This maintains consistent risk across different volatility environments.
Step 6: Watch for Premium Signals
Premium expansion signals (squeeze release + high volatility + HV confirmation) offer high-probability breakout opportunities. Premium contraction signals (early contraction + low HV) suggest optimal entry points before breakouts.
Best Practices
Use the indicator to adapt your strategy to volatility conditions rather than fighting them
Squeeze releases are most reliable when they occur after long compression periods (>10 bars)
Volatility expansion often follows news events - be aware of economic calendars
In low volatility environments, reduce position size but increase stop distance proportionally
High volatility periods offer larger profit potential but require wider stops and smaller position sizes
The volatility forecast is mean-reversion based - extreme volatility tends to revert to normal
Combine with trend analysis for best results - volatility expansion in the direction of trend is powerful
Use the adaptive multipliers in your automated strategies for dynamic risk management
Monitor the cycle phase to anticipate regime changes before they occur
Keep a volatility journal to track how different instruments behave in various regimes
Strategy Integration
This indicator is designed to integrate seamlessly with other trading systems:
Export plots provide volatility data for strategy consumption
Adaptive multipliers can be imported for dynamic risk management
Regime classification can filter trades based on volatility conditions
Squeeze signals can trigger breakout strategies
Cycle analysis can optimize entry/exit timing
Quality scores can weight signal strength in composite systems
The indicator includes 12 export functions for integration:
ATR Ratio Export: Normalized volatility level
Vol Regime Export: Current regime classification (-1, 0, 1)
ATR Percentile Export: Historical volatility context
Adaptive ATR Export: Volatility-adjusted ATR value
Stop Multiplier Export: Dynamic stop adjustment factor
Target Multiplier Export: Dynamic target adjustment factor
Squeeze State Export: Binary squeeze on/off signal
Squeeze Momentum Export: Squeeze building/release momentum
Vol Score Export: Normalized volatility score (-100 to +100)
Technical Implementation
Built with Pine Script v6 featuring:
Multi-timeframe volatility analysis across three ATR periods
Statistical historical volatility calculation with log returns
Advanced squeeze detection with duration and intensity tracking
Regime classification with confirmation logic to prevent whipsaws
Cycle phase analysis using slope and acceleration
Adaptive multiplier system for dynamic risk management
Comprehensive visualization with multi-layer glow effects
Real-time dashboard with 11 key volatility metrics
Alert conditions for all major volatility events
Export functions for strategy integration
The code uses confirmed bars for all calculations to prevent repainting and ensure reliable signals.
Originality Statement
This indicator is original in its comprehensive approach to volatility analysis and regime classification. While individual components (ATR, Bollinger Bands, Keltner Channels) are established tools, this indicator is justified because:
It synthesizes multiple volatility measurement approaches into a unified framework
The regime classification system provides actionable market state information
Cycle phase analysis adds predictive capability beyond simple volatility measurement
The squeeze detection system includes duration and intensity scoring for signal quality
Adaptive multipliers provide practical risk management adjustments based on volatility
Historical volatility adds statistical confirmation to price-based volatility measures
The forecasting system uses mean reversion principles for volatility prediction
Comprehensive visualization makes complex volatility concepts accessible and actionable
Export functions enable integration with other trading systems
Each component contributes unique insights: ATR shows current volatility, squeeze shows compression, HV shows statistical volatility, cycles show direction, and multipliers provide practical application
The indicator's value lies in transforming volatility from a single number into a rich, multi-dimensional analysis that helps traders understand not just how volatile the market is, but where it is in the volatility cycle and what that means for trading opportunities.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Volatility analysis is a tool for understanding market conditions, not a prediction system.
Volatility patterns can change suddenly due to market events, news, or changes in market structure. Past volatility patterns do not guarantee future behavior. The indicator's signals are mathematical calculations based on historical patterns and should be used in conjunction with other forms of analysis.
Always use proper risk management, including stop losses and position sizing appropriate for current volatility conditions. High volatility periods require smaller position sizes due to increased risk, while low volatility periods may require wider stops to avoid premature exits.
The author is not responsible for any losses incurred from using this indicator. Users assume full responsibility for all trading decisions made using this system.
-Made with passion by officialjackofalltrades
Indicator
