Volume-Adjusted CCI Trend [Alpha Extract]A sophisticated trend identification system that combines dual EMA direction analysis with volume-weighted normalization and CCI momentum filtering for comprehensive trend validation. Utilizing Volume RSI integration and standard deviation-based bands that expand and contract with volume characteristics, this indicator delivers institutional-grade trend detection with multi-layered confirmation requirements. The system's volume adjustment mechanism modulates signal sensitivity based on participation strength while CCI thresholds prevent false signals during weak momentum conditions, creating a robust trend-following framework with reduced whipsaw susceptibility.
🔶 Advanced Dual EMA Direction Engine
Implements fast and slow exponential moving average comparison to establish primary trend direction bias with configurable period parameters for timeframe optimization. The system calculates trend direction as binary +1 (bullish when fast EMA exceeds slow EMA) or -1 (bearish when slow exceeds fast), providing foundational directional input that requires additional confirmation before generating actionable trend states.
🔶 Volume-Adjusted Normalization Framework
Features sophisticated normalization calculation that measures price deviation from basis EMA, scales by standard deviation, then applies volume-weighted adjustment factor for participation-sensitive signal generation. The system calculates Volume RSI to quantify relative volume strength, converts to ratio format, and multiplies normalized deviation by volume factor scaled by impact parameter, creating signals that strengthen during high-volume confirmations and weaken during low-volume moves.
// Volume-Adjusted Normalization
Vol_Ratio = Volume_RSI / 50
Vol_Factor = 1 + (Vol_Ratio - 1) * Vol_Impact
Dev = src - Basis_EMA
Raw_Normalized = Dev / (StdDev * Multiplier)
Vol_Adjusted_Norm = Raw_Normalized * Vol_Factor
🔶 CCI Momentum Filter Integration
Implements Commodity Channel Index threshold system with configurable upper and lower bounds to validate trend strength and filter sideways market conditions. The system calculates standard CCI with adjustable length, compares against asymmetric thresholds (default +100 bullish, -50 bearish), and requires CCI confirmation in addition to EMA direction and normalized deviation before transitioning trend states, ensuring only high-conviction signals generate entries.
🔶 Multi-Layer Trend State Logic
Provides intelligent trend state machine requiring simultaneous confirmation from EMA direction, volume-adjusted normalization threshold breach, and optional CCI momentum validation. The system maintains persistent trend state that only transitions when all three conditions align, preventing premature reversals during temporary retracements or low-volume fluctuations while capturing genuine trend changes with institutional-grade confirmation requirements.
🔶 Dynamic Volume Band Architecture
Creates volatility-adjusted bands around basis EMA using standard deviation multiplied by volume factor, producing channels that widen during high-volume periods and contract during low-volume consolidations. The system applies identical volume adjustment to band calculations as normalization metric, ensuring visual envelope consistency with underlying signal logic and providing intuitive reference boundaries for trend-following price action.
🔶 Gradient Strength Visualization System
Implements color intensity modulation based on normalized signal strength relative to threshold requirements, creating visual feedback that communicates trend conviction. The system calculates strength ratio by dividing absolute normalized value by threshold, caps at 1.0, and applies gradient interpolation from muted to vivid colors, instantly conveying whether current trend exhibits marginal or strong characteristics through line and candle coloring.
🔶 Volume RSI Calculation Engine
Utilizes RSI methodology applied to volume series rather than price to quantify relative participation strength with normalization to 0.5-1.5 range for factor multiplication. The system processes volume through standard RSI calculation, divides by 50 to center around 1.0, and produces ratio values where readings above 1.0 indicate above-average volume and below 1.0 suggest below-average participation for signal adjustment purposes.
🔶 Asymmetric Threshold Configuration
Features separate positive and negative normalization thresholds with independent CCI upper and lower bounds enabling optimization for bullish versus bearish signal generation characteristics. The system defaults to symmetric normalized thresholds (±0.2) but asymmetric CCI levels (+100/-50), recognizing that bullish momentum often requires stronger confirmation than bearish reversals in typical market structures.
🔶 Comprehensive Visual Integration
Provides multi-dimensional trend visualization through color-coded basis line, volume-adjusted bands with gradient fills, trend-synchronized candle coloring, and transition signal labels. The system enables selective display toggling for each visual component while maintaining consistent color scheme and strength-based intensity across all elements for cohesive chart presentation without overwhelming information density.
🔶 Alert and Signal Framework
Generates trend change alerts when state transitions occur with all confirmation requirements satisfied, providing notifications for bullish (transition to +1) and bearish (transition to -1) signals. The system implements state change detection through comparison with previous bar trend state, ensuring single alert per transition rather than continuous notifications during sustained trends.
🔶 Performance Optimization Architecture
Employs efficient calculation methods with null value handling for Volume RSI initialization and nz() functions preventing calculation errors during early bars. The system includes intelligent state persistence maintaining previous trend during ambiguous conditions and optimized gradient calculations balancing visual quality with computational efficiency across extended historical periods.
🔶 Why Choose Volume-Adjusted CCI Trend ?
This indicator delivers sophisticated trend identification through multi-layered confirmation combining directional EMA analysis, volume-weighted normalization, and momentum validation via CCI filtering. Unlike traditional trend indicators relying solely on price-based calculations, the volume adjustment mechanism ensures signals strengthen during high-participation moves and weaken during low-volume drifts, reducing false breakouts and choppy market whipsaws. The system's requirement for simultaneous EMA direction, normalized threshold breach, and CCI momentum confirmation creates institutional-grade signal quality suitable for systematic trend-following approaches across cryptocurrency, forex, and equity markets. The volume-adjusted bands provide dynamic support/resistance references while the gradient strength visualization enables instant assessment of trend conviction for position sizing and risk management decisions.
在脚本中搜索"binary"
SPX Volatility EngineSPX Volatility Engine
A Structured Decision-Support Framework for Intraday SPX Volatility
________________________________________
What This Script Does
The SPX Volatility Engine is a professional decision-support framework designed to help intraday SPX traders determine when market conditions support participation and when restraint is warranted.
Rather than generating trade signals in isolation, the script provides contextual classification of directional opportunities by evaluating volatility regime, market structure, and directional behavior together, in real time.
The output is not more signals — it is fewer, higher-quality decisions, created by filtering and ranking directional activity based on whether the surrounding market environment is aligned or conflicted.
________________________________________
Why This Framework Exists
Intraday SPX markets often present conflicting information:
• Volatility may compress while price trends
• Directional momentum may appear during unfavorable structure
• Signals may trigger when participation is statistically poor
Most indicators measure one dimension at a time.
Very few help traders resolve which information should take precedence when those dimensions disagree.
The SPX Volatility Engine was built specifically to address this problem by structuring how market information is evaluated and prioritized, rather than displaying independent indicators side-by-side.
________________________________________
Processing Logic Overview
The SPX Volatility Engine evaluates market conditions in a defined sequence designed to prevent low-quality signals from being treated as actionable.
The framework operates as follows:
1. Volatility Regime Identification
The script first evaluates volatility behavior, including compression, expansion, and momentum characteristics.
This establishes whether the current environment favors participation, caution, or avoidance.
2. Structural Context Evaluation
Next, the framework evaluates where price is interacting relative to defined structural zones.
This step determines whether directional activity is occurring in favorable or unfavorable locations.
3. Directional Signal Detection
Only after volatility regime and structure are established does the script evaluate directional behavior.
Directional signals are generated conditionally, meaning their significance depends on the surrounding context.
4. Contextual Classification and Suppression
Signals are not treated as binary triggers.
Each signal is evaluated against the volatility and structural context present at the moment it occurs.
Signals that occur during misaligned or conflicted conditions are explicitly downgraded or suppressed.
This sequential evaluation — volatility → structure → direction → classification — is the core originality of the framework.
The value of the script lies in how information is filtered and ranked, not in any single calculation.
Internal volatility and structural measurements are calculated consistently using the same rules on every bar and updated in real time.
________________________________________
How the Components Work Together
The SPX Volatility Engine is a single, integrated analytical framework rather than a collection of independent indicators.
Volatility metrics, structural references, and directional signals are not displayed for separate interpretation.
They are integrated within the same script so that:
• Structural context can qualify or disqualify directional behavior
• Volatility state can suppress participation during unfavorable regimes
• Signals are evaluated based on environmental alignment, not trigger occurrence
These elements are included together to enforce interpretive precision.
If structure, volatility, and direction were viewed separately, signals could appear actionable when they are not — which this framework is explicitly designed to prevent.
This integration logic is the reason the script is maintained as closed source.
The originality resides in the evaluation hierarchy and classification process, not in any individual indicator.
Single-script integration of all calculations and plot presentations ensures that what is seen on-screen matches the classification process taking place in real time for each signal and its surrounding market context.
________________________________________
Signal Classification
Directional signals are classified in real time into one of three contextual states:
• Out-of-Context — directional activity exists, but volatility or structure makes participation unreliable
• Priority — partial alignment is present and conditions warrant attention with caution
• Ideal — volatility regime, structural context, and directional behavior are aligned
These classifications are intended to guide trader behavior:
• Out-of-Context signals are typically ignored
• Priority signals are monitored selectively
• Ideal signals represent structurally supported participation environments
The script does not predict outcomes and does not provide trade entries or targets.
What is presented on-screen is intended to highlight conditions favorable for directional trades when conditions warrant participation, and restraint when those conditions are absent or adverse.
________________________________________
What Appears on the Chart
When applied, the SPX Volatility Engine presents a unified on-chart framework that includes:
• A Heads-Up Display (HUD) summarizing volatility regime, directional bias, and contextual classification
• Contextual CALL / PUT markers that are classified, not blindly generated
• Structural reference zones used internally to evaluate signal validity
• Real-time regime and alignment cues designed to support disciplined interpretation
All outputs belong to this single script and are designed to be interpreted together.
________________________________________
Companion Indicator (Clarification)
A separate companion indicator exists to display the volatility compression and histogram state calculated internally by this framework and used during signal evaluation. This companion exists solely to provide an optional visual representation of that state in a dedicated lower pane for traders who wish to see it.
The companion indicator is not required for the SPX Volatility Engine to function. It provides an optional visualization for traders who prefer to view volatility state in a separate pane.
________________________________________
Intended Use
The SPX Volatility Engine is designed for:
• Intraday SPX traders who value context before conviction
• Discretionary traders seeking a structured, rules-based analytical framework
• Professionals and advanced retail traders who prioritize clarity over signal volume
The framework supports interpretation and decision discipline.
It does not execute trades and does not provide investment advice.
________________________________________
Access
This script is available by Invite-Only.
________________________________________
Disclaimer
This indicator is provided for informational and analytical purposes only and does not constitute investment advice, trading advice, or a recommendation to buy or sell any security or instrument.
The SPX Volatility Engine does not execute trades and does not guarantee results.
All trading decisions remain the sole responsibility of the user.
Trading SPX and related instruments involves substantial risk and may result in losses.
Users should trade responsibly and in accordance with their own risk tolerance.
________________________________________
Kalman Absorption/Distribution Tracker (1 Second)The Microstructure Revolution: Kalman Filtering and the Physics of Order Flow
The evolution of technical analysis has historically been constrained by the limitations of available data and the processing power required to interpret it. For decades, retail traders have relied on indicators derived from Open, High, Low, and Close prices—metrics that are inherently reactive and fundamentally lagging. While these tools can effectively map the history of market movement, they often fail to capture the immediate, aggressive intent that dictates future price action. The financial markets are not merely a sequence of price prints; they are a continuous, high-velocity auction where liquidity is provided and consumed in milliseconds. To truly understand the mechanics of price delivery, one must look beyond the candlestick and into the microstructure of the order flow itself. The Kalman Absorption/Distribution Tracker, specifically designed to operate on 1-second intrabar intervals, represents a paradigm shift in this analytical approach. It abandons the simplistic smoothing of moving averages in favor of a state-space model that applies aerospace-grade signal processing to the chaotic environment of high-frequency market data.
At the core of this concept is the understanding that volume alone is insufficient; it is the relationship between aggressive volume and price displacement that reveals the hand of institutional participants. Traditional volume analysis is often binary, categorizing bars as simply "up" or "down," a method that obscures the nuances of the battle taking place within the timeframe. By drilling down to the 1-second level, this script effectively bypasses the limitations of time-based charting, treating the market stream almost as a tick chart. In this granular domain, the noise is immense. Algorithms, high-frequency trading bots, and market makers generate a blizzard of data that can easily deceive a standard cumulative volume delta (CVD) indicator. This is where the Kalman Filter becomes indispensable. Originally developed for trajectory estimation in navigation systems, the Kalman Filter excels at separating the "signal"—the true vector of buying or selling pressure—from the "noise" of random market chatter. By estimating the velocity and position of order flow in real-time, the tracker provides a smoothed yet highly responsive visualization of market intent, allowing traders to discern between genuine momentum and the deceptive phenomena of absorption and distribution.
The shift to 1-second intrabar resolution transforms the nature of the data being analyzed. In a standard 1-minute or 5-minute timeframe, the internal battle is aggregated into a single bar, hiding the specific sequence of events. A candle might close green, looking bullish, but the 1-second data might reveal that 90% of the buying occurred in the first ten seconds, followed by fifty seconds of passive selling that absorbed all further upside attempts. The 1-second processing logic implemented in this script utilizes a "Close-to-Close" methodology, which acts as a pseudo-tick reader. If the price of the current second is higher than the previous second, the volume is classified as aggressive buying; if lower, aggressive selling. This granularity offers a near-perfect correlation with true bid/ask data, providing the trader with an X-ray view of the auction. This level of detail is crucial because institutional accumulation and distribution rarely happen in obvious, large-block trades that spike volume histograms. Instead, they occur in a steady stream of smaller, algorithmic executions designed to mask intent. The 1-second granularity catches these footprints that larger timeframes simply average out.
A critical innovation within this framework is the handling of "flat ticks"—moments where volume executes but price remains unchanged. In the world of microstructure, these moments are often the most significant. When aggressive buying volume pours into the market but price refuses to tick higher, it signifies the presence of a "limit wall" or a passive seller absorbing the demand. Standard indicators often discard this data or split it arbitrarily. This script, however, offers advanced logic to assign this volume based on the previous tick's direction, recognizing that in a high-velocity momentum move, a flat tick is often a continuation of the immediate aggressor's effort meeting temporary resistance. By accurately categorizing this "effort without result," the script identifies Absorption with pinpoint accuracy. It flags the precise moment when the laws of supply and demand seemingly break—when effort (volume) fails to produce a result (price change)—alerting the trader to a potential reversal or exhaustion point long before the price pattern confirms it.
The concept of "Market Efficiency Benchmarking" serves as the analytical engine driving the script’s diagnostic capabilities. The market is not a static environment; liquidity conditions change depending on the time of day, the asset class, and the prevailing volatility regime. A 500-contract buy order might shatter resistance during the Asian session but barely move the needle during the New York open. To account for this, the tracker calculates a dynamic "Price per CVD" metric, effectively learning the current exchange rate between volume and price displacement. It utilizes an exponential decay mechanism to maintain a rolling baseline of market efficiency. By constantly asking, "How much price movement should this amount of volume create?", the script establishes a standard of normalcy. When the market deviates from this standard—for example, when a massive surge in buying velocity results in minimal price gain—the script registers a Distribution event. Conversely, when selling pressure evaporates into a stable price, it registers Absorption. This dynamic benchmarking ensures that the tool remains robust and adaptive, requiring less manual tuning as market conditions shift.
The Kalman Filter’s role in this process is to calculate the "velocity" of the order flow. While cumulative volume delta (CVD) tells you the position of buyers versus sellers (who has bought more in total), the Kalman velocity tells you the rate of change of that aggression. This is analogous to the difference between a car’s odometer and its speedometer. In trading, the speed of the move matters. A slow, grinding move upward suggests a lack of aggressive selling, while a rapid vertical spike suggests an emotional imbalance. The script detects these velocity shifts instantly. When the velocity exceeds a specific threshold, the system enters a "Trend State." It is during these states that the benchmarking logic is most active, comparing the predicted price trajectory against reality. If the velocity is high but the price lags behind the Kalman prediction, the divergence is mathematically quantified. This removes the subjectivity from reading divergence; instead of "eyeballing" a chart, the trader receives a definitive, data-driven signal that the current trend is unhealthy.
The visual interface of the tracker, the dashboard, is designed to synthesize this complex data into actionable intelligence. Trading is a game of context, and a single signal in isolation is often meaningless. The dashboard provides a multi-day memory, aggregating events from "Today," "Yesterday," and "Day Before (D-2)." This temporal perspective is vital because institutional campaigns often span several days. A single day of distribution might be a pause in a trend, but three consecutive days of distribution events in a rising market constitute a screaming warning sign of a reversal. The dashboard tracks "Confirmed" events (where price moves in harmony with volume) and "Hidden" events (Absorption/Distribution). By calculating the "Net" counts for each day, the script offers a directional bias summary. If the "Hidden Net" is positive, it implies that passive buyers are accumulating positions, supporting the trend. If negative, it implies smart money is using liquidity to exit. This high-level view allows the trader to align their intraday execution with the broader structural narrative of the market.
One of the most powerful metrics presented on the dashboard is the "Ease of Movement" ratio. Derived from Wyckoff logic, this ratio compares the efficiency of buyers versus sellers. If the script calculates that it takes 1,000 contracts of buying to move the price 5 points, but 1,000 contracts of selling only moves it 2 points, the ratio reveals a fundamental asymmetry. The path of least resistance is up. This metric allows traders to filter their setups with a bias toward the "easier" side of the market. Even if a short setup presents itself technically, a high Ease of Movement ratio warns that the trade will be fighting against the market’s internal physics. This insight is invaluable for risk management, helping traders avoid "choppy" trades and focus on high-probability expansions where price and volume are working in concert.
The granularity of the 1-second data also necessitates a discussion on the "State Change" counter. In a healthy, trending market, the Kalman state should remain relatively stable, holding a bullish or bearish velocity for extended periods. However, in a volatile, indecisive market, the state may flip rapidly back and forth. The "State Changes" metric quantifies this turbulence. A high number of state changes relative to the time elapsed indicates a "choppy" or "balanced" auction where neither side has seized control. This is an environment that destroys trend-following strategies. By observing this counter, a trader can gauge the "texture" of the market volatility. Is the market flowing smoothly, or is it erratic? This allows for dynamic strategy adjustment—tightening stops in high-state-change environments or letting winners run when the state is stable.
The practical application of this tool requires a nuanced understanding of the four primary events it detects: Confirmed Bullish, Confirmed Bearish, Absorption, and Distribution. A "Confirmed" event is the market functioning efficiently. Aggressive buyers step in, velocity spikes, and price expands proportionally. These are the waves traders want to ride. They signify agreement between aggressive and passive participants. However, the edge lies in identifying the anomalies. An "Absorption" event (Cyan on the dashboard) often marks the bottom of a pullback. It visually represents the moment when sellers run out of ammunition or hit a limit buy wall. Seeing a cluster of Absorption events at a key support level provides the confidence to enter a long position with a tight stop, knowing that the structural support is real, not just a line on a chart. Conversely, "Distribution" (Orange) at highs is the hallmark of a "bull trap." Retail traders see the breakout and buy, but the tracker sees that the buying volume is not translating into price distance, indicating that a larger player is feeding the bulls their exit liquidity.
The "Current State" section of the dashboard brings this analysis into the immediate present. It functions as a real-time monitor for the active candle or swing. By projecting an "Expected Price" based on the accumulated CVD of the current move, it gives the trader a live performance review of the trend. If the actual price is trading below the expected price during an uptrend, the text will flash "Distribution Risk." This is a leading indicator in the truest sense. It warns the trader before the candle closes, before the moving average crosses, and before the price structure breaks. This latency advantage is the primary benefit of the Kalman filter’s predictive capability. It allows for proactive trade management—taking partial profits as distribution appears, rather than waiting for the market to reverse and stop out the trade.
It is important to acknowledge the technical sophistication required to run such a script. Processing 1-second arrays for an entire trading session pushes the Pine Script engine to its limits. The sheer volume of data points—tens of thousands per session—requires efficient coding and array management to prevent timeouts. This complexity is the barrier to entry that keeps such analysis out of the hands of the casual amateur. It is a tool for the serious market participant who understands that the quality of their output is dependent on the resolution of their input. The script’s ability to handle this data load and persist the calculations across sessions using var variables demonstrates a mastery of the platform’s capabilities, turning TradingView into a workstation that rivals professional institutional terminals.
The psychological impact of using the Kalman Absorption/Distribution Tracker cannot be overstated. Uncertainty is the root of emotional error in trading. When a trader buys a pullback, the fear of the price continuing to drop is palpable. However, if that trader has quantitative evidence that selling pressure is being absorbed—if they can see the "Hidden Net" turning positive and the Kalman velocity slowing down despite the red candles—that fear is replaced by conviction. The tool acts as an objective third party, decoupling the decision-making process from the emotional sway of price ticks. It anchors the trader in the reality of the order flow. It fosters a mindset of "buying strength in weakness" and "selling weakness in strength," which is the antithesis of the typical retail urge to chase price.
Furthermore, the adaptability of the script through its inputs allows it to be tuned to specific assets. The "Alpha" and "Beta" settings of the Kalman filter control its sensitivity. A higher Alpha makes the filter more responsive to recent price changes, suitable for scalping volatile assets like cryptocurrencies. A lower Alpha smooths the data further, ideal for capturing broader trends in thicker markets like the ES or Treasuries. The "Price Follow Threshold" allows the user to define what constitutes "efficiency" for a specific instrument. By tweaking these parameters, the trader effectively calibrates their radar to the specific frequency of the market they are trading, ensuring that the signals generated are relevant and actionable. This customizability ensures that the tool is not a black box but a transparent framework for market analysis.
The distinction between "Confirmed Net" and "Hidden Net" on the dashboard offers a dual-layer view of market sentiment. "Confirmed Net" tracks the visible trend—the moves that everyone sees. A high positive Confirmed Net means the trend is healthy and obvious. "Hidden Net," however, tracks the invisible war. A divergence between these two is a powerful signal. For instance, if the market is grinding higher (Positive Confirmed Net) but the Hidden Net is deeply negative (Distribution), it indicates a "hollow rally." The price is rising due to a lack of selling, not the presence of strong buying, and passive sellers are unloading into the move. This setup often precedes a violent correction. Identifying this "hollow" structure allows the trader to avoid buying the top or to position themselves for a mean reversion trade.
The 1-second granularity also shines during news events and the market open. These periods are characterized by extreme volatility and noise. Standard indicators often blow out or provide false signals during these times due to the sheer magnitude of the variance. The Kalman filter, however, is designed to handle noisy data streams. By dynamically adjusting its state estimates, it can track the dominant flow of capital even through the chaos of an FOMC release or the opening bell. The "Close-to-Close" logic ensures that every tick is accounted for, providing a cumulative picture of who won the opening battle. If the first minute of the session sees high volatility but the script registers massive "Absorption," it suggests that the initial volatility was a liquidity grab, setting the stage for a steady move in the opposite direction.
Ultimately, the Kalman Absorption/Distribution Tracker is more than just a technical indicator; it is a philosophy of market engagement. It rejects the notion that price is the only truth, arguing instead that price is the result of a negotiation between aggression and liquidity. By quantifying this negotiation with the precision of 1-second intervals and the mathematical rigor of Kalman filtering, it provides a window into the "why" behind the move. It transforms the chart from a historical record of what happened into a real-time display of what is happening now.
For the trader with the right mindset—one who values process over prediction and risk management over gambling—this tool offers a significant edge. It does not promise to predict the future, but it offers the most accurate possible description of the present. In the zero-sum game of trading, having a clearer, faster, and more detailed view of the battlefield is often the deciding factor between profitability and ruin. The script bridges the gap between the retail trader and the institutional algorithm, democratizing access to high-frequency order flow analysis and empowering the user to make decisions based on the structural reality of the market rather than the deceptive surface of price action. It is a testament to the power of modern scripting languages and a valuable addition to the arsenal of any serious technical analyst.
# Trading View's premium subscription is required to run this script.
S9 ToolkitGENERAL OVERVIEW:
The S9 Toolkit is a multi-layered market structure and volume analysis indicator. It combines volumetric support and resistance, trendlines, engulfing candlesticks & zones, session volume profile, swing highs/lows, moving averages, and a checklist dashboard into one framework. Each component works independently while staying aligned with the others.
This indicator was developed by Flux Charts in collaboration with S9 Trades.
WHAT IS THE THEORY BEHIND THIS INDICATOR?:
The core idea is that price movement encodes behavior, not just direction. Candles show where price traded, but they don’t reveal how committed buyers or sellers were or whether a move was truly accepted or rejected. The S9 Toolkit exposes these behaviors by watching how price reacts at structurally important areas and by analyzing volume during those interactions.
Structure defines where the market is operating. Highs, lows, zones, and trends mark areas where the market has responded before. Volume adds context by showing the level of participation at those locations. Strong reactions, weak follow-through, repeated tests, and clean breaks each convey different information.
Market structure also changes over time. A zone that holds multiple tests may remain important, while one that breaks cleanly may lose relevance. The toolkit tracks these interactions so traders can see how structure evolves rather than treating levels as fixed. Sessions matter too. Markets behave differently across trading windows, and volume distribution shifts throughout the day. By incorporating session-based profiling and higher-timeframe alignment, the toolkit accounts for these differences.
The purpose of the S9 Toolkit is to clarify what the market is doing now and how that relates to earlier structure. It organizes price, volume, and structural change into a clear framework, helping traders make decisions with better context.
S9 TOOLKIT FEATURES:
The S9 Toolkit indicator includes 8 main features:
Volumetric Support & Resistance Zones
Trendlines Structure
Engulfing Candlesticks & Zones
Swing Highs/Lows
Session Volume Profile
EMAs & Directional Bias Dashboard
Checklist Dashboard
Alerts
Each component operates independently while sharing the same underlying market structure and confirmation logic. Detailed explanations for each component are provided in the sections that follow.
VOLUMETRIC SUPPORT AND RESISTANCE ZONES:
🔹 What is Support & Resistance?
Support and resistance are areas on the chart where price previously showed a meaningful reaction. Support is a price area where buying activity was sufficient to slow down or reverse a decline and is displayed in the lower portion of price movement, while resistance is a price area where selling activity was sufficient to slow down or reverse an advance, and is shown in the upper portion of price movement. These zones represent areas where bullish and bearish pressure accumulated and where price is more likely to react again when revisited.
The S9 Toolkit treats support and resistance as price zones. Price does not interact with one exact level but with a range where previous reactions occurred. These zones make it easier to observe whether price reacts, pauses, or moves through the same range when revisited.
(Screenshot: only Support Resistance Zones Enabled)
🔹 How the Indicator Identifies Support & Resistance
The S9 Toolkit identifies support and resistance using confirmed market structure.
◇ Step 1: Confirmed Swing Detection
The indicator first detects confirmed swing highs and swing lows using a user-defined pivot length. A swing is only confirmed after price has completed the required number of bars on both sides, ensuring that structure does not repaint.
Confirmed swing lows are used to identify support
Confirmed swing highs are used to identify resistance
(Screenshot: Pivot swing detection)
◇ Step 2: Zone Construction
Once a swing is confirmed, the indicator constructs a price zone.
The zone is created around the confirmed swing pivot
The zone boundaries are offset above and below the pivot using a fixed Daily Average True Range (ATR) value
The ATR value is used only to define the initial zone size and does not change after the zone is created
Each zone is plotted forward in time so future price interaction can be observed.
(Screenshot: Zones instead of Lines - based on ATR)
◇ Step 3: Overlap Filtering
To reduce clutter and redundant structure, newly detected zones are compared against existing zones of the same type. If a new zone overlaps too closely with an existing active zone, it is not created
(Screenshot: Ignoring overlapping zones)
🔹 Volumetric Information
Each zone displays the volume information accumulated during its formation. This includes total volume and the percentage breakdown between bullish and bearish activity. By embedding this information directly within the zone, the indicator allows traders to evaluate the character of the trading activity that created the structure.
◇ How volume is calculated
During zone formation, volume is accumulated using lower-timeframe data. Volume is classified as bullish when a bar closes at or above its open, and bearish when a bar closes below its open. This provides a consistent approximation of buying versus selling volume without requiring bid/ask data.
(Screenshot: Bullish Volume vs Bearish Volume)
◇ How volume is displayed
Each zone displays:
The total volume traded during zone formation
A percentage value indicating which side was dominant
For support zones, the percentage represents bullish volume
For resistance zones, the percentage represents bearish volume
◇ Imbalance Zones
In some cases, a zone may show volume dominance that does not align with its type. For example, a resistance zone may display a higher bullish volume percentage, or a support zone may display a higher bearish volume percentage. This indicates that price reversed despite greater activity from the opposing side during formation. These imbalanced zones are displayed the same way as other zones and provide additional information about how price reacted within that range.
(Screenshot: Imbalance Zones)
🔹 Breaks & Retests
After a zone is created, the S9 Toolkit tracks how price interacts with it over time.
◇ Retests
A retest occurs when price returns to a zone after moving away, trades into its price range, and reacts without breaking through the zone boundaries. The retest is only counted after the bar closes, ensuring that transient intrabar touches are not treated as valid retests.
(Screenshot: Retests)
◇ Breaks
A break occurs when price moves beyond a zone’s boundary according to the selected invalidation method.
(Screenshot: Zone breaks)
Breaks are evaluated only on confirmed bars. Intrabar price movement does not trigger break conditions, ensuring that only completed price action updates the zone state.
Once a break is confirmed, the zone is marked as broken and its internal state is updated. The zone no longer qualifies as active support or resistance and can optionally remain on the chart in a visually muted form.
🔹Settings
◇ Volumetric Info
Enables or disables the display of volumetric information inside support and resistance zones. When enabled, each zone shows the total volume traded during its formation along with the bullish and bearish volume distribution. When disabled, zones are displayed without any volume data.
◇ Pivot Length
The Pivot Length setting controls how many bars on each side of a price point are required to confirm a swing high or swing low, used to create support and resistance zones. A zone is only formed after the swing is fully confirmed. Higher Pivot Length values require more confirmation bars, resulting in fewer support and resistance zones based on larger, more established price moves. Lower values confirm swings more quickly, creating more frequent zones that reflect finer structural detail. Pivot Length only affects how support and resistance zones are identified and does not change the zone size or behavior after creation.
(Pivot Length: 5 Detects more zones)
(Pivot Length: 20 Detects fewer zones)
◇ Strength
The strength value represents the number of confirmed retests a support or resistance zone has received. Strength increases only when a valid retest occurs and is capped at a maximum of three. Zones are displayed only when their strength meets or exceeds the user-defined Strength setting. This value does not change after a zone is broken.
(Screenshot: Strength 1, 2 ,3 zones displayed)
◇ Higher-Timeframe Zones
The S9 Toolkit allows support and resistance zones to be calculated on a higher timeframe and projected onto the active chart. When a higher timeframe is selected, zone creation, retests, and breaks are all evaluated using that timeframe's data, while the zones themselves are displayed on lower timeframes without recalculation. This allows traders to observe how lower-timeframe price interacts with zones that were formed using higher-timeframe price action and a wider price range.
(Screenshot: Higher Timeframe Zones)
◇ Invalidation method
The S9 Toolkit allows users to control how a break is confirmed by selecting an invalidation method.
Close-based Invalidation: A break is confirmed only when price closes beyond the zone boundary. Wick penetration alone is ignored. This method requires price to fully accept beyond the zone before it is marked as broken.
Wick-based Invalidation: A break is confirmed when price wicks beyond the zone boundary, even if the candle closes back inside the zone. This method is more sensitive and captures early or aggressive break attempts.
(Screenshot: Zone Breaks with Close)
(Screenshot: Zone Breaks with Wick)
◇ Display Nearest
The Display Nearest setting controls how many of the closest support and resistance zones are shown on the chart relative to the current price. Only the nearest active zones above and below price are displayed, while older or more distant zones are hidden. This helps reduce visual clutter and keeps the focus on the most immediately relevant support and resistance areas without removing or recalculating any underlying zones.
(Screenshot: Display nearest 2 zones)
◇ Breaks & Retests
These settings control the visibility and appearance of break and retest markers on support and resistance zones. Users can independently enable or disable break markers and retest markers. Color settings allow customization of how bullish and bearish retests and zone breaks are displayed on the chart, making it easier to distinguish different types of interactions. Turning these options off hides the markers without affecting how zones are calculated.
◇ Show invalidation Zones
The Show Invalidated Zones setting controls whether support and resistance zones remain visible after they are broken. When enabled, zones that have been invalidated are kept on the chart in a visually muted form. This allows users to see where zones were previously active without treating them as current support or resistance. When disabled, invalidated zones are removed from the chart once a break is confirmed, keeping the display focused only on active zones.
(Screenshot: Historical Zones are muted)
TRENDLINES:
🔹 What is a Trendline
A bullish trendline is a line drawn by connecting higher swing lows, showing that price is making progressively higher lows over time. As long as price continues to respect this line, upward movement remains intact. A bullish trendline is typically tested from above, and a break occurs when price closes below the line.
(Screenshot: Bullish Trendline)
A bearish trendline is a line drawn by connecting lower swing highs, showing that price is making progressively lower highs over time. As long as price respects this line, the downward movement remains intact. A bearish trendline is typically tested from below, and a break occurs when price closes above the line.
(Screenshot: Bearish Trendline)
🔹How it works
In the S9 Toolkit, trendlines are constructed using confirmed swing points. Each trendline is created only after a valid sequence of pivots is identified, ensuring that lines are based on completed price movement rather than interim fluctuations. Once drawn, a trendline extends forward and is continuously evaluated as new price data forms. Trendlines and volumetric zones work together in the S9 Toolkit. Zones highlight areas where price interacts and trades, while trendlines show the overall directional structure. When viewed together, they help traders see whether price is moving in line with the current structure or beginning to move away from it.
🔹How the indicator detects trendlines
◇ Step 1: Detect confirmed swing pivots
The S9 Toolkit identifies confirmed swing highs and swing lows using the selected Swing Length setting. A pivot is only confirmed after the required number of bars have formed on both sides, ensuring completed structure and non-repainting behavior.
(Screenshot: Confirmed swing pivots)
◇ Step 2: Form and validate a candidate trendline
When a new pivot is confirmed, the indicator attempts to connect it with the previous pivot of the same type. For bearish trendlines, the new swing high must be lower than the previous swing high. For bullish trendlines, the new swing low must be higher than the previous swing low.
(Screenshot: New Lower High)
◇ Step 3: Apply strength filtering
Each valid candidate trendline is evaluated using a slope-based strength calculation derived from the relative size of the swing legs between the pivots, rather than a simple angle measurement. If the calculated strength does not meet the user-defined Strength threshold, the trendline is filtered out and not displayed.
(Screenshot: Strength Calculation)
◇ Step 4: Extend the trendline and draw the zone
Validated trendlines are extended forward by the number of bars defined in the Extend By setting. A shaded zone is drawn around the line using ATR-based padding so price interaction is observed as an area rather than a single line.
(Screenshot: S9 Toolkit’s Trendlines)
🔹 Swing Length
The Swing Length setting controls how swing points are identified for trendline construction. A swing point is confirmed only after the specified number of bars has formed on both sides of the pivot. A higher swing length requires more bars to confirm each pivot, resulting in fewer swing points and trendlines that reflect longer-term price movement. A lower swing length confirms pivots more frequently, producing more swing points and shorter-term trendlines that react more quickly to price changes.
(Screenshot: Trendlines with Smaller Swing Length)
(Screenshot: Trendlines with Higher Swing Length)
🔹Strength filtering
The strength setting controls how selective the trendline detection is. Higher strength values require more pronounced directional moves between swing points, filtering out flatter or weaker trendlines. Lower values allow more trendlines to appear, including those with gentler slopes. This allows traders to adjust sensitivity based on their preferred level of structural detail.
(Screenshot: Low strength zones, Flatter Slope)
(Screenshot, High Strength Zones, Weaker Filtered out)
🔹Trendline extension and lifecycle
Once established, trendlines extend forward by a user-inputted number of bars and remain active until invalidated by confirmed price behavior. A trendline does not disappear simply because the price moves away from it. Its relevance is reassessed only when the price decisively breaks through it.
(Screenshot: Trendlines Keep Extending Until Invalidation)
🔹Extend By
The Extend By setting controls how far a trendline is extended forward after its last confirmed pivot or break. The value defines the number of bars the trendline continues beyond that point for ongoing reference.
(Screenshot: Extend by Example)
🔹Show Last
The Show Last setting limits the number of most recent trendlines displayed on the chart. Older trendlines beyond this limit are hidden to reduce visual clutter.
(Screenshot: Show Last Settings)
🔹 Regular Breaks
A regular break occurs when price closes beyond the trendline on a confirmed bar. Intrabar movement is ignored, ensuring that only completed candles can invalidate a trendline. Regular breaks are evaluated using the same confirmed-bar logic as support and resistance zones.
(Screenshot: Regular Breaks)
🔹 Engulfing Breaks
An engulfing break occurs when a valid engulfing candle forms at the trendline. Instead of requiring a close beyond the line, the engulfing pattern itself is used as the break condition. Engulfing breaks are also evaluated only on confirmed bars and can be enabled independently of regular breaks.
(Screenshot: Engulfing Breaks)
The engulfing candlesticks used for trendline break detection follow the same criteria described later in this write-up in the Engulfing Candlesticks section below, where the pattern is explained in detail.
After a break, the trendline stops extending and is marked with a break label.
🔹Hide Invalidated Trendlines
When enabled, trendlines are removed from the chart after a confirmed break to reduce chart clutter and keep the focus on active directional structure. When disabled, broken trendlines remain visible for reference, allowing users to see where previous directional boundaries existed without treating them as valid trendlines.
(Screenshot: Only Valid Trendlines displayed)
🔹How to interpret trendline breaks and continuation
Trendlines should be viewed for directional reference, not as buy or sell signals. When price respects a trendline, it suggests the market is continuing in the same direction, and structure remains aligned. When reactions become weaker or price starts overlapping the line, it may indicate that directional strength is fading.
Clear breaks, especially when they occur near zones or alongside volume changes, often show that the market is re-evaluating its direction. When trendlines align with volumetric zones, price reactions tend to be more meaningful. When they do not align, the mismatch itself becomes useful information.
The S9 Toolkit highlights these relationships so traders can observe whether direction and structure remain aligned or begin to separate.
ENGULFING CANDLE BEHAVIOR AND ZONES:
🔹What is an engulfing candlestick
An engulfing candlestick occurs when a candle completely overtakes the body of the previous candle in the opposite direction. The current candle closes beyond the prior candle’s range, showing that price moved decisively during that bar rather than continuing the previous movement. This type of candlestick highlights a clear shift in short-term price direction compared to the preceding candle and marks areas where price momentum changes abruptly.
A bullish engulfing candlestick forms when a bearish candle is followed by a larger bullish candle that fully engulfs the previous candle’s body and closes above its high.
(Screenshot: Bullish Engulfing)
A bearish engulfing candlestick forms when a bullish candle is followed by a larger bearish candle that fully engulfs the previous candle’s body and closes below its low.
(Screenshot: Bearish Engulfing)
🔹 How the indicator detects engulfing candlesticks
◇ Step 1: Compare candle direction
The indicator first checks whether the previous candle and the current candle are in opposite directions. A bullish engulfing requires the previous candle to be bearish and the current candle to be bullish. A bearish engulfing requires the previous candle to be bullish and the current candle to be bearish.
(Screenshot: Bullish Candle/ Bearish Candle)
◇ Step 2: Apply body-size requirement
The indicator then checks that the current candle’s body is significantly larger than the previous candle’s body. This requirement filters out weak or marginal engulfing candles and focuses only on more decisive price movement.
(Screenshot: Weak Body vs Strong Body)
◇ Step 3: Confirm range takeover with a close beyond the prior bar
After the size condition is met, the indicator requires the current candle to close beyond the previous candle’s range:
Bullish engulfing candles must close above the previous candle’s high.
Bearish engulfing candles must close below the previous candle’s low.
(Screenshot: Closing above previous high)
◇ Step 4: Highlight the engulfing candle on the chart
When an engulfing candlestick is detected, the indicator highlights the candle using direction-specific colors. Bullish engulfing candles and bearish engulfing candles are colored separately based on the user’s Engulfing Candlesticks color settings, allowing quick visual identification on the chart.
(Screenshot: Highlighting the Engulfing Candle)
🔹Engulfing Zones
When a valid engulfing candlestick is detected, the toolkit constructs an engulfing zone based on the price range of the engulfing candlestick. For bullish engulfing, the zone spans from the current bar's high down to its open. For bearish engulfing, the zone spans from the current bar's open down to its low. These zones persist forward in time and can be revisited, tested, or invalidated like other structural elements. The toolkit tracks whether price later returns to mitigate (trade through) these zones.
(Screenshot: Engulfing Zones)
🔹Show Last
This setting limits the number of engulfing zones displayed on the chart. When set to a value such as 5, only the five most recent engulfing zones that have not yet been mitigated are shown, while all others are hidden to reduce chart clutter.
(Screenshot: Last 2 Engulfing Zones)
🔹How to interpret engulfing behavior
Engulfing behavior should be read as a sign of decisive price movement. A bullish engulfing event shows that buying pressure was strong enough to overcome the prior bar's range and close higher. A bearish engulfing event shows the same for selling pressure.
The most important information comes from what happens next. Continued movement in the same direction suggests follow-through, while overlap or hesitation suggests the move may be temporary.
Engulfing behavior becomes more contextually significant when it aligns with other toolkit components. An engulfing event that forms near a volumetric support zone, along a trendline, or close to a session POC may carry more weight than one that appears in open space. The toolkit presents these events as points of interest, allowing traders to evaluate context without treating them as automatic trade signals.
🔹Zone mitigation logic
When price revisits an engulfing zone after its creation, the toolkit tracks whether the zone is mitigated. A zone is marked as mitigated when price trades through it (closes beyond its boundary). Mitigated zones stop displaying, keeping the chart focused on active, unmitigated structure.
By highlighting engulfing behavior and optionally tracking the resulting zones, the S9 Toolkit turns candle patterns into observable reference points. Traders can see where decisive price moves occurred and whether those areas continue to influence later price behavior.
HIGHS AND LOWS STRUCTURAL MARKERS:
🔹How it works
The toolkit marks swing highs and lows as horizontal reference lines on the chart. These represent confirmed pivot points where price changed direction. When price later breaks through a prior swing level, it's marked with a "B" label.
🔹Swing detection
Swing sensitivity is configurable. Lower values detect more swings with finer detail. Higher values detect fewer, more significant pivots. Swings are only marked after confirmation, so they don't repaint.
🔹How to interpret
Swing highs and lows show where price previously reversed. Breaks show where price has moved beyond prior structure. Sequences of higher highs/lows or lower highs/lows help assess directional context.
SESSION VOLUME PROFILE:
🔹How it works
The Session Volume Profile component of the S9 Toolkit organizes traded volume across price for a defined trading session. Volume is arranged vertically across price levels, showing where activity concentrated and where trading interest was limited during that session. This helps identify the price areas where the market spent time trading and building activity. Sessions can be defined explicitly to reflect distinct trading environments, such as regional market opens or custom intraday windows. Each session profile resets independently, allowing traders to observe how value develops and shifts from one session to the next without cumulative distortion.
🔹How volume is distributed across price
Volume is aggregated across all bars within the active session and mapped to price levels using a configurable number of rows. The toolkit divides the session's price range into equal segments and distributes each bar's volume across the rows that the bar's range touches. Volume distribution uses a proportional calculation method where each bar's volume is allocated based on how much of the bar's range falls within each price row. This creates a distribution that highlights high-activity price levels and low-activity gaps. Volume is classified as up or down based on candle direction, providing a consistent way to separate buying and selling activity across the profile.
🔹Point of Control (POC)
The Point of Control represents the price level where the highest amount of volume was traded during the session. It marks the area of greatest trading activity and often acts as a gravitational reference point for price. The POC highlights where the market showed the strongest willingness to transact during that session.
Repeated interaction with a session POC suggests continued interest around that price level, while clean movement away from it can indicate that trading activity is shifting elsewhere.
🔹Value Area High and Low (VAH / VAL)
The Value Area defines the range of prices where the majority of session volume was exchanged. VAH marks the upper boundary of this range, while VAL marks the lower boundary. Together, they frame the area where the market considered prices fair during that session.
Price behavior around VAH and VAL often provides context. Continued trading within the value area reflects concentrated activity, while sustained trade outside of it often coincides with expansion or transition in price behavior.
🔹How to interpret session-based volume structure
Session Volume Profile should be interpreted in conjunction with structure and direction. A session that develops value above prior structure may indicate continuation, while value developing below may suggest reassessment. Sessions with narrow value and low activity often precede expansion, while sessions with wide, overlapping value often reflect consolidation.
By resetting profiles each session, the S9 Toolkit helps traders observe how value shifts over time and how activity changes across different trading environments. Session Volume Profile highlights where trading activity is concentrated and where it is limited, providing a clear context for how price movement develops afterward.
EMA BIAS:
🔹How it works
The toolkit allows users to display up to three exponential moving averages, each with a user-defined length. These EMA lengths can be configured independently, allowing short-, medium-, and longer-term averages to be viewed together on the chart. Each EMA updates continuously as new bars form.
🔹 Price Above the EMAs
When price trades consistently above one or more EMAs, bias relative to those EMAs is considered positive. This indicates that price is accepting higher levels and that upward movement is being maintained. When multiple EMAs are stacked below price and begin to spread apart, it often reflects bullish price discovery, where price is moving higher with momentum.
(Screenshot: Price above ema, Emas spread apart)
🔹Price Below the EMAs
When price trades consistently below one or more EMAs, bias relative to those EMAs is considered negative. This indicates that lower prices are being accepted and downward movement is being maintained. When multiple EMAs are stacked above price and spread apart, it often reflects bearish price discovery, where price is moving lower with strong directional pressure.
(Screenshot: Bearish EMA Direction)
🔹Frequent EMA Crossings and Compression
When price crosses back and forth through the EMAs and the EMAs remain close together, directional bias is unclear. This behavior typically indicates consolidation or range-bound conditions, where price lacks sustained directional movement and reactions at support or resistance are more likely to be rotational rather than trending.
(Screenshot: Frequent Crossing, Range-Bound)
CHECKLIST DASHBOARD:
🔹How it works
The Checklist Dashboard is a context reference tool designed to present selected market conditions in a compact, easy-to-read format. It brings together key observations from the S9 Toolkit and displays them in one place, allowing traders to review structure, direction, and interaction without scanning the entire chart.
Most checklist items are manually assessed and toggled by the trader based on their own reading of the chart. This allows the checklist to function as a disciplined review framework rather than an automated signal generator. The EMA-related item is the only condition that updates automatically based on live price behavior.
🔹How checklist conditions are handled
Each checklist item represents a specific consideration, such as structural alignment, directional bias, or interaction with key zones. Except for EMA, checklist states are user-controlled and reflect the trader's interpretation of current conditions using the toolkit's visual components.
Conditions are presented in a simple binary format to reduce cognitive load. The checklist does not rank, weight, or score conditions. Its purpose is to organize thought, not to make decisions.
🔹How to use the checklist
The Checklist Dashboard is best used as a discipline and a confluence aid. A checklist showing broad alignment can indicate a cleaner market environment, while mixed states can highlight uncertainty, compression, or transition.
Because the checklist is configurable and largely manual, traders can adapt it to different workflows, higher-timeframe analysis, intraday execution, or post-analysis review. Used properly, it helps maintain consistency and situational awareness without introducing mechanical bias or automated decision-making.
INPUTS:
🔹Volumetric Support & Resistance
◇ Enable
Turns volumetric support and resistance zones on or off entirely.
◇ Pivot Length
Defines how many bars on each side are required to confirm a swing pivot.
Higher values produce fewer, more stable zones based on higher-level structure. Lower values produce more frequent zones with finer structural detail.
◇ Strength
Sets the minimum number of valid retests required for a zone to remain active. Strength increases only when price revisits the zone without breaking it. The maximum strength is capped at three.
◇ Timeframe
Allows zones to be sourced from a higher timeframe and projected onto the active chart. When set, all zone logic (creation, retests, breaks) is evaluated on the selected timeframe while remaining historically aligned.
◇ Invalidation Method
Controls how zone invalidation is confirmed:
Close: A zone is invalidated only when the price closes beyond its boundary.
Wick: A zone is invalidated when the price wicks beyond its boundary.
Close-based invalidation is more conservative; wick-based invalidation is more sensitive.
◇ Display Nearest
Limits how many of the closest active zones are displayed.
◇ Volumetric Info
Displays internal volume information inside each zone, including total volume and bullish/bearish percentage split based on candle direction during zone formation.
◇ Retests
Displays retest markers when price revisits a zone and reacts without invalidation.
◇ Breaks
Displays visual markers when a zone is invalidated according to the selected invalidation method.
◇ Show Invalidated Zones
Keeps invalidated zones on the chart in a visually muted state. This preserves historical structure and allows observation of how price behaves around former areas of interest.
🔹Trendlines
Trendline inputs control directional structure derived from confirmed swings.
◇ Enable
Enables or disables all trendline calculations and rendering.
◇ Swing Length
Defines how many bars are required to confirm swing highs and lows used for trendline construction. Higher values emphasize broader directional structure; lower values increase sensitivity.
◇ Strength
Sets the minimum slope strength required for a trendline to be considered valid. Higher values filter out flatter or weaker trendlines.
◇ Extend By
Controls how many bars a trendline extends forward beyond its last confirmed point or break.
◇ Show Last
Limits the number of most recent trendlines displayed to reduce clutter.
◇ Regular Breaks
Marks a trendline break when price closes beyond the trendline.
◇ Engulfing Breaks
Marks a trendline break when a valid engulfing candle occurs at the trendline.
◇ Hide Invalidated Trendlines
Removes broken trendlines from the chart after confirmation.
🔹Engulfing Candlesticks
◇ Bullish Engulfing / Bearish Engulfing
Enables detection of bullish or bearish engulfing candles based on body size and directional criteria.
◇ Engulfing Zones
Creates zones from engulfing candles that can be revisited, tested, or invalidated like other structural elements.
◇ Show Last
Limits how many recent engulfing events or zones remain visible.
🔹Session Volume Profile
◇ Session Volume Profile
Enables session-based volume profiling.
◇ Session
Defines the active session window used to build each profile. Profiles reset automatically at session boundaries.
◇ Volume Mode
Controls how volume is displayed:
Up / Down: Separates volume based on candle direction.
Total: Displays total volume per price row.
Delta: Displays directional imbalance.
◇ Value Area Volume (%)
Defines the percentage of total session volume used to calculate the Value Area.
◇ Row Size
Defines how the session’s price range is divided when constructing the volume profile. Each row represents a discrete price band where volume is aggregated.
◇ Profile Placement
Anchors the volume profile to the left or right of the session range.
◇ Point of Control (POC)
Displays the price level with the highest traded volume for the session.
◇ Value Area High / Low (VAH / VAL)
Displays the upper and lower boundaries of the value area.
◇ Only Show Current Session
Hides historical session profiles and displays only the active session.
🔹Highs & Lows
◇ Highs/Lows
Enables swing high and swing low detection.
◇ Swing Length
Defines how many bars are required to confirm a swing pivot.
◇ Display Nearest
Limits how many recent swing levels are displayed.
◇ Show Breaks
Marks when price breaks beyond a prior swing high or low using confirmed bars.
🔹EMAs
◇ EMA Visibility and Lengths
Controls which EMAs are displayed and their respective lengths.
🔹Checklist Dashboard
◇ Enabled
Shows or hides the checklist dashboard.
◇ Checklist Items (1–5)
Each checklist item consists of:
A manual true/false toggle
A custom label
These reflect the trader’s interpretation of current conditions using the toolkit’s visual components.
◇ EMA Checklist
Automatically displays EMA alignment status. This is the only dynamic checklist item.
◇ Position
Controls where the checklist appears on the chart.
◇ Size
Controls dashboard text and spacing.
ALERTS:
🔹How alerts are triggered
Alerts in the S9 Toolkit notify traders when important structural or behavioral events occur. Each alert is linked to confirmed conditions, so notifications reflect completed market behavior. Alerts trigger only after the condition is confirmed on a closed bar.
Alert logic mirrors the same confirmation rules used throughout the toolkit. If a zone is invalidated, a trendline is broken, or a structural condition changes, the alert fires only once the event is confirmed. This prevents duplicate or misleading alerts caused by intrabar fluctuations or temporary probes.
🔹Available alert types
The S9 Toolkit supports alerts for the following events:
◇ Trendlines:
Bullish Trendline Detection
Bearish Trendline Detection
Bullish Trendline Break
Bearish Trendline Break
◇ Support/Resistance Zones:
Support Zone Detected
Resistance Zone Detected
Support Zone Retest
Resistance Zone Retest
Support Zone Break
Resistance Zone Break
◇ Engulfing Patterns:
Bullish Engulfing Candlestick
Bearish Engulfing Candlestick
◇ Swing Structure:
Swing High Break
Swing Low Break
◇ Moving Averages:
EMA Direction Change (price crosses above or below EMA)
Each alert type can be individually enabled or disabled in the indicator settings.
🔹How to set up alerts
To create alerts, add the S9 Toolkit indicator to your chart and configure which alert types you want to receive in the indicator settings. Then create a TradingView alert on the chart, select the S9 Toolkit indicator, and choose "Any alert() function call" as the condition. This will trigger an alert whenever any of your enabled alert types fires.
PERFORMANCE AND DESIGN CONSIDERATIONS:
🔹Lower-timeframe data handling
Some components of the S9 Toolkit rely on lower-timeframe data to provide more granular volume and structural insight. These requests are handled explicitly and conservatively to avoid excessive data usage or performance degradation. Lower-timeframe logic is applied only where it meaningfully enhances analysis, and safeguards are in place to prevent unnecessary recalculation.
🔹Object limits and performance safeguards
The toolkit actively manages drawing objects such as zones, lines, and profiles to remain within TradingView’s object limits. Older or less relevant objects can be pruned, merged, or visually downgraded to preserve chart performance. This ensures stability even when multiple components are enabled simultaneously.
🔹Non-repainting and confirmation logic
All calculations in the S9 Toolkit are based on confirmed historical data. No component relies on future bars or retroactive adjustment. Structural elements update only when confirmation conditions are met, ensuring that historical analysis remains consistent with real-time behavior. This design principle allows traders to trust that what they see on the chart reflects what was available at the time.
UNIQUENESS:
The S9 Toolkit focuses on contextual analysis by organizing price, volume, and structure into layered components that operate together rather than as isolated signals. It combines volumetric support and resistance zones with internal volume breakdowns, trendline structure, engulfing candlestick detection, session-based volume profiling, and swing structure tracking in a single visual layout. Unlike indicators that focus on one technique at a time, each component in the S9 Toolkit is designed to coexist without overriding the others, allowing traders to observe alignment, disagreement, and transitions in market conditions within the same chart view.
Not only a Supertrend [by Oberlunar]Oberlunar’s Not only Supertrend is designed for traders who need something that stays reactive in fast regimes without collapsing when the tape turns discontinuous—volume gaps, microstructure noise, sudden volatility shocks.
The design goal is to approximate market regime dynamics by combining a probability-like regime score (a bounded Bayesian-style posterior from multiple evidence) with a measure of regime impulse (the Kalman-filtered step/change in evidence).
For ETF-like tapes, it models second-order behaviour: volatility expansion vs contraction, persistence of the expansion, and participation/flow confirmation proxies (via multi-broker OHLCV pressure dominance), to reduce sensitivity to transient spikes.
There is no type of lookahead bias or repaint:
More or less 2 R in a 10-minute chart...
The core signal is built around two regime proxies that are intentionally different, so they don’t fail in the same way when the tape gets stressed.
The first proxy looks at realised volatility computed from log-returns, then maps it into a rolling percentile range. Framing volatility this way keeps it scale-free and easier to compare across instruments and across very different volatility states, and it also helps avoid the typical warping you can get from raw ATR-like measures when the market produces abrupt jumps.
The second proxy focuses on Bollinger Band width, but not in absolute terms: it measures the width relative to its own EMA baseline, and then compresses that ratio through a logistic mapping. This keeps the regime evidence continuous, smoothly saturating, and far less prone to “threshold artefacts” where a tiny change flips the state.
Put together, these two pieces produce an “ expansion base ” and a “ contraction base ” that stay bounded and well-behaved, even when price action prints discontinuities.
Then, directional bias is handled as a soft prior that can lean the model without overpowering it. In practice, a weighted multi-timeframe RSI builds a probability-like prior over long versus short bias, so the engine can express partial conviction and gracefully reconcile conflicts across timeframes instead of forcing a single, binary view.
That separation matters in situations where directional edge and volatility regime edge are related but not the same thing. The design keeps them coupled—so strong direction can reinforce regime confidence—but it does not collapse them into one signal.
For that reason, the system works with four parallel channels— expansion-long, expansion-short, contraction-long, contraction-short —as continuous evidence streams. And when price breaks the Bollinger bands, it’s treated as a conditional boost to the relevant evidence instead of an absolute trigger, which helps reduce false positives during noisy, stop-run style breakouts.
You can use a not only Supertrend line style with signals...
...or just follow its planes and their breakout, such in the following example:
To keep the system resilient to gaps and one-bar anomalies, the raw evidence doesn’t go straight into decisions: it is first passed through an alpha–beta Kalman update. In practical terms, this acts as a lightweight state-space tracker that follows both the level of the evidence and its drift .
The level is your smoothed, probability-like regime proxy. The drift is the key ingredient for options, because it captures how quickly the regime is changing—what you can reasonably describe as the acceleration of the transition.
Crucially, the script doesn’t just compute that internally and forget it: it explicitly takes the step of the filtered state, normalises it, and uses it as a feature. That lets the engine distinguish between a regime that is high but basically flat, and a regime that is actively ramping. And because one-bar spikes can still happen, the step feature is bounded, so it can react to real transitions without overreacting to a single print.
The final confidence layer is produced with a Bayesian-style update that treats both the prior and the incoming evidence as **pseudo-counts in a Beta distribution**, and then uses the **posterior mean** as the final probability-like score. The prior is derived from the weighted multi-timeframe RSI: the script maps the weighted RSI into a smooth probability via a sigmoid (`rsiPriorLong`), and uses its complement for short bias (`rsiPriorShort`).
The likelihood is built per channel, and it is deliberately simple and bounded. For expansion, the likelihood combines the Bollinger expansion signal with the normalised Kalman step , using user-controlled weights. Contraction does the same with the corresponding contraction signals. Small conditional boosts are then applied when the price breaks the bands (or stays inside them), but these boosts remain incremental rather than flipping the state.
The two strength parameters, `kPrior` and `kLike`, control how “ sticky ” this posterior is. A higher `kPrior` makes the posterior lean more strongly on the RSI-based belief and therefore move more smoothly. A higher `kLike` gives more authority to the incoming evidence (BB regime + Kalman step), so the posterior adapts faster when conditions change.
In effect, this is a practical calibration layer: instead of stacking indicators and hoping they agree, the script converts each component into bounded evidence, fuses them into a single posterior mean, and exposes explicit controls for stability versus responsiveness—exactly the trade-off you typically care about when dealing with convex instruments, where you want confidence to be reactive, but not fragile.
Bands filled by expansion Bayesian posterior:
Because regime detection alone isn’t enough to avoid whipsaws, the script adds an adaptive “lane supertrend” layer. This supertrend layer is not built upon a classic ATR. Instead of operating on price distance, it operates on posterior imbalance : the engine computes a net score as the difference between bullish and bearish posteriors (`netE = postEL - postES` for expansion and `netC = postCL - postCS` for contraction), and that net is what drives direction.
Direction changes are then gated by an adaptive deadband .
In turn, the deadband is not fixed: it expands or contracts based on two things that already exist in the model— posterior confidence (e.g., `confE = max(postEL, postES)`) and regime intensity (e.g., `regE = volPct01`, and the complementary contraction regime). Those are mixed to produce `dbE` and `dbC`, which act like a hysteresis zone around neutrality.
When the posterior is indecisive and the regime is noisy, the deadband effectively widens, so small oscillations around zero don’t cause constant flips. When the posterior becomes decisive, the deadband tightens, and the direction logic becomes more responsive.
On top of that, flips are not allowed instantly: the script uses a flip-confirm counter that requires the net score to stay beyond the deadband for multiple bars before a direction switch is accepted. This prevents the engine from toggling on micro-oscillations and single-bar disturbances.
Visually, the “lane” is explicitly mapped into price space .
In detail, the script builds a lane geometry using ATR as a vertical scale, then projects the net posterior into the expansion and contraction band. With optional trailing enabled, the lane value is further “supertrend-like”, so what you see on the chart reads as a probabilistic supertrend line —a line whose position and persistence reflect posterior imbalance—rather than a raw volatility expression.
Finally, to address real-world tape issues (discontinuities, fragmented liquidity, venue noise), the script integrates a multi-broker Volumetric Dominance filter as an additional gate. It aggregates multi-broker OHLCV, derives a pressure-like proxy, and only allows certain triggers when cross-broker dominance is sufficiently aligned—so the system is less likely to react to isolated prints that aren’t supported by broader participation.
Once dominance is both directional and concentrated, the filter becomes a hard regime-consistency gate. If dominance is meaningfully bearish, the script blocks bullish expansion triggers and symmetrically blocks bearish expansion triggers when dominance is bullish. In other words, it’s not trying to “confirm” signals after the fact; it enforces a consistency constraint between volatility-expansion regime and cross-venue participation direction, specifically to reduce the exact kind of false positives that can wreck options entries: apparent volatility expansion occurring into opposing flow.
Thus, this is not only a Supertrend. It’s a bounded, smooth regime engine with an outlier-resistant “acceleration” step, a Bayesian-style posterior with tunable inertia, and a dominance gate that blocks expansion signals when multi-venue pressure points the other way.
It can still fail—no proxy fully captures the tape, and any filter can lag or miss abrupt turns—but I think it’s a framework worth exploring for more informed entries across assets: responsive in fast regimes, yet less fragile around gaps and volatility shocks.
Enjoy!
by Oberlunar 👁★
Intrabar Volume Flow IntelligenceIntrabar Volume Flow Intelligence: A Comprehensive Analysis:
The Intrabar Volume Flow Intelligence indicator represents a sophisticated approach to understanding market dynamics through the lens of volume analysis at a granular, intrabar level. This Pine Script version 5 indicator transcends traditional volume analysis by dissecting price action within individual bars to reveal the true nature of buying and selling pressure that often remains hidden when examining only the external characteristics of completed candlesticks. At its core, this indicator operates on the principle that volume is the fuel that drives price movement, and by understanding where volume is being applied within each bar—whether at higher prices indicating buying pressure or at lower prices indicating selling pressure—traders can gain a significant edge in anticipating future price movements before they become obvious to the broader market.
The foundational innovation of this indicator lies in its use of lower timeframe data to analyze what happens inside each bar on your chart timeframe. While most traders see only the open, high, low, and close of a five-minute candle, for example, this indicator requests data from a one-minute timeframe by default to see all the individual one-minute candles that comprise that five-minute bar. This intrabar analysis allows the indicator to calculate a weighted intensity score based on where the price closed within each sub-bar's range. If the close is near the high, that volume is attributed more heavily to buying pressure; if near the low, to selling pressure. This methodology is far more nuanced than simple tick volume analysis or even traditional volume delta calculations because it accounts for the actual price behavior and distribution of volume throughout the formation of each bar, providing a three-dimensional view of market participation.
The intensity calculation itself demonstrates the coding sophistication embedded in this indicator. For each intrabar segment, the indicator calculates a base intensity using the formula of close minus low divided by the range between high and low. This gives a value between zero and one, where values approaching one indicate closes near the high and values approaching zero indicate closes near the low. However, the indicator doesn't stop there—it applies an open adjustment factor that considers the relationship between the close and open positions within the overall range, adding up to twenty percent additional weighting based on directional movement. This adjustment ensures that strongly directional intrabar movement receives appropriate emphasis in the final volume allocation. The adjusted intensity is then bounded between zero and one to prevent extreme outliers from distorting the analysis, demonstrating careful consideration of edge cases and data integrity.
The volume flow calculation multiplies this intensity by the actual volume transacted in each intrabar segment, creating buy volume and sell volume figures that represent not just quantity but quality of market participation. These figures are accumulated across all intrabar segments within the parent bar, and simultaneously, a volume-weighted average price is calculated for the entire bar using the typical price of each segment multiplied by its volume. This intrabar VWAP becomes a critical reference point for understanding whether the overall bar is trading above or below its fair value as determined by actual transaction levels. The deviation from this intrabar VWAP is then used as a weighting mechanism—when the close is significantly above the intrabar VWAP, buying volume receives additional weight; when below, selling volume is emphasized. This creates a feedback loop where volume that moves price away from equilibrium is recognized as more significant than volume that keeps price near balance.
The imbalance filter represents another layer of analytical sophistication that separates meaningful volume flows from normal market noise. The indicator calculates the absolute difference between buy and sell volume as a percentage of total volume, and this imbalance must exceed a user-defined threshold—defaulted to twenty-five percent but adjustable from five to eighty percent—before the volume flow is considered significant enough to register on the indicator. This filtering mechanism ensures that only bars with clear directional conviction contribute to the cumulative flow measurements, while bars with balanced buying and selling are essentially ignored. This is crucial because markets spend considerable time in equilibrium states where volume is simply facilitating position exchanges without directional intent. By filtering out these neutral periods, the indicator focuses trader attention exclusively on moments when one side of the market is demonstrating clear dominance.
The decay factor implementation showcases advanced state management in Pine Script coding. Rather than allowing imbalanced volume to simply disappear after one bar, the indicator maintains decayed values using variable state that persists across bars. When a new significant imbalance occurs, it replaces the decayed value; when no significant imbalance is present, the previous value is multiplied by the decay factor, which defaults to zero point eight-five. This means that a large volume imbalance continues to influence the indicator for several bars afterward, gradually diminishing in impact unless reinforced by new imbalances. This decay mechanism creates persistence in the flow measurements, acknowledging that large institutional volume accumulation or distribution campaigns don't execute in single bars but rather unfold across multiple bars. The cumulative flow calculation then sums these decayed values over a lookback period, creating a running total that represents sustained directional pressure rather than momentary spikes.
The dual moving average crossover system applied to these volume flows creates actionable trading signals from the underlying data. The indicator calculates both a fast exponential moving average and a slower simple moving average of the buy flow, sell flow, and net flow values. The use of EMA for the fast line provides responsiveness to recent changes while the SMA for the slow line provides a more stable baseline, and the divergence or convergence between these averages signals shifts in volume flow momentum. When the buy flow EMA crosses above its SMA while volume is elevated, this indicates that buying pressure is not only present but accelerating, which is the foundation for the strong buy signal generation. The same logic applies inversely for selling pressure, creating a symmetrical approach to detecting both upside and downside momentum shifts based on volume characteristics rather than price characteristics.
The volume threshold filtering ensures that signals only generate during periods of statistically significant market participation. The indicator calculates a simple moving average of total volume over a user-defined period, defaulted to twenty bars, and then requires that current volume exceed this average by a multiplier, defaulted to one point two times. This ensures that signals occur during periods when the market is actively engaged rather than during quiet periods when a few large orders can create misleading volume patterns. The indicator even distinguishes between high volume—exceeding the threshold—and very high volume—exceeding one point five times the threshold—with the latter triggering background color changes to alert traders to exceptional participation levels. This tiered volume classification allows traders to calibrate their position sizing and conviction levels based on the strength of market participation supporting the signal.
The flow momentum calculation adds a velocity dimension to the volume analysis. By calculating the rate of change of the net flow EMA over a user-defined momentum length—defaulted to five bars—the indicator measures not just the direction of volume flow but the acceleration or deceleration of that flow. A positive and increasing flow momentum indicates that buying pressure is not only dominant but intensifying, which typically precedes significant upward price movements. Conversely, negative and decreasing flow momentum suggests selling pressure is building upon itself, often preceding breakdowns. The indicator even calculates a second derivative—the momentum of momentum, termed flow acceleration—which can identify very early turning points when the rate of change itself begins to shift, providing the most forward-looking signal available from this methodology.
The divergence detection system represents one of the most powerful features for identifying potential trend reversals and continuations. The indicator maintains separate tracking of price extremes and flow extremes over a lookback period defaulted to fourteen bars. A bearish divergence is identified when price makes a new high or equals the recent high, but the net flow EMA is significantly below its recent high—specifically less than eighty percent of that high—and is declining compared to its value at the divergence lookback distance. This pattern indicates that while price is pushing higher, the volume support for that movement is deteriorating, which frequently precedes reversals. Bullish divergences work inversely, identifying situations where price makes new lows without corresponding weakness in volume flow, suggesting that selling pressure is exhausted and a reversal higher is probable. These divergence signals are plotted as distinct diamond shapes on the indicator, making them visually prominent for trader attention.
The accumulation and distribution zone detection provides a longer-term context for understanding institutional positioning. The indicator uses the bars-since function to track consecutive periods where the net flow EMA has remained positive or negative. When buying pressure has persisted for at least five consecutive bars, average intensity exceeds zero point six indicating strong closes within bar ranges, and volume is elevated above the threshold, the indicator identifies an accumulation zone. These zones suggest that smart money is systematically building long positions across multiple bars despite potentially choppy or sideways price action. Distribution zones are identified through the inverse criteria, revealing periods when institutions are systematically exiting or building short positions. These zones are visualized through colored fills on the indicator pane, creating a backdrop that helps traders understand the broader volume flow context beyond individual bar signals.
The signal strength scoring system provides a quantitative measure of conviction for each buy or sell signal. Rather than treating all signals as equal, the indicator assigns point values to different signal components: twenty-five points for the buy flow EMA-SMA crossover, twenty-five points for the net flow EMA-SMA crossover, twenty points for high volume presence, fifteen points for positive flow momentum, and fifteen points for bullish divergence presence. These points are summed to create a buy score that can range from zero to one hundred percent, with higher scores indicating that multiple independent confirmation factors are aligned. The same methodology creates a sell score, and these scores are displayed in the information table, allowing traders to quickly assess whether a signal represents a tentative suggestion or a high-conviction setup. This scoring approach transforms the indicator from a binary signal generator into a nuanced probability assessment tool.
The visual presentation of the indicator demonstrates exceptional attention to user experience and information density. The primary display shows the net flow EMA as a thick colored line that transitions between green when above zero and above its SMA, indicating strong buying, to a lighter green when above zero but below the SMA, indicating weakening buying, to red when below zero and below the SMA, indicating strong selling, to a lighter red when below zero but above the SMA, indicating weakening selling. This color gradient provides immediate visual feedback about both direction and momentum of volume flows. The net flow SMA is overlaid in orange as a reference line, and a zero line is drawn to clearly delineate positive from negative territory. Behind these lines, a histogram representation of the raw net flow—scaled down by thirty percent for visibility—shows bar-by-bar flow with color intensity reflecting whether flow is strengthening or weakening compared to the previous bar. This layered visualization allows traders to simultaneously see the raw data, the smoothed trend, and the trend of the trend, accommodating both short-term and longer-term trading perspectives.
The cumulative delta line adds a macro perspective by maintaining a running sum of all volume deltas divided by one million for scale, plotted in purple as a separate series. This cumulative measure acts similar to an on-balance volume calculation but with the sophisticated volume attribution methodology of this indicator, creating a long-term sentiment gauge that can reveal whether an asset is under sustained accumulation or distribution across days, weeks, or months. Divergences between this cumulative delta and price can identify major trend exhaustion or reversal points that might not be visible in the shorter-term flow measurements.
The signal plotting uses shape-based markers rather than background colors or arrows to maximize clarity while preserving chart space. Strong buy signals—meeting multiple criteria including EMA-SMA crossover, high volume, and positive momentum—appear as full-size green triangle-up shapes at the bottom of the indicator pane. Strong sell signals appear as full-size red triangle-down shapes at the top. Regular buy and sell signals that meet fewer criteria appear as smaller, semi-transparent circles, indicating they warrant attention but lack the full confirmation of strong signals. Divergence-based signals appear as distinct diamond shapes in cyan for bullish divergences and orange for bearish divergences, ensuring these critical reversal indicators are immediately recognizable and don't get confused with momentum-based signals. This multi-tiered signal hierarchy helps traders prioritize their analysis and avoid signal overload.
The information table in the top-right corner of the indicator pane provides real-time quantitative feedback on all major calculation components. It displays the current bar's buy volume and sell volume in millions with appropriate color coding, the imbalance percentage with color indicating whether it exceeds the threshold, the average intensity score showing whether closes are generally near highs or lows, the flow momentum value, and the current buy and sell scores. This table transforms the indicator from a purely graphical tool into a quantitative dashboard, allowing discretionary traders to incorporate specific numerical thresholds into their decision frameworks. For example, a trader might require that buy score exceed seventy percent and intensity exceed zero point six-five before taking a long position, creating objective entry criteria from subjective chart reading.
The background shading that occurs during very high volume periods provides an ambient alert system that doesn't require focused attention on the indicator pane. When volume spikes to one point five times the threshold and net flow EMA is positive, a very light green background appears across the entire indicator pane; when volume spikes with negative net flow, a light red background appears. These backgrounds create a subliminal awareness of exceptional market participation moments, ensuring traders notice when the market is making important decisions even if they're focused on price action or other indicators at that moment.
The alert system built into the indicator allows traders to receive notifications for strong buy signals, strong sell signals, bullish divergences, bearish divergences, and very high volume events. These alerts can be configured in TradingView to send push notifications to mobile devices, emails, or webhook calls to automated trading systems. This functionality transforms the indicator from a passive analysis tool into an active monitoring system that can watch markets continuously and notify the trader only when significant volume flow developments occur. For traders monitoring multiple instruments, this alert capability is invaluable for efficient time allocation, allowing them to analyze other opportunities while being instantly notified when this indicator identifies high-probability setups on their watch list.
The coding implementation demonstrates advanced Pine Script techniques including the use of request.security_lower_tf to access intrabar data, array manipulation to process variable-length intrabar arrays, proper variable scoping with var keyword for persistent state management across bars, and efficient conditional logic that prevents unnecessary calculations. The code structure with clearly delineated sections for inputs, calculations, signal generation, plotting, and alerts makes it maintainable and educational for those studying Pine Script development. The use of input groups with custom headers creates an organized settings panel that doesn't overwhelm users with dozens of ungrouped parameters, while still providing substantial customization capability for advanced users who want to optimize the indicator for specific instruments or timeframes.
For practical trading application, this indicator excels in several specific use cases. Scalpers and day traders can use the intrabar analysis to identify accumulation or distribution happening within the bars of their entry timeframe, providing early entry signals before momentum indicators or price patterns complete. Swing traders can use the cumulative delta and accumulation-distribution zones to understand whether short-term pullbacks in an uptrend are being bought or sold, helping distinguish between healthy retracements and trend reversals. Position traders can use the divergence detection to identify major turning points where price extremes are not supported by volume, providing low-risk entry points for counter-trend positions or warnings to exit with-trend positions before significant reversals.
The indicator is particularly valuable in ranging markets where price-based indicators produce numerous false breakout signals. By requiring that breakouts be accompanied by volume flow imbalances, the indicator filters out failed breakouts driven by low participation. When price breaks a range boundary accompanied by a strong buy or sell signal with high buy or sell score and very high volume, the probability of successful breakout follow-through increases dramatically. Conversely, when price breaks a range but the indicator shows low imbalance, opposing flow direction, or low volume, traders can fade the breakout or at minimum avoid chasing it.
During trending markets, the indicator helps traders identify the healthiest entry points by revealing where pullbacks are being accumulated by smart money. A trending market will show the cumulative delta continuing in the trend direction even as price pulls back, and accumulation zones will form during these pullbacks. When price resumes the trend, the indicator will generate strong buy or sell signals with high scores, providing objective entry points with clear invalidation levels. The flow momentum component helps traders stay with trends longer by distinguishing between healthy momentum pauses—where momentum goes to zero but doesn't reverse—and actual momentum reversals where opposing pressure is building.
The VWAP deviation weighting adds particular value for traders of liquid instruments like major forex pairs, stock indices, and high-volume stocks where VWAP is widely watched by institutional participants. When price deviates significantly from the intrabar VWAP and volume flows in the direction of that deviation with elevated weighting, it indicates that the move away from fair value is being driven by conviction rather than mechanical order flow. This suggests the deviation will likely extend further, creating continuation trading opportunities. Conversely, when price deviates from intrabar VWAP but volume flow shows reduced intensity or opposing direction despite the weighting, it suggests the deviation will revert to VWAP, creating mean reversion opportunities.
The ATR normalization option makes the indicator values comparable across different volatility regimes and different instruments. Without normalization, a one-million share buy-sell imbalance might be significant for a low-volatility stock but trivial for a high-volatility cryptocurrency. By normalizing the delta by ATR, the indicator accounts for the typical price movement capacity of the instrument, making signal thresholds and comparison values meaningful across different trading contexts. This is particularly valuable for traders running the indicator on multiple instruments who want consistent signal quality regardless of the underlying instrument characteristics.
The configurable decay factor allows traders to adjust how persistent they want volume flows to remain influential. For very short-term scalping, a lower decay factor like zero point five will cause volume imbalances to dissipate quickly, keeping the indicator focused only on very recent flows. For longer-term position trading, a higher decay factor like zero point nine-five will allow significant volume events to influence the indicator for many bars, revealing longer-term accumulation and distribution patterns. This flexibility makes the single indicator adaptable to trading styles ranging from one-minute scalping to daily chart position trading simply by adjusting the decay parameter and the lookback bars.
The minimum imbalance percentage setting provides crucial noise filtering that can be optimized per instrument. Highly liquid instruments with tight spreads might show numerous small imbalances that are meaningless, requiring a higher threshold like thirty-five or forty percent to filter noise effectively. Thinly traded instruments might rarely show extreme imbalances, requiring a lower threshold like fifteen or twenty percent to generate adequate signals. By making this threshold user-configurable with a wide range, the indicator accommodates the full spectrum of market microstructure characteristics across different instruments and timeframes.
In conclusion, the Intrabar Volume Flow Intelligence indicator represents a comprehensive volume analysis system that combines intrabar data access, sophisticated volume attribution algorithms, multi-timeframe smoothing, statistical filtering, divergence detection, zone identification, and intelligent signal scoring into a cohesive analytical framework. It provides traders with visibility into market dynamics that are invisible to price-only analysis and even to conventional volume analysis, revealing the true intentions of market participants through their actual transaction behavior within each bar. The indicator's strength lies not in any single feature but in the integration of multiple analytical layers that confirm and validate each other, creating high-probability signal generation that can form the foundation of complete trading systems or provide powerful confirmation for discretionary analysis. For traders willing to invest time in understanding its components and optimizing its parameters for their specific instruments and timeframes, this indicator offers a significant informational advantage in increasingly competitive markets where edge is derived from seeing what others miss and acting on that information before it becomes consensus.
Volatility RadarVolatility Radar: Script Summary
The **Volatility Radar** is a real-time TradingView dashboard designed to decode dealer positioning by fusing structural VIX analysis with options flow. Instead of treating volatility as a static number, it categorizes the market into distinct regimes—supportive "Green Rooms," noisy "Grey Channels," or dangerous "Red Rooms"—to determine whether options flow represents genuine momentum or a dealer hedging trap.
Recent upgrades have transformed the script from a passive monitor into an active threat detection system. It now features a **Velocity Check** that instantly overrides standard confirmation timers during sudden VIX spikes, **Gatekeeper Logic** to identify regime breakout events, and a **Dealer Reality Check** that flags "Trap Risks" when call buying occurs directly into high-velocity resistance.
### Detailed Mechanics: Velocity & Gatekeeper Logic
**The Velocity Check (The "Speed Trap")**
Standard indicators often lag because they wait for candle closes or fixed time intervals (e.g., a 10-minute confirmation rule). The Velocity Check bypasses this by monitoring the *rate of change* in the VIX over a rolling 5-bar window. If the VIX moves more than **0.40 points** in this short timeframe, the script triggers an "Immediate Override." This acknowledges that high-velocity moves—whether spikes or crushes—force dealers to re-hedge instantly, making the standard wait times dangerous. If the velocity threshold is breached, the script flashes a lightning bolt icon (`⚡`) and treats the move as confirmed immediately.
**The Gatekeeper Check (The "Zone Logic")**
Rather than viewing volatility as a simple high/low binary, the Gatekeeper logic defines a "Neutral Zone" (Grey Channel) bounded by specific "Gates" (e.g., 14.78 and 15.26).
* **Inside the Gates:** The market is considered to be in "Chop/Noise," where directional signals are unreliable and often result in whipsaws.
* **Crossing the Gates:** The logic specifically watches for *breakout events*. A move from the Grey Channel into the "Red Room" (>Bear Chop) signals a **Bearish Breakout**, immediately flipping the script's interpretation of "Buying Pressure" from bullish momentum to a "Trap Risk" (dealers selling into resistance). Conversely, a breakdown into the "Green Room" (
TRIDENT TREND Daily Decision Engine v1.4TRIDENT TREND is a rules-based, daily-timeframe decision engine designed for swing and position traders.
It evaluates market regime, trend structure, and risk conditions using end-of-day data only.
All decisions update after the daily candle closes to reduce noise and intraday over-trading.
Core Concepts
1. Market Regime (Directional Permission)
The script first determines whether the market environment supports long exposure.
If conditions are unfavorable, the system explicitly signals no-trade or exit, prioritizing capital preservation over constant participation.
2. Trend Structure & Risk Control
When long exposure is permitted, trend structure is evaluated to manage continuation and exits.
Risk controls adapt to market volatility, providing structured downside protection rather than fixed targets.
3. Indicator Inputs
The decision engine incorporates trend regime analysis and volatility-aware structure tracking derived from widely used technical frameworks.
These components are not used as standalone signals, but are combined, filtered, and gated into a single daily decision state that determines whether long exposure is permitted, maintained, or exited.
Regime context is derived from cloud-based trend analysis, while structure and risk controls adapt to volatility-based trend frameworks.
The resulting output reflects the interaction between regime context and trend structure, rather than raw indicator crossovers or alerts.
4. Daily Decision Framework
This script is not designed to generate frequent entries.
Instead, it provides a daily binary framework:
Long exposure permitted
Hold existing position
Exit / remain in cash
Visual Outputs:
Regime coloring indicates whether long exposure is allowed
Trend and stop overlays display structural context
Status table summarizes the current decision state at a glance
Intended Use:
Designed for daily charts
Best suited for swing and position trading
Not intended for scalping or intraday execution
Decisions should be evaluated once per day after candle close
Important Notes:
This is a decision-support tool, not a signal service
No predictions are made
Users are responsible for execution, position sizing, and risk management
[CT] D&W PPO + RBF + DivergenceThis indicator combines two separate ideas into one tool so you can read trend context from your price chart while timing momentum shifts from a clean oscillator panel. The first component is the Daily and Weekly Percentage Price Oscillator (D&W PPO), which measures the relationship between two EMA spreads that are intentionally built to reflect two “speeds” of market structure. The “weekly” leg is calculated as the percentage distance between a slower and faster EMA pair (L1 and L2), and the “daily” leg is calculated as the percentage distance between a shorter EMA pair (L3 and L4), but both are normalized by the same long EMA (e2) so the values behave like a percent-based oscillator rather than raw points. The script then combines those two legs by creating R = W + D, and it plots the histogram as R − W, which simplifies to D. That is not a mistake, it is the point of the design. By setting the baseline at “R equals W,” the zero line becomes a very intuitive threshold that tells you whether the shorter-term push is adding to the longer-term bias or subtracting from it. When the histogram is above zero, the daily component is supportive of the larger trend pressure, and when it is below zero, the daily component is opposing it. The histogram color is intentionally binary and stable, green when the histogram is at or above zero and red when it is below, so the panel reads like a momentum confirmation tool rather than a noisy oscillator that constantly shifts shades.
The second component is the RBF Price Trail, which is drawn on the upper price chart even though the indicator itself lives in a lower panel. This line is not a moving average in the traditional sense. It is a Radial Basis Function kernel smoother that weights recent prices based on their similarity rather than only their recency. In plain terms, the kernel attempts to build a smoother “baseline” that adapts to the shape of price action, and then the script optionally wraps that baseline inside an ATR band and applies a Supertrend-like trailing clamp. When the ATR band is enabled, the line will not simply track the kernel value, it will trail price and hold its position until price forces it to ratchet. This behavior is what makes it useful as a structure-aligned trend line rather than just another smoothing curve. When the adaptive band boost is enabled, the band width is multiplied by a factor that grows when recent price change is large relative to a lookback normalization window. That means the trailing mechanism can adapt to fast markets by changing the effective band behavior, which helps reduce whipsaws in choppy conditions while still allowing the line to respond when volatility expands. The line color is determined by where price closes relative to the trail, bullish when price is above the trail and bearish when price is below it, and you can optionally color your actual chart candles from either the PPO state or the RBF state depending on what you want your eyes to follow.
The settings are organized so you can control each module without changing how the core PPO trend logic behaves. The PPO settings L1, L2, L3, and L4 define the EMA lengths used to compute the weekly leg W and the daily leg D. Increasing these values makes the oscillator slower and smoother, while decreasing them makes it react faster to recent movement. “Show W line” is simply a visual aid, it plots the W line in the oscillator panel so you can see the longer-term component, but it does not change the histogram logic. “Histogram thickness” is purely visual and controls how thick the column bars are. The PPO colors are the two base colors used for the histogram state, green when the daily component is supportive and red when it is opposing.
The RBF settings control what you see on the upper chart. “Show RBF on Price Chart” turns the trail line on or off. “Source” chooses which price series feeds the kernel, and close is usually the cleanest choice. “Kernel Length” determines how many bars the kernel uses; a larger value makes the baseline smoother and slower, and a smaller value makes it more reactive. “Gamma Adj” controls how quickly the kernel’s weights decay as price becomes dissimilar, so higher gamma tends to make the kernel react more sharply to changes while lower gamma produces a broader smoothing effect. “Use ATR Trail Band” is the switch that turns the kernel baseline into a trailing band line, and it is the reason the line can “hold” and then ratchet instead of moving continuously like a normal moving average. “ATR Length” and “ATR Factor” control the width of that band, and widening the band will generally reduce flips and noise at the cost of later signals. “Use Adaptive Band Boost” turns on the volatility normalization idea, “Boost Normalization Lookback” defines how far back the script looks to determine what counts as a large price change, and “Boost Multiplier” controls how strongly the band behavior is adjusted during those periods. The line width and bull/bear colors are visual controls only.
Price bar coloring is intentionally handled with a single selector so you do not end up with two modules fighting to color candles differently. If you choose “Off,” nothing on the main chart is recolored. If you choose “PPO,” your price candles reflect whether the PPO histogram is above or below zero. If you choose “RBF,” your price candles reflect whether price is above or below the RBF trail. Most traders will pick one and stick with it so the chart communicates a single bias at a glance.
The divergence module is optional and is designed to be a confirmation layer rather than a primary trigger. When enabled, it can mark regular divergence and hidden divergence, and it lets you decide what the pivots should be based on. The divergence source can be the PPO histogram or the R line, depending on whether you want divergence measured on the cleaner momentum component or on the combined series. “Key off pivots” determines whether pivot detection is driven by oscillator pivots or by price pivots. If you choose oscillator pivots, divergence anchors are found where the oscillator makes pivot highs or lows and those are compared against price at the same points. If you choose price pivots, the pivots are taken from price first and the oscillator value at those pivot bars is used for the comparison, which can feel more intuitive when you want divergence to respect obvious swing structure on the chart. Pivot Left and Pivot Right control how strict the swing definition is, larger values create fewer but more meaningful pivots and smaller values create more frequent signals. “Mark on Price Chart” adds tiny markers on the candles at the pivot location so you can see where the divergence event was confirmed, while the oscillator panel uses lines and labels to make the divergence relationship obvious.
For trading, the cleanest way to use this tool is to separate “bias” from “timing.” The RBF Price Trail is your bias filter because it is structure-like and tends to hold and ratchet rather than constantly drifting. When price is closing above the trail and the trail is colored bullish, you treat the market as long-biased and you focus on long setups, pullbacks, and continuation entries. When price is closing below the trail and the trail is bearish, you treat the market as short-biased and you focus on short setups, rallies, and continuation shorts. The PPO histogram is then your timing and pressure confirmation. In an up-bias, the highest quality continuation conditions are when the histogram is above zero and stays above zero through pullbacks, because that means the shorter-term pressure is still supporting the longer-term drift. When the histogram dips below zero during an up-bias, it is a warning that the daily component is now opposing, which often corresponds to a deeper pullback, a rotation, or a period of consolidation, so you either wait for the histogram to recover above zero or you tighten expectations and manage risk more aggressively. In a down-bias, the mirror logic applies: the best continuation conditions are when the histogram is below zero, and pushes above zero tend to represent countertrend rotations or pauses inside the bearish condition.
Divergence is best used as an early warning and a location filter, not as a standalone entry button. Regular bullish divergence, where price makes a lower low but the oscillator makes a higher low, can signal bearish pressure is weakening and is most useful when it appears while price is below the RBF trail but failing to continue downward, because it often precedes a reclaim of the trail or at least a meaningful rotation. Regular bearish divergence, where price makes a higher high but the oscillator makes a lower high, can signal bullish pressure is weakening and is most useful when it appears while price is above the trail but extension is failing, because it often precedes a drop back to the trail or a full flip. Hidden divergence is a continuation concept. Hidden bullish divergence, where price makes a higher low while the oscillator makes a lower low, often shows up during pullbacks in an uptrend and can help you confirm continuation as long as the RBF bias remains bullish. Hidden bearish divergence, where price makes a lower high while the oscillator makes a higher high, often shows up during rallies in a downtrend and can help you confirm continuation as long as the RBF bias remains bearish. In practice, you’ll get the best results when you only act on divergence that aligns with the RBF bias for hidden divergence continuation, and you treat regular divergence as a caution or reversal setup only when it occurs near a meaningful swing and is followed by a bias change or a strong momentum shift on the PPO.
The most practical workflow is to keep the RBF trail visible on the price chart as your regime guide, keep the PPO histogram as your momentum confirmation, and decide in advance whether you want candle coloring to represent the PPO state or the RBF state so your eyes are not reading two different meanings at once. if you want the cleanest “trend-following” behavior, color candles by the RBF trail and use the PPO histogram as the timing trigger. If you want the cleanest “momentum-first” behavior, color candles by PPO and treat the RBF trail as the higher-level filter for whether you should press a move or fade it.
CVD Absorption & Distribution Pro v3 (With Logit Regression)CVD Absorption & Distribution Pro v3 - Complete Guide
Introduction and Overview
The CVD Absorption and Distribution Pro v3 is an advanced trading indicator designed for TradingView that reveals hidden market dynamics invisible on standard price charts. This tool analyzes the battle between buyers and sellers at the micro level, identifying when large institutional players are quietly accumulating or distributing positions while price remains deceptively stable.
Traditional volume indicators fail traders because they treat all volume the same way. They cannot distinguish between aggressive buying and aggressive selling. More importantly, they cannot reveal when significant selling pressure is being absorbed by hidden buyers, or when strong buying pressure is being quietly distributed by large sellers. This information asymmetry has historically given institutional traders a massive advantage over retail participants.
This indicator solves that problem by implementing Cumulative Volume Delta analysis combined with machine learning prediction models, hidden liquidity detection, and comprehensive statistical validation. The result is a professional-grade analytical tool that was previously available only on expensive specialized platforms, now accessible to the entire TradingView community.
What is Cumulative Volume Delta
Cumulative Volume Delta, commonly known as CVD, is a method of categorizing trading volume based on whether it represents buying or selling pressure. The concept is straightforward. When price ticks upward from one moment to the next, the volume associated with that price movement is classified as buying volume. When price ticks downward, that volume is classified as selling volume. The difference between total buying volume and total selling volume over a given period is the delta.
A positive delta indicates that buyers were more aggressive during that period. A negative delta indicates sellers were more aggressive. By tracking this delta cumulatively over time, traders can see the underlying pressure that may not be immediately visible in price action alone.
However, raw CVD analysis has limitations. The real trading edge emerges when we compare what the CVD suggested should happen to price versus what actually happened. When there is significant selling pressure but price fails to decline, something interesting is occurring. Someone is absorbing all that selling. This is where the concepts of absorption and distribution become critically important.
Core Functionality Explained
The indicator operates by accessing one-second bar data from TradingView, the finest granularity available on the platform. This micro-level data is then grouped into clusters, which are user-configurable time blocks. The default setting creates clusters of sixty one-second bars, effectively creating one-minute analysis blocks. However, traders can adjust this to create clusters representing anywhere from a few seconds to several minutes depending on their trading style.
For each one-second bar within a cluster, the script must determine whether to classify the volume as buying or selling. This classification happens based on whether price moved up or down compared to the previous bar. But what happens when price does not change at all? The indicator provides three methods to handle this situation.
The first method, called Last Direction, assigns unchanged volume to whichever direction occurred most recently. If the previous tick was an uptick, the unchanged volume is counted as buying. This approach assumes market momentum tends to persist at very short timeframes.
The second method, called Split Fifty-Fifty, divides unchanged volume equally between buying and selling. This conservative approach acknowledges that when price does not move, we genuinely cannot know whether buyers or sellers were responsible.
The third method simply ignores unchanged ticks entirely, excluding them from the CVD calculation. This purist approach ensures only directionally confirmed volume influences the analysis.
Understanding Absorption
Absorption is one of the two primary signals this indicator detects. Absorption occurs when significant selling pressure fails to push price lower. Imagine a scenario where the delta is strongly negative, meaning sellers are aggressively hitting bids and overwhelming buyers. Under normal circumstances, this should drive price down. But if price stays flat or even rises despite this selling pressure, something unusual is happening. A large buyer is absorbing all that selling without allowing price to fall.
This behavior is characteristic of institutional accumulation. Large players who want to build substantial positions cannot simply place massive buy orders because that would move price against them immediately. Instead, they often buy by absorbing selling pressure. They let other participants sell to them at stable prices, quietly accumulating shares without revealing their intentions.
The indicator identifies absorption by first checking whether the CVD magnitude exceeds a calculated threshold based on historical averages. If the CVD is significantly negative and exceeds this threshold, the script then examines what happened to price. If price moved up or stayed flat, this is classified as full absorption. If price moved down but moved less than expected given the selling pressure, this is classified as partial absorption.
The expected price move is calculated based on the relationship between CVD magnitude and typical price movement observed historically. If current CVD is twice the average, the expected price move would be approximately twice the average price move. When actual price movement falls short of this expectation, the shortfall percentage quantifies the absorption.
Understanding Distribution
Distribution is the mirror image of absorption. It occurs when significant buying pressure fails to push price higher. When delta is strongly positive but price stays flat or even declines, someone is distributing shares into that buying pressure. They are selling to eager buyers without allowing price to rise.
This behavior characterizes institutional distribution. Large holders who want to exit substantial positions face the same challenge as accumulators. They cannot simply dump massive sell orders because that would crash the price before they finish selling. Instead, they often sell by distributing into buying pressure, letting other participants buy from them at stable prices while quietly reducing their position.
The indicator identifies distribution using the same logic as absorption but in reverse. Strongly positive CVD that exceeds the threshold combined with flat or declining price signals distribution. Partial distribution is identified when price rises but rises less than the CVD magnitude would suggest.
Hidden Liquidity Detection
Perhaps the most valuable feature of this indicator is its ability to quantify hidden liquidity. Hidden liquidity refers to large orders that are not fully visible in the order book. Institutional traders commonly use iceberg orders, which display only a small portion of the total order size while the rest remains hidden. As the visible portion gets filled, more of the hidden quantity is revealed.
The indicator estimates hidden liquidity by analyzing partial absorption and partial distribution events. When price moves less than expected given the CVD, the difference represents volume that was absorbed by hidden orders. The cumulative hidden buy liquidity and hidden sell liquidity provide insight into institutional activity that remains completely invisible on standard charts.
A high ratio of hidden buy liquidity to hidden sell liquidity suggests institutional accumulation is occurring. Conversely, a high ratio of hidden sell liquidity to hidden buy liquidity suggests institutional distribution. These signals often precede significant price movements as the institutional positioning eventually influences market direction.
The Prediction Model
This indicator goes beyond simple pattern detection by implementing a genuine machine learning model trained on historical data. The model uses logistic regression to predict whether price will move up or down in subsequent clusters based on current market conditions.
The model considers three primary factors. First, it looks at the normalized CVD, which measures current CVD relative to its historical average and variability. Second, it examines net flow, which is the difference between absorption and distribution. Third, it analyzes hidden flow, the difference between hidden buy liquidity and hidden sell liquidity.
During the training process, the model examines historical clusters where price actually moved significantly. It learns the relationship between these three factors and subsequent price direction. Through iterative gradient descent, the model adjusts its coefficients to best fit the historical data.
The output is a probability between zero and one representing the likelihood that the next cluster will see upward price movement. A probability above sixty percent suggests bullish conditions. A probability below forty percent suggests bearish conditions. Values between forty-five and fifty-five percent indicate neutral or uncertain conditions.
Model Validation Metrics
The indicator provides several metrics to help traders assess whether the prediction model is actually useful for the specific instrument they are analyzing. This validation is critically important because not all instruments exhibit predictable CVD-price relationships.
Logistic Accuracy shows the percentage of correct binary predictions across the training window. An accuracy of fifty percent is essentially random, providing no edge. Accuracy above fifty-five percent suggests the model has genuine predictive value.
Sign Agreement Rate measures how often CVD direction matched price direction historically. When CVD is positive and price goes up, or when CVD is negative and price goes down, this counts as agreement. A sign agreement rate significantly above fifty percent indicates that CVD provides useful directional information for this instrument.
Weighted Sign Agreement applies the same concept but weights each observation by CVD magnitude. High-magnitude CVD events that correctly predict direction count more than low-magnitude events. This metric reveals whether strong CVD signals are more reliable than weak ones.
If these validation metrics are close to fifty percent, traders should be cautious about relying on the model for that particular instrument. The CVD-price relationship may be too noisy or the market microstructure may not suit this type of analysis.
Bucket Analysis
The indicator performs bucket analysis by segmenting historical data into five groups based on CVD magnitude. The first bucket contains clusters where CVD was very strongly negative, more than twice the average in the negative direction. The second bucket contains moderately negative CVD clusters. The third bucket represents neutral conditions where CVD was within one standard average of zero in either direction. The fourth bucket contains moderately positive CVD, and the fifth bucket contains very strongly positive CVD.
For each bucket, the indicator calculates what percentage of clusters saw price move upward. In a market where CVD has predictive value, we would expect to see low upward percentages in negative CVD buckets and high upward percentages in positive CVD buckets. The spread between the highest and lowest buckets indicates how useful CVD is for predicting direction.
If the bucket analysis shows similar upward percentages across all buckets, the CVD-price relationship is essentially random for that instrument. If the pattern shows the expected gradient from low to high, CVD analysis should provide genuine trading edge.
Strength Tiers
Not all absorption and distribution events are equally significant. The indicator classifies events into three strength tiers based on their magnitude relative to baseline averages.
Normal events occur when CVD is between one and two times the average magnitude. These events happen regularly throughout trading sessions and represent standard market dynamics.
Strong events occur when CVD is between two and three times the average magnitude. These elevated significance events warrant additional attention and may indicate more substantial institutional activity.
Exceptional events occur when CVD exceeds three times the average magnitude. These rare occurrences often precede significant price movements and represent major institutional footprints in the market.
The indicator tracks how many events of each tier occurred during the display period, helping traders identify sessions with unusual institutional activity.
Divergence Detection
The indicator implements sophisticated divergence detection that compares trends in CVD with trends in price over a rolling window of recent clusters. Divergence occurs when these two metrics move in opposite directions or when one moves significantly while the other remains flat.
Bullish divergence manifests in two forms. Hidden accumulation occurs when the CVD trend turns increasingly positive while price remains flat, suggesting buying pressure is building without yet moving price. CVD accumulation occurs when average CVD is positive but average price movement is minimal.
Bearish divergence also manifests in two forms. Hidden distribution occurs when CVD trend turns increasingly negative while price remains stable, suggesting selling pressure is building. CVD distribution occurs when average CVD is negative but price refuses to decline.
Divergence signals are quantified by their strength relative to baseline averages, allowing traders to prioritize the most significant divergences.
Display and Interface
The indicator presents all its analysis through a comprehensive table overlay positioned on the chart. The table is organized into logical sections that can be individually enabled or disabled based on trader preferences.
The Direction Prediction section shows the current signal, probability, and period cluster breakdown between bullish, bearish, and neutral predictions. The Model Performance section displays accuracy metrics and training sample counts.
The CVD Bucket Analysis section shows the five-bucket breakdown with upward percentages for each, along with an interpretation of whether a predictable pattern exists.
The Baselines section displays the calculated averages for CVD and price movement, along with the current threshold being used for event detection.
The Results section shows total absorption and distribution for the display period, the ratio between them, net values, and an overall flow signal interpretation.
The Full versus Partial section breaks down events by type, showing how much activity was full absorption or distribution versus partial events indicating hidden liquidity.
The Hidden Liquidity section displays estimated hidden buy and sell volumes, their ratio, average shortfall percentages, and an iceberg signal interpretation.
The Strength Tiers section shows event counts by tier for both absorption and distribution, highlighting any exceptional events.
The Divergence section indicates whether bullish or bearish divergence is currently present and its strength.
The Statistics section provides cluster counts and event counts for reference.
Configuration Recommendations
For scalping and very short-term trading with holding periods of one to five minutes, traders should use smaller cluster sizes around thirty to sixty seconds, shorter average lengths around two to three hundred clusters, and enable intensity weighting to emphasize high-magnitude events.
For day trading with holding periods of fifteen to sixty minutes, the default settings work well. Cluster size of sixty for one-minute analysis, average length of seven hundred fifty for approximately two trading days of history, and single-day display period provide balanced analysis.
For swing trading with multi-day holding periods, larger cluster sizes of three hundred to six hundred representing five to ten minute blocks reduce noise. Longer average lengths of seven fifty to fifteen hundred clusters capture broader patterns. Multi-day display periods of three to five days reveal accumulation and distribution over meaningful timeframes.
Interpreting Results
When the absorption to distribution ratio exceeds one point five, this suggests bullish underpinnings. Selling pressure is being absorbed, potentially indicating institutional accumulation. Traders should look for confirmation from hidden buy liquidity metrics, model probability favoring upside, and any bullish divergence signals.
When the ratio falls below zero point six seven, this suggests bearish underpinnings. Buying pressure is meeting distribution, potentially indicating institutional selling. Validate with hidden sell liquidity metrics, model probability favoring downside, and any bearish divergence signals.
When the ratio falls between zero point eight and one point two, the market is in relative equilibrium. Traders should wait for the ratio to break out of this neutral range, watch for exceptional tier events that might signal a shift, or wait for divergence to develop.
Regarding model predictions, when accuracy exceeds fifty-eight percent and sign agreement exceeds fifty-five percent, there is a strong predictive relationship. CVD analysis provides genuine edge for this instrument. When accuracy falls between fifty-four and fifty-eight percent or sign agreement falls between fifty-two and fifty-five percent, there is moderate edge. Use signals for confirmation but not as standalone entry triggers. When both metrics fall below their respective thresholds, the relationship is weak or random. Traders should reconsider whether CVD analysis adds value for this particular instrument.
Best Practices
Allow adequate training time before relying on model predictions. The prediction model requires substantial data to train effectively. Ensure at least five hundred clusters have accumulated before trusting model outputs. The indicator displays training sample count for verification.
Always validate model quality before trading based on predictions. A fifty-two percent accuracy is statistically indistinguishable from random chance. Ensure your edge is real by checking all validation metrics.
Context matters tremendously in interpretation. Absorption during an established uptrend suggests continuation strength. Absorption during a downtrend suggests potential reversal. Always interpret signals within the broader market context rather than in isolation.
Combine this indicator with price action analysis. The CVD analysis reveals hidden dynamics but should not be used alone. Combine with support and resistance levels, trend structure analysis, volume profile, and traditional technical patterns for comprehensive market assessment.
Monitor for regime changes over time. Market microstructure can change as participation patterns evolve. Regularly review bucket analysis to ensure the CVD-price relationship remains stable. Significant deterioration in predictive patterns may indicate changing market conditions requiring parameter recalibration.
Value to the Trading Community
This indicator democratizes institutional-grade analysis. Historically, this level of order flow analysis required expensive specialized platforms that cost hundreds or thousands of dollars monthly. By implementing these concepts within TradingView Pine Script, this tool makes professional analysis accessible to all traders regardless of budget.
The indicator serves as an educational framework. Beyond practical trading applications, the visible statistics help traders understand the CVD-price relationship. Bucket analysis teaches probabilistic thinking. Model coefficients reveal which factors matter most. Validation metrics prevent overconfidence in unreliable signals.
The customization depth accommodates diverse trading styles. With over thirty configurable parameters, the indicator adapts to virtually any approach from rapid scalping to patient swing trading.
The transparent methodology builds trust. Unlike black-box commercial solutions where algorithms remain hidden, every calculation is visible in the source code. Traders can verify the logic, understand the assumptions, and modify the approach to suit their specific needs.
Conclusion
The CVD Absorption and Distribution Pro v3 represents a significant advancement in accessible order flow analysis for retail traders. By combining time-tested CVD concepts with modern statistical validation and machine learning techniques, it provides a comprehensive toolkit for understanding the hidden dynamics driving price action.
Its value lies not merely in generating trading signals but in providing the framework to understand why those signals occur and whether they are statistically meaningful for the specific instrument being traded. This combination of actionable intelligence and educational transparency makes it an invaluable addition to any serious trader analytical arsenal.
The indicator rewards those who invest time in understanding its methodology, optimizing its parameters for their specific trading style, and validating its signals against their own market experience. Used thoughtfully, it reveals the institutional footprints that remain invisible on conventional charts. The absorption, distribution, and hidden liquidity patterns it detects often presage significant market movements, giving attentive traders the opportunity to position themselves alongside smart money rather than against it.
Digital MACD Divergences MTF [LUPEN]Digital MACD Divergences MTF V1.0
Overview:
Digital MACD Divergences MTF is an advanced momentum oscillator based on digital signal processing techniques.
Instead of relying on traditional moving-average smoothing, it applies Finite Impulse Response (FIR) digital filters to extract momentum more cleanly, reducing lag and short-term market noise.
The indicator is designed to provide a clear visualization of momentum structure, divergence behavior, and multi-timeframe context, rather than discrete trading signals.
Conceptual Architecture
At its core, the indicator reinterprets the classic MACD framework through digital convolution logic:
FIR filters are used to compute momentum in a more responsive and stable manner than standard EMA-based MACD.
The resulting histogram represents momentum intensity and direction as a continuous state rather than binary conditions.
A digitally smoothed signal line provides structural reference without introducing excessive delay.
This approach emphasizes momentum quality and structure, not signal frequency.
Divergence Detection Logic:
The script includes automatic divergence detection based on pivot analysis:
Regular bullish and bearish divergences are identified using confirmed pivot points.
Divergences are visualized with explicit line structures and optional filled areas, highlighting the zone of disagreement between price behavior and momentum.
The visualization is designed to remain readable without obscuring price action.
Divergences are presented as contextual information, not as mandatory actions.
Multi-Timeframe (MTF) Context
Digital MACD Divergences MTF supports native multi-timeframe analysis through a dual-pane workflow:
A lower-timeframe instance visualizes local momentum dynamics.
A higher-timeframe instance visualizes the broader momentum regime within which lower-timeframe fluctuations occur.
The higher-timeframe view is not intended as confirmation or filtering logic, but as a contextual background layer that helps interpret short-term momentum behavior inside a larger structural environment.
This separation avoids decision compression and keeps each timeframe’s role conceptually distinct.
Visual Design
Gradient-based histogram fills represent momentum intensity in a continuous manner.
Positive and negative momentum regions are clearly differentiated while remaining adaptable to both dark and light chart themes.
All visual elements are designed to emphasize state and regime, not discrete events.
Reliability
No repainting: all divergences and momentum states are confirmed on candle close and remain fixed.
Designed for consistency across instruments and timeframes.
Customization Options
Timeframe selection for MTF mode (leave empty to use the chart’s timeframe).
Adjustable signal smoothing parameters.
Divergence visibility controls, pivot sensitivity, and optional divergence fill.
Fully customizable color palette.
Usage Notes
This indicator is a visual market analysis tool intended to support momentum interpretation and structural context.
It does not provide investment advice, trading signals, or automated decision logic, and should be used as part of a broader analytical framework.
Final quotes:
"Trading is not about prediction, but about understanding momentum structure.
Digital MACD removes noise to make that structure visible."
Pinnacle ICT BasicOverview
Pinnacle ICT Basic (PICT Basic) is a contextual market regime overlay inspired by Inner Circle Trader (ICT) principles. It analyzes price behavior relative to recent structure and momentum to classify current conditions as orderly (directional progression), transitional (consolidation/stall), or unstable (chop/stand-down).
Important: This script provides no trade entries, exits, targets, alerts for execution, or performance predictions. It serves purely as a visual aid for discretionary decision-making, highlighting market context to help traders avoid low-quality conditions.
Originality and Value of This Integration
This script stands out by combining classic elements (EMA baseline for trend bias, pivot-based liquidity sweeps, displacement via candle body analysis, volume spikes, ATR-based separation, ADX/range for chop detection, and HTF EMA alignment) in a unique hierarchical filtering system. The proprietary tuning creates cleaner, more reliable contextual reads than simple individual indicators or basic mashups.
Key differentiators include:
Adaptive stall detection using a rolling baseline cross-count scaled as a percentage of lookback period (combined with ADX and range/ATR ratios) to identify hidden consolidation early, reducing false directional reads in ranging markets.
Deterministic market-mode adjustments (offsets for stocks vs. futures) for consistent behavior across asset classes without over-optimization.
Binary quality gating on setups (configurable OR/AND logic for volume + displacement) before confirmation, with limits like one-setup-per-leg, one-confirm-per-swing, cooldown bars, and micro-trend alignment.
Strict CONT (continuation first-touch) arming that requires pre-separation from baseline (ATR-scaled) and optional close-side requirements, preventing premature or noisy signals.
These interactions form a multi-layer filter: structure → quality → confirmation → regime shading. This reduces noise significantly compared to freely available scripts that plot sweeps or displacements independently, offering refined contextual awareness that justifies protected source code and selective access.
How It Works (Conceptual)
The script evaluates price movement progression, not just position.
At a high level:
A baseline EMA defines primary bias (bullish/bearish), with optional micro EMA for short-term alignment.
Market state detection combines traditional chop filters with proprietary stall logic to flag "stand down" periods of indecision.
Liquidity sweeps identify breaches of recent swing highs/lows (configurable key-swing strength or lookback).
Displacement requires strong candle bodies exceeding averages (with optional ATR filter).
Volume confirmation demands spikes above SMA.
HTF filter checks true bias alignment (not just LTF close vs. HTF EMA).
Setups trigger on recent sweeps or armed first-touch continuations at baseline.
Confirms require confluence of displacement, volume, micro alignment, and HTF OK—gated to avoid over-signaling.
The HUD displays regime (bullish/bearish/stand-down), bias, HTF status, alignment (OK or mismatch), and active filters (vol/disp). Background shading and optional labels/shapes provide visual cues for orderly vs. compressed/unstable action.
Visual Output
The script overlays:
Baseline (and optional micro) EMA.
Background regime shading.
Setup/confirm labels or shapes (configurable sizes/modes: Minimal, Standard, Debug).
On-chart HUD with real-time state summary.
No predictive elements, offsets into future, or non-standard chart assumptions are used.
What This Script Is Not
Does not generate buy/sell signals or alerts for direct execution.
Does not rely on fixed oscillator thresholds or simple MA crossovers alone.
Does not forecast direction or replace risk management.
Does not constitute a standalone system—all decisions remain discretionary.
Intended Use
Use as a contextual filter alongside your existing approach:
Avoid participation in "stand down" or mismatched conditions.
Monitor transitions from compression to expansion.
Assess structural continuity or disruption.
Apply across timeframes and assets (with auto-mode detection for stocks/futures).
Disclaimer
This script is for educational and informational purposes only. It does not constitute financial, investment, or trading advice. Trading involves risk; apply proper risk management. Past observations do not guarantee future behavior.
To request access, send a private message on TradingView with your username and brief intended use.
HoneG_AvgBodyBoxThis is a binary options trading support tool that displays the average size and movement direction of candlesticks. The height (vertical width) of the rectangle shown at the current price indicates the average value of the past 20 candlestick bodies. Use it to avoid entries during periods of low volatility.
ローソク足平均サイズや移動方向を描画するバイナリーオプションのトレード補助ツールです。現在値に表示される四角形の高さ(縦幅)がローソク足実体の過去20本平均値を示します。ボラが無い時のエントリーを避けるなどご活用ください。
MTF Probability Predictor v1 (Directional + Market State)This indicator is designed to generate high-confidence market bias by combining price action, chart structure, momentum, divergence analysis, ATR, and VWAP-based volatility assessment.
Instead of providing binary signals, the indicator presents a probability-based decision framework, displaying BUY / SELL confidence percentages in real time. This allows traders to assess signal quality, market strength, and trade suitability before taking a position.
MTF Probability Predictor PRO v2This indicator is designed to generate high-confidence market bias by combining price action, chart structure, momentum, divergence analysis, ATR, and VWAP-based volatility assessment.
Instead of providing binary signals, the indicator presents a probability-based decision framework, displaying BUY / SELL / NEUTRAL confidence percentages in real time. This allows traders to assess signal quality, market strength, and trade suitability before taking a position.
BUY Bias (Trade-Favorable Condition)
A BUY setup is considered favorable when: BUY confidence exceeds 65% AND SELL confidence remains below 10% AND NEUTRAL confidence is 25% or lower
==>> This combination indicates strong directional momentum with minimal opposing pressure, suggesting a higher-probability bullish environment.
SELL Bias (Trade-Favorable Condition)
A SELL setup is considered favorable when: SELL confidence exceeds 65% AND BUY confidence remains below 10% AND NEUTRAL confidence is 25% or lower
==>> This reflects dominant bearish control, reduced market indecision, and a clearer downside directional bias.
NEUTRAL Bias (No-Trade Zone)
A NEUTRAL condition is identified when: NEUTRAL confidence rises above 50% or higher
==>> This indicates range-bound or transitional market behavior, where directional conviction is weak. During such conditions, it is recommended to avoid trading and allow the market to establish a clearer trend.
Key Benefits -
Probability-driven signal clarity
Reduced false signals in sideways markets
Suitable for scalping, intraday, and swing trading
Designed to support disciplined, rules-based decision making
SHDW AlphaDesk|ProShort summary
Institutional multi-timeframe trend map that shows a clean Bull / Bear regime for 5m → 1M at a glance, using price structure, trend filters and momentum.
---
Concept
SHDW AlphaDesk|Pro is a desk-style trend regime dashboard.
The goal is simple: when you open a chart, you instantly know if the asset is trading in a bullish or bearish environment on each major timeframe.
The script does not try to be a signal generator or an automated strategy.
Instead, it focuses on three pillars:
* Price behaviour: swing structure and directional context.
* Trend filters: dynamic moving averages and a trend-strength filter.
* Momentum: classic RSI and optional RSI price levels on the chart.
All of this is condensed into a compact table that shows, for every timeframe from 5m to 1M:
* `Trend` → Bull or Bear regime
* `RSI` → 14-period RSI value
The output is always binary (Bull or Bear) to keep the message clear and help avoid hesitation or “neutral” noise.
---
Profiles
The engine is pre-calibrated with three institutional profiles:
* Scalping/Intraday (Crypto): more reactive, tuned for intraday flow, faster regime changes.
* Swing/Conservative (Crypto): smoother behaviour, designed for position and swing trading.
* Institutional (Stocks): slower and more conservative, anchored to higher-timeframe trend for equity and index flows.
All key parameters behind the scenes are handled automatically by the selected profile, so you can switch behaviour without tweaking numbers manually.
---
What the script shows
On every bar:
* A multi-timeframe dashboard on the right side with TF / Trend / RSI.
* Optional EMA/SMA overlays on the price chart for visual alignment with the regime.
* Optional RSI Levels mapped into price, giving approximate areas where RSI would reach common overbought/oversold zones.
There is no trade entry, exit or risk sizing logic.
The script is a trend-reading and context tool , not a full trading system.
---
How to use (institutional view)
A practical way to use SHDW AlphaDesk|Pro is:
1. Start from the top-down.
* Check 1M → 1W → 1D to establish the dominant regime (Bull or Bear).
* Only then look at intraday timeframes (12h, 4h, 1h, 15m, 5m).
2. Trade in the direction of the regime.
* Prefer long setups when the higher-timeframe column is Bull.
* Prefer short setups when the higher-timeframe column is Bear.
3. Use pivots and RSI.
* The snapshot explains how a pivot on a lower timeframe can confirm or anticipate structure on the next higher timeframe (for example, a bullish pivot on 5m confirming a higher low on 15m, etc.).
* Oversold (RSI ≤ 30) on a lower TF often warns that a higher low may be forming one step above.
* Overbought (RSI ≥ 70) on a lower TF often warns that a lower high may be forming one step above.
4. Watch for trend breaks.
* When a significant low is lost (or a strong bearish pivot appears) on a timeframe, zoom out to the next one and re-evaluate the regime there.
* On very high timeframes, a clean break of a major structural low is treated as a bear-market context.
5. Combine with your own execution.
* Use the dashboard to align direction and timing, then apply your own entry models, risk management and trade management rules.
---
Important notes
* This tool is intended for educational and informational purposes only and should be combined with independent analysis and risk management.
Z-Score Momentum Dashboard Z-Score Momentum Dashboard: A Comprehensive Technical Analysis Framework
Understanding the Z-Score Momentum Dashboard
The Z-Score Momentum Dashboard represents a sophisticated evolution in technical analysis indicators, designed to synthesize multiple analytical frameworks into a singular, coherent probabilistic assessment of market conditions. At its core, this indicator is a multi-dimensional analytical engine that processes price action, volume dynamics, cyclical patterns, and statistical anomalies to generate standardized z-scores that measure how far current market behavior deviates from established norms. Unlike traditional single-metric indicators that examine price through one lens, this dashboard constructs a comprehensive probabilistic model by weighting and combining six distinct analytical domains: Ehlers bandpass filtering for cycle detection, momentum calculations across multiple timeframes, mean reversion tendencies, trend strength measurements, volatility regime analysis, and volume confirmation signals.
The indicator operates by first calculating individual scores across each of these six domains, normalizing them into comparable z-score formats, then applying user-configurable weights to create a composite probability score that estimates the likelihood of upward price movement. This probability undergoes statistical transformation through hyperbolic tangent functions to ensure bounded outputs between zero and one, which are then compared against historical baselines to generate the final z-score reading. The z-score itself becomes the primary signal, indicating not just direction but the statistical significance of the current market state relative to recent history. When the z-score exceeds predefined thresholds, it suggests the market has entered a regime that statistically differs from the baseline, implying either strong momentum continuation or potential exhaustion depending on accompanying contextual indicators.
The dashboard visualization provides traders with immediate access to critical information through a comprehensive table display that shows historical z-scores over the past five days, current probability assessments, trend classification, momentum measurements, acceleration metrics, and distance from moving averages. This multi-temporal perspective allows traders to observe not just the current state but the trajectory of change, identifying whether momentum is building, plateauing, or reversing. The indicator also generates regime classifications such as "PARABOLIC EXT," "OVERSOLD," "STRONG MOM," and "NEUTRAL," which combine z-score readings with price extension metrics to characterize the current market environment. These classifications directly inform suggested actions, ranging from "Ride trend w/ stops" during strong momentum periods to "Watch for reversal" during oversold conditions with increasing momentum, providing traders with contextually appropriate strategic guidance.
The Special Nature of This Analytical Approach
What distinguishes the Z-Score Momentum Dashboard from conventional technical indicators is its fundamental philosophical approach to market analysis, which embraces probabilistic thinking rather than deterministic prediction. Most traditional indicators generate binary signals or directional recommendations based on threshold crossovers or pattern recognition, implicitly suggesting certainty about future price movement. This dashboard, in contrast, explicitly models uncertainty by generating probability distributions and measuring statistical significance, acknowledging that markets are stochastic systems where edge comes from systematic bias rather than predictive certainty. By converting diverse technical signals into standardized z-scores, the indicator creates a common language for comparing fundamentally different types of market information, whether that information comes from price momentum, volume patterns, or cyclical oscillations.
The pseudo-machine learning architecture embedded within the indicator represents another distinctive feature that elevates it beyond standard technical analysis tools. While Pine Script limitations prevent the implementation of actual neural networks or gradient-boosted decision trees, the indicator approximates ensemble learning principles by treating each analytical domain as a separate "model" whose outputs are weighted and combined. Users can adjust these weights based on their market beliefs or through backtesting optimization, effectively training the indicator to emphasize whichever analytical dimensions prove most predictive in their specific trading context. This flexibility means the same indicator can be configured for mean-reversion trading in range-bound markets by increasing mean reversion weights, or for momentum trading in trending markets by emphasizing trend and momentum components, making it adaptable across varying market regimes without requiring entirely different analytical tools.
The integration of John Ehlers' digital signal processing concepts, particularly the bandpass filtering and super smoother functions, introduces engineering-grade analytical precision to financial market analysis. Ehlers' work translates aerospace and telecommunications signal processing mathematics into trading applications, allowing the indicator to isolate specific cyclical frequencies within price action while filtering out noise. This is fundamentally different from simple moving averages or oscillators that indiscriminately smooth price data; bandpass filters can extract the 10-day cycle component separately from the 20-day cycle component, identifying when multiple cycles align or diverge. The inclusion of these sophisticated filters alongside more conventional tools creates a hybrid analytical framework that combines the mathematical rigor of quantitative finance with the practical market wisdom embedded in traditional technical analysis.
The dashboard's temporal analysis capabilities provide another layer of analytical depth rarely found in standalone indicators. By displaying five days of historical z-scores alongside current readings, the interface enables pattern recognition at the signal level rather than just the price level. Traders can observe whether z-scores are trending, oscillating, or demonstrating divergent behavior relative to price action. For instance, if price continues making new highs while z-scores decline, this suggests deteriorating statistical support for the advance despite superficial price strength, providing early warning of potential reversals. Similarly, rising z-scores during price consolidation indicate building statistical pressure that may soon manifest as directional movement. This meta-analytical capability transforms the indicator from a simple signal generator into a comprehensive framework for understanding the statistical character of market behavior.
Algorithmic Superiority and Technical Advantages
The algorithmic architecture of the Z-Score Momentum Dashboard demonstrates several technical advantages that contribute to its analytical power and practical utility. The normalization of disparate technical indicators into standardized z-scores solves a fundamental problem in multi-factor analysis: how to combine indicators with different scales and units into a coherent composite signal. A momentum reading measured in price points cannot be directly compared to an RSI reading measured on a 0-100 scale, nor to a volume ratio measured as a multiplier. By converting each measure into a z-score representing standard deviations from its respective mean, the indicator creates dimensional consistency, ensuring that each component contributes proportionally to the final composite score based on its statistical deviation rather than its nominal value.
The use of adaptive baselines through rolling statistical windows provides robustness against regime changes and non-stationary market behavior. Rather than comparing current readings against fixed historical values or statically defined overbought/oversold levels, the indicator continuously recalculates mean and standard deviation estimates over the user-defined baseline period. This approach automatically adjusts to changing volatility regimes, market cycles, and structural shifts in price behavior. During high-volatility periods, the standard deviation increases, requiring larger absolute deviations to generate extreme z-scores, appropriately raising the bar for signal generation. Conversely, during low-volatility periods, smaller absolute movements can generate significant z-scores, maintaining signal sensitivity across diverse market conditions.
The composite probability calculation employs mathematically sound transformation functions rather than arbitrary scaling. After weighting and combining individual z-scores into a composite score, the indicator applies hyperbolic tangent transformation to convert the unbounded composite score into a bounded probability estimate between zero and one. The tanh function was chosen specifically because its sigmoid-shaped curve smoothly compresses extreme values while maintaining sensitivity around the center, preventing outlier distortion while preserving information about moderate deviations. This is superior to linear scaling or simple threshold clamping, which can create artificial discontinuities or lose information about the magnitude of extreme readings. The subsequent z-score calculation on this probability distribution creates a second-order statistical metric that measures not just "is probability high?" but "is probability statistically significantly higher than typical?" This layered statistical approach provides more nuanced information than single-stage calculations.
The incorporation of acceleration metrics alongside momentum measurements adds a crucial dimension to the analytical framework. While momentum measures the first derivative of the z-score (rate of change), acceleration measures the second derivative (rate of change of the rate of change), identifying inflection points where momentum itself shifts. Markets often reverse not when momentum reaches zero but when acceleration reverses, as this indicates the rate of momentum decay is accelerating even while momentum remains positive. By explicitly calculating and displaying acceleration, the indicator provides early warning of potential trend exhaustion before momentum fully dissipates. This mathematical sophistication mirrors concepts from physics and calculus, applying them to financial market dynamics in ways that enhance predictive capability.
The multi-timeframe momentum analysis embedded within the indicator examines price changes over five, ten, and twenty periods, capturing different temporal scales of market behavior. Short-term momentum captures immediate price action and trading range dynamics, while longer-term momentum reflects sustained directional bias and major trend development. By combining these timeframes into a weighted average before calculating z-scores, the indicator synthesizes information across temporal scales, avoiding the myopia of single-timeframe analysis. This approach recognizes that market structure exists simultaneously at multiple frequencies, and robust signals often emerge when momentum aligns across timeframes, while divergences between timeframes can signal pending reversals or consolidations.
Predictive Power Through Cyclical Analysis
The integration of cyclical analysis into the Z-Score Momentum Dashboard represents one of its most powerful predictive capabilities, leveraging the empirical observation that financial markets exhibit periodic behavior driven by fundamental economic cycles, seasonal patterns, trader psychology, and technical feedback loops. The Ehlers bandpass filters implemented in the indicator specifically isolate cyclical components at 10, 15, and 20-day periods, frequencies that correspond to common trading cycles including bi-weekly, monthly, and quarterly rhythms in market activity. By extracting these specific frequency bands and measuring their slope, the indicator identifies when cycles are aligned in the same directional phase versus when they are diverging, with aligned cycles providing stronger predictive signals than single-frequency readings.
Cyclical analysis offers predictive power because cycles, by definition, have characteristic wavelengths that enable forecasting of future turning points based on the current phase. If the indicator detects that the 10-day cycle is in a trough phase while the 20-day cycle is also declining, it can anticipate that the shorter cycle should begin turning upward before the longer cycle, potentially creating a bullish divergence or early reversal signal. Conversely, when a shorter cycle reaches a peak while longer cycles continue rising, this suggests the current rally may consolidate before the longer-cycle momentum can drive new highs. This phase relationship analysis transforms cyclical information from descriptive to predictive, allowing traders to position ahead of probable turning points rather than merely reacting to them.
The bandpass filtering approach is particularly valuable because it separates signal from noise more effectively than conventional smoothing techniques. Traditional moving averages suppress both high-frequency noise and the actual signal being measured, creating lag and reducing responsiveness. Bandpass filters, in contrast, selectively attenuate frequencies outside the target band while preserving amplitude and phase information within the band, maintaining the timing and magnitude of the actual cyclical component. This means when the bandpass output changes, it reflects genuine change in the underlying cycle rather than random noise or smoothing artifacts. The z-score normalization of bandpass slopes then measures whether the current cyclical momentum is statistically unusual relative to recent history, identifying periods when cyclical forces are particularly strong or weak.
The integration of Fisher Transform calculations further enhances cyclical predictive power by converting price oscillations into a nearly Gaussian probability distribution. Financial price data typically exhibits non-normal distributions with fat tails and skewness, which violate the assumptions underlying many statistical techniques. The Fisher Transform specifically addresses this by mapping the price data onto a normal distribution where standard statistical inference tools work more reliably. When applied to cyclical data, this transformation makes it possible to accurately assess the statistical significance of cycle phases and turning points, distinguishing between normal cyclical oscillation and statistically significant deviations that may precede major price movements.
The Schaff Trend Cycle component adds another dimension to cyclical analysis by combining MACD calculations with stochastic smoothing to identify trending phases within broader cyclical structures. Markets often exhibit fractal behavior where trends exist within cycles which exist within larger trends. The Schaff indicator specifically addresses this nested structure by detecting when shorter-term trends are emerging within the dominant cycle, providing early identification of trend changes before they become apparent in price action. When the Schaff reading aligns with bandpass filter signals and overall z-score direction, it confirms that multiple analytical perspectives agree on current cyclical phase, increasing confidence in directional predictions.
The Detrended Price Oscillator (DPO) calculation removes trend components to isolate pure cyclical behavior, addressing a common challenge in cyclical analysis where strong trends can mask underlying cycles. By comparing current price to a centered moving average, the DPO reveals cyclical patterns that persist regardless of trend direction, allowing the indicator to maintain cyclical awareness in both trending and ranging markets. This is particularly valuable because cycles often continue operating during trends but become invisible to trend-following indicators, yet these cycles can predict pullbacks, consolidations, and acceleration phases within the larger trend. The incorporation of DPO signals into the composite z-score calculation ensures that cyclical information contributes to the final reading even when dominated by strong directional momentum.
Practical Trading Application and Strategic Implementation
Implementing the Z-Score Momentum Dashboard in practical trading requires understanding both its signal generation logic and the appropriate strategic frameworks for acting on its outputs. The primary trading signal comes from the overall z-score reading relative to the trigger and extreme thresholds, which by default are set at 1.25 and 2.0 respectively. When the z-score exceeds the trigger threshold, it indicates that current market behavior is more than 1.25 standard deviations above the recent baseline, suggesting statistically significant bullish momentum. Traders can interpret this as a regime shift from neutral to bullish conditions, warranting either initiation of long positions or continuation of existing long exposure with trailing stops. The strength of this signal increases when the z-score crosses the extreme threshold, indicating the market has entered a parabolic phase that, while statistically unusual, may represent either climactic buying or unsustainable conditions prone to mean reversion.
The regime classifications provide contextual interpretation that modifies how traders should approach z-score signals. A z-score above the trigger threshold combined with moderate price extension from the 20-period moving average generates a "STRONG MOM" regime classification with the recommended action "Ride trend w/ stops," suggesting that traders should maintain directional exposure while using trailing stop-loss orders to protect profits if momentum reverses. In contrast, a z-score above the trigger threshold but with extreme price extension generates a "PARABOLIC EXT" classification with the action "Mean rev UP expected," warning that despite strong statistical momentum, the price has deviated too far from its moving average and may soon consolidate or reverse toward the mean. This nuanced interpretation prevents traders from blindly chasing extended moves even when z-scores remain elevated.
The trend classification system—identifying RISING, FALLING, BOTTOMING, and TOPPING patterns—provides crucial information about the trajectory of statistical momentum rather than just its current level. A RISING classification indicates that not only is the z-score positive, but it has been consistently increasing over recent periods, suggesting accelerating momentum and increasing statistical support for directional movement. Traders can use this to distinguish between stable momentum that may continue and deteriorating momentum that may reverse, informing position sizing and stop-loss placement decisions. BOTTOMING and TOPPING classifications specifically identify potential inflection points where the direction of z-score movement is changing, generating early reversal signals before z-scores cross back through neutral territory.
For mean reversion traders, the indicator provides exceptional value when z-scores reach extreme negative levels (below -2.0) while showing BOTTOMING trend patterns and positive acceleration. This combination suggests that statistical momentum has reached an extreme oversold condition and is beginning to reverse, creating favorable risk-reward opportunities for counter-trend long positions. The extension metric provides additional confirmation, as extreme negative extension from the moving average creates mechanical pull toward the mean independent of momentum considerations. Traders can enter positions when these factors align, using the moving average as an initial profit target and the z-score returning to neutral as a signal for position closure or transition to trend-following mode.
For trend-following traders, the indicator is most valuable when z-scores remain elevated above the trigger threshold for extended periods with RISING or stable trend patterns and positive momentum readings. This indicates persistent statistical support for the trend rather than a temporary spike, justifying larger position sizes and wider stop-loss placement. The momentum and acceleration metrics help trend followers distinguish between healthy trends with sustained momentum and exhausted trends where momentum is decelerating, allowing for timely exit before reversals occur. When momentum and acceleration both turn negative while z-scores remain positive, it signals that the statistical foundation of the trend is eroding even though the trend nominally persists, prompting trend followers to tighten stops or take partial profits.
The component scores displayed in the dashboard enable advanced traders to perform qualitative analysis of what factors are driving the composite z-score reading. If the composite z-score is positive but the breakdown shows that bandpass and momentum scores are negative while mean reversion scores are strongly positive, this indicates that the bullish reading is driven primarily by oversold mean reversion potential rather than directional momentum. Traders can use this information to adjust their trading approach, perhaps favoring short-term reversal trades over longer-term trend follows. Conversely, if all components show aligned readings, it suggests broad-based agreement across analytical dimensions, increasing confidence in the signal and potentially warranting larger position sizes or longer holding periods.
Integration with broader trading systems can enhance the indicator's effectiveness. Traders might use the z-score as a filter for other strategies, taking long signals from separate systems only when the z-score is positive or trading reversal patterns only when z-scores are extreme. Alternatively, the indicator can serve as a portfolio allocation tool, increasing equity exposure when z-scores are positive and reducing exposure or shifting to defensive positions when z-scores turn negative. The probability estimates can be directly incorporated into Kelly Criterion or other position sizing formulas, scaling position sizes proportionally to the estimated probability of upward movement adjusted for risk-reward ratios of specific trade setups.
Alert conditions built into the indicator provide automated monitoring capabilities, notifying traders when z-scores cross critical thresholds or when trend patterns change from FALLING to BOTTOMING or RISING to TOPPING. These alerts enable traders to monitor multiple instruments without constant chart watching, maintaining awareness of regime changes across a diversified portfolio. The alerts for extreme z-scores specifically warn of potential climactic conditions that may require immediate attention, whether to take profits on existing positions or to prepare for reversal opportunities.
The customization options allow traders to optimize the indicator for specific instruments and market conditions. The baseline period parameter controls the lookback window for calculating statistical norms, with shorter periods making the indicator more responsive to recent conditions at the cost of increased noise, while longer periods provide stability but slower adaptation to regime changes. The weight parameters enable traders to emphasize whichever analytical dimensions prove most predictive in their specific markets, potentially increasing trend weights for strongly trending instruments like technology stocks while increasing mean reversion weights for range-bound commodities or currencies. Through systematic backtesting and forward validation, traders can develop instrument-specific configurations that maximize the indicator's predictive accuracy.
Ultimately, the Z-Score Momentum Dashboard functions most effectively as a comprehensive analytical framework rather than a standalone trading system, providing rich statistical context that enhances decision-making across diverse trading approaches. Whether used for discretionary trade timing, systematic signal generation, risk management, or portfolio allocation, the indicator's multi-dimensional analysis, cyclical awareness, and probabilistic framework offer traders a sophisticated tool for understanding and responding to statistical patterns in market behavior that persist across timeframes, instruments, and market regimes.
TRharmonic RSI Amplitude System
TRharmonic RSI Amplitude System - Technical Guide
Overview
The TRharmonic RSI Amplitude System is an edge for anyone in the market who uses only standard RSI or oscillator indicators to trade. This measure uses the Hilbert Transform and Wavelet Analysis to determine how much the RSI is oscillating at any point in time. - This creates dynamic support and resistance bands, allowing traders to more readily see potential reversals.
Mathematical Foundation
Hilbert Transform Method
The Hilbert Transform technique constructs what mathematicians call an "analytic signal": z(t) = x(t) + j·H Here H is the Hilbert operator which shifts the phase by 90 degrees (a notion of Gabor in 1946). After Ehlers' functional adaptation to digital trading systems, the implementation begins with a high-pass Butterworth filter to detrend the data. It next separates I and Q (both in-phase) components. Think of these as perpendicular measurements, that when added together tell you the real strength of the oscillations. The immediate amplitude is then computed by |z(t)| = √(I² + Q²), which provides us with a continuous indication of how vigorously the RSI is moving.
Wavelet Transform Method
The decomposition with the Haar wavelet is based on the multiresolution analysis by Mallat (1989). Inspired by the "barplots" of each individual feature, this method decomposes the RSI signal into different frequency layers in a similar way that musical notes can be separated into their fundamental harmonics. The detail coefficients (D_j) capture the high-frequency oscillations by comparing differences between successive time points: D_j = (μ₁ - μ₂)/√2. The energy-based amplitude computation is E j = ∑|D j | ² and the final amplitude used is √(E j /scale). This normalization ensures that the amplitude measurement is invariant under what timescale in which you analyze.
Adaptive Band Construction
The dynamic band bands use a brainy multiplier reacting to the market: σ_adaptive = σ_base × (1 + StdDev(A)/A), where A is an amplitude measurements over n periods. As volatility rises, the bands widen automatically; as markets calm down, they contract. An optional Hull Moving Average (HMA) smoothing is used for band edges, and is described by HMA(n) = WMA( 2*WMA(n/2) - WMA(n), √n). Hull’s innovation here is that it reduces the lag — not at the expense of smoothness, but without ruining its look and feel: You have taut bands that don’t whipsaw. Bands by their nature are mathematically individual to each instrument within 0 and 100.
Signal Generation Framework
Extremes are zones where the RSI is likely to hit a reversal (just like price hitting the extremes on the bollinger bands). When price is over the contraption lines, momentum has overextended to that direction. 2- Reversal signals, a reversal signal needs two conditions and the bump reverse is both: - The break back out of the bands. holder band amp confirmation.exec("7 - Valid Entry") sexdate.mainloop Except that in trading binary options, this justification is conjecture. This 2-step check really helps to eliminate all the noise. The system also checks for "squeeze" conditions (where A < 0.7·μ_A), which represents a compression in volatility, ensuring that we are not only trading it here but using the indicator to warn us of potential high volatility moves building up.
Alert Architecture
The alert mechanism is built to be practical and non-disruptive. It activates once per closed bar, it also has memory of the signal so it shouldn't spam you. Everything you need to know: which symbol you are watching, what time frame, RSI values and indications for buying or selling while the amplitude statistics provide guidance on where important levels and signals reside. They are formatted using Unicode box-drawing characters for a crisp appearance that appears the same on every platform and device.
Visualization Components
It have three beautiful professionally designed colour schemes for your optional preference to suits different ideal lighting environments. The gradient fills are highly transparent (92%) so you can keep your price chart visible and still see the band structure. Real-time value labels follow around important metrics as they update and an information panel highlights all your key parameters making it even easier to track market conditions.
References
Gabor, D. (1946). Theory of communication. Journal of the Institution of Electrical Engineers, 93(26), 429-441.
Mallat, S. (1989). A theory for multiresolution signal decomposition: The wavelet representation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 11(7), 674-693.
Hull, A. (2005). Active Investing: Using Technical Analysis and Market Sentiment to Find the Best Trading Opportunities.
BTC - CII: Drawdown DNA | RMBTC - CII: Drawdown DNA | Rob_Maths
The "Broken Cycle" Series: Pt 1
Welcome to the debut of the Cycle Integrity Index (CII) . This quantitative diagnostic suite was engineered for a singular mission: to determine if Bitcoin’s historical 4-year cycle is still the primary track rhythm, or if the market has shifted into a high-downforce Institutional Regime.
As of January 2026 , the Bitcoin market is at a historical crossroads. According to the classical 4-year model, we have passed the "Theoretical Peak" and are now on the long descent toward a projected cycle low in late 2026 . However, a massive debate is raging: Is the cycle broken?
While legacy models expect a total engine failure (an -80% wipeout) by the end of this year, the ETF-era market structure suggests we may have "re-engineered" the asset's DNA. Pt 1: Drawdown DNA acts as our first telemetry check, auditing the "Structural Fatigue" of every correction to see if we are taking a tactical pit stop or heading for a catastrophic crash.
How to Read the Telemetry
Think of the Bitcoin market as a Formula 1 engine. This indicator audits the "Wear and Tear" (drawdowns) to see if the chassis can sustain its pace or if the structural integrity is failing as we approach the legacy "finish line."
• Vibrant Green (Institutional Sync): Optimal Performance. The engine is healthy. Pullbacks are shallow (-20% to -35% range), representing professional re-fueling stops by smart money. This suggests the "Supercycle" narrative is overriding the 4-year clock.
• Red/Dark Blue (Regime Decay): Loss of Traction. The "Institutional" heartbeat is weakening. Volatility is rising as the engine stalls, drifting back toward the chaotic, un-buffered "Drift" patterns of the retail era.
• Blue Shaded Zones (Legacy DNA): SYSTEMIC CRASH. The price has breached the -50% "G-Force Threshold." At this depth, the correction carries the genetic makeup of a Legacy Bear Market (historically bottoming near -80%). The 4-year cycle is still very much alive—and it's painful.
Behind the Math: ECU Tuning
This script is an original quantitative work utilizing Gaussian Probability Density logic to categorize market drawdowns into distinct historical regimes.
Instead of simple binary "on/off" logic, the code acts like an ECU (Electronic Control Unit) , calculating the mathematical "fit" of the current drawdown against a specific Institutional Mean (-25%) . Why 25%? I chose -25% as the Institutional DNA anchor based on the structural shift observed between 2023 and 2025. While legacy retail cycles were defined by violent 30-40% "shakeouts" during bull phases, the introduction of spot ETFs and corporate treasury adoption has significantly compressed volatility. A -25% correction now represents the maximum "healthy" absorption of sell-side liquidity by institutional "bids." Staying near this level maintains high aerodynamic sync; dropping further suggests the chassis is failing.
How it Audits the Regime
The closer the price stays to this -25% target, the higher the Integrity Score (10/10). By providing unique "DNA Match" calculations and background shading based on specific threshold crossings, this indicator provides utility beyond standard price-change indicators. It allows you to mathematically distinguish between an "Institutional Rebalancing" and the start of a "Legacy Cycle-Ending Termination."
User Inputs & Navigation
• Rolling High Lookback: Default 52 Weeks . Defines our diagnostic lap. It ensures the audit focuses on the current race, not the entire history of the track.
• Inst. Drawdown Target: Default -25% . The "Perfect Pit Stop." Corrections near this level maintain the highest aerodynamic sync.
• Legacy Threshold: Default -50% . The "Point of No Return" where the engine enters total failure and the Blue Legacy Shading triggers.
• Legacy Crash Target: Default -80% . The historical baseline for previous 4-year cycle bear market floors (Expected mid-to-late 2026 in legacy models).
Instructions & Performance
• Preferred Timeframe: This is a macro-telemetry tool. It performs best on Weekly (1W) or Daily (1D) charts.
• The Dashboard: Monitor the INST. DNA MATCH in the table. A score of 8.0+ / 10 provides the "Green Light" that the Supercycle is still the primary driver, effectively breaking the 4-year "Crash" script.
Disclaimer
Trading and investing in digital assets involve significant risk. The Cycle Integrity Index (CII) is a quantitative tool for informational and educational purposes only. Past performance does not guarantee future results. This is not financial advice. Your capital is at risk.
Tags
robmaths, Rob Maths, Bitcoin, CycleTheory, Institutional, Drawdown, Quant, RegimeShift, CII
Check out my published scripts here: de.tradingview.com
Session Standard Deviations [IbnHindi]Session Standard Deviation⁺
Introduction
Session Standard Deviation⁺ is a comprehensive technical analysis tool designed to map key session-based price levels through Fibonacci deviation zones while simultaneously tracking real-time market regime conditions. Built for precision intraday analysis, this indicator combines structured session reference points with volatility-based regime filtering to provide traders with both tactical price zones and macro bias context across any liquid instrument.
This indicator does not predict direction or generate trade signals. It operates on confirmed time-based session structures and produces logic-bound visuals designed for traders who understand ICT-based price delivery models and seek consistent visual frameworks for tracking displacement, deviation targeting, and regime-aware decision making.
Key Terms and Definitions
Session Reference Candle : A specific time-stamped candle that serves as the structural anchor for Fibonacci projections. The tool recognizes four distinct session markers: London Open (4:00 AM), Asia Range (8:00 PM–12:00 AM), New York 8:30 AM, and New York 9:30 AM. Each session's high and low become the baseline for calculating all subsequent deviation levels.
Fibonacci Deviations : Price levels calculated as multiples of the session range, extending both above and beyond the reference high and low. Unlike traditional Fibonacci retracements, these deviations project targets at standard levels (0, 0.5, 0.618, 1, 1.618) as well as extended levels (2, 2.25, 2.5, 3, 3.25, 3.5, 4, 4.25, 4.5, 4.618), and their negative equivalents. These zones represent potential areas where institutional orders may cluster during expansion or retracement.
Regime Analysis : A multi-factor assessment of current market conditions based on volatility (ATR), directional bias (EMA), and trend strength (ADX). The regime framework categorizes the market into three states: trending bullish, trending bearish, or consolidating. This classification helps traders contextualize whether session-based deviations are likely to act as continuation targets or reversal zones.
ATR (Average True Range) : A volatility measurement comparing fast and slow periods to determine whether the market is expanding (regime-high volatility) or contracting (regime-low volatility). When fast ATR exceeds slow ATR, the market is considered to be in an elevated volatility state, which often accompanies displacement moves that respect deviation levels.
Trend EMA : A directional filter using an exponential moving average to determine whether price is trading above or below a defined trend anchor. This binary condition helps classify whether the regime is structurally bullish or bearish.
ADX (Average Directional Index) : A momentum oscillator measuring trend strength. When ADX is above 25, the market is considered to have sufficient momentum to support regime classification as trending. Below 25 suggests choppy or non-directional conditions (consolidation).
Session Box (Asia Only) : A visual range overlay drawn for the Asia session (8:00 PM–12:00 AM), highlighting the consolidation zone that often precedes major market expansion. This box is rendered with customizable opacity and provides a structural reference for overnight price action.
Fib Extension Mode : Determines how deviation lines project forward in time. Options include extending right indefinitely, extending a fixed number of bars, or stopping at the session reference point. This allows traders to declutter charts or maintain persistent levels based on their analytical preference.
Description
At its core, Session Standard Deviation⁺ operates on a two-layer framework: structural deviation mapping and dynamic regime classification. Each qualifying session creates a full matrix of Fibonacci-based price levels, calculated from the session's confirmed high and low. These levels remain active and extend forward until the next session triggers, providing persistent reference zones for intraday price delivery.
The tool does not account for partial moves or wick-based touches. Deviation levels are drawn as horizontal lines and remain static once plotted. Labels are positioned to the left of each line by default, displaying the session prefix (LON, ASIA, PRE, NYAM) alongside the deviation multiplier. All labels use a minimal style with no background fill, ensuring clean visual hierarchy.
The regime analysis operates independently and updates in real-time on each new bar. A table positioned in the top-right corner displays the current regime classification, live ATR value, and optional ADX strength. The table's background color shifts dynamically—green for bullish regimes, red for bearish regimes, and gray for consolidation—allowing traders to immediately assess whether session deviation zones should be interpreted as continuation targets or reversal areas.
The model remains active until the next session reference candle is detected, at which point a new set of deviation levels is generated. Older session levels are automatically cleaned up after 300 objects to prevent performance degradation on lower-timeframe charts.
Key Features
Multi-Session Structure : Track up to four distinct session types simultaneously—London (4:00 AM 1H candle), Asia (8:00 PM–12:00 AM range), New York 8:30 AM (5m candle), and New York 9:30 AM (5m candle). Each session generates its own color-coded deviation matrix, allowing traders to differentiate between overnight, pre-market, and intraday structural levels.
Extended Fibonacci Levels : The tool plots 26 unique deviation levels, including both standard and extended targets. Positive deviations (0 through 4.618) project above the session high, while negative deviations project below the session low. Each level can be toggled individually, enabling traders to focus only on the zones relevant to their strategy.
Real-Time Regime Classification : A live regime panel evaluates market conditions using ATR comparison (fast vs. slow), trend EMA positioning, and ADX strength. The regime updates on every bar and displays one of three states: "Reversal to Bullish" (trending up with high volatility), "Bias: Bearish (Hi-Vol)" (trending down with high volatility), or "Consolidating" (low directional conviction). This dynamic classification allows traders to interpret session fibs contextually rather than mechanically.
Customizable Color Coding : Each session type is assigned a unique color—purple for London, blue for Asia, and orange for New York pre-market candles. These colors carry through to both the deviation lines and their labels, maintaining visual consistency across timeframes and chart layouts.
Flexible Extension Controls : Choose how deviation lines project into the future. "Right N Bars" extends lines a fixed number of bars forward (default 50), "Right" extends indefinitely, and "None" stops extension at the session reference point. This flexibility allows traders to maintain clean charts on busy intraday timeframes while preserving structural context.
Minimal Label Design : Labels display session prefix and deviation multiplier (e.g., "LON 2.5" or "NYAM -0.618") with no background fill. Label placement can be toggled between left and right alignment, and padding is customizable to prevent overlap with price action.
Session-Specific Box Overlay : The Asia session (8:00 PM–12:00 AM) is rendered as a semi-transparent box spanning its high and low range. This visual aid helps traders identify the overnight consolidation zone and anticipate expansion moves during London or New York open.
Timezone Awareness : All session detections are timezone-aware and default to America/New_York. Traders can customize the timezone input to align with their broker's server time or preferred regional standard.
Regime Panel Display : The top-right table shows the indicator name, current regime state, live ATR value, and optional ADX reading. The panel's background color shifts with regime changes, providing instant visual feedback without requiring interpretation of numeric values.
Memory Management : The tool automatically deletes lines and labels after 300 objects are created, preventing performance issues on lower timeframes while maintaining enough historical context for multi-session analysis.
How Traders Can Use the Indicator Effectively
Session Standard Deviation⁺ is not a signal generator or automated trading system. It is best used as a visual reference framework for understanding where price may seek liquidity based on session expansion logic and how current volatility conditions contextualize those projections. The tool excels as a companion for:
- Mapping session-based expansion targets and retracement zones for ICT-style price delivery analysis
- Differentiating between low-probability and high-probability deviation zones based on regime classification
- Journaling and reviewing which session structures produce the cleanest reactions across different market conditions
- Identifying when price is respecting session fibs as continuation levels (trending regime) versus when deviation zones may act as exhaustion points (consolidation regime)
Traders using the tool should be familiar with session-based analysis, Fibonacci extension logic, and the role of volatility in price delivery. The indicator is most effective when combined with narrative, higher-timeframe structure, and discretionary interpretation of regime shifts.
Usage Guidance
1. Add Session Standard Deviation⁺ to any TradingView chart. This is a fractal tool and can be applied across any timeframe or liquid instrument.
2. Configure which sessions you want to track using the input toggles. Disable sessions that are not relevant to your trading hours or strategy.
3. Use the regime panel to assess whether the current market environment supports continuation into higher deviation levels (trending regime) or whether deviation zones are more likely to act as reversal points (consolidation regime).
4. Reference session deviation lines as structural zones for limit orders, stop placement, or target setting. Combine these levels with your own narrative and higher-timeframe bias to determine which zones carry the highest probability of reaction.
5. Adjust label placement, line width, and extension mode to match your visual preferences and chart timeframe. Lower timeframes (1m–5m) often benefit from shorter extension lengths, while higher timeframes (15m–1H) may prefer persistent lines.
6. Review how price interacts with session fibs across different regime classifications. Over time, you'll develop discretion for which deviation levels are most respected during specific market conditions.
Session Standard Deviation⁺ provides the structural scaffolding and environmental context for informed intraday decision-making. Use it as a lens—not a crutch—for navigating session-based price delivery.
Quantum Reversal Detector [JOAT]
Quantum Reversal Detector - Multi-Factor Reversal Probability Analysis
Introduction and Purpose
Quantum Reversal Detector is an open-source overlay indicator that combines multiple reversal detection methods into a unified probability-based framework. The core problem this indicator addresses is the unreliability of single-factor reversal signals. A price touching support means nothing without momentum confirmation; an RSI oversold reading means nothing without price structure context.
This indicator solves that by requiring multiple independent factors to align before generating reversal signals, then expressing the result as a probability score rather than a binary signal.
Why These Components Work Together
The indicator combines five analytical approaches, each addressing a different aspect of reversal detection:
1. RSI Extremes - Identifies momentum exhaustion (overbought/oversold)
2. MACD Crossovers - Confirms momentum direction change
3. Support/Resistance Proximity - Ensures price is at a significant level
4. Multi-Depth Momentum - Analyzes momentum across multiple timeframes
5. Statistical Probability - Quantifies reversal likelihood using Bayesian updating
These components are not randomly combined. Each filter catches reversals that others miss:
RSI catches momentum exhaustion but misses structural reversals
MACD catches momentum shifts but lags price action
S/R proximity catches structural levels but ignores momentum
Multi-depth momentum catches divergences across timeframes
Probability scoring combines all factors into actionable confidence levels
How the Detection System Works
Step 1: Pattern Detection
The indicator first identifies potential reversal conditions:
// Check if price is at support/resistance
float lowestLow = ta.lowest(low, period)
float highestHigh = ta.highest(high, period)
bool atSupport = low <= lowestLow * 1.002
bool atResistance = high >= highestHigh * 0.998
// Check RSI conditions
float rsi = ta.rsi(close, 14)
bool oversold = rsi < 30
bool overbought = rsi > 70
// Check MACD crossover
float macd = ta.ema(close, 12) - ta.ema(close, 26)
float signal = ta.ema(macd, 9)
bool macdBullish = ta.crossover(macd, signal)
bool macdBearish = ta.crossunder(macd, signal)
// Combine for reversal detection
if atSupport and oversold and macdBullish
bullishReversal := true
Step 2: Multi-Depth Momentum Analysis
The indicator calculates momentum across multiple periods to detect divergences:
calculateQuantumMomentum(series float price, simple int period, simple int depth) =>
float totalMomentum = 0.0
for i = 0 to depth - 1
int currentPeriod = period * (i + 1)
float momentum = ta.roc(price, currentPeriod)
totalMomentum += momentum
totalMomentum / depth
This creates a composite momentum reading that smooths out noise while preserving genuine momentum shifts.
Step 3: Bayesian Probability Calculation
The indicator uses Bayesian updating to calculate reversal probability:
bayesianProbability(series float priorProb, series float likelihood, series float evidence) =>
float posterior = evidence > 0 ? (likelihood * priorProb) / evidence : priorProb
math.min(math.max(posterior, 0.0), 1.0)
The prior probability starts at 50% and updates based on:
RSI extreme readings increase likelihood
MACD crossovers increase likelihood
S/R proximity increases likelihood
Momentum divergence increases likelihood
Step 4: Confidence Intervals
Using Monte Carlo simulation concepts, the indicator estimates price distribution:
monteCarloSimulation(series float price, series float volatility, simple int iterations) =>
float sumPrice = 0.0
float sumSqDiff = 0.0
for i = 0 to iterations - 1
float randomFactor = (i % 10 - 5) / 10.0
float simulatedPrice = price + volatility * randomFactor
sumPrice += simulatedPrice
float avgPrice = sumPrice / iterations
// Calculate standard deviation for confidence intervals
This provides 95% and 99% confidence bands around the current price.
Signal Classification
Signals are classified by confirmation level:
Confirmed Reversal : Pattern detected for N consecutive bars (default 3)
High Probability : Confirmed + Bayesian probability > 70%
Ultra High Probability : High probability + PDF above average
Dashboard Information
The dashboard displays:
Bayesian Probability - Updated reversal probability (0-100%)
Quantum Momentum - Multi-depth momentum average
RSI - Current RSI value with overbought/oversold status
Volatility - Current ATR as percentage of price
Reversal Signal - BULLISH, BEARISH, or NONE
Divergence - Momentum divergence detection
MACD - Current MACD histogram value
S/R Zone - AT SUPPORT, AT RESISTANCE, or NEUTRAL
95% Confidence - Price range with 95% probability
Bull/Bear Targets - ATR-based reversal targets
Visual Elements
Quantum Bands - ATR-based upper and lower channels
Probability Field - Circle layers showing probability distribution
Confidence Bands - 95% and 99% confidence interval circles
Reversal Labels - REV markers at confirmed reversals
High Probability Markers - Star diamonds at high probability setups
Reversal Zones - Boxes around confirmed reversal areas
Divergence Markers - Triangles at momentum divergences
How to Use This Indicator
For Reversal Trading:
1. Wait for Bayesian Probability to exceed 70%
2. Confirm price is at S/R zone (dashboard shows AT SUPPORT or AT RESISTANCE)
3. Check that RSI is in extreme territory (oversold for longs, overbought for shorts)
4. Enter when REV label appears with high probability marker
For Risk Management:
1. Use the 95% confidence band as a stop-loss reference
2. Use Bull/Bear Targets for take-profit levels
3. Higher probability readings warrant larger position sizes
For Filtering False Signals:
1. Increase Confirmation Bars to require more consecutive signals
2. Only trade when probability exceeds 70%
3. Require divergence confirmation for highest conviction
Input Parameters
Reversal Period (21) - Lookback for S/R and momentum calculations
Quantum Depth (5) - Number of momentum layers for multi-depth analysis
Confirmation Bars (3) - Consecutive bars required for confirmation
Detection Sensitivity (1.2) - Band width and target multiplier
Bayesian Probability (true) - Enable probability calculation
Monte Carlo Simulation (true) - Enable confidence interval calculation
Normal Distribution (true) - Enable PDF calculation
Confidence Intervals (true) - Enable confidence bands
Timeframe Recommendations
1H-4H: Best for swing trading reversals
Daily: Fewer but more significant reversal signals
15m-30m: More signals, requires higher probability threshold
Limitations
Statistical concepts are simplified implementations for Pine Script
Monte Carlo uses deterministic pseudo-random factors, not true randomness
Bayesian probability uses simplified prior/likelihood model
Reversal detection does not guarantee actual reversals will occur
Confirmation bars add lag to signal generation
Open-Source and Disclaimer
This script is published as open-source under the Mozilla Public License 2.0 for educational purposes. The source code is fully visible and can be studied to understand how each component works.
This indicator does not constitute financial advice. Reversal detection is probabilistic, not predictive. The probability scores represent statistical likelihood based on historical patterns, not guaranteed outcomes. Past performance does not guarantee future results. Always use proper risk management, position sizing, and stop-losses.
- Made with passion by officialjackofalltrades
Premium CCT Multi-Timeframe Candle Continuation Theory IndicatorPremium CCT is a multi-timeframe technical analysis indicator implementing a proprietary three-condition sequential confirmation system for identifying structural continuation setups. Unlike standard multi-timeframe approaches that simply display HTF indicators on LTF charts or use basic moving average crossovers, this indicator employs a systematic state-machine architecture with specific entry, validation, and invalidation rules designed to filter low-probability setups.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 TECHNICAL METHODOLOGY
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔹 PHASE 1: HTF STRUCTURAL BREAK DETECTION
The indicator implements a specific candle-close comparison algorithm on the higher timeframe (HTF) that differs from standard breakout detection methods:
DETECTION LOGIC:
• Bullish Setup: HTF_Close > HTF_High
(Current closed HTF candle's close price exceeds the previous HTF candle's high)
• Bearish Setup: HTF_Close < HTF_Low
(Current closed HTF candle's close price falls below the previous HTF candle's low)
This is NOT a simple "price broke above high" detection. The requirement for the CLOSE to be above the previous HIGH (rather than just the high being above the previous high) ensures the structural break is confirmed at candle close, filtering wick-only breakouts that often fail.
POINT OF INTEREST (POI) ESTABLISHMENT:
When a setup is detected, the POI is set at:
• Bullish: POI = HTF_High (the previous candle's high that was broken)
• Bearish: POI = HTF_Low (the previous candle's low that was broken)
This POI represents a key structural level where the market previously struggled to move beyond. The hypothesis is that this level will act as support (bullish) or resistance (bearish) during retracement.
INVALIDATION ALGORITHM:
The setup remains valid until:
• Bullish: HTF_Close < Setup_Candle_Low (current HTF candle closes below the low of the candle that created the setup)
• Bearish: HTF_Close > Setup_Candle_High (current HTF candle closes above the high of the candle that created the setup)
This invalidation logic differs from simple "stop loss at low" approaches because it requires a full candle close beyond the extreme, not just a wick, preventing premature invalidation from intrabar volatility.
🔹 PHASE 2: LTF THREE-CONDITION SEQUENTIAL SYSTEM
Once a valid POI is established, the indicator enters a state-machine that tracks three specific conditions on the lower timeframe (LTF). Each condition must be satisfied sequentially, and certain conditions can be invalidated if specific price action occurs.
CONDITION 1 - RETRACEMENT THROUGH POI:
ENTRY CRITERIA:
• Bullish: LTF_Close < POI (candle closes below the POI level)
• Bearish: LTF_Close > POI (candle closes above the POI level)
TRACKING MECHANISM:
Upon Condition 1 satisfaction, the indicator begins tracking two separate extreme values:
1. Momentum Extreme (for Condition 3):
• Bullish: Track the candle with the LOWEST CLOSE during retracement
- If new lower close found: Update Momentum_Extreme_Close and store this candle's HIGH
• Bearish: Track the candle with the HIGHEST CLOSE during retracement
- If new higher close found: Update Momentum_Extreme_Close and store this candle's LOW
2. Stop Loss Extreme (for risk management):
• Bullish: Track the absolute LOWEST LOW reached during retracement
- Update continuously if LTF_Low < Current_SL_Extreme
• Bearish: Track the absolute HIGHEST HIGH reached during retracement
- Update continuously if LTF_High > Current_SL_Extreme
WHY THIS MATTERS:
This dual-tracking system is a key differentiator from standard indicators. Most indicators either:
(a) Only track absolute extremes, which don't help identify momentum shifts
(b) Use fixed ATR-based stops, which don't adapt to actual retracement depth
(c) Use a single reference point for both momentum and risk
By tracking BOTH the candle with the most extreme close (momentum) AND the absolute extreme price (risk), the indicator can identify precise momentum shift points while maintaining appropriate stop placement.
MATHEMATICAL REPRESENTATION:
If Condition_1 == False: If (Bullish AND LTF_Close < POI) OR (Bearish AND LTF_Close > POI): Condition_1 = True Momentum_Close_Extreme = LTF_Close Momentum_HighLow_Reference = (Bullish ? LTF_High : LTF_Low) SL_Extreme = (Bullish ? LTF_Low : LTF_High)
If Condition_1 == True: If Bullish: If LTF_Close < Momentum_Close_Extreme: Momentum_Close_Extreme = LTF_Close Momentum_HighLow_Reference = LTF_High If LTF_Low < SL_Extreme: SL_Extreme = LTF_Low If Bearish: If LTF_Close > Momentum_Close_Extreme: Momentum_Close_Extreme = LTF_Close Momentum_HighLow_Reference = LTF_Low If LTF_High > SL_Extreme: SL_Extreme = LTF_High
CONDITION 2 - POI RECLAIM WITH DYNAMIC INVALIDATION:
ENTRY CRITERIA:
• Bullish: LTF_Close > POI (candle closes back above the POI level)
• Bearish: LTF_Close < POI (candle closes back below the POI level)
CRITICAL DIFFERENCE FROM STANDARD APPROACHES:
This condition implements real-time validation logic. If Condition 2 is satisfied but price subsequently closes back through the POI before all conditions are met, Condition 2 is INVALIDATED and must be re-satisfied.
VALIDATION STATE MACHINE:
If Condition_1 == True AND Condition_2 == False: If (Bullish AND LTF_Close > POI) OR (Bearish AND LTF_Close < POI): Condition_2 = True
If Condition_2 == True: If (Bullish AND LTF_Close < POI) OR (Bearish AND LTF_Close > POI): Condition_2 = False // Invalidated - must reclaim again
WHY THIS IS UNIQUE:
Most indicators treat support/resistance reclaims as binary events - once price crosses back, the condition stays "true." This creates false signals when price oscillates around the level. The dynamic invalidation ensures that the POI must be HELD, not just briefly touched, filtering out weak reclaims.
CONDITION 3 - MOMENTUM SHIFT CONFIRMATION:
ENTRY CRITERIA:
• Bullish: LTF_Close > Momentum_HighLow_Reference
(Current candle closes above the HIGH of the candle with the lowest close during retracement)
• Bearish: LTF_Close < Momentum_HighLow_Reference
(Current candle closes below the LOW of the candle with the highest close during retracement)
TECHNICAL RATIONALE:
This condition confirms that momentum has definitively shifted in the intended direction. By requiring price to break the high/low of the MOST EXTREME CLOSE candle (not just any candle, not just the extreme low/high), the indicator ensures:
1. Price has moved beyond the point of maximum bearish/bullish pressure during retracement
2. The momentum shift is decisive, not just a small bounce
3. The setup shows real follow-through, not just sideways consolidation
COMPARISON TO ALTERNATIVES:
• Simple "close above previous high": Too many false signals during consolidation
• ATR-based breakout: Doesn't account for actual market structure
• Fixed pip movement: Not adaptive to volatility
• Break of retracement low: Triggers too late and misses optimal entry
• Our approach: Break of the high/low of the CANDLE that showed the most extreme close, providing early but confirmed entry
SIGNAL GENERATION:
Entry signal triggers ONLY when:
Condition_1 == True AND Condition_2 == True AND Condition_3 == True AND Entry_Signal_Not_Yet_Shown
All three conditions must be simultaneously true. Once a signal is generated, the tracking system resets only when a new HTF setup is detected or the current setup is invalidated.
🔹 PHASE 3: HTF TREND FILTER IMPLEMENTATION
An optional moving average filter adds a fourth layer of confirmation by ensuring directional alignment with the broader trend.
TREND DETERMINATION LOGIC:
HTF_MA = MA(HTF_Close, Period, Method) Trend_Bullish = (HTF_Close > HTF_MA) Trend_Bearish = (HTF_Close < HTF_MA)
SIGNAL FILTERING:
If Trend_Filter_Enabled: If Entry_Signal == True: If (Setup_Bullish AND NOT Trend_Bullish) OR (Setup_Bearish AND NOT Trend_Bearish): Entry_Signal = False // Block counter-trend signals
WHY THIS IS NECESSARY:
While the three-condition system identifies structural continuation setups, the trend filter prevents taking continuation trades in the opposite direction of the dominant trend. This is particularly important because continuation patterns can form in both trending and counter-trending moves, but success rates differ significantly.
CUSTOMIZATION LOGIC:
• Period: Adjustable 1-500 (default 20)
• Method: SMA (arithmetic mean), EMA (exponential smoothing), SMMA (smoothed MA), LWMA (linear weighted)
• Applied Price: Close/Open/High/Low/Median/Typical/Weighted
The default 20-period SMA provides a balance between responsiveness and noise filtering on the HTF, effectively identifying intermediate trends without being overly sensitive to short-term fluctuations.
🔹 DYNAMIC REFERENCE LEVEL CALCULATION
TAKE PROFIT REFERENCE:
Unlike static targets (ATR multiples, fixed pips, percentage), the indicator dynamically tracks:
• Bullish: Highest HIGH reached after setup formation but BEFORE entry confirmation
• Bearish: Lowest LOW reached after setup formation but BEFORE entry confirmation
TRACKING ALGORITHM:
On_New_HTF_Setup: TP_Reference = (Bullish ? Setup_Candle_High : Setup_Candle_Low)
While Conditions_Not_All_Met: If Bullish AND LTF_High > TP_Reference: TP_Reference = LTF_High If Bearish AND LTF_Low < TP_Reference: TP_Reference = LTF_Low
On_Entry_Signal: Final_TP_Reference = TP_Reference // Lock in the value
WHY THIS APPROACH:
This creates realistic profit targets based on actual market movement, not theoretical calculations. The TP represents a price level the market has ALREADY REACHED and therefore has demonstrated it CAN reach again. This is fundamentally different from:
• ATR-based targets: Theoretical, may not align with structure
• Fixed R:R targets: Arbitrary, ignores market behavior
• Previous swing high/low: Static, doesn't account for current volatility
STOP LOSS REFERENCE:
The SL reference is the absolute extreme reached during the retracement phase (tracked in Condition 1). This ensures:
• Stop is beyond actual retracement depth (not arbitrary)
• Stop accounts for the volatility of this specific setup
• Stop placement adapts to market conditions automatically
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 JUSTIFICATION FOR CLOSED-SOURCE & PAID ACCESS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
While this indicator uses fundamental building blocks available in technical analysis (price comparisons, moving averages, high/low tracking), the value and originality lie in the SPECIFIC IMPLEMENTATION:
1️⃣ PROPRIETARY STATE MACHINE ARCHITECTURE
The exact sequence of conditions, their interaction logic, and the specific invalidation rules constitute a proprietary trading methodology. The state machine ensures conditions are tracked, validated, and invalidated according to precise rules that took extensive development and testing to optimize.
The specific choice of:
• CLOSE vs HIGH for HTF breakout detection
• Tracking the candle with extreme CLOSE vs absolute extreme for momentum
• Dynamic Condition 2 invalidation logic
• The specific relationship between all three conditions
...represents a unique systematic approach not found in standard indicators.
2️⃣ DUAL-TRACKING MECHANISM
The simultaneous tracking of two different extremes during retracement (momentum extreme and SL extreme) with their specific update conditions is a non-obvious implementation that required systematic development. Standard indicators typically track only one reference point.
3️⃣ PRECISE TIMING AND INTERACTION LOGIC
The exact timing of when each condition is checked, how they interact, when they reset, and the specific price action that triggers state changes represents implementation details that distinguish this from generic approaches. For example:
• Checking conditions on bar close (not intrabar)
• Specific invalidation rules for Condition 2
• Continue tracking extremes even after Condition 1 is met
• Lock TP reference only at entry, not at setup
4️⃣ INTEGRATED MULTI-COMPONENT SYSTEM
While each component (HTF analysis, LTF conditions, trend filter) uses standard concepts, the specific way they integrate - including which HTF signals are acted upon, how LTF conditions sequence, when the trend filter applies, how reference levels are calculated - represents a cohesive methodology developed through systematic testing.
5️⃣ OPTIMIZATION AND PARAMETER SELECTION
The specific default parameters (timeframe relationships, condition thresholds, MA periods) were determined through extensive testing and represent proprietary optimization decisions.
COMPARISON TO FREE ALTERNATIVES:
Free indicators typically offer:
• Simple multi-timeframe displays (showing HTF indicators on LTF chart)
• Basic breakout detection (price crosses level)
• Single-condition entry systems
• Static stops and targets
• No systematic state tracking
This indicator differs by providing:
• Systematic three-condition sequential confirmation
• Dynamic state validation with invalidation logic
• Adaptive reference levels based on actual price behavior
• Integrated trend filtering
• Dual-tracking system for momentum and risk
• Complete automation of the methodology
The closed-source protection preserves the specific implementation logic, exact condition relationships, timing mechanisms, and proprietary parameter selections that distinguish this systematic approach from free building blocks.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✨ FEATURES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📐 MULTI-TIMEFRAME COORDINATION
• Three preset combinations: Daily/15M, 4H/5M, 1H/1M
• Automatic HTF/LTF synchronization with request.security() implementation
• Chart timeframe validation preventing incompatible setups
• Real-time HTF bar tracking to detect new setups immediately
🎨 VISUAL INDICATORS
• Dynamic POI horizontal lines with directional color coding
• Automatic SL/TP reference levels displayed after Condition 1
• Real-time condition status in info panel (checkmark system)
• Customizable colors, line styles (solid/dashed/dotted), and widths (1-5px)
• Label annotations showing exact price levels
📊 INFORMATION PANEL
• Current HTF/LTF configuration display
• HTF trend direction with MA value
• Active setup type (Bullish/Bearish/None)
• Three-condition status with real-time updates
• Trend alignment indicator (when filter enabled)
• Position: 4 corners (top-left, top-right, bottom-left, bottom-right)
• Size: Small/Normal/Large
• Theme: Light (light background charts) / Dark (dark background charts)
🎯 ENTRY SIGNALS
• Display modes: Arrows only, Background color only, or Both
• Arrow placement: Above low (bullish) / Below high (bearish)
• Background: 90% transparent fill on signal bar
• Customizable colors for long (default green) and short (default red)
• Signals trigger only when ALL conditions + trend filter pass
🔔 ALERT SYSTEM
• HTF Setup Formation: Notifies when new POI established
• Entry Signal: Full trade details (direction, entry, TP, SL)
• POI Invalidation: Warns when setup is invalidated
• Custom message format compatible with webhook automation
• alert() function calls for flexible notification routing
• Frequency: Once per bar (prevents spam)
⚙️ CUSTOMIZATION
• Trend Filter: Enable/disable, period (1-500), method (SMA/EMA/SMMA/LWMA), applied price
• Visual Settings: All element colors, line styles, widths
• Alert Toggles: Individual on/off for each alert type
• Info Panel: Position, size, theme independently configurable
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📖 USAGE INSTRUCTIONS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1️⃣ CHART TIMEFRAME REQUIREMENT
Your chart timeframe MUST be equal to or lower than the selected LTF:
• Daily/15M preset: Chart must be 15-minute or lower (15M, 5M, 1M)
• 4H/5M preset: Chart must be 5-minute or lower (5M, 1M)
• 1H/1M preset: Chart must be 1-minute
The indicator displays a warning label if your chart is incompatible. This requirement exists because the indicator needs to process individual LTF bars in real-time to track conditions accurately.
2️⃣ INTERPRETING SIGNALS
Entry signals appear when the complete sequence is satisfied:
• POI line shows the key structural level (blue for bullish, orange for bearish)
• SL reference line appears after Condition 1 (red line at retracement extreme)
• TP reference line tracks highest/lowest point before entry (green line)
• Info panel shows real-time condition status (✓ when met, ✗ when not)
• Entry arrow/background appears when all conditions + trend filter pass
The setup remains active until either:
(a) Entry signal is generated
(b) HTF setup is invalidated
(c) New HTF setup is detected
3️⃣ TREND FILTER OPTIMIZATION
Enable in clearly trending markets:
• Strong uptrends: Enable filter, allows only bullish setups
• Strong downtrends: Enable filter, allows only bearish setups
• Ranging markets: Consider disabling to allow both directions
• Choppy conditions: Enable filter with longer MA period (50-100)
MA Period Selection:
• 20: Default, balances responsiveness and stability
• 50: Intermediate trends, less false signals
• 100/200: Major trends only, very selective
MA Method Selection:
• SMA: Smooth, equal weight to all periods
• EMA: More weight to recent prices, faster response
• SMMA: Double-smoothed, very stable
• LWMA: Linear weighting, moderate responsiveness
4️⃣ ALERT CONFIGURATION
To receive entry signal notifications:
1. Right-click the indicator name on your chart
2. Select "Add Alert on Premium CCT..."
3. In alert dialog, choose "Any alert() function call"
4. Configure notification preferences (app/email/webhook)
5. Set "Once Per Bar Close" to avoid repeated alerts
Alert message format includes:
• Direction (BUY/SELL)
• Symbol
• Entry price (current close when signal triggered)
• TP level (dynamic reference)
• SL level (retracement extreme)
5️⃣ RISK MANAGEMENT CONSIDERATIONS
The indicator provides REFERENCE levels, not trade management:
• SL Reference: Shows the retracement extreme - consider adding buffer
• TP Reference: Shows price level already reached - may not be hit again
• Position Sizing: Calculate based on your account size and risk tolerance
• Actual SL: Should account for spread, slippage, and broker conditions
• Actual TP: May want to take partial profits before reference level
These reference levels represent structural points identified by the indicator's logic, but actual trade management should incorporate:
• Your personal risk parameters
• Current market volatility
• Spread and commission costs
• Your trading plan rules
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💡 BEST PRACTICES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
BACKTESTING:
Before live trading, review historical signals on your instruments to understand:
• Signal frequency on different timeframe combinations
• Typical stop-loss distances
• How setups behave in different market conditions
• Average time from setup to entry signal
MARKET SELECTION:
This methodology works best in markets with:
• Clear directional trends on HTF (for trend filter effectiveness)
• Sufficient liquidity (reduces slippage on entries)
• Normal volatility (extreme conditions may cause unusual behavior)
• Avoid during major news events initially until familiar with behavior
TIMEFRAME CONSIDERATIONS:
• Lower timeframe combinations (1H/1M): More signals, faster moves, require more monitoring
• Higher timeframe combinations (Daily/15M): Fewer signals, larger moves, less intensive
• Match timeframe selection to your trading availability and style
INTEGRATION WITH YOUR ANALYSIS:
While this indicator provides a systematic approach, consider:
• Overall market context (trending, ranging, consolidating)
• Key support/resistance levels from higher timeframes
• Economic calendar events that may cause volatility
• Your own chart patterns and technical analysis
• Confluence with other methodologies you use
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠️ DISCLAIMERS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
This indicator is a technical analysis tool that implements a specific systematic methodology. It does NOT constitute financial advice, investment recommendations, or trading signals that should be followed blindly.
RISK ACKNOWLEDGMENT:
• Trading involves substantial risk of loss
• You can lose your entire investment
• Past indicator signals do not predict future results
• No methodology works in all market conditions
• Market conditions change and render historical performance irrelevant
• Backtested results do not account for real-world factors (slippage, spread, execution, psychological factors)
USER RESPONSIBILITY:
• You are solely responsible for all trading decisions
• You should never trade with money you cannot afford to lose
• You should thoroughly understand this methodology before using it
• You should test on demo accounts before live trading
• You should maintain appropriate position sizing and risk management
• You should seek advice from qualified professionals regarding your situation
METHODOLOGY LIMITATIONS:
• This system tracks specific price relationships and conditions
• It cannot predict market behavior with certainty
• It may generate false signals during certain conditions
• It requires proper interpretation within market context
• Signal frequency varies significantly across markets and timeframes
• Performance varies across different market regimes (trending vs ranging)
• The three-condition system filters many setups, which reduces signal frequency
NO PERFORMANCE CLAIMS:
• No claims are made about win rates or profitability
• Historical signals shown are not representative of future performance
• Results vary dramatically based on execution, market selection, and risk management
• What works on one instrument may not work on another
• Different timeframe combinations produce different results
TECHNICAL LIMITATIONS:
• Requires specific chart timeframe compatibility
• Depends on clean price data from broker
• May behave differently with different data providers
• LTF conditions depend on precise bar-by-bar tracking
• Internet connectivity issues may cause missed signals
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📚 VERSION HISTORY
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Version 1.0 - Initial Release
• HTF structural break detection with close-vs-high/low logic
• Three-condition LTF sequential tracking system with state machine
• Dual extreme tracking (momentum reference and SL reference)
• Dynamic Condition 2 validation with real-time invalidation
• Adaptive TP/SL reference levels based on actual price movement
• Visual POI lines with automatic updates
• Comprehensive information panel with real-time status
• Customizable entry signal display (arrows/background/both)
• Complete alert system with structured messages
• HTF trend filter with MA (customizable period, method, applied price)
• Multiple timeframe presets (Daily/15M, 4H/5M, 1H/1M)
• Light and Dark theme support for different chart backgrounds
• Extensive visual customization options
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
The information and publications provided by this indicator are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations.
This indicator implements a specific technical analysis methodology. Users must understand the underlying logic, test thoroughly, and integrate it appropriately within their own trading approach and risk management framework.
Adaptive Trend Envelope [BackQuant]Adaptive Trend Envelope
Overview
Adaptive Trend Envelope is a volatility-aware trend-following overlay designed to stay responsive in fast markets while remaining stable during slower conditions. It builds a dynamic trend spine from two exponential moving averages and surrounds it with an adaptive envelope whose width expands and contracts based on realized return volatility. The result is a clean, self-adjusting trend structure that reacts to market conditions instead of relying on fixed parameters.
This indicator is built to answer three core questions directly on the chart:
Is the market trending or neutral?
If trending, in which direction is the dominant pressure?
Where is the dynamic trend boundary that price should respect?
Core trend spine
At the heart of the indicator is a blended trend spine:
A fast EMA captures short-term responsiveness.
A slow EMA captures structural direction.
A volatility-based blend weight dynamically shifts influence between the two.
When short-term volatility is low relative to long-term volatility, the fast EMA has more influence, keeping the trend responsive. When volatility rises, the blend shifts toward the slow EMA, reducing noise and preventing overreaction. This blended output is then smoothed again to form the final trend spine, which acts as the structural backbone of the system.
Volatility-adaptive envelope
The envelope surrounding the trend spine is not based on ATR or fixed percentages. Instead, it is derived from:
Log returns of price.
An exponentially weighted variance estimate.
A configurable multiplier that scales envelope width.
This creates bands that automatically widen during volatile expansions and tighten during compression. The envelope therefore reflects the true statistical behavior of price rather than an arbitrary distance.
Inner hysteresis band
Inside the main envelope, an inner band is constructed using a hysteresis fraction. This inner zone is used to stabilize regime transitions:
It prevents rapid flipping between bullish and bearish states.
It allows trends to persist unless price meaningfully invalidates them.
It reduces whipsaws in sideways conditions.
Trend regime logic
The indicator operates with three regime states:
Bullish
Bearish
Neutral
Regime changes are confirmed using a configurable number of bars outside the adaptive envelope:
A bullish regime is confirmed when price closes above the upper envelope for the required number of bars.
A bearish regime is confirmed when price closes below the lower envelope for the required number of bars.
A trend exits back to neutral when price reverts through the trend spine.
This structure ensures that trends are confirmed by sustained pressure rather than single-bar spikes.
Active trend line
Once a regime is active, the indicator plots a single dominant trend line:
In a bullish regime, the lower envelope becomes the active trend support.
In a bearish regime, the upper envelope becomes the active trend resistance.
In neutral conditions, price itself is used as a placeholder.
This creates a simple, actionable visual reference for trend-following decisions.
Directional energy visualization
The indicator uses layered fills to visualize directional pressure:
Bullish energy fills appear when price holds above the active trend line.
Bearish energy fills appear when price holds below the active trend line.
Opacity gradients communicate strength and persistence rather than binary states.
A subtle “rim” effect is added using ATR-based offsets to give depth and reinforce the active side of the trend without cluttering the chart.
Signals and trend starts
Discrete signals are generated only when a new trend regime begins:
Buy signals appear at the first confirmed transition into a bullish regime.
Sell signals appear at the first confirmed transition into a bearish regime.
Signals are intentionally sparse. They are designed to mark regime shifts, not every pullback or continuation, making them suitable for higher-quality trend entries rather than frequent trading.
Candle coloring
Optional candle coloring reinforces regime context:
Bullish regimes tint candles toward the bullish color.
Bearish regimes tint candles toward the bearish color.
Neutral states remain visually muted.
This allows the chart to communicate trend state even when the envelope itself is partially hidden or de-emphasized.
Alerts
Built-in alerts are provided for key trend events:
Bull trend start.
Bear trend start.
Transition from trend to neutral.
Price crossing the trend spine.
These alerts support hands-off trend monitoring across multiple instruments and timeframes.
How to use it for trend following
Trend identification
Only trade in the direction of the active regime.
Ignore counter-trend signals during confirmed trends.
Entry alignment
Use the first regime signal as a structural entry.
Use pullbacks toward the active trend line as continuation opportunities.
Trend management
As long as price respects the active envelope boundary, the trend remains valid.
A move back through the spine signals loss of trend structure.
Market filtering
Periods where the indicator remains neutral highlight non-trending environments.
This helps avoid forcing trades during chop or compression.
Adaptive Trend Envelope is designed to behave like a living trend structure. Instead of forcing price into static rules, it adapts to volatility, confirms direction through sustained pressure, and presents trend information in a clean, readable form that supports disciplined trend-following workflows.






















