EMA Ribbon Trend Filter [StrixEDGE]EMA Ribbon Trend Filter is a multi-layered trend analysis system built around a triple EMA ribbon (8/21/55) enhanced with squeeze detection, a composite momentum score, multi-timeframe confluence, and dynamic slope-adaptive coloring.
This is not another moving average overlay. It is a full trend diagnostics dashboard designed to answer five questions at a glance: what is the trend, how strong is it, how long has it been running, is the ribbon compressing toward a breakout, and do higher timeframes agree.
๐น CORE CONCEPT
Three exponential moving averages โ fast (8), mid (21), and slow (55) โ form a visual ribbon on the chart. When the EMAs stack in order (fast > mid > slow), the trend is bullish. When they invert, the trend is bearish. Anything else is a transitional state labeled neutral.
The ribbon is more than directional. The distance between the fastest and slowest EMA (the "spread") measures trend strength as a percentage, and the rate at which the ribbon expands or contracts reveals momentum shifts before price confirms them.
๐น WHAT MAKES THIS DIFFERENT
Most EMA ribbons stop at direction and color. This indicator adds four analytical layers that standard ribbons lack:
โธ Ribbon Squeeze Detection
The indicator continuously measures ribbon width against its own moving average. When the three EMAs converge below a configurable threshold (default: 30% of average width), the ribbon turns yellow and the dashboard flags an active squeeze. Compression precedes expansion โ a squeeze ending often marks the start of a directional move. Dedicated markers appear on the chart when a squeeze releases into a bullish or bearish trend.
โธ Composite Momentum Score (0โ100)
A single number synthesizing four components, each weighted equally at 25 points:
โ EMA alignment: full bullish or bearish stack scores 25, mixed scores 0
โ Slope agreement: all three EMAs rising or all falling scores 25, partial agreement scores 12
โ Spread strength: scaled between 0โ25 based on where the current spread falls relative to the user-defined weak and strong thresholds
โ Price position: price above the ribbon in a bullish trend (or below in bearish) scores 25, inside the ribbon scores 10, on the wrong side scores 0
The score is color-coded: cyan (80+), teal (60โ79), orange (40โ59), red (below 40).
โธ Dynamic Slope-Adaptive Colors
When enabled, each EMA line independently changes color based on its own slope โ rising EMAs render green, falling EMAs render red. This provides an early visual warning when individual EMAs begin to flatten or turn, even while the overall stack remains intact. A bullish stack where the slow EMA has turned red is a qualitatively different signal than one where all three are green.
โธ Multi-Timeframe Dashboard
A built-in table displays trend state, spread, and grade across five timeframes simultaneously: the current chart timeframe plus 15-minute, 1-hour, 4-hour, and daily. The active chart timeframe is marked with โบ in the MTF rows if it matches one of the fixed timeframes. A confluence row at the bottom counts how many timeframes are bullish versus bearish and outputs a directional bias: Strong Bull (4โ5 aligned), Bull Lean (3), Neutral (mixed), Bear Lean (3 bearish), or Strong Bear (4โ5 bearish).
๐น CROSSOVER SIGNAL HIERARCHY
Not all EMA crossovers carry equal weight. The indicator differentiates three tiers with distinct marker sizes and shapes:
โธ Fast ร Mid (tiny triangles) โ Early signal. The 8 EMA crossing the 21 EMA indicates short-term momentum shift. Frequent, noisy, best used as an alert rather than a trigger.
โธ Fast ร Slow (standard triangles) โ Confirmation signal. The 8 EMA crossing the 55 EMA has more significance and filters out minor pullbacks.
โธ Mid ร Slow (diamonds) โ Trend shift signal. The 21 EMA crossing the 55 EMA typically marks a genuine change in trend direction. This is the least frequent and most reliable crossover in the set.
All crossover markers can be toggled off independently.
๐น DASHBOARD COMPONENTS
The top-right dashboard (position and size adjustable) contains:
Row 1 โ TREND: Current trend state (โฒ Bullish / โผ Bearish / โ Neutral) with bar count showing how long the trend has been active.
Row 2 โ ZONE: Where price sits relative to the ribbon (Above / Inside / Below) alongside the momentum score out of 100.
Row 3 โ SQUEEZE: Active squeeze status with a visual strength bar (โโโโโโโโโโ) showing current spread intensity relative to its recent range.
Rows 4โ9 โ MTF OVERVIEW: Trend, spread, and grade for the current chart, 15m, 1H, 4H, and 1D timeframes.
Row 10 โ BIAS: Multi-timeframe confluence verdict with bull/bear count.
๐น SETTINGS
EMA Settings
โธ Fast / Mid / Slow EMA Period โ Default 8/21/55. Periods must be in ascending order.
โธ Source โ Close, Open, High, Low, HL2, HLC3, or OHLC4.
Overlay Settings
โธ Background Transparency โ Controls the intensity of the trend-colored chart background (0โ99).
โธ Crossover Signals โ Toggle the three-tier crossover markers.
โธ Ribbon Fill โ Toggle the colored fill between EMA lines. Fill turns yellow during active squeeze.
โธ Dynamic EMA Colors โ Toggle slope-based EMA coloring (green = rising, red = falling).
โธ Bar Coloring โ Optional candle coloring by trend state and price position. Off by default.
โธ Squeeze Detection โ Toggle squeeze markers and dashboard squeeze status.
Dashboard
โธ Table Size โ Tiny, Small, Normal, or Large.
โธ Table Position โ 8 positions (corners, centers, sides).
Thresholds
โธ Weak/Strong spread thresholds (%) โ Define what constitutes a weak, moderate, or strong trend spread. These should be adjusted per asset class (e.g., lower for forex, higher for crypto).
โธ Squeeze Lookback โ Number of bars used to calculate the average ribbon width for squeeze detection.
โธ Squeeze Ratio โ The compression threshold. A ribbon narrower than this ratio ร average width triggers a squeeze flag.
๐น ALERTS
Nine configurable alert conditions:
โธ Bullish / Bearish EMA Crossover (any tier)
โธ Mid ร Slow Bullish / Bearish Shift
โธ Bullish / Bearish Stack Formed
โธ Squeeze Detected (compression begins)
โธ Squeeze Released (expansion starts)
โธ High Momentum (score crosses above 80)
๐น SUGGESTED USE
This indicator works as a trend filter, not a standalone entry signal. Use it to:
โธ Confirm directional bias across timeframes before entering trades
โธ Identify compression phases where breakouts are likely
โธ Gauge trend quality and exhaustion via the momentum score and bar duration
โธ Filter crossover signals โ a Fast ร Mid cross during an active squeeze with MTF confluence is a higher-probability setup than the same cross in isolation
Pairs well with oscillators (RSI, Stochastic), volume-based indicators, or support/resistance tools for entry timing. Penunjuk

Multi-Timeframe Squeeze Board LiteWhat it shows
Multi-Timeframe Squeeze Board โ Lite answers one question at a glance: "Where is this symbol compressed, and which way is momentum leaning, on every timeframe that matters?" For the chart's symbol it displays a compact table with one row per timeframe โ 15m, 1h, 4h, Daily, Weekly โ and two readings per row:
- Sqz โ the TTM Squeeze compression state as a colored dot, using the standard three-level cascade: orange = high squeeze (deepest compression), red = mid squeeze, black = low squeeze, green = no squeeze (volatility released / normal).
- Mom โ the squeeze momentum oscillator as a colored arrow using the classic 4-color scheme: aqua = positive and rising, blue = positive but falling, yellow = negative but rising, red = negative and falling. The arrow points up when momentum is increasing bar-over-bar and down when it is decreasing.
A stacked squeeze (orange/red dots on several adjacent timeframes) marks a market coiling across horizons; the momentum colors tell you which side the pressure is building on.
How it works
Each row runs the full TTM Squeeze calculation on its own timeframe via request.security() with lookahead = barmerge.lookahead_off (no future data, ever):
1. Bollinger Bands: SMA(close, 20) basis, 2.0 ร population standard deviation.
2. Keltner Channels: the same SMA(close, 20) basis, with band width = SMA of True Range over 20 bars (simple average of TR โ not Wilder's ATR) at three multipliers: 1.0, 1.5, 2.0.
3. A squeeze is on when the Bollinger Bands sit fully inside the Keltner Channel on both sides. The narrower the Keltner band that still contains the BB, the deeper the compression โ hence the 1.0-multiplier band defines the high squeeze, 1.5 the mid, 2.0 the low.
4. Momentum is the linear regression of price's deviation from the average of the Donchian midline and the SMA, over the same 20 bars.
By default the board evaluates confirmed bars only: every row shows the last fully closed bar of its timeframe, so a dot or arrow never changes after it appears. See Limitations for the tradeoff.
Inputs
- Squeeze length โ lookback for BB, KC and momentum (default 20, the canonical TTM setting).
- Confirmed HTF bars only โ ON (default): stable, non-repainting readings that lag up to one bar of each row's timeframe. OFF: rows track the still-forming higher-timeframe bar โ more current, but the reading can flip until that bar closes.
- Table position / Table size โ where the board sits and how large it renders.
How to use it
Apply it to a 15m chart (or lower) so all five rows populate. Scan the Sqz column top-to-bottom: multiple orange/red dots stacked across timeframes indicate multi-horizon compression โ historically the precondition for expansion moves. Then read the Mom column for directional lean while the compression resolves. The board is a context tool: it tells you where energy is stored, not when or in which direction it must release.
Limitations โ please read
- Confirmed-bar lag: with the default non-repainting mode, the Weekly row updates once per week, the Daily row once per day, etc. That is the honest cost of stability. Turning the toggle off shows the live forming bar instead, and those readings can change until the bar closes.
- Rows below the chart's timeframe show "โ": Pine's request.security() cannot reliably reconstruct lower-timeframe series, so instead of showing a possibly wrong dot the board declines to show one. Use a 15m chart to see everything.
- A squeeze has no direction. Compression means stored energy, not a buy or sell signal. The momentum color is a lean, not a prediction.
- Warm-up: each timeframe needs about 20 bars of history before its row populates (shown as "ยท" until then).
This board covers one symbol โ the chart's.
Penunjuk

Volatility Squeeze Ignition [MarkitTick]๐ก A multi-dimensional analytical engine designed to detect periods of extreme market consolidation and validate the subsequent directional expansion. By measuring the mathematical relationship between standard deviation and average true range, this tool identifies equilibrium zones where price action compresses and stores kinetic energy. Rather than reacting blindly to every volatility spike, the script employs a sophisticated filtration matrix that evaluates underlying volume delta, higher timeframe macro-trend alignment, directional movement strength, and immediate candlestick morphology. This creates a rigorous framework that authenticates breakout signals, ensuring that traders only focus on high-probability momentum ignitions supported by definitive market conviction.
โจ Originality and Utility
Standard volatility indicators often generate breakout signals without providing any insight into the underlying market participation or the structural validity of the move. This system distinguishes itself by integrating a state-tracking memory engine that monitors the cumulative buying and selling volume specifically during the compression phase. This continuous volume delta tracking allows the system to pre-assess the directional bias before the actual breakout materializes. Furthermore, it incorporates a dynamic risk-to-reward projection matrix mapped directly onto the chart. It calculates stop-loss zones and sequential take-profit levels based on the exact width of the preceding volatility squeeze. This creates a completely self-contained analytical environment that bridges the critical gap between signal generation and precise trade management, eliminating the need for discretionary target plotting and manual risk calculations.
๐ฌ Methodology and Concepts
โ The Volatility Squeeze Engine
The core mechanics rely on the precise interplay between Bollinger Bands and Keltner Channels. A squeeze state is formally activated when the Bollinger Bands contract entirely within the boundaries of the Keltner Channels. This condition signifies that the market's standard deviation has fallen below its historical true range, indicating a profound period of low volatility and liquidity resting. The system mathematically locks in the exact width of the bands at the onset of this compression. An ignition signal is mathematically validated only when the price decisively breaks outside the Bollinger Bands, provided the bands have begun to expand.
โ Volume Delta Profiling
While the squeeze state is active, the script meticulously aggregates the volume of up-closing bars versus down-closing bars. This builds a cumulative delta sum. When a breakout triggers, the system references this stored delta to ensure that the directional break is fully supported by the actual volume flow accumulated during the consolidation phase, preventing false breakouts engineered by low-liquidity spikes.
โ Multi-Dimensional Filtering
The breakout validation process is governed by a rigorous confluence matrix:
Higher Timeframe Alignment: Evaluates a simple moving average on a higher resolution chart to ensure the breakout trades strictly in the direction of the macro trend, utilizing a secure, non-repainting data referencing architecture.
Trend Strength Evaluation: Integrates the Average Directional Index to demand a minimum trend strength threshold, actively filtering out choppy, sideways market noise.
Candlestick Morphology: Evaluates immediate, candle-by-candle price and momentum interaction. The real body of the breakout candle must constitute a specific percentage of the total high-to-low range, confirming definitive and immediate market conviction rather than relying on lagging divergences.
Volatility Expansion: Compares the current channel width against the locked width from the start of the squeeze, ensuring the breakout is accompanied by a genuine expansion in market volatility.
๐จ Visual Guide
โ Chart Overlays
Active Squeeze Background: A subtle blue vertical background highlight appears when the volatility squeeze is actively compressing.
Breakout Backgrounds: A vibrant teal background signals a confirmed bullish squeeze ignition, while a vivid crimson background highlights a bearish squeeze ignition.
BB Basis Line: A solid blue line representing the central moving average of the standard deviation channel.
KC Lines: Muted, semi-transparent lines mapping the upper and lower boundaries of the true range channel.
โ Trade Management UI
Entry Line: A dashed blue line marking the exact closing price of the validated breakout candle, accompanied by a dynamic price label.
Stop Loss (SL) Line: A solid, thick crimson line indicating the invalidation level. Depending on user settings, this is positioned either at the opposite channel edge or calculated via an ATR multiplier. A red translucent fill connects the Entry to the SL, visualizing the exact risk zone.
Take Profit (TP) Lines: Three distinct dashed teal lines representing sequential profit targets, derived from Fibonacci extensions of the locked squeeze width. A green translucent fill highlights the total reward zone from the Entry to TP3.
โ Information Dashboard
A comprehensive heads-up display anchored to the chart corner providing real-time telemetry on the system's state:
Squeeze Status: Displays whether the compression is currently ACTIVE or OFF, alongside a graphical progress bar.
Sqz Bars: A numerical count of how long the current squeeze has been compressing.
BB Width %: A visual gauge showing the current width of the standard deviation channel relative to its basis.
Delta Bias: Highlights the dominant accumulated volume direction (BULLISH, BEARISH, or NEUTRAL) colored dynamically in teal or crimson.
R:R Metrics: Real-time calculation bars showing the exact risk-to-reward ratios for all three take-profit targets based on the current active signal.
Filter Diagnostics: Individual status readouts for HTF Trend, ADX, Body Strength, and Volume Confirmation, allowing traders to instantly see which filters are passing or failing.
๐ How to Use
โ Identifying Setups
Traders should monitor the chart for the appearance of the blue active squeeze background. During this phase, direct your attention to the Dashboard to monitor the "Delta Bias" and "Sqz Bars" count. A longer squeeze accompanied by a strong, building Delta Bias indicates a high-probability impending breakout. Wait for a confirmed candle close that breaks the channel limits, triggering the vibrant teal or crimson background.
โ Managing Trades
Once an ignition signal fires, the script automatically projects the entry, stop-loss, and three take-profit levels. Traders can use the SL line to place their initial protective stop. As price approaches TP1, traders may consider scaling out a portion of their position and trailing their stop loss to the Entry line to secure a risk-free trade. The graphical risk and reward fills visually assist in quickly assessing if the projected trade meets your personal risk parameters before execution.
โ๏ธ Inputs and Settings
โ Core Parameters
BB Range: Defines the calculation range for the standard deviation channel.
BB Mult: The standard deviation multiplier determining the width of the outer bands.
KC Range: Defines the calculation range for the average true range channel.
KC Mult: The multiplier dictating the width of the Keltner Channels.
Min Squeeze Bars: The absolute minimum number of consecutive compressed bars required before a valid ignition can be fired.
โ Filters
Require Volume Confirmation: Toggles the volume delta tracking engine.
HTF Trend Filter: Activates the macro-trend alignment requirement, preventing counter-trend breakout signals.
ADX Trend Strength Filter: Enables a strict momentum threshold requiring the market to be actively trending.
Candle Body Strength Filter: Enforces a structural rule where the breakout candle's body must meet a minimum size relative to its wicks.
โ Trade Tools & Alerts
SL Mode: Allows traders to select between a structural stop loss at the opposite channel edge or a volatility-based ATR stop.
TP1, TP2, TP3 Fib: Customizable Fibonacci multipliers that project the profit targets based on the original width of the market squeeze.
Dashboard Settings: Toggles the visibility and positional anchoring of the telemetry table.
Alert Actions: Advanced JSON-formatted string inputs allowing traders to define precise webhook payloads for entries, exits, and target hits, enabling seamless automated execution.
๐ Deconstruction of the Underlying Scientific and Academic Framework
โ Volatility Compression Theory
The fundamental architecture of this script is rooted in the cyclical nature of market volatility, which oscillates continuously between periods of extreme contraction and aggressive expansion. By cross-referencing standard deviation against an absolute measure of true range, the algorithm quantitatively identifies the inflection points where liquidity providers pull back and the market reaches a state of unnatural equilibrium. The mathematical locking of the channel width captures the precise kinetic energy stored during this phase, applying principles of mean reversion and standard deviation expansion to project the statistical probability of the ensuing vector move.
โ Order Flow and Delta Mechanics
To move beyond simple price derivatives, the system incorporates an approximated order flow model through its volume delta profiling. By segmenting traded volume into up-closing and down-closing aggregates during the compression state, the script builds a proxy for aggressive market participation. This mechanism relies on Auction Market Theory, assessing the imbalance between aggressive buyers lifting the offer and aggressive sellers hitting the bid. When the mathematical breakout aligns with the underlying delta accumulation, the script confirms that the price displacement is driven by genuine institutional or macroscopic participation, significantly reducing the statistical likelihood of a mean-reverting liquidity sweep.
โ ๏ธ 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. We 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. Penunjuk

Penunjuk

Robust Bollinger Bands"First and foremost, full credit and massive respect to John Bollinger for inventing the original Bollinger Bands, an absolute cornerstone of technical analysis. This script does not aim to replace his legendary work, but rather to build upon his core philosophy by applying modern robust statistics to solve extreme outlier scenarios."
Description:
Overview
The "Institutional Robust Bollinger Bands" is a highly advanced, mathematically robust volatility indicator designed to solve the most common flaws of the classic Bollinger Bands. Standard Bollinger Bands rely on a Simple Moving Average (SMA) and Standard Deviation. Because standard deviation squares the distance from the mean, extreme market events (flash crashes, large gaps, or massive outlier wicks) artificially inflate the bands. This creates a "ghosting effect" where the bands remain irrationally wide long after the volatile event has passed, leading to false signals (fakeouts).
This script completely rebuilds the volatility model using Robust Statistics, Huber Weights, Kaufman-inspired Efficiency Ratios, and Asymmetric Expansion.
How It Solves the Classic Bollinger Bands Problem
Median (Q50) vs. SMA: Instead of using an SMA for the Basis line, this indicator uses the Median (Q50). The Median is statistically immune to single-bar manipulation. Even if a massive outlier wick occurs, the Basis line remains stable, completely ignoring the "fake" movement.
Huber Weighted Dispersion vs. Standard Deviation: Instead of squaring outliers, this script uses Median Absolute Deviation (MAD) and Huber Weights. Price action that falls outside a statistical threshold (1.345 * MAD) receives heavily penalized weights. This means the bands measure true continuous volatility rather than being skewed by one-off anomalies.
Asymmetric Bands: Financial markets do not follow a perfect normal distribution (Bell Curve); they exhibit skewness and fat tails. This script calculates the Skewness (Q75 + Q25 - 2 * Q50) and Kurtosis (Q95 - Q05). If the trend is aggressively skewed to the upside, the upper band expands further while the lower band tightens, adapting to the directional momentum asynchronously.
The Role of Classic Indicators & Custom Volatility Engines
While the core logic replaces classic averages with quantiles, we still utilize the classic Simple Moving Average (SMA) for a very specific, underlying purpose: Smoothing dynamic mathematical engines.
Efficiency Ratio (ER): We calculate a raw directional efficiency (netDisp / hlRange) inspired by Perry Kaufman's methodology. We then apply an SMA to smooth this raw data. This smoothed ER dynamically adjusts the Lambda (Skewness) multiplier. When the market is trending cleanly, the asymmetry expands automatically.
Gap & Body Volatility: We measure real tick-by-tick shock (disp = body + gap). We use an SMA to compare the short-term volatility of this calculation against its long-term average. This dynamically adjusts the Mu (Fat Tail) multiplier, fortifying the bands automatically when market gaps increase.
Key Features for Traders
Self-Adaptive Multipliers: You don't need to manually change settings for different assets. The internal Efficiency Ratio and Volatility engines automatically scale the Skewness and Kurtosis multipliers based on the asset's current state.
Percentile-Based Squeeze Detection (Yellow Background): Instead of looking for an absolute lowest value (which often breaks in prolonged ranging markets), the script uses a Percentile Rank logic. If the current bandwidth falls within the narrowest 15% (adjustable) of the last 100 bars, the background turns Gold/Yellow. This provides a highly stable visual cue that a major volatility breakout is building up.
QUICK COMPARISON: CLASSIC BB vs. ROBUST BB
1. BASIS LINE (MIDDLE BAND)
Classic: SMA (Simple Moving Average) - Sensitive to spikes.
Robust: Median (Q50) - Completely immune to single-candle manipulation.
2. VOLATILITY MEASUREMENT
Classic: Standard Deviation (Squared errors) - Outliers cause "Ghosting Effect".
Robust: Huber Weighted Dispersion - Punishes outliers, keeping bands stable.
3. BAND STRUCTURE
Classic: Perfectly Symmetric - Ignores market trend bias.
Robust: Asymmetric Expansion - Adapts to price skewness (Bullish/Bearish bias).
4. DYNAMIC MULTIPLIERS
Classic: Static (User-defined) - Requires manual tuning.
Robust: Self-Adaptive - Automatically scales Kurtosis and Skewness via Efficiency Ratios.
5. SQUEEZE DETECTION
Classic: Manual observation.
Robust: Percentile-Rank Based - Background turns yellow when bandwidth is in the narrowest 15% of recent history.
Usage
Use this indicator exactly as you would use classic Bollinger Bands, but with the confidence that outlier wicks will not distort your analysis. Look for continuous Squeeze (yellow) zones to prepare for breakouts, and observe the asymmetric expansion of the bands to understand the true strength and bias of a trend.
Disclaimer: This script is for educational and analytical purposes only. It does not constitute financial advice.
Penunjuk

MACD Dynamic Squeeze Pro [ZynAlgo]1. Technical Overview
ZynAlgo MACD Dynamic Squeeze Pro is a momentum-context indicator built from the traditional MACD concept. Instead of trying to pick tops and bottoms against the trend, it focuses on trend-following shakeouts, energy compression, and breakout confirmation after a squeeze phase.
2. Chart Reading & UI Guide
ZynAlgo Ribbon
The area between the MACD line and Signal line is filled with Green/Purple ribbon colors.
The ribbon helps traders quickly see which side currently has momentum control.
Use the ribbon as context for your own trading approach, not as a standalone entry trigger.
4-State Histogram
Neon Green highlights bullish acceleration.
Neon Purple highlights bearish acceleration.
Faded colors warn that momentum is losing strength or price may be stagnating.
Diamond Marker on Main Chart
The breakout context marker is plotted directly on the main price chart.
This reduces the need to constantly switch attention between the oscillator pane and price candles.
Treat the marker as a context alert that should be confirmed with your own entry method, risk plan, and market structure.
3. Zyn Explosion Logic
The Green/Purple diamond markers appear only when the indicator detects several conditions together:
Trend Filter: The MACD and Signal lines must both be above the Zero line for bullish trend context, or both below the Zero line for bearish trend context.
Squeeze Phase: The histogram compresses, showing that the market is consolidating or shaking out traders.
Explosion Phase: After the squeeze, MACD crosses the Signal line with enough timing alignment to suggest momentum expansion.
This is a context/analysis tool, not a signal generator. The marker identifies a possible momentum continuation area, but it does not execute trades or guarantee direction.
4. Settings Explanation
Momentum Average Length
Controls the period used to calculate the average volatility of the histogram.
This average becomes the baseline for detecting whether current momentum is compressed.
Squeeze Compression Ratio
Controls how tightly the histogram must compress before the market is considered to be in a squeeze phase.
For example, 0.5 means the current histogram column must compress to less than 50% of the average.
Lower values reduce marker frequency and make the squeeze requirement stricter.
Squeeze Valid Lookback
Defines how many bars after the squeeze phase the MACD cross can still qualify.
This helps reject late or off-beat crossover events.
5. Recommended Presets
Gold Breakout - XAUUSD 5m/15m
Squeeze Average Length: 20
Squeeze Compression Ratio: 0.4
Valid Lookback: 3
Useful when gold creates short-term shakeouts before starting a stronger trend move.
Crypto Trend Following - BTC/ETH 15m/1H
Squeeze Average Length: 30
Squeeze Compression Ratio: 0.5
Valid Lookback: 5
Useful when crypto spends longer periods in sideways consolidation before momentum expansion.
6. Best Practices & Limitations
Use this tool as momentum and squeeze context for your own framework.
Confirm any trade idea with price structure, session context, volatility, and risk planning.
A diamond marker is not an automatic buy or sell instruction.
This tool does not predict price movement.
You alone are responsible for your trading decisions.
No tool eliminates risk or guarantees results.
Penunjuk

Adaptive Squeeze Breakout [NQ Labs]
Adaptive Squeeze Breakout
The Adaptive Squeeze Breakout combines two concepts into a single volatility-timing tool: adaptive Bollinger Bands that adjust to the current volatility regime, and a squeeze-to-breakout system that identifies volatility compression before expansion.
The Two Core Ideas:
1. Adaptive Bollinger Bands
Standard Bollinger Bands use a fixed deviation multiplier, which means they treat trending and choppy conditions identically. This version adjusts the deviation using a Kaufman-style efficiency ratio โ a measure of how directional recent price movement has been relative to its total path.
When price is moving efficiently (trending), the bands widen to give the move room. When price is chopping back and forth (low efficiency), the bands tighten. The result is a band that breathes with the market's character rather than applying one setting everywhere. The Adaptive Strength input controls how much this effect is applied, from fully fixed (0) to fully adaptive (1).
2. Squeeze-to-Breakout
A "squeeze" occurs when volatility compresses โ often preceding a larger move. This is detected by measuring when the adaptive Bollinger Bands contract inside the Keltner Channels. While the bands sit inside the Keltner range, the market is coiling. When they expand back outside, the squeeze releases, and the tool flags the breakout in the direction of momentum.
How It Works On The Chart:
โข Adaptive Bands โ The Bollinger Bands, colored by momentum direction, with the deviation adjusting to volatility efficiency.
โข Squeeze Highlight โ An amber background and marker dots appear while the market is in a squeeze (bands compressed inside the Keltner Channels), giving an at-a-glance view of coiling conditions.
โข Breakout Signals โ A triangle marks the bar where a squeeze releases, pointing in the direction of momentum at that moment.
โข Dashboard โ A panel showing the current squeeze state, momentum direction, bandwidth percentile (where current volatility sits historically), volatility regime (compressed / normal / expanded), and the live adaptive deviation value.
Settings:
All components are adjustable: Bollinger length and base deviation, adaptive strength, Keltner length and ATR multiplier, and full control over visuals, colors, and the dashboard position. Alerts are available for breakouts (up and down) and for the start of a squeeze.
How Traders Might Use It:
The squeeze highlights conditions of volatility compression, which some traders use as a preparation signal โ a period to watch for an impending expansion rather than to trade the range itself. The breakout marker then indicates the direction in which the compression resolved. As with any volatility tool, squeezes can release in either direction and can produce false starts, so many traders combine this with a trend or structure filter rather than trading breakouts in isolation.
Notes:
This indicator visualizes volatility conditions and breakout timing. It does not predict direction with certainty and makes no claim about future performance. It is intended as one component within a broader analysis process. Results vary across markets, timeframes, and conditions โ test thoroughly before relying on it.
Open-source and free to use.
Feedback and suggestions are welcome. Penunjuk

Penunjuk

Momentum Squeeze Breakout EngineDescription
*Momentum Squeeze Breakout Engine* is a quantitative, trend-following breakout strategy engineered to capture explosive directional moves emerging from periods of asset compression (squeezes). By combining precise volatility boundaries, structural market sentiment filters, and micro-momentum triggers, this strategy systematically avoids false breakouts.
### Core Mechanics & Features
1. Volatility Squeeze Identification
The foundation of this strategy relies on the relationship between *Bollinger Bands* and *Keltner Channels. When the Bollinger Bands contract *inside the Keltner Channels, it confirms a highly compressed, low-volatility environment (highlighted by the subtle blue background zones). This indicates stored market energy primed for release.
2. Rigid Structural Macro Filter (200 EMA)
To eliminate counter-trend traps, the strategy utilizes a strict 200-period Exponential Moving Average (EMA) as a macro baseline. Long entries are strictly prohibited if the asset is printing below this line, ensuring you only trade high-probability expansions aligned with the dominant institutional trend.
3. Holistic Intra-Bar Bias
Rather than relying purely on close prices, the script calculates an internal *Holistic Bias* engine. It evaluates where the close falls relative to each bar's high-low range over a specific structural lookback period. A valid breakout requires a positive cumulative sentiment bias (cumBias > 0), ensuring authentic accumulation is taking place.
4. Micro-Momentum (Rate of Change) Filter
To prevent entering "slow drift" scenarios or low-volume fakeouts, a 3-period Rate of Change (ROC) velocity check is integrated. A breakout will only trigger an entry if the price action demonstrates immediate expanding velocity (priceROC > 0).
# Execution Rules
* *BUY Signal:* Generated when a compression zone has broken out within the last 3 bars, the price crosses above the Upper Bollinger Band, the macro trend is bullish (Price > 200 EMA), holistic bias is positive, and positive momentum velocity is confirmed.
* *EXIT Signal:* Generated when the price crosses below the Lower Bollinger Band following a squeeze or when the holistic bias shifts negatively, functioning as a structural trailing mechanism.
* *Signal Spacing:* Features a built-in 15-bar cooldown rule to prevent over-trading and signal clustering within volatile consolidation nodes.
### Best Practices
* *Intended Timeframe:* Optimized for the *1-Hour (1H)* chart.
* *Assets:* Best suited for high-liquidity assets including Major Crypto Pairs (BTC, ETH), Blue- Chip Equities, Indices and Major Forex Pairs.
* *Risk Management:* Default settings utilize a 100% equity allocation model for raw backtesting transparency, but traders should scale their position sizes according to their personal risk tolerances.
### Disclaimer
*Financial and Trading Risk Warning:*
This script is an educational and analytical tool designed to demonstrate quantitative breakout concepts using historical data. It is published as an open-source resource for informational purposes only and does not constitute financial, investment, or trading advice.
Past performance is not indicative of future results. Market conditions change constantly, and systematic strategies can experience significant drawdowns. Automated trading involves substantial risk of capital loss. Never trade with money you cannot afford to lose. The author assumes no liability or responsibility for any financial losses incurred from the use or modification of this code. Always perform your own independent research and forward-test on a demo account before risking live capital. Strategi

Squeeze Momentum Pro - TTM Squeeze, Volatility Breakout & MomentSqueeze Momentum Pro - TTM Squeeze, Volatility Breakout & Moment is a modern volatility squeeze and momentum indicator for TradingView that shows you exactly when the market is coiling (building energy) and the precise moment that energy fires into a trend. It combines the classic TTM Squeeze concept โ Bollinger Bands contracting inside the Keltner Channel โ with a multi-tier compression engine (Squeeze Pro) and a glowing momentum histogram, so you can trade breakouts, momentum, trend continuation and volatility expansion on any market and any timeframe: forex, crypto, stocks, indices, futures, gold (XAUUSD), Bitcoin (BTCUSD), NASDAQ, S&P 500, oil and more. Built in Pine Script v6, it adds neon momentum candles, rare high-conviction squeeze fire signals and a live dashboard โ a clean, professional upgrade over a plain squeeze momentum oscillator. Keywords: squeeze momentum, squeeze pro, TTM squeeze, volatility squeeze, momentum indicator, Bollinger Bands, Keltner Channel, breakout indicator, volatility breakout, momentum oscillator, trend, buy sell signals, scalping, day trading, swing trading, no repaint.
โ WHY THE SQUEEZE WORKS
When Bollinger Bands contract inside the Keltner Channel, volatility is compressing โ the market is coiling like a spring. Low volatility is always followed by high volatility. The squeeze tells you a big move is building; the momentum histogram tells you which direction it is most likely to release. Trading the release of a squeeze is one of the highest-reward, lowest-risk setups in technical analysis.
โ WHAT IT DOES
3 compression tiers (Squeeze Pro): HIGH (BB inside KC x1.0, tightest coil), MID (x1.5), LOW (x2.0), and EXPANSION (bands released). Tier is shown by colour-coded dots on the zero line.
Neon momentum histogram: linear-regression momentum that glows brighter as it extends and dims as it fades โ instant read of strength and direction.
Squeeze Fire signals: rare, high-conviction arrows that fire only when a real coil (HIGH/MID) releases โ filtered to remove noisy weak releases.
Neon momentum candles: your chart candles are tinted by momentum (turquoise up / magenta down).
Live dashboard: State, a unique Coil Energy gauge (stored energy of the coil), Momentum strength, Signal and Bias.
โ HOW IT WORKS (under the hood)
Bollinger Bands (length/multiplier) measure compression; Keltner Channel (ATR-based) is the volatility reference. A squeeze is active when both BB edges sit inside the KC edges.
Three KC multipliers create three compression tiers so you can tell a mild coil from a maximum-tension coil.
Momentum is a linear regression of price versus the average of the Donchian midline and the moving average (LazyBear method).
The script tracks the tightest tier reached during each coil; a fire is only flagged when the coil reaches your chosen tier and then releases โ so arrows mean something.
Coil Energy accumulates from how long and how tightly price has been compressed, and discharges on release โ a unique read of stored breakout potential.
โ HOW TO USE IT
Wait for a squeeze (especially a HIGH tier โ tightest spring). The dashboard shows State and rising Coil Energy.
On the Squeeze Fire arrow, enter in the direction of the histogram colour (teal = long, magenta = short).
Stay in while momentum keeps extending (bars growing, bright colour); exit as momentum fades (bars shrinking, dim colour) or flips across the zero line.
Use Fire on release from to control signal frequency: HIGH only (rare, strongest) โ MID+ โ Any (more signals).
Works on all symbols and timeframes; combine with your own support/resistance, structure or trend tools for confluence.
โ SETTINGS
Squeeze Engine: BB length & multiplier, KC length, KC multipliers for HIGH/MID/LOW tiers.
Momentum: linear-regression length.
Fire Signals: release tier threshold (HIGH only / MID+ / Any).
Histogram / Candles: glow, tint chart candles by momentum, optional squeeze-zone shading, fire markers.
Panel: show/hide, position, background, accent colour.
โ ALERTS
Squeeze Fire Long / Short
High Squeeze started (maximum compression)
Momentum crossed zero
โ LIMITATIONS
This is a momentum/volatility tool, not a complete system โ always confirm with price action and risk management.
On forex and crypto, volatility (ATR) and momentum reflect the data feed of your broker/exchange; results can vary slightly between feeds.
A squeeze signals that a move is building, not its direction with certainty โ the momentum colour gives the probable bias, not a guarantee.
With "HIGH only" some calm instruments may rarely reach the tightest tier; loosen the KC HIGH multiplier or switch to "MID+" if you want more signals.
โ NON-REPAINTING
Every value comes from confirmed bar data with no lookahead and no security() smoothing tricks. A signal printed on a closed bar stays. As with any live tool, the current forming bar updates in real time and settles on close.
Squeeze Momentum Pro - TTM Squeeze, Volatility Breakout & Moment is an educational analysis tool, not financial advice. Always do your own research and manage risk. ยฉ LunqFX. Penunjuk

Strong Squeeze Signals | ProjectSyndicateStrong Squeeze Signals catches the moment a genuine volatility coil releases โ and instead of treating every flat patch as a setup, it waits for a real squeeze to fire, tags the direction from momentum, and ranks the release 0โ10 with a star score. A market that has been compressing for a stretch of bars โ its Bollinger Band wound tightly inside its Keltner Channel โ has to actually expand back out, in the direction of momentum, before a signal arms. Every setup gets a structural stop beyond the coil that just broke and fixed R-based targets, and is tracked live on a full statistics dashboard so you can see how the logic behaves on the exact symbol and timeframe you trade.
๐ง Squeeze-Release Core โ the core idea. The engine measures volatility compression directly from two bands. When a Bollinger Band contracts entirely inside a Keltner Channel, the market is coiling: range is shrinking and energy is building. A signal fires on the release โ the bar where the band expands back outside the channel โ and the direction is set by a linear-regression momentum oscillator that measures how far price sits from a composite centreline. Momentum above zero on the release fires a long; below zero fires a short. The longer and tighter the coil before it lets go, the more it counts. Signals are evaluated on the bar's close and are fixed once that bar closes โ the release does not repaint.
๐ Coil Mapping & Tightness โ while a squeeze is active, the engine continuously tracks how many bars it has been compressing, the high and low extent of the coil, and how tight it became โ the Bollinger half-width as a fraction of the Keltner half-width. A long coil that wound down to a very tight ratio is a loaded spring; both the duration and the tightness feed directly into the strength score. A minimum-coil filter ignores fleeting micro-squeezes, and an optional Strict Fire setting demands a confirmed expansion on the release bar rather than just the end of the coil.
๐ฏ Structural Stop + R-Based Targets โ the stop is placed just beyond the coil that just broke, with an ATR buffer: below the coil's low for a long, above the coil's high for a short โ then capped and floored by ATR so it can never balloon into a wide stop or collapse into a meaningless one. TP1, TP2, and TP3 are set at clean R multiples and default to 0.5R / 0.75R / 1.25R โ a tighter, hit-rate-leaning profile out of the box, and fully adjustable to whatever reward-to-risk you prefer. Every signal plots its complete Entry / SL / TP1 / TP2 / TP3 line set, labeled price levels, and filled TP / SL zone boxes, with a result label on exit.
๐๏ธ Coil-Conviction Controls โ two inputs set how serious a squeeze must be before its release counts: Minimum Coil Bars To Arm how long the spring must compress and Minimum Strength the 0โ10 gate. Tighten them for fewer, higher-quality fires; loosen them for more frequent signals. This is your main dial for conviction versus frequency.
๐งญ HTF Trend Alignment Filter โ an optional higher-timeframe EMA filter blocks counter-trend fires, keeping you on the dominant side of the market: longs only above it, shorts only below. The higher-timeframe value is read without lookahead. A signal cooldown spaces out entries so a single impulsive expansion doesn't stack multiple tickets.
โญ 0โ10 Setup-Quality Score โ every release is scored and labeled with 1โ5 stars and a tier FORMING โ WEAK โ MODERATE โ STRONG โ VERY STRONG โ ELITE across nine squeeze-native factors: coil length stored energy, coil tightness how far the band compressed inside the channel, momentum magnitude at release, momentum acceleration in the fire direction, volume confirmation, expansion-candle body and range, band-width widening on the break, higher-timeframe alignment, and RSI agreement. Treat the score as a confluence / cleanliness read for ranking and thinning setups โ it describes how textbook a squeeze release is, not a guaranteed outcome. A Minimum Strength / Only Strong gate lets you display and alert on stronger setups only, while the dashboard keeps tracking every tier in the background.
๐ Live Statistics Dashboard โ a non-intrusive panel tracks, in real time on your chart: the current squeeze state coiling / fired / expanded / no squeeze, live coil-bar count, the momentum reading, current status and the active trade, the last signal with its star score, total signals, win rate, closed trades, profit factor, average R per trade, best-performing direction, long vs short win rate, current and max win/loss streaks, and a TP1 / TP2 / TP3 / SL hit breakdown. These are computed live from the signals on your current symbol and timeframe โ so you can judge the settings yourself rather than trusting a number printed in a description.
๐จ Clean Themed Visuals โ an institutional colour palette shades each zone by direction and score: bullish coils run a teal family that deepens as the score climbs, bearish coils a red-to-magenta-to-purple family, so quality reads at a glance. The compression zone is drawn over the bars where the coil formed and labeled with FIRE plus its star score; the TP and SL zones are harmonized to the same palette. Four lighting themes drive the lines, labels, and dashboard; an optional faint background tint marks active coils, and optional state dots can sit under the chart. A Max Zone Width control caps how far the SL / TP / Entry zones extend to the right, so long trades never stretch into oversized towers across the chart.
๐ Detailed Alerts โ fires on strong long / short squeeze releases, plus squeeze-on new coil forming, squeeze-released, partial-TP, TP3, and SL events, including direction and score, formatted for manual or automated use. The minimum-strength setting can restrict alerts to higher-conviction setups.
๐ง Fully Customizable โ every component is exposed: Bollinger and Keltner lengths and multipliers, the true-range toggle, minimum coil bars and Strict Fire confirmation, the 0โ10 strength gate and Only-Strong filter, ATR length, the structural-stop buffer with risk cap/floor, the three R targets, level-shelf length and Max Zone Width, the HTF alignment filter, the signal cooldown, plus the full institutional box palette, all four themes, and every label, dashboard, and zone-shading option.
๐ฏ Why this is different โ most squeeze tools just print a histogram or drop a dot when the bands let go and leave everything after that to you. This one classifies the release direction from momentum, requires a real coil rather than a momentary flat spot measuring both how long and how tightly it compressed, demands momentum, acceleration, volume, and expansion confirmation, anchors the stop to the coil that actually broke, then layers an objective 0โ10 ranking and a live, on-chart statistics panel on top โ so you are tuning and judging the system on real, current data instead of a marketing figure.
๐ Where to use it โ markets that coil and expand: Forex, Gold XAUUSD, indices, and crypto, on intraday and swing timeframes M10/M15/M30/H1 and up. The ATR-based stop and R targets adapt to each asset's volatility automatically.
๐ฏ How to trade it
Apply it to a market that produces real volatility cycles and let the dashboard populate. Read the live win rate, profit factor, and average R for your symbol and timeframe before committing โ if the logic doesn't suit that market, you'll see it.
Keep the HTF Trend Alignment filter on so you only take releases in the direction of the larger trend.
Wait for a STRONG LONG FIRE / STRONG SHORT FIRE label โ it marks a confirmed coil release, with the star score and Entry, SL, and TP1/2/3 already plotted.
Manage the trade with the plotted levels: with the default sub-1R targets a common approach is to bank TP1 quickly, then trail or hold the remainder toward TP2/TP3; the structural SL defines your risk on the trade. If you prefer a higher reward-to-risk profile, widen the R targets in the inputs.
Use Minimum Coil Bars and Minimum Strength to set your style โ stricter for fewer, cleaner releases; looser for more activity โ and use the star score and Only-Strong gate to focus on the cleanest setups.
โ ๏ธ Important โ this is a decision-support tool, not a standalone buy/sell system, and it makes no performance guarantees. Default settings were chosen on historical data and behavior will vary by symbol, timeframe, and configuration; the dashboard's statistics are historical and descriptive, not a forecast. Note the default targets are sub-1R 0.5R / 0.75R / 1.25R: tight targets tend to raise the raw hit rate while lowering the reward-to-risk on each trade, so win rate read on its own is misleading โ always weigh it together with average R and profit factor, and resize the targets to your own risk profile. Signals confirm on the closed bar, so always wait for the labeled release on a closed candle. Always combine it with your own analysis and risk management, and test it on your market before trading it live. Penunjuk

Volatility Pressure & Regime AnalyzerVolatility Pressure & Regime Analyzer
## What this script does
VPRA estimates **when a market is loading energy for an outsized move, how large that move could be, and whether the current regime favors chasing or fading the breakout**. It condenses this into one on-chart verdict panel, directional signal markers, a regime ribbon, and a forecast of the expected move in ATR and points.
It works on **any symbol, any market, any timeframe**. A related volatility index and a companion symbol (the underlying if you chart a derivative, or vice versa) are optional inputs that sharpen the analysis; both can be disabled and the model renormalizes to price-only mode automatically.
## Why these components are combined (mashup justification)
Each module answers a question the others cannot, and the signal only fires when their answers agree. None of them is a stock indicator pasted alongside another โ they are inputs to a single pressure model:
1. **Compression (ATR percentile)** answers *"is energy being stored?"* Quiet ranges precede expansion, but compression alone says nothing about direction or timing.
2. **Implied-vs-realized volatility dislocation** (optional vol index) answers *"is the options market mispricing the calm?"* A large gap between implied and realized volatility marks complacency or stress that compression alone cannot see.
3. **Basis tension** (optional companion symbol) answers *"is positioning leaning?"* Momentum in the derivative-to-underlying spread, and outright backwardation, reveal funding pressure and de-risking invisible in a single price series.
4. **Convexity and trend inefficiency** (return acceleration, efficiency ratio) answer *"is price behavior becoming unstable?"*
These four are blended into one **Pressure score (0โ100)**, percent-ranked against its own history so thresholds adapt to every symbol and timeframe.
5. **A variance-ratio regime filter** answers *"will the break run or get faded?"* The ratio of k-bar to 1-bar return variance classifies the tape as mean-reverting (pinning) or trending (amplifying). Breakouts in a pinning regime are statistically more likely to fail, so the script can label or skip them.
6. **A multi-timeframe trend filter (Ichimoku cloud bias on the chart TF + three higher TFs)** answers *"is the release direction supported by structure?"* It grades signals rather than generating them. Higher-timeframe values are taken from **closed bars by default, so the confluence grade does not repaint**.
7. **Session, expiry, gap and event context** scale the expected-move forecast: an expiry-afternoon release during a volatility spike forecasts a larger move than a sleepy mid-session one.
Removing any module degrades a specific, named capability โ that is the test the combination was built to pass.
## How a signal is generated
A marker prints only when **all** of the following align: pressure has reached a high percentile of its own history within a short lookback ("loaded"), the current bar shows a genuine range expansion ("release"), the condition persists for a confirmation bar count, a debounce gap has passed, and (optionally) the regime and trend filters pass. Direction is scored from **trigger-break** (close beyond the prior N-bar extreme), **close location** within the bar, and short momentum.
Marker color encodes the inferred event type: expiry-session releases, volatility-co-movement squeezes (price and vol index moving together โ a short-covering tell), or plain expansions. The glow ring encodes how many higher timeframes agree. An โ label stores a full diagnostic snapshot (pressure, regime, instability, basis, energy, session, expected move) in its tooltip for every signal.
## How to use it
- Apply to a liquid symbol; set "This chart is" to Derivative or Underlying, point the companion and volatility-index inputs at your market's related symbols (or disable them), and set your session hours and expiry weekday.
- Read the panel top-down: **Regime** (chase vs fade), **Pressure/Energy** (how loaded), **Move size** (forecast), **Trend align / HTF** (structure), **Triggers** (the price levels that confirm).
- Use the "Filter" modes to suppress signals against regime or higher-timeframe structure, or leave them as badges and judge manually.
- The advanced rows show per-type follow-through statistics (hit rate, average favorable and adverse excursion in ATR) and an early-vs-late history split as a coarse robustness check. **These are in-sample descriptive statistics, not a backtest.** A companion strategy script with identical logic is available for proper backtesting with costs.
- Alerts: per-signal dynamic alert with all values (webhook-ready), plus static conditions for expiry signals, releases, critical pressure, and vol shocks.
## Originality
The pressure blend (compression x vol-dislocation x basis tension x convexity x inefficiency, percent-rank normalized), the variance-ratio regime gate applied to breakout qualification, the compression-energy budget, and the per-type MFE/MAE statistics with an early/late split are original constructions written from first principles for this script. The only classical components used are public-domain building blocks (ATR, Bollinger/Keltner-style compression logic via ATR percentile, Ichimoku cloud bias as a trend filter, Kaufman efficiency ratio), each justified above.
## Limitations (please read)
- Dealer-positioning effects (often discussed as gamma/vanna/charm) are **inferred from price, volatility and basis behavior**. This script does not and cannot read option-chain open interest. Labels such as "gamma blast" describe an expiry-session release pattern, not a measured dealer position.
- All on-panel statistics are computed on the loaded chart history and will differ across symbols, timeframes and history length.
- Higher-timeframe confluence uses closed HTF bars by default (no repaint); the current chart bar still forms in real time, as with any script.
- Expected-move figures are model estimates, not guarantees.
This script is for education and analysis. It is **not financial advice**; trade at your own risk and test before use.
Penunjuk

Adaptive Bollinger Bands Calibrated and Regime-Aware# Adaptive Bollinger Bands โ Robust, Calibrated & Regime-Aware (BB ARC)
## What this is
Most Bollinger Band tools plot a simple moving average plus or minus two standard deviations and assume price is normally distributed. Real price is not: it has fat tails, it is skewed, and a single spike distorts the width. BB ARC is a full reworking of the Bollinger idea that measures the **actual distribution** of the symbol on your chart, builds statistically honest bands from it, proves how well those bands describe the market in real time, and then decides whether a band touch should be **faded** (range) or **ridden** (trend). Everything is universal: the price source and all optional reference feeds are user-selectable, so it runs on any symbol, any market and any timeframe.
It plots the bands and signals on the price chart and an analytics oscillator (%B or band-z) in a lower pane, with a single dashboard that turns all of it into one read.
## Why these components are combined (mashup rationale)
A raw band only says "price is far from its average." On its own that is ambiguous: in a quiet range a touch of the band mean-reverts, but in a strong trend price "walks the band" and keeps going. Giving the same signal in both situations is the classic Bollinger weakness. BB ARC combines several layers specifically because each one removes a weakness the others cannot, and they feed each other in sequence:
1. **Honest band engine** โ replaces the naive standard-deviation width with a choice of robust (median / MAD), asymmetric (separate upside/downside deviation, capturing skew), empirical-quantile (width set so the band actually contains your chosen percentage of bars), or EWMA-volatility estimators, plus a kurtosis-adaptive multiplier that widens the band when tails are fat. This makes the *distance* of a touch statistically meaningful instead of an arbitrary 2-sigma.
2. **Calibration layer** โ because the bands now claim to contain a certain fraction of price, the script measures the **realized containment %** on the current symbol, plus skew and kurtosis, so the band proves its own validity instead of asking you to trust a textbook assumption.
3. **Regime filter** (efficiency ratio + ADX + volatility clustering) โ decides whether the market is ranging, trending or volatile, and therefore whether the correct response to a band touch is to fade it or ride it. This is what resolves the Bollinger paradox above.
4. **Mean-reversion math** โ an Ornstein-Uhlenbeck half-life estimate quantifies how many bars a touch typically takes to revert (and reports "trending" when there is no clean reversion), and band-walk persistence counts how long price has been pinned to a band. Together they tell you whether a reversion is realistically tradable.
5. **Multi-timeframe confluence** โ checks %B agreement across four timeframes and draws higher-timeframe band rails on your chart, so a signal is not taken against the larger structure.
6. **Conviction engine** โ blends the stretch, regime fit, MTF agreement, half-life quality, calibrated edge, volume thrust and order-flow into a single 0-100 score with hard vetoes, so you get one decision rather than several conflicting indicators.
None of these layers is decorative; remove any one and the others lose context. That interdependence is the reason they are published together rather than as separate scripts.
## What it does, step by step
- Builds a basis (SMA / EMA / rolling VWAP / robust median) and three band tiers using the deviation engine you select.
- Computes **%B** and **bandwidth**, a signed **band-z** (how many multiples beyond the basis, using the correct up or down deviation), realized **containment %**, **skew/kurtosis**, **half-life**, **band-walk** streaks, an empirical **reversion probability** (how often, historically on this symbol, a band touch returned toward the basis within N bars), and a **squeeze** state with an expansion-direction read.
- Classifies the **regime** and auto-selects **Fade** (range reversion) or **Ride** (trend continuation) logic.
- Detects regular **%B divergence** and can draw it as lines connecting the pivots on price.
- Produces a **verdict** (LONG / SHORT / VETO / FLAT) with a conviction score and tier, and fires alerts on bar close.
## How to use it
1. Add it to any chart. The bands appear on price, the %B/band-z analytics in the lower pane, and the dashboard in the corner.
2. Read the **REGIME** and **MODE** rows. In a Range regime the engine looks to **fade** outer-band touches back toward the basis; in a Trend regime it looks to **ride** band-walks in the trend direction.
3. Use the calibration rows as a confidence check: a high containment %, a short half-life and a favourable reversion probability support a fade; "trending" half-life and persistent band-walk support a ride.
4. Treat the **CONVICTION** score and **VETO** as the gate โ a high score with no veto is the cleanest setup; a veto explains why a tempting touch is being skipped.
5. Optional: enter a volatility-index symbol and/or a correlated instrument in the feed settings to add a volatility-spike veto and cross-asset confluence. Both are blank (off) by default, so nothing market-specific is assumed.
## What makes it original
- A **multi-engine, statistically honest** band (robust, asymmetric semideviation, empirical quantile, EWMA, fat-tail-adaptive) rather than a single SMAยฑkฯ.
- **Live self-calibration**: the band reports the percentage of bars it actually contained, on the current symbol, so its claim is verifiable.
- An **Ornstein-Uhlenbeck half-life** read that turns "far from the mean" into "expected to revert in about X bars, or not at all."
- An **empirical reversion-probability** statistic built from the chart's own history.
- A **regime-driven fade/ride auto-switch** and a single **conviction score with vetoes**, so the same band touch is interpreted correctly in different market states.
## Settings overview
Grouped as: Core (price source, basis, adaptive length), Band Engine (deviation engine, multipliers, quantile %, EWMA lambda, fat-tail), Regime, Mean-Reversion, Calibration, Squeeze, Signals, MTF, Conviction (weights and minimum), Risk (used for sizing and alert context), Optional Reference Feeds (volatility index, cross-asset โ both off by default), and Display (bands, fills, divergence-as-lines toggle, adaptive dashboard, legend, identity label).
## Universal data source
The whole engine runs on a user-selected **price source** (close, hl2, hlc3, ohlc4, or even another indicator's output), and the optional reference feeds are typed in by the user, so the script is not tied to any one instrument or exchange. It also degrades gracefully on instruments without volume.
## A note on the chart used for publishing
The published chart shows only this script. The bottom-centre label prints the script name, the symbol and the timeframe so it is always clear what is plotted. No unrelated drawings or third-party indicators are added.
## Disclaimer
This script is a technical study for educational and informational purposes only. It is not financial, investment or trading advice, and it is not a strategy or a solicitation to buy or sell any instrument. The signals, levels, conviction scores and statistics it displays are derived from past price and volume on your chart and do not guarantee any future result. Markets involve risk; you are solely responsible for your own decisions and risk management. Test thoroughly before relying on any tool.
Penunjuk

SuperTrend Exhaustion Clues [Gabremoku]SuperTrend Exhaustion Clues is a context-aware SuperTrend indicator that separates structural direction from signal timing. Instead of treating every flip as a trade trigger, it classifies market behavior into four states: Transition, Confirmed, Compressed Break, and Exhausted. The goal is to show when trend structure is still healthy, when it is compressing, and when it is weakening enough to start looking for directional clues.
The core logic combines four elements: SuperTrend for directional structure, ADX and DI for trend strength, VWAP and price location for acceptance, and compression detection for squeeze/release context. These components are not merged just for convenience; they work together to decide whether price is merely changing direction structurally or whether it is also showing enough internal confirmation to justify attention.
BUY and SELL signals are not printed on every flip. They are designed to appear only during Exhausted phases, and only when directional clues align with the next likely move. This makes the indicator more selective than a standard SuperTrend and better suited to reading late-stage trend fatigue and early follow-through behavior.
A built-in Signal Profile lets you choose between Responsive, Balanced, and Selective behavior. Responsive lowers the confirmation threshold and is better for faster charts, Balanced is the default middle ground, and Selective raises the bar for cleaner but rarer signals. For this reason, the script is especially useful on lower timeframes, where exhaustion tends to be easier to read and directional clues appear earlier.
For higher timeframes, the script can keep showing state, regime, and clue scores while disabling signals from 4H and above. This helps avoid forcing execution signals where the exhaustion logic is less expressive, while still letting you use the indicator for context and structure.
The visual design is intentionally restrained: bullish states are blue, bearish states are yellow, compression is purple, transition is gray, and exhaustion is red. The SuperTrend line, gradient fill, dashboard, and color legend are meant to make the state of the market easy to read at a glance without cluttering the chart.
How to use it: watch the current state first, then use Exhausted phases as the main area of interest. When the script shows Exhausted and the directional clue score aligns with the next move, that is the moment it is designed to highlight. On 4H and above, the script is better used as a structural context tool rather than a signal engine.
@Gabremoku
TradingView Penunjuk

MACD Dive [TTM Squeeze | Dual Lock %R]Disclaimer : This indicator is not financial advice and is strictly for educational and informational purposes only. The metrics and signals provided herein (including momentum crosses, trend saturation state icons, and squeeze markers) are calculated based on historical market data and do not guarantee future performance. Trading stocks and commodities involves significant risk of loss. The user assumes full responsibility for all trading decisions and should always perform their own due diligence before executing trades.
MACD Dive is a multi-state momentum and volatility context engine. By layering momentum oscillation (MACD/PPO/MACD-V) with market stalemates (volatility squeeze) and trend exhaustion (Dual %R saturation), this suite transforms a standard MACD into a multi-dimensional 'No-Go' gatekeeper. This synergy is what gives the engine its edge: it actively blocks the trader from whipsawing in sideways chop or buying into a dying trend, highlighting high-probability market turns where momentum, volatility, and trend capacity perfectly align.
Standard oscillators have a scaling problem. This script lets you choose your engine:
MACD (Classic): Measures momentum in absolute dollars. Great for visual reactivity, but a "2.0" reading means something different on a $5 stock versus a $500 stock.
PPO (Percentage): Measures momentum in percentages. Standardizes the reading across all assets, making it ideal for fixed-rule algorithmic trading.
MACD-V (Volatility Normalized): This divides the MACD by the Average True Range (ATR). It measures momentum in "Units of Volatility," mathematically adapting to market chaos so that signals remain consistent across both different assets and shifting volatility regimes (quiet markets vs chaotic markets).
This suite includes a fully optimized divergence detection engine:
Regular Divergence (Solid Lines): Identifies Trend Reversals. Price pushes to a new extreme, but momentum fails to follow, signaling exhaustion.
Hidden Divergence (Dashed Lines): Identifies Trend Continuations (Slingshots). Price pulls back, but momentum fully resets, signaling a high-probability entry in the direction of the dominant trend.
Located in your chosen corner, the HUD provides an instant visual readout with hover tooltips for active Engine Mode, %R Fatigue state, Oscillator crossover validation, and Squeeze environment. Vertical background highlights in green or red represent filter-passed momentum crossovers, like the MACD bullish cross. Use the extensive inline tooltips in the indicator's settings panel for a comprehensive breakdown of every tunable parameter.
Adaptive Time-Frames & RSI Gatekeeper
Think of this as an automated gear shifter. When looking at lower timeframes (below a user-defined boundary, e.g. 1 hour), the engine automatically scales down to tight, agile lookback periods. When viewing high timeframes, it dials up to filter out noise.
Buying a bullish MACD cross when the RSI is already at 85 increases risk of buying the top when the tank is empty. The optional RSI Safety Filter acts as a strict ceiling/floor blocker. If momentum crosses upward but the asset is mathematically overbought, the indicator suppresses the background highlight. It prevents signals on MACD crosses that have no fuel left.
VOLATILITY ENGINE: BB-KC Squeeze Radar
Building on John Carterโs TTM Squeeze by mapping the contraction of Bollinger Bands inside Keltner Channels to identify market stalemates. The implementation here color codes between a Loose Squeeze (BB inside 1.5 KC) and a hyper-compressed Tight Squeeze (BB inside 1.0 KC) to show the staged intensity of the coiled spring.
While the market coils sideways, a 20-period Linear Regression calculates the trajectory of price deviation inside the bands. The directional bias is shown by customizable markers on the zero line (default โ or โ). This reveals hidden institutional accumulation or distribution before the trigger is pulled. To bypass "dead money" risk, the script tracks the first clean candle close or intraday pierce outside the Keltner bounds following a squeeze, catching the expansion phase exactly as it starts.
Furthermore, it accounts for the "Disappearing Mark" phenomenon. Bollinger Bands expand instantly when price moves, causing standard squeeze signals to vanish 1-3 bars before the real breakout candle. This script uses a memory state to remember recent compression, firing a "squeeze release" marker (default โ) the exact moment price closes outside the Keltner bounds. Trade the release, not the waiting room.
Note: While MACD Dive tracks this compression mathematically on its zero-line, you can see the actual physical boundaries of the breakout by pairing it with my companion Swing Data suite . Plotting its Keltner Channel at 1.5 multiplier over your price chart allows you to visually verify the exact moment the squeeze release mark is ignited.
SATURATION ENGINE: Dual-Lock %R and Momentum Rot
This suite tracks sustained trend maturity using a fast/slow dual Williams %R setup. The conceptual pairing of a fast and slow %R to identify overbought/oversold exhaustion is credited to upslidedown's excellent Trend Exhaustion indicator . I highly recommend applying their script to your chart if you want to visually learn how the two %R lines interact.
While upslidedownโs implementation offers multiple display modes to paint visual boxes and exhaustion zones directly over price action, the focus here is on the discrete icons for trend status at the top and bottom of the MACD pane: Ignition (ยท), Saturation (โก), and Fatigue (ร). This suite adapts native ta.wpr() math assuming the trader is already familiar with Dual %R mechanics. Specific "Sprint" and "Marathon" tuning guidance is provided in the tooltips: heavily smoothing the fast line to ignore intraday noise, while lightly smoothing the macro slow line to preserve its reach into extreme zones.
It also features one major addition: the Stall. While Dual %R tracks Price Location (confirming price is structurally pinned at the highs), it doesn't track Velocity (confirming energy is sustained). To solve this, a Stoch RSI "Rot" detector runs quietly inside the saturation state. If price continues to float at the highs but internal velocity drops below a critical threshold, the script overlays a Stall marker (โข). Designed as a "one-shot" early warning, it fires only on the first detection per trend saturation leg to prevent chart clutter. This differentiates a strong trend lock from a rotting lock, warning us that the move is running on fumes: giving us the exact cue to tighten stops, trim into parabolic strength, and strictly avoid adding new size.
BACKTESTER READY
Out-of-the-box compatibility with a comprehensive built-in README guide is available directly inside the settings menu. For traders who prefer a "Diamond Hands" approach, the indicator fully maps to Jason5480's TTS Framework convention, outputting strict integer states (1, -1, 2, -2) to hold full position size until the trailing macro baseline completely fractures. My personal backtester, Cosmos Signal Commander (which may be released to the public in the future), broadcasts a composite float signal capable of managing active trade positioning. It tracks entries, hard stops, and partial take-profits (swapping the trailing stop from tight to a wide "runner" buffer upon hitting extended ATR targets).
PERFORMANCE OPTIMIZATION
O(1) Memory States: Replaced lag-heavy ta.barssince() and 50-bar for loops in the Divergence engine with O(1) var state trackers.
String Caching: HUD table strings are built once in the global var scope to prevent constant memory allocation and garbage collection lag.
UI Mutation: The HUD uses table.cell_set_* to alter data dynamically, bypassing the stutter caused by destroying and redrawing tables on every tick.
Native C++ Backend: Replaced custom highest/lowest math arrays with native ta.wpr() functions for the %R engine to maximize computation speed.
Ghost State Resets: When switching the backtester logic to "Long Only" mode, the engine actively hunts and kills lingering short-memory variables so they don't inadvertently suppress valid long signals.
Penunjuk

Squeeze Vector [Gabremoku]Squeeze Vector is a squeeze-based volatility breakout tool that combines Bollinger/Keltner compression detection, directional pressure flow, and a first-expansion state machine to help traders identify high-probability post-squeeze breakout setups.
The core idea is simple: compression precedes expansion. When Bollinger Bands shrink inside Keltner Channels, the market is coiling โ and when that squeeze releases, the first directional signal can carry strong momentum. This script gives that process a structured visual and logical framework.
Core Concept โ Squeeze โ Release โ Direction
A BB/KC squeeze occurs when Bollinger Bands, which reflect price volatility through standard deviation, contract inside Keltner Channels, which reflect typical range through ATR. This gap between the two envelopes is used as a proxy for volatility compression.
When BB width becomes smaller than KC width, the script identifies a Squeeze state. When it releases, the script enters an Armed state and opens a short post-squeeze window during which it looks for the first valid directional expansion.
Importantly, the squeeze release alone does not confirm direction. That is why the script adds multiple expansion confirmation filters before triggering a signal.
What it shows
Squeeze Vector Oscillator โ a single line that rises as BB/KC compression increases. When it crosses above 50, the squeeze is active. The oscillator turns purple during squeeze states for fast visual identification.
Pressure Flow Histogram โ a volume-weighted directional pressure value that reads where price closed within the candle range and weights it by volume relative to its moving average. Positive values indicate bullish pressure, negative values indicate bearish pressure.
Bollinger Overlay on Price โ during squeeze states, the script renders Bollinger Bands directly on the main chart with gradient fills, making it easy to see where price is relative to the compressed structure.
LONG / SHORT signals โ primary directional signals are placed on the main chart after a post-squeeze expansion bar meets all required conditions. Optional lighter repeat markers can be shown for follow-through confirmation.
Dashboard with live checklist โ the on-chart dashboard shows the current state, regime, pressure, vector value, and a 6-point checklist for both long and short setups, with filled/empty circles to show how many conditions are currently met.
Signal Logic
The signal engine works as a state machine with three phases:
Squeeze โ BB/KC compression is active. No signal is generated. The dashboard shows SQUEEZE.
Armed โ the squeeze just released. The script opens a short expansion window and waits for directional confirmation. The dashboard shows ARMED.
Expansion signal โ within the expansion window, if a valid directional bar forms with sufficient pressure, body size, and break condition, a LONG or SHORT label is placed on the main chart.
Signal direction is confirmed by checking:
Basis side: price above or below the BB basis
Pressure: smoothed directional pressure above threshold
Strong pressure: optional stronger filter
Body quality: minimum body-to-candle-range ratio
Break condition: higher high or lower low
Regime: optional EMA 200 trend filter
When both long and short conditions are simultaneously valid, the stronger pressure side wins. If pressure is equal, raw pressure bias decides.
States and Dashboard
The dashboard tracks the full machine at a glance:
Row Content
SQZ Squeeze ON / OFF
SEQ ARMED or READY
REG Trend regime (BULL / BEAR / OFF)
BIAS Current directional pressure bias
P Pressure Flow value
V Vector Oscillator value
Checklist 6-point LONG and SHORT condition matrix
The checklist can be set to appear only during Squeeze or Armed states to reduce visual noise when no setup is forming.
Features
โ
Bollinger/Keltner squeeze detection via ratio oscillator
โ
Volume-weighted directional pressure flow
โ
Post-squeeze first expansion state machine
โ
Armed โ signal transition logic
โ
6-point entry checklist for both long and short
โ
EMA 200 regime filter
โ
Bollinger overlay with gradient fill during squeeze
โ
LONG / SHORT signal labels on main chart
โ
Optional follow-through repeat markers
โ
Repeat window filter to suppress signal clustering
โ
Strategy mode: Long, Short, or Both
โ
Fully configurable dashboard with size and offset settings
โ
Alert conditions for BUY, SELL, and squeeze activation
How to use
A practical workflow:
Watch for the Vector Oscillator to cross above 50 and turn purple โ that is the squeeze state.
When it releases below 50, the dashboard switches to ARMED.
In the expansion window, check the checklist: more filled circles on one side indicate stronger directional alignment.
A LONG or SHORT label confirms a valid first expansion signal.
Use the Pressure Flow histogram to gauge how strong and consistent the directional push is.
The squeeze release alone is not a signal. Direction is only confirmed when the expansion bar quality, pressure, and structure checks all align.
Notes
Like all squeeze-based tools, Squeeze Vector is most effective when used alongside price structure context. Squeezes release into strong moves, but not every release produces a sustained trend โ volume, higher timeframe context, and support/resistance levels can all affect follow-through quality.
Author: Gabremoku
Pine Script v6 Penunjuk

Bollinger Band [scoopup]Overview
A Bollinger Bandsโbased indicator that shows trend direction (up/down) through the basis line color, displays band width (volatility) as a percentage, and marks the most recent meaningful lows (demand zones) on the weekly and daily timeframes as boxes. It lets you view statistical volatility and the real low zones where buying previously stepped in โ all on a single chart.
Default settings are Length 21 and StdDev 1.618, based on the Fibonacci number (21) and the golden ratio (1.618).
Components
1. Bollinger Bands (Upper / Basis / Lower)
Defaults: Length 21, StdDev 1.618
Upper band, basis (middle), and lower band. The bands widen and narrow with volatility.
2. Basis Line Trend Color (Daily-based)
The color of the middle basis line indicates trend direction.
Logic: over a set lookback, it compares the cumulative size of the "close-to-lower" area (red) versus the "upper-to-close" area (green).
Red area dominant โ uptrend โ basis line GREEN
Green area dominant โ downtrend โ basis line RED
The longer the close stays near the lower band (larger red area), the more it is read as base-building before a move higher.
This color is always calculated from Daily data, regardless of the chart timeframe. Whether you view it on the 15m, 1h, or 4h chart, the daily trend color stays consistent.
3. Fill
Upper band โ close: semi-transparent green
Close โ lower band: semi-transparent red
Lets you quickly read where the close sits within the bands.
4. Band Width (%)
Formula: (Upper โ Lower) / Basis ร 100
Displays the current band width in a corner table as Band Width: X.XX%.
Lower = volatility contraction (squeeze) โ often precedes a large move; higher = volatility expansion.
The Data Window also shows band width % and band width (price difference), including on historical bars.
5. Recent Lows
Weekly recent low = yellow box / Daily recent low = red box
Shows only the most recent pivot (swing) low that sits below the current close. (Lows above the close are skipped; if the latest low is above the close, the prior low is used instead.)
Box height spans the low โ the close at that point, and extends to the right to show a still-valid support/demand zone.
How to Read It
Basis green + close near the lower band โ watch for a potential bounce after base-building.
Basis red + close near the upper band โ watch for overextension/pullback risk.
Band Width % contracting (squeeze) โ watch for an upcoming volatility expansion.
Recent low boxes (yellow/red) act as first support candidates on a pullback. A close below the box signals support failure.
Key Settings
Bollinger Bands: Source, Length (default 21), StdDev (default 1.618), Band Color / Width / Style
Basis Line: Show Basis, Basis Width, Ratio Length, Up / Down Color
Fill: Show Fill, Upper / Lower Fill Transparency
Band Width: Show Band Width %, Table Position, Text Size
Recent Lows: weekly/daily toggles, Pivot Length, Box Color
Tips
This is a supporting tool for reading trend direction + volatility + support zones together, not a standalone trade signal.
Reliability increases when the daily trend color and a recent low box line up in the same area.
Adjust StdDev and Ratio Length to fit each instrument's volatility.
Disclaimer
This indicator is for reference only and does not guarantee trading profits. All trading decisions and responsibility rest solely with the user. Penunjuk

Stochastic Histogram Regime [Gabremoku]Stochastic Histogram Regime is a refined Stochastic-based momentum oscillator that transforms classic %K / %D logic into a mid-centered histogram regime model with adaptive zones, squeeze detection, and sequential BUY/SELL signaling.
Instead of using the traditional 0โ100 Stochastic layout alone, this script recenters the oscillator around its midline and highlights:
momentum expansion and recovery phases
adaptive extreme zones
K/D compression regimes
sequential crossover signals
squeeze-aware signal styling
a compact live dashboard
The Stochastic Oscillator measures where the current close sits relative to its recent price range, and its two core lines โ %K and %D โ are commonly used to spot momentum shifts, overbought/oversold conditions, and crossover signals.
What it shows
๐ Mid-centered stochastic histogram โ instead of plotting Stochastic only in its standard form, the script centers the histogram around the 50 level so bullish and bearish pressure become easier to compare visually.
๐ %K line and ghost %D line โ the main momentum line stays visually dominant, while %D acts as a softer confirmation layer.
๐ฏ Adaptive zones โ rather than relying only on static 80/20 thresholds, the script calculates percentile-based extreme zones from recent Stochastic behavior. Traditional Stochastic readings above 80 are often considered overbought and readings below 20 oversold, but adaptive thresholds can better reflect changing market behavior.
๐๏ธ Combined squeeze regime โ the script measures both:
compression around the midline
compression between %K and %D
This creates a composite squeeze state that helps identify low-momentum contraction phases before expansion.
๐ฆ Sequential BUY/SELL state machine โ primary signals are filtered through K/D crossover logic, slope confirmation, and optional extreme-zone requirements.
๐บ Follow-up triangles โ repeated same-direction confirmations after the first primary signal can be shown as lighter continuation markers.
๐ชง Minimal dashboard โ displays state, K/D values, adaptive zone range, slope, and squeeze status.
Core logic
The script is built around the idea that the Stochastic Oscillator is not just an overbought/oversold tool, but a momentum regime detector.
Classic Stochastic compares the latest close to the recent high-low range and is typically interpreted through:
%K and %D crossovers
movement around 80/20 zones
and changes in momentum before price fully reacts
Your script extends that by:
recentering the oscillator around 50
using histogram structure for directional emphasis
adapting extreme zones to recent behavior
and combining crossover quality with slope and squeeze context
This makes it more structured than a standard Stochastic display.
State model
The indicator classifies momentum into five readable states:
Bull Impulse
Bull Recovery
Bear Impulse
Bear Recovery
Neutral
This adds nuance to the usual Stochastic reading because it separates:
strong directional continuation
weaker recovery phases
and non-directional compression
In practice:
Bull Impulse suggests K is above D, above the mid-neutral area, and still rising
Bear Impulse suggests K is below D, below the mid-neutral area, and still falling
recovery states identify improving momentum before full expansion
Signal logic
The script uses a filtered signal engine based on %K / %D crossovers, which are among the most common Stochastic signals.
Primary BUY and SELL signals can be filtered by:
extreme zone location
K slope confirmation
signal mode: Aggressive, Balanced, or Strict
This helps reduce the classic problem of noisy Stochastic crossovers in sideways conditions. Stochastic crossovers are useful, but they generally become more meaningful when combined with trend or momentum context rather than taken in isolation.
How to read it
A practical reading method is:
Use the histogram around the midline to read directional pressure.
Use adaptive zones to identify statistically stretched momentum.
Use %K / %D crossovers for trigger logic.
Use the squeeze state to identify contraction before expansion.
Treat follow-up triangles as continuation confirmation, not as fresh primary entries.
In general:
positive histogram with rising K = improving bullish momentum
negative histogram with falling K = improving bearish momentum
squeeze ON = compressed momentum regime
BUY/SELL labels = primary filtered crossover signals
Features
โ
Mid-centered stochastic histogram
โ
%K and ghost %D structure
โ
Percentile-based adaptive extreme zones
โ
Neutral zone around the 50 midline
โ
Composite squeeze detection
โ
Sequential BUY / SELL state machine
โ
Optional follow-up continuation markers
โ
Overlay and pane signal display options
โ
Minimal live dashboard
โ
Alert conditions for BUY, SELL, and squeeze state
Notes
This indicator is designed to improve the readability of Stochastic momentum structure, especially in transitions between compression, recovery, and impulse phases. Like all Stochastic-based tools, it can produce noisy signals in choppy markets, and overbought/oversold readings should generally be interpreted as momentum context rather than automatic reversal calls.
Author: Gabremoku
Pine Script v6 Penunjuk

Artemis Squeeze Momentum๐ฆ Artemis Squeeze Momentum collapses an entire momentum-and-volatility workflow into a single oscillator pane. Eight analytical layers โ Squeeze Momentum core, Directional Flux, three-tier compression detection with a release tracker, dual confluence gauges, dual anchor Regular + Hidden divergence with a Smart AI Filter, a composite Trend Strength Score (0โ100), a four-timeframe MTF Confluence panel with alignment / divergence detection, and a theme-adaptive PRO dashboard โ operate as one integrated system, all driven by a single theme dropdown across 12 cohesive palettes.
Most squeeze indicators ship as a strip of black-and-red dots with a lone momentum histogram, then require a separate ADX, a separate divergence tool and a separate confluence gauge to complete the read. Artemis Squeeze Momentum closes that gap: every compression tier, every directional cross, every divergence, every higher-timeframe bias reads from the same pane in the same colour language โ no inline colour pickers, no palette drift, no pane-hopping. The result is a complete momentum workbench where compressions, breakouts, regime flips, divergences and multi-TF bias are all readable at a glance.
๐ฆ HOW THE CORE ENGINE WORKS
**Squeeze Momentum Engine**
Each bar, the engine builds three anchors over the Momentum Length window:
1. **Channel midpoint** โ `(highest(high, len) + lowest(low, len)) / 2`
2. **Smoothed midline** โ `SMA(HL2, len)`
3. **Channel ATR** โ channel range plus the gap-to-prior-close component (matches Pine v5 `tr(true)` on the synthetic channel bar)
The raw momentum is then computed as:
mom_raw = (close โ avg(channelMid, smaMid)) / channelATR ร 100
This produces a channel-aware, ATR-normalized residual scaled to roughly the ยฑ100 range. The result is then passed through `ta.linreg(mom_raw, len, 0)` to produce the visible momentum line โ a linear-regression smoothing that gives the curve its characteristic forward-leaning shape. An SMA of length Signal Length builds the trigger line. Crossovers between momentum and signal mark momentum regime changes โ the same convention used by classical MACD.
**Directional Flux**
A custom ADX-style oscillator running in parallel. Each bar, the engine measures positive high-changes vs. negative low-changes, each RMA-smoothed and ATR-normalized:
up = RMA(max(change(high), 0), len) / ATR(len)
dn = RMA(max(โchange(low), 0), len) / ATR(len)
ratio = (up โ dn) / (up + dn)
flux = RMA(ratio, len / 2) ร 100
The result is a directional bias oscillator bounded to ยฑ100. An overflow branch (values past ยฑ25 โ where the directional pressure becomes structurally significant) renders as a separate, brighter fill so traders read both raw direction and acceleration in one glance.
**Heiken Ashi Bias (Optional)**
When `Use Heiken Ashi Bias` is enabled, the Flux engine reads from a Heiken Ashi bar stream instead of raw OHLC. HA bars smooth body / wick noise and emphasise trend continuation โ useful on lower timeframes where raw OHLC is noisy.
๐ฆ SQUEEZE DETECTION
A three-tier Bollinger-vs-ATR compression detector running on the same Length as the Momentum Core (so compression and momentum stay perfectly aligned):
| Tier | Condition | Visual |
|---|---|---|
| Tight | stdev < ATR ร 0.5 | Deepest, most saturated theme tone |
| Mid | stdev < ATR ร 0.75 | Middle-intensity theme tone |
| Loose | stdev < ATR ร 1.0 | Lightest tier โ broadest detection |
Tiers nest โ tight implies mid implies loose. The bottom-of-pane squeeze column lights up whenever any tier is active and the colour escalates as compression tightens, using a theme-native ramp drawn from each palette's own colour family (so the column reads as part of the theme rather than an imported generic warning).
The standard deviation is computed via a single-pass Welford algorithm โ numerically stable on long histories where naive sum-of-squares accumulators drift.
**โฆ Squeeze Release Marker**
The signature feature of the engine. The bar after the loosest active tier (stdev < ATR ร 1.0) finally drops off, a tiny โฆ diamond paints at the midline in the theme's vivid release accent โ one step brighter and more saturated than the tight tier so the climax moment reads as the most luminous point in the squeeze cycle.
This is the canonical "spring uncoiled" moment: compression has fully ended, volatility expansion begins, breakout direction is about to reveal itself. Historically the highest-conviction breakout setup the squeeze model produces. Hovering on the marker surfaces:
- Current bar state (compression ended this bar)
- Meaning (volatility expansion incoming)
- Next steps (watch the next 1โ5 bars, confirm with Momentum slope, cross-check Flux, prioritise MTF-aligned setups)
๐ฆ CONFLUENCE GAUGES
Two horizontal strips render at the top (Bull side, +70 to +75) and bottom (Bear side, โ70 to โ75) of the pane. Each strip lights up when momentum and flux agree on direction, with brightness reflecting the confluence tier:
| State | Condition | Opacity |
|---|---|---|
| Strong Bull | mom > 0 AND flux > 0 | Full |
| Weak Bull | mom > 0 OR flux > 0 | Half |
| Strong Bear | mom < 0 AND flux < 0 | Full |
| Weak Bear | mom < 0 OR flux < 0 | Half |
| Neutral | Neither side dominates | Transparent |
The display mode (Both / Bull / Bear / None) lets traders mute one half if they only trade one direction.
**Confluence Buy / Sell Triangles**
A separate signal layer rides outside the gauges. The detector fires only when momentum crosses its signal line WHILE in the opposite zone past the Signal Threshold AND with flux in the opposite direction (classic mean-reversion logic):
- **Buy โฒ** (below bear gauge at โ90) โ `xMomUp AND momVal < โthreshold AND fluxVal < 0`
- **Sell โผ** (above bull gauge at +85) โ `xMomDn AND momVal > +threshold AND fluxVal > 0`
Each triangle pairs with an invisible label carrying a tooltip that lists current mom, signal, flux, the active threshold, and a one-line interpretation of the trigger. The Signal Threshold (default 40) is independent of the Divergence Sensitivity setting โ the two engines need different thresholds (divergence wants permissive at 25 for pivot detection, confluence wants strict at 40 for deep mean-reversion triggers).
๐ฆ DIVERGENCE DETECTION
A cross-confirmed, dual-anchor detector that fires on signal-line crossovers (NOT on Pine pivots). Regular divergences signal exhaustion reversals, Hidden divergences signal trend continuation.
**Four divergence types:**
| Type | Price | Momentum | Signal |
|---|---|---|---|
| Regular Bull (Dโฒ) | Lower Low | Higher Low | Potential reversal up |
| Regular Bear (Dโผ) | Higher High | Lower High | Potential reversal down |
| Hidden Bull (Hโฒ) | Higher Low | Lower Low | Uptrend continuation |
| Hidden Bear (Hโผ) | Lower High | Higher High | Downtrend continuation |
Regular divergence uses solid lines; Hidden uses dashed lines โ visually quieter to match the continuation signal's lower conviction tier. Labels (Dโฒ / Dโผ / Hโฒ / Hโผ) each carry a tooltip-rich hover with price + momentum + meaning context.
**Dual-Anchor Logic**
The key engineering choice. Regular and Hidden divergences each maintain their own separate anchor pair:
- **Regular anchors** โ stored only at extreme-zone crosses (|mom| > Sensitivity). Catches classical exhaustion reversals at deep extremes.
- **Hidden anchors** โ stored at ANY signal-line cross, regardless of zone. Shallow pullbacks inside an established trend rarely push momentum past ยฑSensitivity, so the Hidden detector must accept every cross to capture the classical "price HL + mom LL" / "price LH + mom HH" continuation pattern.
A detected divergence consumes its anchor (resets to na) so the next setup starts fresh.
**Smart Divergence Filter (AI)**
Optional pre-filter that rejects low-quality divergences before they render. Three independent gates:
1. **Min Momentum Swing** โ minimum |momentum| difference between the two pivot momentum values (default: 10 units). Drops noise-level differences.
2. **Min Price Swing (%)** โ minimum price swing between pivots as a percentage of the recent `Momentum Length ร 4` high-low range (default: 0.3%). Drops divergences where price barely moved relative to recent volatility.
3. **Require Flux Confirmation** โ Flux must agree with the divergence direction at the moment of detection (Bull div needs Flux > 0, Bear div needs Flux < 0). Filters out divergences that fire counter to the broader directional bias.
When the master toggle is OFF (default), all detected divergences render. When ON, only divergences that clear all three gates survive. The filter applies identically to chart rendering and alert conditions โ no mismatch between visual and alert signals.
๐ฆ COMPOSITE TS SCORE (0โ100)
A weighted blend of every analytical layer into a single RSI-style 0โ100 reading. 50 is neutral, > 50 leans bull, < 50 leans bear.
| Component | Weight | Mapping |
|---|---|---|
| Momentum | 30% | mom value mapped from โ100..+100 โ 0..100 |
| Flux | 30% | flux value mapped the same way |
| Mom ร Signal | 15% | 70 if mom > sig, else 30 (slope direction confirmation) |
| Confluence | 25% | 90 strong-bull / 65 weak-bull / 50 neutral / 35 weak-bear / 10 strong-bear |
The score is rounded to the nearest integer and labelled into five tiers in the dashboard: STRONG BULL (โฅ75) / BULL (โฅ60) / NEUTRAL (40โ59) / BEAR (โฅ25) / STRONG BEAR (<25), each prefixed with a directional glyph (โฒ โผ โ ). The tier label gives traders an executive summary at a glance โ one row in the dashboard tells you what every other row collectively says.
๐ฆ MULTI-TIMEFRAME CONFLUENCE
A separate PRO panel that runs the full Momentum + Flux + Confluence stack on four higher timeframes simultaneously via `request.security()` and surfaces the overall alignment state. All MTF calls use `lookahead = barmerge.lookahead_off` โ fully repaint-safe on every closed bar.
**Six Presets**
Pre-tuned four-timeframe packs matched to common trader profiles:
| Preset | TF 1 | TF 2 | TF 3 | TF 4 | Use case |
|---|---|---|---|---|---|
| Scalp | 1m | 5m | 15m | 1h | Fast scalper |
| Intraday | 5m | 15m | 1h | 4h | Day trader |
| Swing | 15m | 1h | 4h | 1D | Default โ swing trader |
| Position | 1h | 4h | 1D | 1W | Position trader |
| Crypto | 5m | 15m | 1h | 4h | 24/7 markets |
| Forex | 15m | 1h | 4h | 1D | Session-based markets |
**Alignment Detection**
Each TF returns a bias tag (โฒ STRONG / โฒ WEAK / โผ STRONG / โผ WEAK / โ NEUTRAL) and a direction code (+1 / 0 / โ1). The header rolls up the four codes into one of three states:
- **โฒโฒโฒโฒ ALIGNED** โ all four TFs bullish (highest-conviction long setup)
- **โผโผโผโผ ALIGNED** โ all four TFs bearish (highest-conviction short setup)
- **โ MIXED** โ TFs disagree (no clean direction)
**Divergence Detection**
When the current chart's bias contradicts โฅ 3 of the 4 HTF biases (e.g., chart bullish but 3+ HTFs bearish), an MTF Divergence flag fires โ a contrarian / counter-trend warning. Treat as a "current move may be a bull / bear trap" signal.
**Panel Style**
Direction is conveyed purely by the โฒ / โผ glyphs in each row's tag โ never by cell colour. Every cell uses a uniform `thBull` text colour matching the main Dashboard, so the two panels feel like one product across all twelve themes, light and dark alike.
๐ฆ BAR COLORING
Five mutually exclusive modes apply an oscillator-driven colour to every price bar on the chart:
| Mode | Behavior |
|---|---|
| None | Leave bars untouched (default) |
| Momentum | Bull when mom > 0, bear when mom < 0 |
| Flux | Bull when flux > 0, bear when flux < 0 |
| Squeeze | Theme-native ramp when compressed, neutral otherwise |
| Confluence | Strong / Weak / Neutral tiers via mom + flux agreement |
| Slope | Bull when mom > signal, bear when mom < signal |
Colours are pulled from the active theme โ no per-mode color picker needed.
๐ฆ DASHBOARD
A compact 2-column, 8-row data panel renders on the last bar when enabled. Every value derives from variables already computed upstream, so the dashboard adds zero overhead until the final bar.
| Row | Left | Right |
|---|---|---|
| Header | Artemis Squeeze | โฒ STRONG BULL / โฒ WEAK BULL / โ NEUTRAL / โผ WEAK BEAR / โผ STRONG BEAR |
| TS Score | TS Score | 0โ100 composite + tier label (STRONG BULL / BULL / NEUTRAL / BEAR / STRONG BEAR) |
| Momentum | Momentum | Current value + trend arrow (โฒ โผ โ ) |
| Flux | Flux | Current value + trend arrow (โฒ โผ โ ) |
| Squeeze | Squeeze | TIGHT / MID / LOOSE / โ |
| Confluence | Confluence | STRONG BULL / WEAK BULL / NONE / WEAK BEAR / STRONG BEAR |
| Div | Div | Most recent divergence within last 50 bars (โฒ REG / โผ REG / โฒ HID / โผ HID / โ) |
| Slope | Slope | โฒ UP / โผ DOWN / โ FLAT |
**Theme-Adaptive Chrome**
The dashboard auto-inverts its layout based on the active theme:
- **Dark themes** (Tropic, Amber, Pastel, Cyber, Helios, Electric, Candy, Bloomberg, Solar, Royal): header and footer use a faint `thBull` tint, middle rows stay solid dark, text uses full-saturation `thBull`. Border uses `thBull` at 20% transparency for strong theme presence.
- **Light themes** (Midnight, Graphite): backgrounds flip to white, text stays `thBull` (which is itself dark on these themes), border uses `thBull` at 40% transparency.
This guarantees text legibility against every palette without per-theme manual tuning. The MTF Confluence panel uses identical chrome rules so the two panels feel like one product.
**Position & Size**
Six anchor slots (Top / Middle / Bottom ร Left / Right) and four text sizes (Tiny / Small / Normal / Large). The Dashboard defaults to Bottom Right and the MTF panel to Top Right โ vertically opposite so the two never overlap.
๐ฆ COLOR THEMES
Twelve cohesive palettes, each resolving to four axis colours plus a four-step squeeze ramp:
| Theme | Character | Bull | Bear |
|---|---|---|---|
| Tropic | Cyan steel + deep orange | #00bcd4 | #ff6d00 |
| Amber | Warm amber + ember red | #ff9800 | #e53935 |
| Pastel | Sky blue + soft lavender | #4fc3f7 | #9575cd |
| Cyber | Neon lime + hot crimson | #00e676 | #ff1744 |
| Helios | Bright gold + scarlet | #ffd600 | #ef5350 |
| Electric | Electric aqua + magenta | #00e5ff | #e040fb |
| Candy | Neon green + hot pink | #69F0AE | #FF4081 |
| Bloomberg | Terminal orange + cyan | #ff8c00 | #00b0ff |
| Solar | Solarized olive + crimson | #859900 | #dc322f |
| Royal | Imperial gold + deep purple | #ffd700 | #6a0dad |
| Midnight | Deep navy + dark crimson | #0d47a1 | #b71c1c |
| Graphite | Near-black + silver grey | #1a1a1a | #757575 |
Beyond the four axis colours (bull / bear / neutral / signal), each theme also defines its own four-step squeeze ramp (tight / mid / loose / release) drawn from its own colour family โ so the squeeze column and the โฆ release marker harmonise with the active theme rather than imposing a generic warning hue. Nothing below the theme resolver block references a raw hex literal, so a single dropdown selection drives every plot, fill, gauge, divergence line, dashboard cell, MTF panel and bar colour.
๐ฆ ALERT SYSTEM
Twenty-two alert conditions, all using `alert.freq_once_per_bar_close`. Each alert is gated by its own toggle in the Alerts group โ hiding a feature on the chart silences its alerts automatically.
| Alert | Condition |
|---|---|
| Confluence Buy | Mom crossed UP through signal while below โThreshold AND Flux bearish |
| Confluence Sell | Mom crossed DOWN through signal while above +Threshold AND Flux bullish |
| Momentum Cross Up | Mom crossed above zero |
| Momentum Cross Down | Mom crossed below zero |
| Flux Cross Up | Flux crossed above zero |
| Flux Cross Down | Flux crossed below zero |
| Bullish Swing | Mom ร signal upward cross (any zone) |
| Bearish Swing | Mom ร signal downward cross (any zone) |
| Strong Bull Confluence | Mom AND flux both turned bullish |
| Strong Bear Confluence | Mom AND flux both turned bearish |
| Weak Bull Confluence | Mom OR flux turned bullish |
| Weak Bear Confluence | Mom OR flux turned bearish |
| Tight Squeeze | stdev < ATR ร 0.5 |
| Mid Squeeze | stdev < ATR ร 0.75 |
| Loose Squeeze | stdev < ATR ร 1.0 |
| Regular Divergence | Dโฒ or Dโผ detected (respects Smart Filter) |
| Hidden Divergence | Hโฒ or Hโผ detected (respects Smart Filter) |
| Squeeze Release โฆ | stdev re-expanded above ATR ร 1.0 |
| MTF Aligned | All four MTF timeframes agree on direction |
| MTF Divergence | Current chart bias contradicts โฅ 3 of 4 HTF biases |
Each alert fires through `alert()` so the message body carries live context โ direction, current values, the trigger condition, and a one-line interpretation. Divergence alerts respect the Smart Filter โ if the filter is ON and a divergence is rejected visually, the alert will also not fire.
๐ฆ SETTINGS REFERENCE
**Visual**
- Theme โ 12 cohesive palettes. Default: Tropic
**Bar Coloring**
- Bar Color Mode โ None / Momentum / Flux / Squeeze / Confluence / Slope. Default: None
**Momentum Core**
- Length โ Lookback for both the Momentum engine and the Squeeze window. Range 7โ50. Default: 20
- Signal Length โ SMA smoothing for the signal line. Range 2โ7. Default: 3
- Show Momentum โ Toggle. Default: ON
**Directional Flux**
- Length โ Lookback for the Flux engine. Range 7โ50. Default: 30
- Use Heiken Ashi Bias โ Toggle. Default: OFF
- Show Flux โ Toggle. Default: ON
**Squeeze Engine**
- Show Squeeze โ Toggle. Default: ON
- Show Squeeze Release โ Toggle for the โฆ marker. Default: ON
**Confluence Gauges**
- Display Mode โ Both / Bull / Bear / None. Default: Both
- Signal Threshold โ |momentum| floor for Buy โฒ / Sell โผ arrows. Range 10โ80. Default: 40
**Divergence**
- Sensitivity โ |momentum| floor for Regular div detection. Range 10โ50. Default: 25
- Regular Divergence โ Toggle. Default: ON
- Hidden Divergence โ Toggle. Default: ON
- Show Divergence Lines โ Toggle. Default: ON
- Show Divergence Labels โ Toggle. Default: ON
- Label Size โ Tiny / Small / Normal / Large. Default: Tiny
- Smart Divergence Filter (AI) โ Master toggle. Default: OFF
- Min Momentum Swing โ Default: 10.0
- Min Price Swing (%) โ Default: 0.3%
- Require Flux Confirmation โ Default: ON
**Multi-Timeframe**
- Show MTF Panel โ Toggle. Default: ON
- Timeframe Preset โ Scalp / Intraday / Swing / Position / Crypto / Forex. Default: Swing
- Panel Position โ 6 anchor slots. Default: Top Right
- Panel Text Size โ Tiny / Small / Normal / Large. Default: Small
**Dashboard**
- Show Dashboard โ Toggle. Default: ON
- Panel Position โ 6 anchor slots. Default: Bottom Right
- Panel Text Size โ Tiny / Small / Normal / Large. Default: Small
**Alerts**
- 20 toggles covering all 22 alert conditions (Regular and Hidden divergence each drive two alerts โ bull + bear โ from one toggle).
- Defaults ON: Confluence Buy/Sell, Mom Cross Up/Dn, Flux Cross Up/Dn, Strong Bull/Bear Confluence, Tight Squeeze, Regular Divergence, Squeeze Release, MTF Aligned.
- Defaults OFF: Swings, Weak Confluences, Mid/Loose Squeeze, Hidden Divergence, MTF Divergence.
๐ฆ COMPATIBILITY
Works on all asset classes and all timeframes in TradingView Pine Script v6.
- Crypto: Spot, futures, perpetual contracts
- Forex: All pairs
- Equities: Stocks, ETFs, indices
- Commodities: Metals, energy, agriculture
- Timeframes: 1m through Monthly
The channel-aware ATR normalization in the Momentum engine, the ATR-normalized Flux ratio, and the stdev / ATR squeeze tests make every layer volatility-agnostic. The same default settings work on a 1m BTC chart and a weekly index chart without retuning. The MTF presets cover the common scalp / intraday / swing / position profiles plus dedicated Crypto and Forex packs.
๐ฆ DISCLAIMER
This indicator is provided for educational and informational purposes only. It does not constitute financial advice. Past performance does not guarantee future results. Always conduct your own analysis and apply proper risk management. Penunjuk

Bollinger Bands Gradient [Gabremoku]Bollinger Bands Gradient is an enhanced Bollinger Band overlay designed to turn classic volatility bands into a richer visual and signal-based trading framework.
The indicator keeps the core structure of Bollinger Bands โ Upper Band, Basis, and Lower Band โ but adds a dynamic gradient fill, squeeze detection, state-based bar coloring, strategy-side signal logic, and an optional dashboard for fast chart interpretation. Bollinger Bands are widely used to read volatility compression, expansion, and breakout behavior, especially when traders want more context than a standard three-line display can offer.
This script is built for traders who want Bollinger Bands to feel more alive: clearer transitions, better volatility awareness, and cleaner breakout mapping directly on price.
What it shows
๐ Dynamic Gradient Fill โ the area between Upper/Basis and Basis/Lower is filled with adaptive color intensity that changes according to price distance from the basis.
๐๏ธ Squeeze Detection โ the script monitors Bollinger Band compression and flags low-volatility states when band width contracts relative to its recent range. Bollinger squeezes are commonly used to identify volatility contraction before a possible breakout.
๐จ State-Based Coloring โ basis line, bands, bars, and optional background can all shift visually depending on whether the market is bullish, bearish, neutral, or in squeeze mode.
๐ Breakout Signals โ optional labels for:
BUY / SELL in Long mode
SHORT / CLOSE in Short mode
๐ชง Dashboard โ a compact panel showing current state, strategy mode, sequence status, band width, range position, and squeeze condition.
๐ท๏ธ Last Value Labels โ optional live labels for Upper, Basis, and Lower band values.
Core logic
This script combines volatility structure and signal sequence control.
At the core, Bollinger Bands define the dynamic range around a moving average using standard deviation, which helps visualize whether price is relatively stretched or compressed versus its recent behavior. Narrow bands usually reflect low volatility, while wide bands reflect expansion.
On top of that, this version introduces:
a basis color gradient tied to price position inside the band structure,
a fill intensity model tied to distance from the basis,
and a state machine that prevents repeated entry signals in the same sequence.
That makes the indicator more structured than a plain breakout marker, especially for traders who want cleaner signal flow.
Signal logic
The indicator supports two operating modes:
Long Mode
BUY = breakout above the Upper Band
SELL = breakdown below the Lower Band
Short Mode
SHORT = breakdown below the Lower Band
CLOSE = breakout above the Upper Band
This logic reflects one of the most common ways traders use Bollinger Bands: watching for volatility compression, then responding to expansion outside the bands. At the same time, Bollinger-based strategies can also be used for mean reversion, which is why breakout signals generally work best when confirmed by price structure, momentum, or volume.
Features
โ
Classic Bollinger Bands with selectable basis type
โ
Dynamic gradient fill above and below the basis
โ
Adaptive basis coloring based on price position
โ
Squeeze detection using band-width normalization
โ
Optional squeeze background highlighting
โ
Optional bar coloring by state
โ
Strategy-side selector: Long or Short
โ
Breakout signal state machine
โ
BUY / SELL / SHORT / CLOSE labels
โ
On-chart dashboard
โ
Optional last-value labels
โ
Fully customizable colors and style inputs
How to use
A practical reading flow is:
Watch for band contraction and squeeze conditions.
Treat that as a volatility compression phase.
Monitor for price expansion outside the bands.
Use the selected strategy mode to interpret the resulting signal sequence.
In practice:
tight bands + squeeze on = market compression
break above upper band = bullish expansion candidate
break below lower band = bearish expansion candidate
That said, Bollinger breakouts can fail in choppy environments, so many traders confirm them with momentum, volume, or higher timeframe structure rather than using them in isolation.
Notes
This indicator is designed as an enhanced Bollinger workflow tool, not as a complete trading system with full risk management. Bollinger Bands can support both breakout and mean-reversion approaches, so the best interpretation depends on market regime and confirmation methods.
Author: Gabremoku
Pine Script v6 Penunjuk

Penunjuk

MTF Kinetic Oscillator | Rainbow MatrixGENERAL OVERVIEW
The MTF Kinetic Oscillator is a multi-timeframe order-flow probability oscillator that fuses 5 timeframes into a single composite score, blended with three independent order-flow sensors (CVD, Volume Climax, Squeeze) and plotted against a self-adaptive Fibonacci channel that recalibrates to current volatility conditions. Instead of treating an oscillator as a fixed 0-100 envelope where the same threshold means the same thing across all market regimes, the indicator continuously classifies the current score against an adaptive channel โ and colors the chart accordingly.
The main goal of this indicator is to give traders a clean, automatic read on where the order-flow consensus sits across 5 timeframes simultaneously, and how stretched that consensus is relative to its own recent statistical range โ without having to manually monitor multiple oscillators on multiple timeframes. Every value the oscillator displays is the result of a weighted aggregation of 5 timeframe scores, modulated by order-flow sensors, and contextualized against an adaptive channel.
It plots a single score line that travels through five color zones (yellow, orange, red, purple for upper extremes; green, teal, blue, aqua for lower extremes), each corresponding to a probabilistic regime. Combined with the Info Panel HUD, Vacuum Trail convergence lines, and Black Swan dynamic glow, the indicator gives a complete read on order-flow direction, statistical position, and proximity to exhaustion zones โ all from a single oscillator pane.
This indicator was developed for traders who already understand oscillator-based indicators (RSI, MFI, Stochastic, CCI) and want a multi-timeframe aggregation that calibrates its thresholds to current volatility instead of using fixed 0-100 boundaries.
WHAT IS THE THEORY BEHIND THIS INDICATOR?
Most oscillators on TradingView โ RSI, MFI, CCI, Stochastic, and their derivatives โ share two common architectural choices: they operate on a single timeframe, and they classify against fixed thresholds (typically 70/30 or 80/20). This treats every market regime as statistically equivalent.
The problem: market regimes are not equivalent. A score of 75 during a tight-range, low-volatility period is structurally different from a score of 75 during a volatile expansion phase. Fixed thresholds applied to a non-stationary distribution produce systematic mismatches โ overbought readings that resolve into further upside, oversold readings that continue lower, signals that appear at the wrong moments precisely when volatility shifts regimes. This mismatch becomes most visible during transitions between volatility regimes: trend climaxes, capitulation lows, squeeze breakouts.
This indicator addresses both issues at once. First, the per-timeframe score is built from a Log-Normal Z-Score regression of price (which respects the asymmetric distribution of returns) blended with RSI through a sigmoid normalization. Second, the 5 per-timeframe scores are aggregated through Fibonacci weights (0.15 / 0.20 / 0.25 / 0.25 / 0.15) into a single global score โ giving the most weight to the middle macro horizons rather than the shortest or longest timeframes. Third, the global score is plotted not against fixed 0-100 thresholds, but against a self-adaptive channel whose boundaries are re-computed every bar from the highest and lowest scores in the lookback window, smoothed by EMA, and proportioned by Fibonacci ratios (1.50/1.85, 1.85/1.85, 2.75/1.85, 3.85/1.85).
The three order-flow sensors โ CVD Z-Score, Volume Climax, and Squeeze โ operate as modulators of the base score: the CVD bonus amplifies the score when directional order pressure dominates (clamped at ยฑ12 points), Volume Climax drag dampens the score when abnormal volume is detected (statistical exhaustion signal), and the Squeeze damper compresses score amplitude to 25% during compressed-volatility regimes (suppressing false signals during low-conviction lateral phases).
Why traders use it: each color zone on the chart represents a different probabilistic regime, calibrated to current volatility. When the score sits between the median and the inner band (yellow/green), the order-flow consensus is in normal operating range โ equilibrium. When the score crosses into the second band (orange/teal), the move has crossed into directional territory. The third band (red/blue) marks the threshold beyond which most of the impulse has already happened โ exhaustion. The fourth band (purple/aqua) marks the tail of the distribution โ a Black Swan event in Taleb's sense โ where score positions rarely persist under normal volatility conditions.
The three order-flow sensors and the adaptive Fibonacci channel are not independent layers stacked in the same pane. They map three different aspects of the same question: where the multi-timeframe order-flow consensus currently sits (the score), how that consensus is being modulated by live order-flow pressure (the sensors), and how stretched that modulated value is relative to its own recent statistical range (the channel). The integration of all three components into a single oscillator is the reason they exist in one script rather than as three separate indicators: the cross-component blending is what surfaces multi-sensor confluence that separate-script approaches cannot produce.
MTF KINETIC OSCILLATOR FEATURES
The indicator includes 6 main features:
Multi-Timeframe Score Engine
CVD Order-Flow Sensor
Volume Climax and Squeeze Sensors
Adaptive Fibonacci Channel
Vacuum Trail and Black Swan Dynamic Glow
Info Panel HUD and Alerts
Multilingual interface and full customization across all visual layers.
MULTI-TIMEFRAME SCORE ENGINE
๐น What It Does
The core of the indicator. For each of the 5 configured radar timeframes, the engine performs three operations:
โ Calculates a Log-Normal Z-Score regression of price (hlc3 transformed via natural logarithm, fitted with linear regression, residuals normalized by their own standard deviation).
โ Computes a per-timeframe RSI at a Fibonacci-aligned length (8, 13, 21, 34, 55 โ one per timeframe).
โ Blends the Z-Score (via sigmoid normalization) and the RSI into a single per-timeframe score, bounded 0-100.
The 5 per-timeframe scores are then aggregated through Fibonacci weights (0.15 / 0.20 / 0.25 / 0.25 / 0.15) into a single global score representing the multi-horizon order-flow consensus.
๐น Method
The regression runs in log space, addressing the asymmetric nature of price distribution that linear estimators (such as the Simple Moving Average) fail to account for. The directional reference (high vs low) is selected per bar based on candle direction โ green candles use the high (upward pressure reference), red candles use the low (downward pressure reference). This produces a Z-Score that reflects the directional intent of each bar rather than the midpoint average.
The sigmoid normalization compresses Z-Scores into a bounded 0-100 range without losing the asymmetric information of extreme values. The RSI component anchors the score to a familiar momentum reference, blending two independent signal families into one bounded value per timeframe.
๐น Hierarchical Weighting
The five timeframes are weighted by structural significance using Fibonacci proportions:
โ TF1 (Trigger, default 5): weight 15% โ fastest reactivity, lowest weight.
โ TF2 (Intraday, default 13): weight 20% โ session-scale resolution.
โ TF3 (Macro 1, default 55): weight 25% โ backbone of the score.
โ TF4 (Macro 2, default 233): weight 25% โ institutional reference horizon.
โ TF5 (Base, default 987): weight 15% โ macro trend anchor.
The middle horizons (TF3 and TF4) carry the highest weight because they typically represent the most structurally significant reference for institutional decision-making โ short enough to react to current conditions, long enough to filter intraday noise.
CVD ORDER-FLOW SENSOR
๐น What It Does
The CVD (Cumulative Volume Delta) sensor estimates the difference between buyer and seller volume per bar โ measuring market-order aggression. The signed delta is normalized to a Z-Score against a 50-period rolling reference, and the resulting bonus is clamped at ยฑ12 points before being added to the global score.
๐น Method
For each bar, total volume is split between buyer share (proportional to `close - low / range`) and seller share (proportional to `high - close / range`). The signed delta is the difference. A 50-period mean and standard deviation define the reference; the current delta is expressed as a Z-Score against that reference, then multiplied by 4 and clamped to ยฑ12 to control its contribution to the final score.
๐น Why It Matters
The Z-Score component answers "where is the multi-timeframe consensus", and the RSI component answers "what is the momentum". The CVD sensor answers a separate question: "who is currently aggressive in the order book". When the multi-timeframe consensus is bullish and CVD aggression confirms it, the bonus amplifies the score. When the consensus is bullish but CVD shows seller aggression, the bonus subtracts from the score โ surfacing a divergence between consensus and order-flow.
VOLUME CLIMAX AND SQUEEZE SENSORS
๐น Volume Climax
A standalone sensor that detects abnormal volume conditions (volume Z-Score above 3.0). When triggered, a climax drag is applied to the score, signaling potential exhaustion. The HUD reports this state explicitly in the Status row.
๐น Squeeze
A volatility-compression detector based on the percentage-rank of the current range against a 20-period lookback. When the range compresses to its 15th percentile or lower, the squeeze flag activates and the score amplitude is dampened to 25% of its normal range โ preventing false directional signals during compressed-volatility regimes.
๐น Why They Matter
These sensors operate on a different axis from the price-direction sensors. Volume Climax surfaces statistical exhaustion before it becomes visible in price; Squeeze suppresses noise during periods when the oscillator would otherwise produce false reads. Together they make the oscillator behave correctly during regime transitions, where standard oscillators are typically least reliable.
ADAPTIVE FIBONACCI CHANNEL
๐น What It Does
The global score is plotted against a self-adaptive channel rather than against fixed 0-100 thresholds. The channel boundaries are re-computed every bar from the highest and lowest scores in a 50-bar lookback window, smoothed by 10-period EMA, and then proportioned through Fibonacci ratios into four zones:
โ Z-Breathing (inner, yellow/green) โ ratio 1.50 / 1.85 (โ 0.811)
โ Z-Alert (upper limit, orange/teal) โ ratio 1.85 / 1.85 = 1.000 (the visible anchor)
โ Z-Exhaustion (outer, red/blue) โ ratio 2.75 / 1.85 (โ 1.486)
โ Black Swan (extreme edge, purple/aqua) โ ratio 3.85 / 1.85 (โ 2.081)
๐น Why It Adapts
Fixed thresholds (70/30 or 80/20) treat every volatility regime as equivalent. The adaptive channel calibrates the rainbow visual to the actual statistical envelope of the current regime โ overbought during a low-volatility consolidation does not mean the same as overbought during a volatility expansion, and the channel reflects that.
๐น Visual Rendering
The space between adjacent channel boundaries is filled with a semi-transparent color matching the zone palette (toggleable via "Show Thermal Zone Fills"). This makes the current zone immediately visible without having to read the score number โ the visual position alone tells you the regime.
VACUUM TRAIL AND BLACK SWAN DYNAMIC GLOW
๐น Vacuum Trail
Ghost convergence lines projecting from exhaustion extremes back toward the channel median. The lines anchor at a level 15% inside the inner Breathing zone (not at the channel boundary itself), which produces visual convergence inward rather than along the edge โ useful for anticipating the typical mean-reversion path after extreme touches.
๐น Black Swan Dynamic Glow
The outermost ยฑ3.85ฯ-equivalent boundaries are rendered as a main line plus a wide outer glow whose intensity scales with the score's distance from the boundary. The glow becomes bright when the score is near the Black Swan zone and fades when far โ drawing visual attention only when the statistical tail is approached.
๐น Why They Matter
Both elements give the oscillator a sense of direction beyond the score's current position: the Vacuum Trail visualizes the expected return path during exhaustion; the Black Swan Glow makes statistical tail events visible at a glance, before the score itself crosses the boundary.
INFO PANEL HUD AND ALERTS
๐น What the HUD Shows
A compact corner panel reports six live values:
โ SCORE โ the current global score (0-100) with color matching the active channel zone
โ PROB. โ the absolute probability (distance from neutral 50 expressed as percentage)
โ DIRECTION โ BUY / SELL / NEUTRAL based on score position relative to the median
โ CHANNEL โ current channel regime classification (Uptrend / Downtrend / Sideways / Compression / Expansion)
โ RHYTHM โ score velocity classification (Fast / Slow)
โ STATUS โ Black Swan / Squeeze / Climax / Neutral, prioritized by severity
๐น Customization
The HUD can be positioned in any of the four chart corners and rendered in any of five font sizes. The display language is controlled by the System Language input.
๐น Alerts
Three alert types are available:
โ Exhaustion Alert โ fires when the score crosses above 85% (buying exhaustion) or below 15% (selling exhaustion).
โ Squeeze Alert โ fires when the squeeze flag activates (volatility compression detected).
โ Black Swan Alert โ fires when the score enters the ยฑ3.85ฯ-equivalent extreme zone; uses an edge-trigger arm/disarm mechanism (fires once on entry, locks while inside, re-arms only on exit).
All alerts are gated by `barstate.isconfirmed` and use `alert.freq_once_per_bar` to prevent duplicate firings on the same candle. Five `alertcondition` blocks are also exposed for users who prefer the TradingView alert UI.
MULTILINGUAL INTERFACE
The indicator supports five languages for the HUD display and alert messages: English (default), Portuguรชs, Espaรฑol, ะ ัััะบะธะน, and ไธญๆ (Chinese). Code, comments, group names and input labels remain in English regardless of the selected language.
For reference, the English text of all multilingual UI strings used in the HUD and alerts:
โ BUY / SELL / NEUTRAL โ direction states
โ SQUEEZE โ Low Volatility. Await the Explosion.
โ CLIMAX โ Abnormal Volume Detected. Possible Exhaustion.
โ UPTREND / DOWNTREND / SIDEWAYS / COMPRESSION / EXPANSION โ channel states
โ FAST / SLOW โ rhythm states
โ SCORE: / DIRECTION: / CHANNEL: / RHYTHM:
โ BLACK SWAN โ EXTREME HIGH / BLACK SWAN โ EXTREME LOW
โ Buying Exhaustion Alert: " Buying Exhaustion: Score above 85%. High reversal probability."
โ Selling Exhaustion Alert: " Selling Exhaustion: Score below 15%. High reversal probability."
โ Squeeze Alert: " Squeeze Active: Volatility maximally compressed. Explosion imminent."
โ Black Swan Alert: " Score reached the dynamic channel's extreme zone. Maximum statistical tension. Reversal probable."
HOW TO USE
This indicator is not a signal generator. It is a state classifier: it tells you where the multi-timeframe order-flow consensus currently sits, how stretched that consensus is relative to its own recent statistical range, and which order-flow regime (climax, squeeze, normal) is currently active.
๐น Reading the Oscillator
โ The score line color matches the active channel zone โ visual position alone identifies the regime.
โ The HUD reports the score numerically and classifies the channel/rhythm/status in plain language.
โ Vacuum Trail lines indicate the expected mean-reversion path during exhaustion conditions.
โ Black Swan glow intensity scales with proximity to the statistical extreme.
๐น Tactical Reading
โ Score between dyn_mid and inner band: equilibrium zone. Order-flow consensus is in normal range.
โ Score crossing into the Alert band: directional move asserting itself across multiple timeframes.
โ Score at the Exhaustion band: most of the impulse has already happened โ continuation in trend direction becomes structurally less favorable.
โ Score touching the Black Swan band: statistical tail event. Mean-reversion context is elevated, but regime change is also possible โ the boundary itself is adaptive, so a sustained breach indicates the volatility envelope expanding.
โ Squeeze state active: oscillator is operating in low-conviction mode. Wait for squeeze release before trusting directional reads.
โ Climax state active: abnormal volume has been detected. Exhaustion context is present regardless of score position.
๐น Multi-Timeframe Reading
โ The default radar configuration (5/13/55/233/987) follows Fibonacci minute periods and is calibrated for intraday and swing trading.
โ For scalping, configure shorter timeframes (e.g., 1/3/8/21/55).
โ For position trading, configure longer timeframes (e.g., 60/240/D/W/M).
โ The middle-weighted timeframes (TF3 and TF4) carry the most influence โ choose them carefully.
INPUTS EXPLAINED
๐น System Language
Display language for the HUD and alert messages. Options: English (default), Portuguรชs, Espaรฑol, ะ ัััะบะธะน, ไธญๆ (Chinese).
๐น MTF Synchronization (TF1 to TF5)
Configure each of the five timeframes to aggregate. Defaults: 5, 13, 55, 233, 987 (Fibonacci minutes). Weights are fixed at 15/20/25/25/15 percent respectively.
๐น Show Thermal Zone Fills
Toggle for the semi-transparent rainbow fills between adjacent channel boundaries.
๐น Show Vacuum Trail (Ghost Lines)
Toggle for the convergence ghost lines from exhaustion extremes back toward the channel median.
๐น Show Dynamic Median Line
Toggle for the channel midline (dyn_mid) โ the adaptive zero-reference of the oscillator.
๐น Show Black Swan Lines (Dynamic Glow)
Toggle for the outermost ยฑ3.85ฯ-equivalent boundaries with proximity glow.
๐น Show Info Panel
Toggle for the corner HUD reporting score, direction, channel, rhythm, and status.
๐น Panel Position
Position of the HUD on the chart. Four corners available: Bottom Right (default), Bottom Left, Top Right, Top Left.
๐น Font Size
HUD font size. Options: Tiny (default), Small, Normal, Large, Huge.
๐น Exhaustion Alert
Toggle for the alert that fires when the score crosses ยฑ85/15 thresholds.
๐น Squeeze Alert
Toggle for the alert that fires when the squeeze flag activates.
๐น Black Swan Alert
Toggle for the alert that fires when the score enters the adaptive extreme zone.
IMPORTANT NOTES
The MTF Kinetic Oscillator works on any timeframe. The default MTF configuration (5/13/55/233/987 in minutes) is calibrated for intraday and swing trading on liquid instruments. The Fibonacci-aligned RSI lengths (8/13/21/34/55) and per-timeframe data lengths (288/96/72/60/40) are tuned to provide roughly equivalent statistical resolution across all five horizons.
The indicator works best on instruments with reliable volume data: crypto perpetual contracts, large-cap equities, futures, major forex pairs. On low-volume instruments, the CVD component becomes less reliable, though the score engine and channel continue to function correctly using the Z-Score and RSI components alone.
Alerts fire once per confirmed bar. The Black Swan alert uses an edge-trigger arm/disarm mechanism that prevents repeated firings while the score remains inside the extreme zone. Historical bars never repaint after they close. The live bar updates intra-bar as expected for a real-time indicator.
The Value Area calibration factor (vp_k = 2.51) used internally by the score engine for the Volume Profile distance component is tuned to approximate the conventional 70% Value Area definition. The Fibonacci sigma multipliers (1.50, 1.85, 2.75, 3.85) used by the adaptive channel are intentionally non-standard โ they are Fibonacci-inspired proportions, not arbitrary choices, and they map to four behavioral regimes derived from observation rather than to integer statistical thresholds.
Pine Script v6. Open-source under Mozilla Public License 2.0.
UNIQUENESS
The MTF Kinetic Oscillator is unique in four ways. First, it operates across 5 timeframes simultaneously, aggregating per-timeframe scores via Fibonacci-proportioned weights (0.15 / 0.20 / 0.25 / 0.25 / 0.15) rather than operating on a single timeframe like RSI, MFI, CCI, or Stochastic. Second, the per-timeframe score is built from a Log-Normal Z-Score regression of price (which respects the asymmetric distribution of returns) blended with RSI through sigmoid normalization โ producing a bounded composite that combines two independent signal families per horizon. Third, the global score is plotted not against fixed 0-100 thresholds but against a self-adaptive Fibonacci channel whose boundaries are recomputed every bar from the highest and lowest scores in the lookback window โ calibrating the rainbow visual to current volatility regime rather than to static numerical levels. Fourth, three independent order-flow sensors (CVD Z-Score, Volume Climax detection, and Squeeze volatility compression) modulate the score continuously, with the Squeeze damper compressing score amplitude to 25% during low-conviction lateral phases โ suppressing false directional signals at exactly the moments standard oscillators are typically least reliable. The combination of Fibonacci-weighted multi-timeframe aggregation, log-space Z-Score plus RSI per timeframe, adaptive Fibonacci channel, and three order-flow modulators produces an oscillator that behaves differently from single-timeframe and fixed-threshold oscillators, particularly during volatility regime transitions where standard oscillators are least reliable. Penunjuk

Neural Confluence Engine [Quantum Algo]Neural Confluence Engine
Neural Confluence Engine is a Pine Script v6 indicator that fuses eight independent technical factors โ momentum, trend, VWAP position, RSI regime, MACD acceleration, ADX trend power, volume confirmation, and squeeze state โ into a single weighted directional strength score on a 0โ100 scale. Signals are gated by a user-configurable score threshold and an optional higher-timeframe trend filter before firing. The script is open-source. All signals are confirmed on bar close and do not repaint.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
HOW IT WORKS
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
1. The eight factor model. Each bar, the engine evaluates eight independent factors and assigns each a normalized score between 0 and 1 based on its current state and intensity. Factors are scored separately for bullish and bearish directions.
2. WaveTrend Momentum (weight 1.5). Computes a custom oscillator from HLC3 smoothed by EMA of channel length (default 9) and signal length (default 12). Oversold reversals below -40 score 1.0; readings above zero score 0.8; positive crossovers below zero score 0.5.
3. EMA Alignment (weight 1.3). Triple EMA stack: fast (default 9) > slow (default 21) > baseline (default 50) scores 1.0 for full alignment. Fast > slow alone scores 0.6. Otherwise 0.
4. VWAP Position (weight 1.0). Price above VWAP by more than 1 ATR scores 1.0. Price above VWAP within 1 ATR scores 0.7. Below VWAP scores 0.
5. RSI Regime (weight 0.8). RSI above 60 scores 1.0. RSI between 50 and 60 scores 0.6. Below 50 scores 0.
6. MACD Histogram (weight 0.8). Rising histogram above zero scores 1.0. Positive but flat histogram scores 0.6. Negative histogram scores 0.
7. ADX Trend Power (weight 0.7). ADX above 40 scores 1.0. ADX between 25 and 40 scores 0.7. ADX below 25 scores 0.3 (penalty for chop, not zero).
8. Volume Confirmation (weight 1.0). Volume above 20-bar SMA combined with a directional candle close scores 1.0. Volume between 80% and 100% of average scores 0.4. Below scores 0.
9. Squeeze State (weight 1.2). Detects Bollinger Band compression inside Keltner Channels using length-20 standard deviation and ATR-10 envelopes. A "firing" bar (compression releases) with positive momentum scores 1.0. Compression without release scores 0.3.
10. Weighted aggregation and smoothing. Each directional factor is multiplied by its weight, summed, divided by total weight, and scaled to 0โ100. The raw score is then smoothed with a 3-bar EMA to reduce single-bar noise. Bull score and Bear score are tracked separately. The net Neural Confluence Engine score is the difference between them.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
SIGNAL TIERS
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
The script produces two signal tiers from the same scoring engine, allowing traders to choose between sensitivity and selectivity.
Standard signals (BUY / SELL). Fire on EMA ribbon color change โ when the fast EMA crosses the slow EMA. These follow every directional shift regardless of score. Useful for systematic trend-following.
High-confluence signals (BUY+ / SELL+). Fire only when three conditions align simultaneously: an EMA cross occurs, the directional score exceeds the user-configurable threshold (default 60), and the higher-timeframe trend agrees with the signal direction. Used to filter for the most aligned setups.
Both signal tiers open trade management โ entry, stop loss, three take-profit targets, and optional trailing stop after TP1.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
TRADE MANAGEMENT
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
When a signal fires, the engine computes ATR-scaled risk levels relative to entry:
Stop loss: entry minus 1.5 ร ATR (configurable multiplier 0.5โ10).
TP1: 1R target (configurable risk-reward ratio).
TP2: 2R target.
TP3: 3R target.
When TP1 is reached, the stop converts to a trailing structure: SL moves to breakeven, then advances to TP1 level when TP2 is hit, then to TP2 level when TP3 is hit. The trailing stop also follows price at 0.5 ร ATR distance after TP1. This can be disabled via the "Activate Trailing SL after TP1" toggle.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
WHAT'S ACTUALLY DIFFERENT
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Eight-factor weighted composite, not a single trigger. Standard indicators fire on one condition โ an EMA cross, an RSI level, a volume spike. The Neural Confluence Engine requires multiple independent factors to agree, weights them by historical reliability, and gates signals through a configurable score threshold. The trader can dial sensitivity from 20 (sensitive) to 95 (selective) without re-tuning eight separate sub-indicators.
โ Two-tier signal architecture. Most indicators produce one stream of signals. This produces two from the same engine: standard ribbon flips for sensitive trend-following, and high-confluence variants gated by score + HTF agreement. Traders can use either tier independently or both in confluence.
โ HTF agreement is built into the signal gate, not a separate filter. The higher-timeframe trend check is computed natively via request.security, auto-detected based on the chart timeframe (15m โ 1H, 1H โ 4H, 4H โ D, D โ W) or set manually. BUY+/SELL+ signals are blocked if HTF disagrees.
โ Per-factor visibility in the dashboard. Each of the eight factors is individually viewable in real time โ traders can see exactly which factors are contributing to the current score, rather than receiving a black-box signal. This is rare in confluence-style indicators which typically hide the sub-components.
โ Trailing-stop ratcheting tied to TP hits. The trailing stop doesn't just follow ATR โ it advances in tiers tied to take-profit milestones. After TP1, stop moves to breakeven. After TP2, to TP1. After TP3, to TP2. This protects profits at structurally meaningful levels rather than purely volatility-derived ones.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
RECOMMENDED SETTINGS
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Forex majors (EUR/USD, GBP/USD, USD/JPY) โ 1H to 4H: Min Confluence Score 65, HTF Trend Filter on, SL Multiplier 1.5, TP R:R 1/2/3, HTF auto. Optimized for session-driven moves where structural levels respect institutional flow.
Crypto perpetuals (BTC, ETH, SOL) โ 15M to 1H: Min Confluence Score 60, HTF Trend Filter on, SL Multiplier 2.0, TP R:R 1/2/3, HTF auto. Tuned for 24/7 markets with higher noise floors; the slightly wider stop accommodates increased wick volatility.
Gold (XAUUSD) โ 1H to 4H: Min Confluence Score 70, HTF Trend Filter on, SL Multiplier 1.8, TP R:R 1/2/3.5, HTF set to Daily. Designed for the elevated wick activity around US session open and the tendency for sharp moves to develop after squeeze release.
Indices (SPX, NDX, DAX) โ 5M to 1H: Min Confluence Score 55, HTF Trend Filter on, SL Multiplier 1.2, TP R:R 1/2/3, HTF auto. Tuned for cash-session structure and typical post-open momentum continuation.
Swing trading (any market) โ 4H to Daily: Min Confluence Score 75, HTF Trend Filter on, SL Multiplier 2.5, TP R:R 1.5/3/5, HTF set to Weekly. Reduces noise to the highest-conviction setups only; wider targets to match the higher timeframe.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
ALERTS & OUTPUTS
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Alerts available:
BUY signal โ ribbon flipped bullish (standard sensitivity)
SELL signal โ ribbon flipped bearish (standard sensitivity)
BUY+ signal โ high-confluence bullish setup
SELL+ signal โ high-confluence bearish setup
Squeeze breakout โ volatility compression released
TP1 reached โ trailing stop activated
TP2 reached
TP3 reached
On-chart visuals:
EMA ribbon (5, 9, 13, 21, 34, 50) with fill bands colored by trend direction
VWAP plot with color reflecting price position
BUY / SELL / BUY+ / SELL+ signal labels at signal bars
Confluence score percentage label on BUY+ / SELL+ bars
Optional Entry / SL / TP1 / TP2 / TP3 horizontal lines for the most recent trade
TP-hit confirmation labels with checkmarks
Squeeze background highlight when compression is active
Diamond markers (โก) on squeeze breakout bars
Optional momentum wave background colored by net score intensity
Optional candle coloring on signal bars
Multi-row dashboard with bull/bear scores, bias classification, HTF direction, factor states, trade status, and threshold setting
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
NOTES
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Pine Script version: v6.
Repainting: All signals (BUY, SELL, BUY+, SELL+, squeeze breakouts, TP/SL hits) are evaluated on confirmed bar close and do not repaint. Higher-timeframe values use lookahead=barmerge.lookahead_off so HTF readings reflect only confirmed information available at signal time.
Compatibility: Works on all symbols and timeframes available in TradingView. Tested on forex majors, crypto perpetuals, gold, and major indices. Functions on stocks but the volume confirmation factor may require threshold adjustment for low-volume tickers. Functions on continuous contracts and CFDs.
Open-source: This script is open-source. Clone, study, and modify it freely under the terms of TradingView's House Rules. Republishing the source under a different name is not permitted.
Credits: This indicator's logic is independently developed. The component oscillators (WaveTrend, RSI, MACD, ADX, Bollinger Bands, Keltner Channels, VWAP) are standard public-domain technical analysis tools. The weighted-score aggregation methodology, two-tier signal architecture, ATR-tiered trailing stop progression, and per-factor dashboard are original implementations.
Disclaimer: This indicator is provided for educational and analytical purposes. Trading involves substantial risk of loss. Past performance does not guarantee future results. Position sizing and risk management are the trader's sole responsibility. Nothing in this script or description constitutes financial advice. Penunjuk
