Indicador

Indicador

Momentum Matrix [LIVE]### Introduction
Welcome to Momentum Matrix , a multi-dimensional momentum and volatility confluence engine. This indicator combines Linear Geometry (Moving Average Slope) with Derivative Volatility Breakouts (Bollinger Bands applied to a custom MACD line) to create a rigorous, two-step verification system designed to identify high-probability trend expansions while filtering out low-volume market noise and chop.
### How It Works
1. **The Core Trend (MA Angle):** The script normalizes a moving average using an Average True Range (ATR) calculation to determine its precise geometric angle. It flags the trend as bullish or bearish only when the moving average breaks past a user-defined threshold (e.g., 6°), turning flat ranges grey (**No Trade Zone**).
2. **The Volatility Trigger (MACD BB):** A custom MACD line is tracked natively against standard deviation Bollinger Bands. When momentum expands, the MACD line punches outside the bands.
3. **The Confluence Signal:** When **both** systems simultaneously turn bright green or bright red, the script prints a distinct **Confluence Dot** on the zero line, signaling an institutional momentum breakout.
---
### Key Use Cases
*🚀 **Squeeze Play & Volatility Breakout Entries***
Entering the trade on the first Confluence Dot catches the absolute beginning of a macro trend expansion.
*📈 **High-Probability Trend Following***
As long as the lines and histograms stay locked in solid green or red, it proves that the velocity of the move is being actively sustained by volume.
*⚠️ **False Breakout Filter (Staying Out of Chop)***
Many traders lose money by buying a breakout on the price chart, only for it to immediately reverse. This indicator acts as a gatekeeper. If price makes a sudden spike upward, the MACD might briefly flash green. However, if the broader Moving Average Angle remains flat and stuck in the "No Trade Zone," the indicator refuses to print a buy dot, preventing FOMO entries.
*⏱️ **Scalping with the Live Delta Dashboard***
If an asset is moving up but the live angle change starts decaying (e.g., dropping from +2.5° down to +0.2°), it signals a hidden momentum loss—alerting you to take profits before the price action actually stalls out.
---
### Key Features
* **Adaptive MA Selection:** Swap between EMA, SMA, HMA, LSMA, ALMA, and McGinley.
* **Built-in Volatility Filter:** Bollinger Bands track the MACD line directly to confirm momentum expansion.
* **Live Statistics Table:** View current trend angles and live changes on every tick.
* **Strict Non-Repainting Signals:** Confluence triggers confirm at the close of the bar to ensure historical data accuracy.
---
### Credits & Acknowledgments
This script is a customized confluence engine built upon the excellent open-source work of two brilliant developers in the TradingView community. Special thanks to:
* ** @Mango2Juice ** for the foundational logic behind the *Angle of Moving Averages* script.
* ** @Algokid ** for the original concept and design of the *AK MACD BB indicator*.
This version modernizes the calculations into Pine Script v5 , introduces a dynamic real-time tracking dashboard, and establishes a strict non-repainting mathematical handshake between both metrics. Indicador

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. Indicador

Squeeze Bollinger Bands Tracker [MarkitTick]💡 This institutional-grade analysis suite provides a sophisticated volatility-tracking environment designed to identify market compression phases and high-conviction breakouts. By integrating Bollinger Band standard deviation logic with Z-Score normalization and a non-linear sigmoid volatility engine, the script transforms raw price action into a multi-dimensional heatmap. This approach allows traders to distinguish between low-volatility "coiling" phases and institutional-driven momentum expansions, providing a clear visual representation of market energy.
● ✨ Originality and Utility
The Squeeze Bollinger Bands Tracker distinguishes itself through the implementation of a proprietary "Signal Engine" and a non-linear volatility grading system. Unlike standard Bollinger Band indicators that merely plot static lines, this tool actively monitors the rate of change in channel width relative to its own historical standard deviation.
• Dynamic Volatility Normalization
Most indicators rely on linear calculations that fail to account for the exponential nature of market expansion. This script utilizes a Z-Score calculation to determine how extreme a volatility move is compared to its history, then maps that value through a sigmoid function. This creates a "Heatmap" effect on the candles that reflects institutional participation levels rather than simple price movement.
• Institutional Breakout Grading
The utility is further enhanced by an automated grading system (Grades A, B, and C). By cross-referencing price spread (the distance between open and close) with actual volume metrics during a breakout, the script provides an objective measure of signal quality, helping traders filter out "fakeouts" that lack volume support.
● 🔬 Methodology and Concepts
The logic flow is divided into three core analytical pillars: Compression Detection, Momentum Normalization, and Signal Verification.
• Compression Detection (The Squeeze)
The script calculates the percentage-based width of the Bollinger Bands. When the current width falls below its SMA-based average, the market is classified as being in a "Squeeze" state. This signifies a period where market energy is being stored, often preceding a significant directional expansion.
• Sigmoid-Mapped Z-Score Volatility
To provide the neon heatmap coloring, the script calculates the Z-Score of the channel width. This tells us how many standard deviations the current volatility is from the mean. This Z-Score is then processed through a Sigmoid Function: 100 / (1 + exp(-Z-Score)). This mathematical transformation squashes the infinite Z-Score range into a 0–100 scale, creating a smooth gradient for the "True Institutional Heatmap."
• Breakout Validation Engine
Signals are not generated simply on a price cross. The Signal Engine (a custom User-Defined Type) calculates real-time Entry, Stop Loss (based on the previous basis line), and Take Profit levels. During the moment of crossover, the "calcGrade" method evaluates if the current bar's spread and volume are at least 150% of their historical averages to assign a Grade A "Institutional" breakout.
● 🎨 Visual Guide
The visual interface is designed with a high-contrast "3D Neon" aesthetic to ensure critical data points are immediately recognizable during fast-moving market conditions.
• The 3D Neon Channels
Upper Core & Glow: The upper Bollinger Band is rendered in Cyan (#00FFFF). It features three layers: a 2-pixel core for precision and two wider "Glow" layers with varying transparency (60% and 85%) to create a neon effect.
Lower Core & Glow: The lower band is rendered in Magenta (#FF00FF), following the same three-layer glow architecture to signify the support boundary.
Basis Core: The central moving average is rendered in Yellow (#FFFF00), acting as the dynamic mean and the primary stop-loss anchor.
• True Institutional Heatmap Candles
The candle colors are not fixed; they represent a gradient based on the Sigmoid Volatility score.
Bullish State: Transitions from a deep "Cold" Forest Green (#004D40) during low-volatility rises to a "Hot" Neon Green (#00FF00) during high-momentum surges.
Bearish State: Transitions from a deep "Cold" Purple (#4A148C) during low-volatility drops to a "Hot" Neon Red (#FF0000) during aggressive sell-offs.
Neutral State: Gray (#808080) candles appear when no definitive trend state is identified by the Signal Engine.
• Analytical Dashboard and Labels
Buy/Sell Labels: When a breakout occurs, a Cyan or Magenta label appears. It displays the signal Grade (A, B, or C) and the calculated E (Entry), TP (Take Profit), and SL (Stop Loss) values.
Institutional Analytics Dashboard: Located in the top-right, this table provides real-time data on Trend Maturity (in bars), Volatility State (Squeeze vs. Expanding), and the percentage proximity to the upper and lower breakout levels.
● 🔍 Deconstruction of the Underlying Scientific and Academic Framework
The indicator is built upon the foundation of Statistical Process Control and Information Theory. By treating price movement as a signal-to-noise problem, the script uses the following frameworks:
• Standard Deviation and Gaussian Distribution
The core of the Bollinger Band calculation relies on the assumption that price spends approximately 95% of its time within two standard deviations of the mean. The "Squeeze" logic identifies periods where the distribution is abnormally tight, suggesting an imminent return to the mean or a "Fat Tail" event (a breakout).
• Z-Score Normalization
In statistics, the Z-Score is used to compare observations from different data sets or time periods. By applying Z-Score logic to the width of the bands, the indicator removes the "unit" of price and focuses purely on the intensity of the volatility, allowing for a standardized comparison across different assets (e.g., Bitcoin vs. Apple).
• Non-Linear Sigmoid Mapping
The use of the Sigmoid function (common in Neural Network activation) serves to eliminate outliers in volatility data. This ensures that the candle heatmap provides meaningful color variations even during extreme "Black Swan" events, preventing the visual output from becoming saturated or unreadable.
● 📖 How to Use
Traders should focus on the transition between market states as displayed by the Analytics Dashboard and the Heatmap.
• Step 1: Identify the Squeeze
Monitor the "Volatility State" in the dashboard. When it displays "⚠️ SQUEEZE" in Neon Orange, the market is coiling. This is the preparation phase where no trades should be taken.
• Step 2: Evaluate the Breakout Grade
Wait for a "BUY" or "SELL" label to appear. Priority should be given to "Grade A" signals, as these indicate that both price spread and volume have significantly exceeded their 20-period averages, confirming institutional intent.
• Step 3: Execution and Risk Management
Upon a valid signal, the script provides an automated trade plan. The Stop Loss is set at the Basis (Yellow) line from the previous bar to allow for minor breathing room, while the Take Profit is projected at a 1:1 ratio relative to the width of the band at the time of entry.
● ⚙️ Inputs and Settings
The script provides granular control over the analytical engine and the visual experience.
• Channel Settings
Channel Length: Controls the SMA window for the Bollinger Bands (Default: 20).
Standard Deviation Multiplier: Adjusts the width of the neon boundaries (Default: 2.0).
• Analytics Settings
Squeeze/Z-Score Length: Determines the lookback period used to define what constitutes "average" volatility (Default: 50).
Quality SMA Length: Defines the window for the Grade A/B/C volume and spread verification (Default: 20).
• Color and Heatmap Settings
Users can fully customize the Neon Upper/Lower colors, the Dashboard background transparency, and the specific "Cold" and "Hot" thresholds for the candle gradient engine to match their preferred dark or light chart theme.
⚠️ 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. Indicador

Indicador

Indicador

Z-Score Mean Reversion ProZ-Score Mean Reversion Pro is a Strategy designed to identify high-probability mean reversion setups by combining statistical Z-Score extremes with RSI momentum confirmation, Bollinger Band volatility filtering, and EMA trend alignment. It provides clean buy/sell signals, visual trade zones, dashboard data, and alert outputs to assist in short-term reversal trading, intraday setups, and swing mean reversion trades.
🔑 FEATURES
Z-Score Mean Reversion Engine: Detects statistically stretched price moves and highlights potential reversal zones when price deviates too far from its rolling mean.
Multi-Layer Signal Confirmation: Combines RSI exhaustion, Bollinger Band Width volatility checks, and EMA trend filtering to reduce false signals and improve trade quality.
Built-In Risk Management: Includes ATR-based stop loss and take profit logic, plus optional mean reversion exits when price returns toward equilibrium.
⚠️ NOTES & DISCLAIMERS
This script works best on 5m, 15m, 1H, and 4H charts across Forex, Crypto, Indices, and liquid Stocks.
Best suited for mean reversion traders looking to capture exhaustion moves and short-term reversals.
ATR exits are ideal for structured risk management, while Z-Score exits are better for pure statistical reversion setups.
Always use risk management (Stop Loss).
This script is for educational and research purposes only. Always forward test before using live capital.
Estrategia

Indicador

Price oscillator [Session Adjusted]Price Oscillator
This indicator combines directional momentum bias with dynamic volatility analysis, helping traders identify both trend direction and potential exhaustion zones.
Core Concept
The oscillator calculates the percentage deviation of price from a session-adjusted moving average (close / MA - 1).
The histogram is plotted as always-positive columns (green when price is above the MA, red when below). This design enables a clear visual comparison between momentum strength and the Bollinger Band Width (BBW).
When the colored columns cross above the BBW line, it signals an over-extended condition, often indicating a high probability of imminent correction or mean reversion.
Volatility Analysis
The blue BBW line is a key element of the indicator:
- Rising BBW (positive slope) indicates volatility expansion — typically associated with strong trending moves or breakout phases.
- Falling BBW (negative slope) indicates volatility contraction — often signaling consolidation periods or impending explosive moves.
Main Features
Adaptive Lookback Period:
Automatically adjusts based on the selected session duration (default 24 hours), providing timeframe consistency.
Flexible Smoothing:
Choose between SMA, EMA, RMA, or WMA for the reference moving average.
Dual Signal System:
Colored columns show momentum direction and strength.
BBW line reveals both the level and the direction (slope) of volatility.
Exhaustion Zones:
Crosses between momentum columns and BBW act as dynamic overbought/oversold signals.
How to Use
Directional Bias Filter: Green columns = bullish bias | Red columns = bearish bias.
Volatility Regime: Use the slope of the BBW line to distinguish between trending (expanding volatility) and consolidating (contracting volatility) environments.
Correction Signals: Watch for strong momentum columns crossing above the BBW line — this frequently precedes pullbacks or reversals.
Particularly effective on Forex pairs and European indices (DAX, CAC40, FTSEMIB, etc.) on 1H to 4H, and Daily timeframes.
Indicador

Indicador

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

Indicador

DMI ADX Bollinger BandsThis Pine Script code merges the classic DMI (Directional Movement Index) and ADX (Average Directional Index) indicators with Bollinger Bands, but with a unique twist: the Bollinger Bands are applied to the ADX line itself rather than the price.
This structure allows you to analyze not just the strength of the trend, but the volatility of that trend's momentum.
1. Components of the Indicator
+DI (Navy Line): Represents the strength of the bullish (upward) momentum.
-DI (Red Line): Represents the strength of the bearish (downward) momentum.
ADX (Green Line): Measures the absolute strength of the trend.
Bollinger Bands (Gray Lines & Blue Shading): Measure the volatility of the ADX line (i.e., how rapidly the trend is gaining or losing momentum).
2. How to Interpret the Signals
A. Trend Direction (DMI)
+DI > -DI: The market is trending upward.
-DI > +DI: The market is trending downward.
B. Trend Strength (ADX Levels)
Below 20: The market lacks a clear trend or is in a "ranging" (sideways) state.
20 – 40: A trend is forming and gaining strength. This is usually the prime area for trend-following strategies.
Above 40: The trend is very strong, but it also indicates the market is becoming "overextended" or at risk of exhaustion.
C. Trend Momentum (ADX + Bollinger Bands)
This is the core feature of your script:
ADX crosses above the Upper Band: The trend is gaining momentum explosively. This often indicates a strong breakout or an acceleration in the current price move.
ADX nears the Lower Band: The trend is losing steam or entering a consolidation/sideways phase.
ADX is between the bands: The trend is moving at a consistent, sustainable pace.
3. Trading Strategies
Trend-Following (Entry)
Entry: Look for a cross where +DI > -DI (for long) or -DI > +DI (for short), while the ADX is above 20.
Confirmation: Ideally, you want to see the ADX line moving upward, ideally heading toward the Upper Bollinger Band, confirming that the momentum is building.
Profit Taking / Reversal (Exhaustion)
When the ADX reaches the 40–50 level and touches or exceeds the Upper Bollinger Band, the trend is likely "overextended." This is a strong signal to consider taking profits or tightening your stop-loss, as the market may be due for a correction.
Identifying Ranging Markets
If the ADX line drops below the Lower Bollinger Band, the market has officially entered a low-volatility/sideways phase. Avoid trend-following strategies in this zone and consider strategies better suited for choppy markets. Indicador

SwissTradeAcademy Money PrinterThe SwissTradeAcademy Money Printer is a professional-grade, multi-component trading indicator developed in Pine Script v6. It combines three powerful analysis methodologies into a single, high-performance tool, designed to keep your TradingView charts clean while providing comprehensive market insights.
Core Components
1. Super Bollinger Trend (SBT)
A dynamic trend-following system based on Bollinger Band volatility.
Trend Tracking: Uses an adaptive baseline that shifts based on price action and volatility.
Integrated ZigZag: Automatically identifies and connects local highs and lows to visualize market structure.
Signal Labels: Provides clear visual markers for trend shifts and price targets.
2. MACD Price Overlay
Unlike standard oscillators that sit in a separate pane, this MACD is projected directly onto the price chart.
Trend Momentum: Features a dual-line MACD (Fast/Slow) and a Signal line that change color based on momentum direction.
Visual Fill: Uses a dynamic color cloud to represent the gap between the MACD and Signal lines, highlighting bullish and bearish strength.
SMA 89 Filter: Includes a long-term 89-period Simple Moving Average to identify the "Golden Mean" and primary market direction.
3. 4-in-1 Multi-Timeframe MAs
A flexible Moving Average engine that allows for deep customization.
Versatile Types: Choose from SMA, EMA, WMA, RMA, HMA, or VWMA.
Multi-Timeframe (MTF) Support: Plot MAs from higher timeframes (e.g., 1H or Daily) directly onto your current lower-timeframe chart.
Custom Sources: Calculate averages based on Open, High, Low, Close, or HL2.
Key Features
Pine Script v6 Optimized: Built with the latest TradingView standards for maximum execution speed and reliability.
Organized Settings: All parameters are logically grouped in the "Inputs" tab for easy configuration.
Clean Interface: Combines three indicators into one, saving valuable indicator slots for free-tier users and reducing chart clutter.
How to Use
Trend Confirmation: Look for alignment between the Super Bollinger Trend color and the MACD cloud color.
Support & Resistance: Use the 89 SMA and the 200 EMA (MA 1) as major "institutional" levels for trade entries or exits.
Volatility Alerts: The ZigZag labels help track the distance of moves, assisting in setting realistic Take Profit levels. Indicador

Volatility Prism [JOAT]Volatility Prism
Introduction
Volatility Prism is an open-source dual Bollinger Band envelope system with percentile-based bandwidth squeeze detection and Stochastic RSI confirmation. It renders two independent envelopes — an inner band at a configurable standard deviation multiplier and an outer band at a wider multiplier — with gradient fills that color dynamically based on whether price is in a bullish or bearish position relative to the moving average basis. When the bandwidth compresses to a historically low percentile, a squeeze state is declared. When the squeeze releases, an expansion signal fires.
The problem Volatility Prism solves is that volatility states are cyclical: periods of compression (squeeze) reliably precede periods of expansion (breakout), and the direction of the breakout is where the opportunity lies. By combining a statistically-based squeeze detector — which uses percentile thresholds rather than fixed bandwidth levels — with Stochastic RSI extreme confirmation, Volatility Prism identifies both the compression state and the likely directional bias of the coming expansion simultaneously.
Core Concepts
1. Dual Bollinger Band Structure
Two separate Bollinger Band pairs share the same basis (SMA of the source) but use different standard deviation multipliers. The inner band (default 2.0x) is the primary envelope. The outer band (default 3.0x) defines the extreme extension zone. Price trading beyond the inner band but inside the outer band is in the elevated zone. Price trading beyond the outer band is in a statistical extreme:
basis = ta.sma(src, bbLen)
dev = ta.stdev(src, bbLen)
upper1 = basis + bbMult1 * dev // Inner upper
lower1 = basis - bbMult1 * dev // Inner lower
upper2 = basis + bbMult2 * dev // Outer upper
lower2 = basis - bbMult2 * dev // Outer lower
The trend bias is determined by whether the close is above or below the basis. When bullish, all envelope lines and fills render in the bullish color. When bearish, they render in the bearish color. This makes the trend state immediately visible from the envelope color alone.
2. Gradient Envelope Fills
Four gradient fills create the visual envelope structure. The inner fills gradient from a near-opaque shade at the band edge to a nearly transparent shade at the basis, creating a density effect that visually represents how far price is from the center. The outer fills extend this gradient into the extreme zone at reduced opacity, cleanly separating the normal, elevated, and extreme price zones:
fill(basisPlot, upper1Plot, upper1, basis, color.new(envCol, 85), color.new(envCol, 98), "Upper Inner Fill")
fill(upper1Plot, upper2Plot, upper2, upper1, color.new(envCol, 75), color.new(envCol, 88), "Upper Outer Fill")
3. Percentile-Based Bandwidth Squeeze Detection
The bandwidth (the width of the inner band as a percentage of the basis) is computed on each bar and added to a rolling history array of configurable length. The current bandwidth is compared to the percentile threshold of that history — if the current bandwidth is below the configured percentile (default 15th percentile), the squeeze state is active:
bandwidth = basis > 0 ? (upper1 - lower1) / basis * 100 : 0.0
// Sort history and find threshold at configured percentile
threshIdx = int(array.size(sorted) * sqzPctile / 100) - 1
sqzThreshold = array.get(sorted, threshIdx)
isSqueezing = bandwidth <= sqzThreshold
This approach adapts to the instrument and timeframe automatically — a 15th percentile squeeze on a low-volatility bond future and on a high-volatility crypto asset will both correctly identify when that specific instrument is in an unusually compressed state relative to its own history.
4. Stochastic RSI Extreme Confirmation
The Stochastic RSI (an oscillator that applies Stochastic logic to RSI values) provides momentum extreme confirmation. Overbought and oversold readings from the K and D lines confirm when band extremes coincide with momentum extremes, strengthening band rejection signals:
rsiVal = ta.rsi(src, rsiLen)
stochVal = ta.stoch(rsiVal, rsiVal, rsiVal, stochLen)
kLine = ta.sma(stochVal, smoothK)
dLine = ta.sma(kLine, smoothD)
stochOB = kLine > upperLim and dLine > upperLim // Overbought
stochOS = kLine < lowerLim and dLine < lowerLim // Oversold
5. Band Rejection Signals and Squeeze Breakout
Three signal types are generated. Bullish band rejection fires when price was below the inner lower band on the previous bar and closes back above it, with Stochastic RSI confirming oversold — a failed breakdown with momentum confirmation. Bearish band rejection fires on the symmetric condition above the inner upper band. Squeeze Breakout fires on the first bar that transitions from squeeze to non-squeeze state — the moment the bandwidth begins expanding:
bearRejection = close > upper1 and close <= upper1 and stochOB
bullRejection = close < lower1 and close >= lower1 and stochOS
sqzBreakout = isSqueezing and not isSqueezing
6. Band Price Labels at the Right Edge
All five band lines (U2, U1, MA, L1, L2) receive price labels at the right edge of the chart. These labels update every bar to show the current price of each level, eliminating the need to hover over lines or read the y-axis to determine band values:
if barstate.islast and showBandLbls
lblU2 := label.new(bar_index + 2, upper2,
"U2 " + str.tostring(upper2, format.mintick),
style=label.style_label_right, ...)
Features
Dual Bollinger Band envelopes: Inner and outer bands with independently configurable multipliers
Adaptive gradient fills: Four gradient fills (inner upper, inner lower, outer upper, outer lower) color dynamically with trend bias
Dynamic trend coloring: All envelope elements switch between bullish and bearish colors based on close vs. basis
Percentile-based squeeze detection: Bandwidth compared to a configurable percentile of its rolling history — adapts to any instrument's volatility profile
Configurable squeeze lookback: Rolling bandwidth history window from 20 to 500 bars
Squeeze background shading: Optional chart background shading during active squeeze state
Stochastic RSI confirmation: K and D line extreme zones confirm band rejection signal quality
Three signal types: Bull Rejection, Bear Rejection, and Squeeze Breakout markers with distinct shapes
Band price labels at right edge: Live price labels for all five band levels (U2, U1, MA, L1, L2) at bar_index + 2
Institutional dashboard (top right): 11-row table with Volatility state (SQUEEZE/EXPANDING), Bandwidth %, Trend, StochRSI state, K and D values, Basis price, and Envelope range
Fully configurable inputs: BB length, both multipliers, squeeze lookback and percentile, Stochastic RSI parameters, and all colors independently adjustable
Alerts: Bull Rejection, Bear Rejection, Squeeze Breakout, and Squeeze Entry alertconditions
Input Parameters
Bollinger Bands:
Source: Price source (default: close)
BB Length: MA and standard deviation period (default: 20)
Inner Mult: Standard deviation multiplier for inner bands (default: 2.0)
Outer Mult: Standard deviation multiplier for outer bands (default: 3.0)
Squeeze Detection:
Bandwidth Lookback: Rolling history window for percentile calculation (default: 120 bars)
Squeeze Percentile: Bandwidth percentile below which squeeze is active (default: 15th)
Stochastic RSI:
K Smoothing (default: 3), D Smoothing (default: 3)
RSI Length (default: 14), Stochastic Length (default: 14)
Overbought level (default: 80), Oversold level (default: 20)
Display:
Show Dashboard toggle
Squeeze Background toggle
Band Price Labels toggle
Bullish Envelope color, Bearish Envelope color, Basis Line color, Squeeze Background color
How to Use This Indicator
Step 1: Identify the Volatility State
The dashboard's Volatility row shows SQUEEZE (yellow) or EXPANDING (gray). When SQUEEZE is active, the chart background shades yellow. A squeeze state means bandwidth has compressed to a historically low percentile — the market is loading energy for a directional move.
Step 2: Watch for Squeeze Breakout Signals
The cross (x) marker appears at the first bar that exits a squeeze. This is the moment bandwidth begins expanding. The direction of the breakout bar (bullish or bearish candle) combined with the trend color of the envelope provides the directional lean for the expansion phase.
Step 3: Interpret Envelope Color for Trend Bias
When all envelope elements are teal, price is above the basis — bullish bias. When all elements are orange, price is below the basis — bearish bias. Use the envelope color as a continuous trend indicator overlaid directly on the price.
Step 4: React to Band Rejection Diamonds
Diamond markers at the band edge indicate price failed to sustain a move beyond the inner band and recovered inside, with Stochastic RSI confirming the extreme. These are mean-reversion entry signals — price rejected the statistical extreme with momentum confirmation.
Step 5: Reference Band Price Labels
The right-edge labels show the current price of each band level. Use these when planning take-profit targets (opposite band) or stop-loss placement (outer band beyond entry) without needing to manually read prices from band lines.
Indicator Limitations
The squeeze detector requires a minimum of sqzLen bars of bandwidth history to activate. On short charts or immediately after the indicator is applied, the squeeze state will not register until enough history is accumulated
The percentile-based squeeze threshold adapts to the lookback window. A longer lookback produces a more stable threshold; a shorter lookback adapts faster but may produce more frequent squeeze entries and exits
Band rejection signals require the close to recover inside the band on the bar immediately following the outside close. Multi-bar breakouts that recover more slowly are not detected as rejections
Squeeze Breakout markers fire on the first bar exiting a squeeze regardless of candle size or direction. They do not independently confirm the breakout direction — the envelope trend color and Stochastic RSI must be used to assess directional bias
Stochastic RSI is a double-transformed oscillator (RSI → Stochastic). It can reach and hold extreme levels for extended periods in strong trends, producing frequent overbought or oversold readings that reduce the specificity of band rejection confirmation
Originality Statement
Volatility Prism is original in its adaptive, percentile-based squeeze detection combined with a dual-envelope gradient structure and Stochastic RSI extreme confirmation with right-edge band price labels. This indicator is published because:
Using the rolling percentile of bandwidth history — rather than fixed bandwidth values or the classic Keltner Channel comparison method — for squeeze detection provides an instrument-adaptive and timeframe-adaptive threshold that requires no manual calibration
The dual-envelope structure (inner and outer bands) with four independent gradient fills that change color based on real-time trend bias creates a visually rich, information-dense chart overlay without adding separate indicator panes
The right-edge band price labels for all five band levels eliminate a common usability friction point in Bollinger Band analysis, where traders must hover over lines or estimate prices from the y-axis scale
The three-signal system (Bull Rejection, Bear Rejection, Squeeze Breakout) operating from two independent mechanisms (band geometry + Stochastic RSI for rejections, bandwidth percentile for breakout) provides distinct signal categories suited to different trading styles
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. Trading involves substantial risk of loss. Bollinger Bands and Stochastic RSI readings are historical statistical tools. Squeeze states can persist for extended periods without producing a breakout, and breakouts can occur in either direction. Band rejection signals do not guarantee price will reverse from the band. Always use proper risk management. The author is not responsible for any trading losses resulting from the use of this indicator.
-Made with passion by jackofalltrades
Indicador

Indicador

Indicador

RSI+BB BANDS[jackieee]RSI + BB Bands
This indicator combines RSI, a moving average of RSI, and Bollinger Bands built on RSI into one panel, helping traders evaluate momentum, volatility, and market rhythm in a clearer way.
The core idea is simple:
RSI shows momentum strength and overbought/oversold conditions
RSI MA helps smooth short-term noise and makes shifts in momentum easier to read
Bollinger Bands on RSI show whether RSI is expanding, compressing, or pushing toward relative extremes within its own recent range
What this indicator includes
RSI line
RSI moving average
Bollinger Band basis line
Upper and lower Bollinger Bands
Custom overbought and oversold reference lines
How it can be used
This tool can help traders:
identify when RSI is stretching toward the upper or lower side of its recent range
observe whether momentum is accelerating or fading
track short-term pullbacks and recoveries with the RSI moving average
spot periods of compression and expansion in RSI behavior through the Bollinger Bands
Basic interpretation
When RSI pushes near or above the upper band, momentum is strengthening and price may be entering an extended phase
When RSI moves near or below the lower band, momentum is weakening and the market may be approaching an exhaustion area
The RSI MA can be used as a smoother guide for short-term momentum direction
Wider bands suggest stronger RSI volatility, while tighter bands suggest compression and possible expansion ahead
Inputs
The script allows full customization of:
RSI source
RSI length
overbought / oversold thresholds
RSI MA length
Bollinger Band length
Bollinger Band multiplier
This makes the indicator flexible for different markets, timeframes, and personal trading styles.
Notes
This indicator is designed as a visual analysis tool and should be used together with price structure, trend context, and risk management. Indicador

Indicador

Indicador

Indicador

Indicador
