ATR ZLEMA [QuantAlgo]🟢 Overview
The ATR ZLEMA indicator identifies trend direction and reversal points using a Zero Lag Exponential Moving Average (ZLEMA) combined with volatility-adjusted dynamic trailing stops. It eliminates the inherent lag of traditional moving averages while incorporating Average True Range (ATR) volatility measurement to create adaptive support and resistance levels that automatically adjust to market conditions, with optional noise filtering to reduce whipsaws in choppy markets, helping traders and investors identify trend changes, maintain positions during trending markets, and exit when momentum shifts across multiple timeframes and asset classes.
🟢 How It Works
The indicator's core methodology lies in its zero-lag trend detection system combined with volatility-adaptive trailing stops, where the ZLEMA eliminates moving average lag while ATR-based bands provide dynamic support and resistance levels:
lag = math.floor((zlemaLength - 1) / 2)
rawZlema = ta.ema(source + (source - source ), zlemaLength)
The Zero Lag EMA calculation uses lag reduction through data compensation, adding the difference between current price and lagged price to eliminate the delay inherent in traditional exponential moving averages, providing faster response to trend changes while maintaining smoothness.
The script incorporates an optional ATR-based noise filter that prevents the ZLEMA from updating during insignificant price movements, helping to reduce false signals in choppy, range-bound markets:
if enableNoiseFilter
noiseThreshold = atr * noiseFilter
priceChange = math.abs(rawZlema - zlema)
if priceChange > noiseThreshold
zlema := rawZlema
First, the indicator calculates the Average True Range to measure current market volatility, then applies a user-defined multiplier to determine the distance of the trailing stop from the ZLEMA:
atr = ta.rma(ta.tr(true), atrLength)
atrBand = atr * atrMultiplier
Next, dynamic trend detection occurs through a state-based system where the indicator tracks whether the ZLEMA is above or below the ATR trailing line, automatically adjusting the trailing stop position:
if trend == 1
if zlema < zlemaATR
trend := -1
zlemaATR := zlema + atrBand
else
zlemaATR := math.max(zlemaATR, zlema - atrBand)
The ATR trailing line acts as a volatility-adjusted stop that follows the ZLEMA during trends but never moves against the trend direction. It ratchets upward with the ZLEMA in uptrends and ratchets downward in downtrends, creating a protective barrier that adapts to market volatility.
Finally, trend reversal signals are generated when the ZLEMA crosses the ATR trailing line, indicating a shift in market momentum:
bullSignal = trend == 1 and trend == -1
bearSignal = trend == -1 and trend == 1
This creates a volatility-adaptive trend-following system that combines ZLEMA with dynamic support/resistance levels and optional noise filtering, providing traders with responsive directional signals and automatic stop-loss levels that adjust to both price momentum and market volatility conditions.
🟢 Signal Interpretation
▶ Bullish Trend (Green): ZLEMA trading above ATR trailing line with indicator showing bullish color, indicating established upward momentum with zero-lag confirmation = Long/Buy opportunities
▶ Bearish Trend (Red): ZLEMA trading below ATR trailing line with indicator showing bearish color, indicating established downward momentum with zero-lag confirmation = Short/Sell opportunities
▶ ATR Trailing Line as Dynamic Support: In uptrends, the trailing line acts as volatility-adjusted support level that rises with ZLEMA, never declining = Use as potential stop-loss reference for long positions = ZLEMA holding above indicates trend strength and momentum continuation
▶ ATR Trailing Line as Dynamic Resistance: In downtrends, the trailing line acts as volatility-adjusted resistance level that falls with ZLEMA, never rising = Use as potential stop-loss reference for short positions = ZLEMA holding below indicates trend weakness and momentum continuation
🟢 Features
▶ Preconfigured Presets: Three optimized parameter sets for different trading styles and market conditions. "Default" provides balanced configuration suitable for swing trading on daily and 4-hour charts with standard ZLEMA and ATR periods, moderate multiplier, and moderate noise filtering that works across most market conditions. "Fast Response" delivers aggressive configuration designed for intraday trading and scalping on 5-minute to 1-hour charts with shorter ZLEMA period for quick trend detection, reduced ATR period for rapid volatility adaptation, tighter multiplier for early entries/exits, and minimal noise filtering for maximum responsiveness. This is ideal for active traders monitoring positions closely but expect more frequent signals and potential whipsaws in choppy conditions. "Smooth Trend" focuses on conservative configuration for position trading and long-term trend following on daily to weekly charts with extended ZLEMA period for smoother trend identification, longer ATR period for stable volatility measurement, wide multiplier to filter minor corrections, and aggressive noise filtering to ensure only strong sustained trends trigger signals. This is best for patient traders focused on major trend moves with fewer reversals.
▶ Built-in Alerts: Three alert conditions enable comprehensive automated monitoring of trend changes and zero-lag momentum shifts. "Bullish Trend" triggers when the ZLEMA crosses above the ATR trailing line and trend state changes from bearish to bullish, signaling potential long entry opportunities with lag-eliminated confirmation. "Bearish Trend" activates when the ZLEMA crosses below the ATR trailing line and trend state changes from bullish to bearish, signaling potential short entry or long exit points with immediate momentum detection. "Any Trend Change" provides a combined alert for any trend reversal regardless of direction, allowing traders to be notified of all zero-lag momentum shifts without setting up separate alerts. These notifications enable traders to capitalize on trend changes and protect positions without continuous chart monitoring, leveraging the indicator's zero-lag technology for faster trend change alerts.
▶ Color Customization: Six visual themes (Classic, Aqua, Cosmic, Ember, Neon, plus Custom) accommodate different chart backgrounds and visual preferences, ensuring optimal contrast for identifying bullish versus bearish trends across various trading environments. The adjustable cloud fill transparency control (0-100%) allows fine-tuning of the gradient area prominence between the ATR trailing line and ZLEMA, with higher transparency values (70-95) creating subtle background context without overwhelming the chart while lower values (20-40) produce bold, prominent trend zone emphasis for instant recognition. Optional bar coloring with adjustable transparency (0-100%) extends the trend color directly to the price bars themselves based on ZLEMA trend state, providing immediate visual reinforcement of current trend direction without requiring reference to the indicator lines.
Volatility
Smart SafeZone Stops [MarkitTick]💡 This script represents a sophisticated evolution of volatility-based trailing stop methodologies. It is designed to assist traders in managing trend-following positions by dynamically adjusting stop-loss levels based on market noise, directional momentum, and volume flows. Unlike static trailing stops that move by a fixed percentage or simple ATR multiples, this tool calculates the "safe zone" by analyzing how far price has penetrated against the trend over a specific lookback period, offering a granular approach to risk management that adapts to changing market conditions.
✨ Originality and Utility
The primary utility of this indicator lies in its ability to filter out market noise while remaining tight enough to protect profits during strong trends. While the classic SafeZone concept (popularized by Dr. Alexander Elder) is effective, this script introduces several modern enhancements that increase its robustness:
● Dynamic ADX Integration Standard SafeZone stops use a fixed multiplier. This script integrates the Average Directional Index (ADX) to gauge trend strength. When the trend is strong, the stop tightens (Aggressive Multiplier) to lock in profits rapidly. When the trend is weak or choppy, the stop widens (Conservative Multiplier) to prevent premature shakeouts. ● Volume-Weighted Noise Price movement on low volume is often considered "noise," while high-volume movement signifies conviction. This script optionally weights the noise calculation by Relative Volume. A downward spike on low volume will affect the stop level less than a downward spike on high volume.
● 3-Day Smoothing Mechanism To prevent the stop line from becoming too jagged or reacting to single-bar anomalies, the script applies a 3-day smoothing algorithm. It utilizes the "worst-case" scenario of the last three calculated stop levels, ensuring the stop only moves when the trend structure genuinely shifts.
🔬 Methodology and Concepts
The underlying logic operates on a "Ratchet" mechanism, meaning the stop line can only move in the direction of the trade (up for longs, down for shorts) and never retraces until a trend reversal occurs.
● Directional Noise Calculation The script separates market noise into two components: Downside Penetration (for Longs): The distance the price dips below the previous bar's low. Upside Penetration (for Shorts): The distance the price spikes above the previous bar's high. The average of these penetrations is calculated over the Noise Lookback Period .
● The SafeZone Formula The raw stop level is derived as follows: Long Stop = Previous Low - (Average Downside Noise × Multiplier) Short Stop = Previous High + (Average Upside Noise × Multiplier)
● Adaptive Multiplier Logic If Dynamic ADX is enabled: If ADX > Strong Threshold: Use Aggressive Multiplier (e.g., 1.5x). If ADX < Weak Threshold: Use Conservative Multiplier (e.g., 3.5x). Otherwise: Use the Base Safety Coefficient.
● Exhaustion Detection The script calculates the distance between the current Close price and the Active Stop. If this distance exceeds a specific multiple of the ATR (Average True Range), it flags a "Mean Reversion" or "Exhaustion" warning, suggesting price has extended too far from equilibrium.
🎨 Visual Guide
The indicator plots distinct visual elements to guide decision-making without cluttering the chart excessively.
● Trailing Stop Lines Green Line (Solid): Represents the SafeZone Long Stop. This line appears below price during an uptrend. As long as price closes above this line, the bullish bias is intact. Red Line (Solid): Represents the SafeZone Short Stop. This line appears above price during a downtrend. A close above this line signals a potential short exit or reversal.
● Trend Signals Green Triangle (Below Bar): Marks the "Bull Start." This occurs when the price crosses above the Trend Filter EMA and the trend logic flips to bullish. Red Triangle (Above Bar): Marks the "Bear Start." Indicates the start of a downtrend sequence.
● Exhaustion Warnings Yellow Labels (⚠️): These appear when price has extended significantly away from the stop line (based on the ATR Exhaustion Multiplier). This is not an immediate sell signal but a warning that the trend may be overextended and a pullback is probable.
● MTF Consensus Cloud Background Color: If enabled, the chart background changes color to reflect the Higher Timeframe (HTF) trend. Green Background: Current trend matches HTF Uptrend. Red Background: Current trend matches HTF Downtrend. Gray Background: Trends are mismatched (Consolidation/Conflict).
● Quantitative Dashboard A table located in the top-right corner displays real-time statistics: Trend: Current state (BULLISH/BEARISH). Age: Number of bars since the trend began. Stop Price: Exact price level of the trailing stop. Risk %: The percentage distance from the current Close to the Stop. If this exceeds 3%, the text turns red to highlight elevated risk. Active Mult: The current multiplier being used (Dynamic or Fixed). ADX State: Shows if the trend is Strong, Weak, or Normal.
📖 How to Use
1. Entry Timing Wait for a Trend Switch signal (Triangle). For a long entry (Green Triangle), ensure the price is above the Trend Baseline (EMA). Ideally, look for confluence with the MTF Cloud (Green Background).
2. Position Management Once in a trade, use the Trailing Stop Line as your hard exit or invalidation point. Do not manually move the stop away from price; the script automatically "ratchets" the stop tighter as the trend progresses.
3. Taking Profits Use the "Exhaustion Warnings" (⚠️) as opportunities to scale out of positions. When price moves parabolically away from the stop line, the probability of a snap-back increases.
4. Managing Chop If the dashboard shows "ADX State: WEAK," expect the stop line to remain wider. This allows the asset "room to breathe" without stopping you out on random volatility.
⚙️ Inputs and Settings
The script is highly customizable to fit different asset classes (Crypto, Forex, Stocks).
● Trend Definitions Trend Filter (EMA Length): Determines the baseline trend bias (Default: 22). Price must be above this EMA to initiate a long calculation.
● Noise Calculation Noise Lookback Period: The number of bars used to calculate average penetration (Default: 10). Base Safety Coefficient: The standard multiplier applied to the noise average (Default: 2.5). Higher values = wider stops. Use Volume Weighting: Enables the volume-adjustment logic. Use 3-Day Smoothing: Recommended keeping this TRUE to avoid stop-hunts.
● Dynamic Multiplier (ADX) Enable Dynamic ADX: Toggles the adaptive multiplier. Strong/Weak Thresholds: The ADX levels that trigger aggressive or conservative multipliers.
● Multi-Timeframe Consensus Higher Timeframe: Select the TF for the cloud background (e.g., Daily or Weekly).
● Exhaustion Warning ATR Multiplier: Defines how far price must be from the stop to trigger a warning (Default: 3.0).
🔍 Deconstruction of the Underlying Scientific and Academic Framework
The "Smart SafeZone" indicator is grounded in the statistical analysis of market noise versus signal.
● Theory of Noise Penetration Conventional stops often use Standard Deviation (Bollinger Bands) or Average True Range (Keltner Channels/Chandelier Stops). While effective, these measures assume volatility is symmetrical. This script adopts the view that directional volatility matters more. In an uptrend, upside volatility is "good" signal, while downside volatility is "noise." By explicitly calculating the average downside penetration (Low - Low), the script isolates the specific counter-trend force acting on the asset. ● Volume-Weighted Price Analysis (VWPA) The inclusion of volume weighting draws upon Dow Theory principles, which state that volume must confirm the trend. Math: Penetration × (Volume / AverageVolume) This formula asserts that a price drop on low volume is statistically less significant than a drop on high volume. By dampening the impact of low-volume moves, the stop becomes more resistant to liquidity vacuums and algorithmic stop-hunts.
● Trend Efficiency (ADX) The integration of J. Welles Wilder’s ADX (Average Directional Index) adds a dimension of Trend Efficiency. High ADX values indicate a highly efficient trend with little retracement. Mathematically, this justifies a lower standard deviation (or noise multiplier) for the stop, as the probability of a deep retracement without a trend change is lower in high-momentum environments.
⚠️ Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. I expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion.
Bands and Channels Laboratory [DAFE]Bands and Channels Laboratory : The Ultimate Volatility & Envelope Engine
40+ Unique Algorithms. The Revolutionary MTF Horizon Display. Smart Kill Zones & Pattern Recognition. This is not just a band indicator; it is the definitive toolkit for mastering market volatility.
█ PHILOSOPHY: BEYOND THE BAND, INTO THE LABORATORY
Standard band indicators like Bollinger Bands or Keltner Channels are built on a simple, powerful idea: price tends to revert to a mean, and its deviation from that mean is a measure of volatility. However, their core calculations are primitive. A simple moving average for the basis and a simple standard deviation for the width are blunt instruments in a market that demands surgical precision and adaptability.
The Bands and Channels Laboratory was not created to be another band indicator. It was engineered to be the final word on volatility and envelope analysis. This is not just an indicator; it is a powerful, interactive research environment. It is a laboratory where you, the trader, can move beyond the static "one-size-fits-all" approach and forge a volatility system that is perfectly synchronized with the unique physics of your market.
We have deconstructed the very concept of a "band," separating it into its three core components— The Basis (Center Line) , The Deviation (Width) , and The Band Type (Envelope Logic) —and rebuilt each one with a library of dozens of advanced algorithms. This modular approach provides an almost infinite number of unique combinations, allowing you to construct a tool that is truly your own.
█ WHAT MAKES THIS THE "ULTIMATE" LABORATORY? THE CORE INNOVATIONS
This tool stands in a class of its own, offering a suite of proprietary features that collectively create an unparalleled analytical experience.
The 40+ Algorithm Core (Modular Engine): This is the heart of the Laboratory. You have independent control over the mathematical engine for each part of the band:
22 Basis Algorithms: Choose anything from a classic SMA to a zero-lag Hull MA, an adaptive KAMA, or a proprietary DAFE engine for your center line.
16 Deviation Algorithms: Move beyond simple standard deviation. Use statistically robust measures like Parkinson Volatility, advanced concepts like the Ulcer Index, or proprietary DAFE engines like "DAFE Dark Matter" to calculate your band width.
14 Band Types: Select the fundamental logic, from Bollinger and Keltner to unique DAFE models like "DAFE Quantum Bands."
The MTF Horizon Display: A revolutionary leap in data visualization. The Horizon projects up to three "holographic" displays of higher-timeframe band metrics (like Bandwidth % or Squeeze State) directly onto your main price chart. You can now see the "Macro Volatility" of the 1-Hour, 4-Hour, and Daily charts without ever leaving your 5-minute screen.
The Smart Kill Zone Engine: The indicator automatically identifies, plots, and tracks high-probability reversal zones. These are not based on simple price pivots. They are generated by identifying price levels where price interacted with the bands on high volume and with significant momentum, marking a true, institutionally defended level.
The Pattern Recognition Engine: The Laboratory isn't just reactive; it's proactive. It automatically detects and labels critical band patterns, including multiple types of Squeezes (Coiling, Compression), strong Walking Bands trends, and subtle Band Divergences that often precede major reversals.
The Visualization Core: Data should be intuitive and beautiful. Choose from 11 distinct, animated, and theme-aware rendering modes . From the glowing "Quantum Field" and flowing "Plasma Storm" to the abstract "Neural Network," you can transform the simple band into interactive data art.
█ A GUIDED TOUR OF THE ALGORITHMIC CORE
This is your library of mathematical DNA. Understanding your tools is the first step to mastery.
THE ENGINE FAMILIES
The Basis Algorithms (Center Line): You have over 22 choices. Replace the lagging SMA with a Hull MA for zero lag, a KAMA for adaptivity, or the DAFE Tensor Cloud for a 4D average of OHLC data. Your center line is now as intelligent as you want it to be.
The Deviation Algorithms (Band Width): You have over 16 choices. Go beyond simple standard deviation. Use advanced statistical measures like Garman-Klass or Yang-Zhang for a more efficient estimate of volatility. Or, deploy proprietary DAFE engines like DAFE Entropy , which widens the bands in chaotic markets, or DAFE Elastic , which resists extreme expansion.
The Band Types: Choose from 14 fundamental logics, including classics like Bollinger Bands, Keltner Channels , and Donchian Channels , as well as proprietary DAFE models like the DAFE Quantum Bands , which use a noise-canceling step function for their width.
█ ACTIONABLE INTELLIGENCE: THE SIGNAL & PATTERN ENGINES
The Laboratory transforms bands from a simple contextual tool into a complete trading framework.
The Signal Engine: You are not limited to one strategy. Choose from eight distinct signal modes, from classic Mean Reversion on a band touch to aggressive Squeeze Breakouts or robust Trend Following signals. The "Smart Composite" mode uses a multi-factor scoring system to identify only the highest quality setups.
The Pattern Engine: This is your early warning system.
Squeeze Classification: It doesn't just tell you there's a squeeze; it classifies its type ("Coiling," "Compression"), giving you insight into the potential energy being stored.
Walking the Bands: It automatically detects when price is "walking" or "riding" the upper or lower band—the signature of an extremely powerful trend.
Band Divergence: It alerts you to subtle but powerful divergences between the trend of the price and the trend of the bandwidth, often signaling trend exhaustion before it's visible in price action.
█ THE MASTER DASHBOARD: YOUR "AT-A-GLANCE" COMMAND CENTER
The professional-grade dashboard provides a comprehensive, real-time summary of the entire volatility system's state.
Position & State: Instantly see the price's position relative to the bands (%B), the current Bandwidth percentage, and the overall Volatility Regime (HIGH, LOW, NORMAL).
Pattern Readout: Get a real-time display of the currently detected band pattern (e.g., "SQUEEZE: COILING," "WALKING UPPER").
Signal Status: Confirms the most recent signal generated by your chosen signal mode and displays its calculated "Strength."
Optimizer Data: When enabled, shows the backtest results of your current settings, including Win Rate, Profit Factor, and a proprietary Robustness Score.
█ DEVELOPMENT PHILOSOPHY
Bands Laboratory Ultra was born from a fascination with the physics of the market: the constant ebb and flow between equilibrium and chaos, compression and expansion. We believe that volatility is not just a risk metric; it is the very energy that drives all market movement. This tool was designed for the serious trader who seeks to understand and harness that energy. It is for the analyst who wants to deconstruct, test, and build a volatility tool that is a perfect extension of their own mind.
This Laboratory is designed to help you be wrong less often by providing a crystal-clear, multi-dimensional view of market volatility, allowing you to filter out low-probability trades and act with precision when the odds are stacked in your favor.
█ DISCLAIMER AND BEST PRACTICES
THIS IS AN ADVANCED ANALYTICAL TOOL: This indicator provides a sophisticated volatility and signal framework. It must be integrated into a complete trading plan that includes your own analysis and risk management.
TEST, DON'T GUESS: The power of this tool is its adaptability. Use the built-in Optimizer Engine to rigorously test different algorithm combinations and settings on your chosen asset and timeframe.
START WITH A ROBUST BASE: A classic "Bollinger Bands" type with a "Hull MA" basis and "Standard Deviation" is an excellent, low-lag starting point. From there, begin experimenting with more advanced deviation methods or basis algorithms.
USE CONFLUENCE: The highest probability signals come from confluence. A "Squeeze Breakout" buy signal that is confirmed by high volume, a bullish ADX, and alignment with the MTF Horizon is an A++ setup.
"In the business of trading, the winner is not the person who is never wrong, but the person who is wrong the least."
— William Eckhardt, Market Wizard
Taking you to school. - Dskyz, Trade with Bands. Trade with Channels. Trade with Bands and Channels Laboratory
GK Trend Ribbon 10L (Ultra Tight) + PREPARE HUDThis upgraded GK Trend Ribbon keeps original ultra tight 10-line trend engine but now adds a Real Time Preparation system to help traders get ready before the signal print
New Additions
Prepare Alerts (Early Warming System)
Before a GK BUY or GK SELL confirms, the indicator now detects when trend conditions are forming and prints
PREPARE GK BUY
PREPARE GK SELL
this gives traders time to: Set lot Sizes
Mark entries
Prepare risk management
Avoid late entries
Live Trend HUD (heads up display)
green Bullish mode
red Bearish mode
grey Neutral/wait
Warning symbol PREPARE GK BUY/SELL when a move is building
this acts like a market control panel keeping traders aligned with the trend direction at all times
CORE ENGINE (unchanged power)
zero lag trend structure
ATR based dynamic bands
1 clean GK BUY/SELL per confirmed trend shift
visual ribbon showing strength and direction
this version improves timing, preparation, and confidence-without adding clutter
this indicator are for educational purposes only
Tanh Clamped Momentum Oscillator [Alpha Extract]A sophisticated momentum measurement system that combines dual EMA trend analysis with volatility-weighted pressure calculations, applying hyperbolic tangent normalization for bounded oscillator output with adaptive signal generation. Utilizing ATR-based volatility regime detection and candle pressure metrics, this indicator delivers institutional-grade momentum assessment with multi-tiered band structure and pulse-based envelope visualization. The system's tanh clamping methodology prevents extreme outliers while maintaining sensitivity to genuine momentum shifts, combined with histogram divergence detection and comprehensive alert framework for high-probability reversal and continuation signals.
🔶 Advanced Dual-Component Momentum Engine
Implements hybrid calculation combining EMA trend differential with candle pressure analysis, weighted by volatility regime assessment for context-aware momentum measurement. The system calculates fast and slow EMA difference normalized by ATR, measures intrabar pressure as close-open relative to range, applies volatility-based weighting between trend and pressure components, and produces composite raw momentum capturing both directional bias and internal candle dynamics.
// Core Momentum Framework
EMA_Fast = ta.ema(src, Fast_Length)
EMA_Slow = ta.ema(src, Slow_Length)
Trend = EMA_Fast - EMA_Slow
// Volatility Regime Detection
ATR_Short = ta.atr(ATR_Length)
ATR_Long = ta.atr(ATR_Length * 2)
Vol_Ratio = ATR_Short / ATR_Long
Vol_Weight = clamp((Vol_Ratio - 0.5) / 1.0, 0, 1)
// Pressure Component
Pressure = (close - open) / (high - low)
// Composite Momentum
Raw = Trend_Normalized * Vol_Weight + Pressure_Scaled * (1 - Vol_Weight)
🔶 Hyperbolic Tangent Normalization Framework
Features sophisticated tanh transformation that clamps raw momentum into bounded range while preserving proportional sensitivity across varying market conditions. The system applies safe exponential calculations with input capping to prevent overflow, computes hyperbolic tangent to compress extreme values while maintaining linearity near zero, and scales output by configurable factor creating oscillator with enhanced dynamic range and reduced outlier distortion.
// Tanh Clamping Logic
tanh(x) =>
x_clamped = clamp(x, -5.0, 5.0)
e = exp(2.0 * x_clamped)
(e - 1.0) / (e + 1.0)
Oscillator = tanh(Smoothed_Momentum / Clamp_Factor) * Scale
🔶 Volatility Regime Weighting System
Implements intelligent volatility assessment comparing short-term and long-term ATR to determine market regime, dynamically adjusting weight between trend and pressure components. The system calculates ATR ratio, normalizes to 0-1 range, and uses this weight factor to emphasize trend component during high-volatility regimes and pressure component during low-volatility consolidations, creating adaptive momentum sensitive to market microstructure.
🔶 Multi-Tiered Band Architecture
Provides comprehensive threshold structure with soft, hard, and maximum bands marking progressive momentum extremes for graduated overbought/oversold assessment. The system establishes configurable levels at soft zones (initial caution), hard zones (strong extreme), and maximum zones (critical overextension) with visual differentiation through line styles and background highlighting, enabling nuanced interpretation beyond binary extreme detection.
🔶 Pulse Envelope Visualization
Features dynamic envelope bands calculated from exponential moving average of absolute oscillator value, creating adaptive boundary that expands during momentum acceleration and contracts during deceleration. The system applies configurable length and width multiplier to pulse calculation, fills area between positive and negative pulse bounds with gradient coloring matching oscillator direction, providing visual context for momentum magnitude relative to recent activity.
🔶 Signal Line Integration Framework
Implements dual-mode signal line supporting both EMA and SMA smoothing of primary oscillator for crossover-based swing detection. The system calculates configurable-length moving average, generates histogram differential between oscillator and signal, applies additional smoothing to histogram for noise reduction, and uses crossovers/crossunders as momentum swing indicators distinguishing bullish and bearish momentum shifts.
🔶 Histogram Divergence Display
Creates column-style histogram visualization showing oscillator-signal differential with intensity-based coloring reflecting momentum acceleration or deceleration. The system plots histogram bars in bright colors when expanding (accelerating momentum) and faded colors when contracting (decelerating momentum), enabling instant visual identification of momentum divergences and convergences without numerical analysis.
🔶 Advanced Reversion Signal Logic
Generates overbought/oversold signals requiring both signal line crossover and extreme threshold breach for high-conviction reversal identification. The system triggers oversold when oscillator crosses above signal while below negative reversion level, triggers overbought when crossing below signal while above positive reversion level, and plots small circle markers at signal locations for clear visual confirmation of setup conditions.
🔶 Comprehensive Alert Framework
Provides six distinct alert conditions covering overbought/oversold reversions, midline trend changes, and oscillator-signal swings with configurable notification preferences. The system includes alerts for extreme reversions (OB/OS), zero-line crossovers (trend changes), and signal line crossovers (momentum swings), enabling traders to monitor critical oscillator events across multiple signal types without constant chart observation.
🔶 Adaptive Bar Coloring System
Implements four coloring modes including midline cross (trend direction), extremities (threshold breach), reversions (OB/OS signals), and slope (oscillator vs signal) for customizable visual integration. The system applies selected color scheme to candles providing chart-level momentum feedback, with option to disable coloring for minimal visual interference while maintaining oscillator pane analysis.
🔶 Performance Optimization Architecture
Utilizes efficient tanh calculation with safe clamping, streamlined EMA computations, and optimized ATR ratio processing for smooth real-time updates. The system includes intelligent null handling, minimal recalculation overhead through smart smoothing application, and configurable display toggles allowing users to disable unused visual elements for enhanced performance during extended historical analysis.
🔶 Why Choose Tanh-Clamped Momentum Oscillator ?
This indicator delivers sophisticated momentum analysis through hybrid trend-pressure calculation with volatility-adaptive weighting and hyperbolic tangent normalization. Unlike traditional momentum oscillators susceptible to extreme outlier distortion, the tanh clamping ensures bounded output while preserving sensitivity to genuine momentum shifts. The system's dual-component architecture combining directional trend with intrabar pressure, weighted by volatility regime assessment, creates context-aware momentum measurement that adapts to market microstructure. The multi-tiered band structure, pulse envelope visualization, and comprehensive signal framework make it essential for traders seeking nuanced momentum analysis with graduated extreme detection and high-probability reversal signals across cryptocurrency, forex, and equity markets.
JEETUNSE@GMAIL.COMOne of the beat intraday traders tool for both option trading and any kind of market situation any kind of script in world
RSI Momentum & Trend Suite - O59 Elite QuantRSI Momentum & Trend Suite – O59 Elite Quant
Professional Market Structure & Momentum Analysis Tool
RSI Momentum & Trend Suite – O59 Elite Quant is a comprehensive technical analysis indicator designed to help traders better understand market momentum, trend structure, price reactions, and key support & resistance zones directly on the chart.
This indicator combines RSI-based momentum analysis, dynamic bar coloring, price action signals, and automatic trend & support/resistance detection into a single, clean visual framework.
🔹 Momentum & Bar Coloring Logic
The indicator includes a custom RSI momentum engine that evaluates short-term price changes and momentum strength.
Candles are automatically colored when momentum reaches critical zones:
Above 70 → Strong bullish momentum
Below 30 → Strong bearish momentum
This candle coloring helps traders instantly recognize momentum extremes without switching to a separate RSI pane.
🔺 Buy & Sell Triangle Signals
The script generates triangle-based buy and sell signals based on a combination of:
RSI oversold / overbought conditions
Short-term price action behavior
Candle structure and confirmation logic
These signals are intended to highlight potential reaction zones, not to predict the market.
They work best when used together with trend direction and support/resistance levels.
📈 Automatic Trend Detection
The indicator automatically identifies ascending and descending trend structures using pivot-based swing analysis.
Trendlines are drawn dynamically based on higher lows and lower highs
Broken trendlines are automatically removed to keep the chart clean
Both bullish and bearish trends are visually distinguished
This allows traders to quickly assess whether the market is trending or losing structure.
🟦 Dynamic Support & Resistance Levels
Key support and resistance levels are detected using recent pivot points:
Levels extend forward in real time
Broken levels are removed automatically
Helps identify potential reaction, rejection, and liquidity zones
These levels are designed to adapt continuously as market structure evolves.
🧾 Information Table & Visual Themes
A customizable information table is displayed on the chart, showing:
Indicator name
Current symbol
Active timeframe
Author branding
Users can choose between multiple visual themes, allowing better readability and personal preference while maintaining a professional appearance.
⚠️ Important Notes & Risk Disclaimer
This indicator is designed as a technical analysis support tool only.
It does not provide financial advice
Signals and visual elements should not be used alone
Always confirm signals with your own strategy, risk management, and market context
⚠️ Special caution is advised during:
Low-volume sessions
Weekend price action
High-impact news events
Thin liquidity hours
Market conditions during these periods may produce false signals or reduced reliability.
📌 Final Disclaimer
This indicator is for educational and analytical purposes only.
It is not investment advice.
All trading decisions remain the sole responsibility of the use
Market Structure & Supply-Demand EngineMarket Structure & Supply-Demand Engine (MSD-Engine) is a professional, non-repainting market structure and supply-demand analysis tool built purely on price action and volatility logic.
This indicator is designed for discretionary traders who want a clean, institutional-style view of market structure without lagging indicators or strategy automation.
🔍 What This Indicator Does
MSD-Engine identifies major structural reversals, plots price-action based supply & demand zones, and provides multi-timeframe confluence in a single, unified framework.
It is visual and analytical only — no strategy orders, no backtesting, and no repainting.
🚀 Core Features
• Non-Repainting Market Structure
Event-based swing reversal detection
ATR-adaptive displacement filtering
Confirmed pivots only (no future leaks)
• Pure Supply & Demand Zones
Candle-structure based zone detection
Volume-weighted zone strength
Automatic invalidation on breach
Configurable zone limits to maintain chart clarity
• Multi-Timeframe Context (MTF)
Chart timeframe structure
Two independent higher-timeframe supply & demand layers
Higher-timeframe directional bias visualization
HTF zones plotted only on confirmed HTF closes
• Volatility-Adaptive Logic
ATR normalized across timeframes
Dynamic reversal thresholds
Stable behavior from scalping to swing charts
• Trendline Lifecycle Tracking
Automatic major trendline construction
Single-fire break detection
Break validation / failure logic
HTF-aligned vs counter-trend classification
🧠 Designed For
• Discretionary price-action traders
• Supply & demand traders
• Market structure & smart-money style analysis
• Multi-timeframe confluence trading
• Futures, indices, forex, crypto, and equities
⚠️ Important Notes
This is NOT a strategy or auto-trading system
No buy/sell signals or performance metrics
No repainting (uses barmerge.lookahead_off)
Educational & analytical use only
📜 Disclaimer
This script is provided for educational and analytical purposes only.
It does not constitute financial advice. Trading financial markets involves risk.
Cumulative Volume Delta[MIT]Cumulative Volume Delta Depth
This indicator provides a simplified approximation of Cumulative Volume Delta based on candlestick structure, helping to estimate short-term aggressive buying vs. selling pressure.
Core Calculation Logic:
Delta ≈ Volume × (Close - Open) / (High - Low)
- Positive Delta when the candle has a strong bullish body (more aggressive buying)
- Negative Delta when the candle has a strong bearish body (more aggressive selling)
- Near zero when the body is very small (indecision / balanced pressure)
Key Features:
- Column chart shows cumulative Delta (resets on new day by default)
- Orange line = smoothed Delta (default 5-period SMA)
- Teal tint for positive values, maroon tint for negative values
- Zero line for easy visual reference of net buying/selling shifts
Use Cases:
- Identify short-term buying/selling dominance
- Spot divergences (e.g. price makes new high but Delta fails to confirm → potential exhaustion)
- Works best on high-volume instruments (futures, crypto, liquid stocks)
Limitations:
- This is an approximation based on OHLC structure, NOT real tick-by-tick order flow
- Long shadows, small bodies, gaps, or low-volume bars may distort the result
- Best used in combination with other volume/price tools (VWAP, OBV, volume spikes, etc.)
Parameters:
- Cumulative Period: Controls lookback/reset logic (default 200 bars)
- Smoothing Period: Length of Delta moving average (default 5)
- Show MA: Toggle orange smoothed line on/off
这是一个基于K线形态粗估的累计成交量Delta指标,用于近似判断短期内主动买方与主动卖方的力量对比。
核心计算逻辑:
Delta ≈ Volume × (Close - Open) / (High - Low)
- 当阳线实体较长时,Delta为正值(偏向买方主动)
- 当阴线实体较长时,Delta为负值(偏向卖方主动)
- 小实体或十字星时Delta接近0
指标特点:
- 柱状图显示累计Delta(可每日重置)
- 橙色线为Delta的平滑均线(默认5周期,可调)
- 正值区域用青色系着色,负值区域用酒红色系着色
- 零轴辅助线,便于观察多空转折
适用场景:
- 辅助判断日内/短线多空力量变化
- 结合价格走势观察是否有背离(价格创新高但Delta不创新高,可能见顶)
- 适合期货、加密货币、活跃股票等成交量较大的品种
局限性:
- 这只是基于K线结构的近似估算,并非真实逐笔方向分类
- 对长影线、小实体K线或跳空行情可能失真
- 建议结合其他量价指标(如VWAP、OBV、成交量放大)一起使用
参数说明:
- 累计周期:控制Delta是否每日/每周重置(默认200根,建议设大值保持连续性)
- 平滑周期:Delta平滑均线的长度(默认5)
- 显示均线:是否显示橙色平滑线
Market Internals SPY[TP]# Market Internals SPY Dashboard - TradingView Publication
## 📊 Overview
**Market Internals SPY ** is a comprehensive multi-factor market sentiment dashboard designed specifically for SPY (S&P 500 ETF) traders. This indicator combines four powerful market breadth signals into one easy-to-read interface, helping traders identify high-probability setups and avoid false breakouts.
---
## 🎯 What Makes This Indicator Unique?
Unlike single-indicator tools, this dashboard synthesizes **multiple market internals** to provide confluence-based trading signals:
- **CPR (Central Pivot Range)** - Institutional pivot levels
- **VIX (Volatility Index)** - Fear gauge
- **Put/Call Ratio** - Options sentiment with dynamic crossover alerts
- ** USI:ADD (Advance/Decline Line)** - Market breadth strength
All presented in a clean, real-time dashboard with visual alerts directly on your chart.
---
## 📈 Key Features
### 1. **Static Daily CPR Levels**
- Automatically plots Top CPR, Pivot, and Bottom CPR
- Levels remain fixed throughout the trading day (no repainting)
- **Trend Bias Indicator**: Green = Current Pivot > Previous Pivot (Bullish structure)
### 2. **Put/Call Ratio Crossover System**
- 10-period SMA smoothing for cleaner signals
- **Bullish Signal** (Green background): Put/Call crosses below SMA
- Indicates decreasing hedging activity (bullish)
- **Bearish Signal** (Red background): Put/Call crosses above SMA
- Indicates increasing hedging activity (bearish)
### 3. **Price/Breadth Divergence Detection**
- **Yellow Candles**: Highlight when price and USI:ADD diverge
- Price rising but USI:ADD falling = Potential reversal
- Price falling but USI:ADD rising = Possible bottom
### 4. **Comprehensive Real-Time Dashboard**
A top-right table displaying:
- **CPR Trend Bias**: Bullish/Bearish structure
- **VIX Level**: Current value + directional bias
- **Put/Call Ratio**: Live value + trend arrows
- **AD Line**: Breadth strength with directional indicators
### 5. **Intelligent Bar Coloring**
- **Green bars**: USI:ADD rising (breadth improving)
- **Red bars**: USI:ADD falling (breadth deteriorating)
- **Yellow bars**: Divergence warning (potential reversal)
---
## 🔧 How to Use
### Setup Instructions
1. **Add to Chart**: Apply to SPY on your preferred intraday timeframe (5m, 15m, 30m, 1H)
2. **Configure Symbols** (if needed):
- Default settings work for most platforms
- If "PCC" doesn't load, try: `PCCR`, `INDEX:PCC`, `USI:PCC`, or `CBOE:PCC`
- Ensure you have market internals data access ( USI:ADD , VIX)
### Trading Signals
#### 🟢 **Bullish Confluence** (High-Probability Long Setup)
- CPR Trend = BULLISH
- VIX falling or low (<20)
- Put/Call below SMA (or green background crossover)
- USI:ADD rising (green bars)
- **Entry**: Look for bullish price action at support levels
#### 🔴 **Bearish Confluence** (High-Probability Short Setup)
- CPR Trend = BEARISH
- VIX rising or elevated (>25)
- Put/Call above SMA (or red background crossover)
- USI:ADD falling (red bars)
- **Entry**: Look for bearish rejection at resistance
#### ⚠️ **Divergence Warning**
- Yellow candles indicate mismatch between price and breadth
- Consider profit-taking or reversals when divergence appears at extremes
### Best Practices
- **Multi-Timeframe Confirmation**: Check higher timeframes (4H, Daily) for trend alignment
- **Volume Confirmation**: Combine with volume analysis for stronger signals
- **Risk Management**: Always use stop losses; no indicator is 100% accurate
- **News Awareness**: Be cautious around major economic releases
---
## 📚 Understanding the Components
### CPR (Central Pivot Range)
Traditional floor trader pivot levels calculated from previous day's High, Low, Close:
- **Pivot (PP)** = (High + Low + Close) / 3
- **Top CPR (TC)** = (PP - BC) + PP
- **Bottom CPR (BC)** = (High + Low) / 2
### VIX (Volatility Index)
- **< 15**: Complacency, potential for sudden moves
- **15-20**: Normal conditions
- **20-30**: Elevated uncertainty
- **> 30**: High fear, potential bottoming process
### Put/Call Ratio
- **< 0.7**: Excessive optimism (contrarian bearish)
- **0.7-1.0**: Balanced sentiment
- **> 1.0**: Defensive positioning (contrarian bullish potential)
### USI:ADD (NYSE Advance/Decline)
- **> 0**: More stocks advancing than declining (bullish breadth)
- **< 0**: More stocks declining than advancing (bearish breadth)
- **Extreme readings** (±2000+): Potential exhaustion
---
## ⚙️ Customization Options
### Input Parameters
- **AD Line Symbol**: Default "ADD" (try "ADVN" or "NYSE:ADD" if needed)
- **VIX Symbol**: Default "VIX" (try "CBOE:VIX" if needed)
- **Put/Call Symbol**: Default "PCC" (alternatives listed above)
### Color Scheme
- Blue: CPR levels
- Purple: Pivot point
- Green: Bullish signals/backgrounds
- Red: Bearish signals/backgrounds
- Yellow: Divergence warnings
---
## 💡 Pro Tips
1. **Wait for Confluence**: Don't trade on a single indicator - wait for 3+ signals to align
2. **Use CPR as Dynamic S/R**: Price tends to react at TC and BC levels
3. **Watch the Crossovers**: Put/Call crossovers often precede significant moves
4. **Monitor Divergences**: Yellow candles at key levels are high-value signals
5. **Combine with Price Action**: This tool confirms direction - you still need entry triggers
---
## ⚠️ Limitations & Disclaimers
- Requires **premium data** for USI:ADD and VIX on most platforms
- Best suited for **intraday SPY trading** (may adapt to other indices)
- **Not a standalone system** - use with proper risk management
- Past performance does not guarantee future results
- Always backtest before live trading
---
## 🎓 Example Scenario
**Bullish Setup**:
- 9:45 AM EST: Price pulls back to Bottom CPR
- Dashboard shows: ✅ Bullish CPR Bias, ✅ VIX 16.5 (falling), ✅ Put/Call 0.68 ⬇️ Bull, ✅ USI:ADD +850 ⬆️
- Green background flashes (Put/Call crossunder)
- **Action**: Enter long at BC with stop below TC of previous day
---
## 📊 Ideal Timeframes
- **Primary**: 5-minute, 15-minute (day trading)
- **Secondary**: 30-minute, 1-hour (swing entries)
- **Confirmation**: Daily chart for trend context
---
## 🔄 Updates & Support
This indicator is actively maintained. If you encounter symbol loading issues:
1. Check your data provider includes market internals
2. Try alternative symbols in inputs
3. Ensure you're using a premium TradingView plan (if required)
---
## 📝 Version Information
- **Version**: 5 (Pine Script v5)
- **Type**: Overlay Indicator
- **Author**: tapaspattanaik
- **Category**: Market Internals / Breadth Analysis
---
## 🏆 Final Thoughts
This indicator is designed for **serious traders** who understand that edge comes from confluence, not single signals. By combining institutional pivot levels with real-time market internals, you gain a significant advantage in reading market sentiment and timing entries with precision.
**Remember**: The best trades happen when multiple independent factors align. Use this dashboard to find those moments.
---
## 📌 How to Add This Indicator
1. Open TradingView and navigate to Pine Editor
2. Copy the complete script code
3. Click "Add to Chart"
4. Configure symbols if needed (see Setup Instructions above)
5. Adjust position/colors to your preference
---
**Happy Trading! 📈**
*This indicator is for educational purposes. Always manage risk appropriately and never risk more than you can afford to lose.*
---
### Tags
`#SPY` `#MarketInternals` `#CPR` `#VIX` `#PutCallRatio` `#BreadthAnalysis` `#DayTrading` `#SwingTrading` `#TechnicalAnalysis` `#PivotPoints`
LDEF SENS Loss Dependent Error Filter Dominance Regime SwitchCAPITALCOM:GOLD
LDEF SENS stands for Loss Dependent Error Filter. This indicator is a dominance regime filter with an adaptive switch boundary. It separates the market into two main states.
Directional tradeable tape (trend and impulse conditions)
Balanced noisy tape (higher fakeout probability)
It also provides a dominance direction bias (bull vs bear) and an adaptive boundary you can use as a market switch signal.
What you see in the indicator pane (bottom panel)
Main line (0 to 100): dominance sensitivity score
Line color meaning
Green: bullish dominance (L greater than R)
Red: bearish dominance (R greater than L)
Gray: low strength or mixed tape
Purple line: adaptive regime boundary (moving threshold)
Violet shading: regime ON (tradeable conditions)
Key idea: height equals strength, color equals direction, violet shading equals regime state.
How to read the three images
Image A - Regime ON in a trending environment
Where to look
Price panel: left to middle shows a clean up move
Indicator panel: directly below the same time window
Violet band is present for a sustained stretch
Main line stays high and mostly green
What it means
When the violet band stays ON, the tape is directional enough for trend following setups to have higher quality. This is not an entry signal. It is an environment filter.
Image B - Switch boundary and state changes
Where to look
Indicator panel: focus on the purple adaptive line and the main line crossing relative to it
Watch the moment the main line moves above the purple line. In the same region, violet shading turns ON.
What it means
The purple line is the adaptive regime boundary.
Cross above: regime switches toward directional tape (state change confirmation)
Cross below: regime fades and chop risk returns
Image C - Direction semantics inside a regime
Where to look
Indicator panel: inside violet shaded regions
Main line is green during bullish dominance (L greater than R)
Main line is red during bearish dominance (R greater than L)
What it means
Violet answers: is this a tradeable regime
Green or red answers: which side is dominating
Together, they provide a filter plus bias framework.
Practical usage
Regime filter
Prefer setups only when the violet band is ON
Reduce size or tighten criteria when the violet band is OFF
Direction bias
Prefer longs when the line is green
Prefer shorts when the line is red
Treat gray as no edge or mixed tape
Switch boundary analysis
Cross above purple: treat as regime shift confirmation
Cross below purple: treat as regime cooling off and higher chop risk
Limitations
This is a regime and dominance tool, not a standalone entry generator. Regime confirmation can be late by design, especially after shocks. Use it with structure, liquidity, and risk management.
ATR-Based Z-Score (with Signal Line)The ATR-Based Z-Score is an advanced, volatility-normalized oscillator designed to identify extreme price deviations more reliably than the standard Z-Score.
By replacing the traditional Standard Deviation with the Average True Range (ATR) in the denominator, this indicator eliminates the "volatility paradox" where rapid price spikes cause standard oscillators to prematurely return to zero, even as the price continues to crash.
Why this version is superior
In a classic Z-Score calculation:
Z = (Price - SMA) / (Standard Deviation)
A sudden impulsive price drop causes the Standard Deviation to explode. Because you are dividing by a rapidly increasing number, the Z-Score often "rises" while the price is still falling.
The ATR-Based Solution:
Z = (Price - SMA) / ATR
By using a long-period ATR as the denominator, the volatility measure remains stable and "clean." This ensures that the indicator’s troughs align much more accurately with actual price bottoms, staying in the oversold territory until the momentum truly shifts.
Key Features
Volatility Cleaning: The ATR-normalization prevents the indicator from "flattening out" during impulsive price movements.
Integrated Signal Line: A customizable Moving Average of the Z-Score values helps filter noise and confirms entry/exit points.
Independent Periods: You can set the Price MA (responsiveness) and the ATR (volatility baseline) separately to fine-tune the indicator to different timeframes.
How to Trade with it
1. Mean Reversion (Buy the Dip / Sell the Rip)
Long: Wait for the Z-Score to drop below a significant level (e.g., -10.0). Enter when the Z-Score crosses back above its Signal Line.
Short: Wait for the Z-Score to rise above +10.0 and enter when it crosses below the Signal Line.
2. Breakout Trading
A strong push of the Z-Score beyond the +/- 7.0 levels can indicate a powerful trend breakout.
In this case, the Signal Line crossover serves as an effective Exit Signal, telling you that the initial momentum of the breakout is fading.
Summary
✅ This indicator is designed for traders who find standard oscillators too "nervous" during volatile periods. By decoupling price deviation from immediate variance spikes, the ATR-Based Z-Score provides a rock-solid foundation for identifying true market extremes and high-probability reversal points.
Dual Red Volume Reversal IndicatorThis indicator works by watching volume patterns
first a small green volume
followed by 2 large red volumes
followed by a small green volume
indicates potential reversal
Relative Strength Leadership Engine v2.0Relative Strength Leadership Engine v2.0OverviewThe Relative Strength Leadership Engine v2.0 is a context-first diagnostic tool designed to identify true market leadership. Instead of simple ratio lines, this script employs a multi-layered scoring model to determine if a symbol is truly outperforming its benchmark (e.g., SPY) or simply riding market beta.The Problem It SolvesMany relative strength indicators fail to distinguish between idiosyncratic leadership and market correlation. A stock might look strong simply because it is a high-beta names moving in lockstep with a rising index. This engine uses Pearson Correlation Filtering and Volatility Normalization to decouple these factors.How It Works (The Math)To ensure full transparency for the TradingView community, the "Leadership Score" (0–100) is calculated based on four proprietary technical pillars:Baseline Alignment (30 pts): Measures if the $Price / Benchmark$ ratio is above its 21-period EMA.Volatility-Normalized Momentum (25 pts): We calculate a Z-score of the RS slope and divide it by the asset's ATR % of price. This ensures momentum is measured by "clean" price action rather than high-beta volatility spikes.Beta-Decoupling (20 pts): Using ta.correlation, the script penalizes "Market Huggers." Points are awarded when a stock shows strength independent of the benchmark's immediate fluctuations.Freshness & Highs (25 pts): Points are awarded for proximity to 252-day relative strength highs, identifying stocks entering a "Power Zone" of leadership.Interpreting the StatesThe dashboard in the bottom-right identifies three distinct permission states:ENGAGE (Score 80+): Full leadership permission. The asset is outperforming with idiosyncratic strength and clean momentum (See FDX example in the gallery).OBSERVE (Score 50–79): Leadership is present but aging or overly correlated to the market (See MU example in the gallery).STAND DOWN (Score <50): Leadership is broken; the asset is a relative laggard (See CBLL example in the gallery).Technical FeaturesMulti-Timeframe Validation: Optional Weekly/Monthly RS confirmation to filter out "noise."Benchmark Timing Filter: A built-in gate that checks if the broader market (Benchmark) is in a "Risk-Off" regime.Non-Repainting: All security calls use lookahead=barmerge.lookahead_off to ensure historical accuracy.Customizable UI: Toggle the dashboard on/off via the "Style" menu for a cleaner workspace.DisclaimerThis script is an informational diagnostic tool and does not generate trade signals, entries, or exits. Educational use only.
Core IC 2.0
## 📌 NIFTY Weekly Option Seller — Core Regime & Risk Framework
This indicator is designed for **systematic weekly option selling on NIFTY**, focused on **Iron Condors (IC), Put Credit Spreads (PCS), and Call Credit Spreads (CCS)**.
It is **not a scalping tool** and **not a signal generator**.
Instead, it provides a **structured decision framework** to help option sellers decide:
* *What structure to deploy* (IC / PCS / CCS)
* *How aggressive to be* (position size & distance)
* *When to adjust* (defend / harvest / regime change)
---
## 🔍 What the Indicator Does
### 1️⃣ Market Regime Detection
The script continuously evaluates the market and classifies it into one of three regimes:
* **IC (Range / Mixed)** – neutral, mean-reverting conditions
* **PCS (Trend Up)** – bullish trend continuation
* **CCS (Trend Down)** – bearish trend continuation
Regime selection is based on:
* EMA structure
* ADX (trend strength)
* VWAP positioning
* Higher timeframe (daily) trend alignment
---
### 2️⃣ Independent Conviction Scores
The indicator computes **three independent scores (0–5)**:
```
IC / PCS / CCS
```
These scores represent **conviction strength**, not trade signals.
* Higher score = stronger suitability for that structure
* All three scores are always visible for transparency
Only **one active score** (based on the current regime) is used for:
* Position sizing
* Strike distance suggestions
* Risk management logic
---
### 3️⃣ Risk-First Position Guidance
Based on the active score, the indicator suggests:
* **Position Size** (100% / 50% / 25%)
* **Short strike distance** (ATR-based, dynamic)
* **Defend / Harvest conditions**
* **Regime change alerts**
This helps traders remain **consistent and disciplined**, especially during volatile weeks.
---
### 4️⃣ Visual Decision Panel
A compact panel displays all key information at a glance:
* Regime (IC / PCS / CCS)
* ATR & ADX
* Suggested size
* Suggested short distance
* IC / PCS / CCS scores
* Key reference levels (H3 / L3, VWAP)
No guesswork, no over-trading.
---
## 🕒 Recommended Usage
* **Best timeframe:** 1H or 4H
* **Ideal style:** End-of-day or limited-check traders
* **Designed for:** Weekly option sellers (not intraday scalpers)
Adjustments are intended to be made **at fixed checkpoints**, not every candle.
---
## ⚠️ Important Notes
* This is **not financial advice**
* The indicator does **not place trades**
* Works best when combined with:
* Defined stop-loss rules
* Fixed risk-reward discipline
* Proper position sizing
---
## 🎯 Who This Is For
✔ Rule-based option sellers
✔ Traders focused on consistency over excitement
✔ Professionals who value structure and risk control
❌ Not for discretionary scalpers
❌ Not for beginners without options knowledge
Volume Weighted LR Z ScoreThis indicator calculates the Volume Weighted Linear Regression
Z-Score (VWLRZS). Unlike a standard Z-Score which measures
deviation from a static mean, this oscillator measures the
statistical distance of price from a dynamic Volume-Weighted
Linear Regression Line (Analysis of Residuals).
Key Features:
1. **Volatility Decomposition:** The indicator separates volatility
based on the 'Estimate Bar Statistics' option.
- **Standard Mode (`Estimate Bar Statistics` = OFF):** Calculates
standard Regression Residuals using the selected `Source`
for both the regression line (baseline) and the signal.
- **Decomposition Mode (`Estimate Bar Statistics` = ON):**
Uses a hybrid statistical approach:
a) **The Model (Baseline):** Uses an estimator to calculate
the 'within-bar' mean and fits the Linear Regression
through these statistical centers. This creates a
stable, trend-following expectation model.
b) **The Signal (Observation):** Compares the actual `Source`
(e.g., Close) against this regression line.
(Result: A Z-Score that measures deviations from the current
trend slope rather than a flat average).
2. **Visual Decomposition Logic:** Total Standard Deviation (of
Residuals) is the primary metric displayed. Since Standard
Deviations are not linearly additive (sqrt(a+b) != sqrt(a)+sqrt(b)),
this indicator calculates the *exact* Total Z-Score and partitions
the area underneath based on the Variance Ratio. This ensures the
displayed total volatility remains mathematically accurate while
showing relative composition.
3. **Normalization (Exponential Regression):** Includes an optional
'Normalize' mode. When enabled, the indicator calculates the
Linear Regression on logarithmic data. Mathematically, this
transforms the baseline into an **Exponential Regression Curve**,
making it ideal for analyzing assets with compounding growth
characteristics (constant percentage trend).
4. **Full Divergence Suite (Class A, B, C):** The indicator's
primary feature is its integrated divergence engine. It
automatically detects and plots all three major divergence
classes between price and the Z-Score:
- Regular (A): Signals potential trend exhaustion and reversals.
- Hidden (B): Signals potential trend continuations during pullbacks.
- Exaggerated (C): Signals weakness at double tops/bottoms.
5. **Divergence Filtering and Visualization:**
- **Price Tolerance Filter:** Divergence detection is enhanced
with a percentage-based price tolerance (`pivPrcTol`) to
filter out insignificant market noise, leading to more
robust signals.
- **Persistent Visualization:** Divergence markers are plotted
for the entire duration of the signal and are visually
anchored to the oscillator level of the confirming pivot.
- **Flexible Pivot Algorithms:** Supports various underlying
mathematical models for pivot detection provided by the
core library
6. **Note on Confirmation (Lag):** Divergence signals rely on a
pivot confirmation method to ensure they do not repaint.
- The **Start** of a divergence is only detected *after* the
confirming pivot is fully formed (a delay based on
`Pivot Right Bars`).
- The **End** of a divergence is detected either instantly
(if the signal is invalidated by price action) or with
a delay (when a new, non-divergent pivot is confirmed).
7. **Multi-Timeframe (MTF) Capability:**
- **MTF Calculation:** The Z-Score line *itself* can be calculated on a
higher timeframe, with standard options to handle gaps
(`Fill Gaps`) and prevent repainting (`Wait for...`).
- **Limitation:** The Divergence detection engine (`pivDiv`)
is designed for the active timeframe. Using it in MTF mode
is not recommended as step-data can lead to inaccurate
pivot detection.
8. **Integrated Alerts:** Includes a comprehensive set of built-in
alerts for the Z-Score crossing the neutral line, the configured
Threshold levels, and the start/end of all divergence types.
---
**DISCLAIMER**
1. **For Informational/Educational Use Only:** This indicator is
provided for informational and educational purposes only. It does
not constitute financial, investment, or trading advice, nor is
it a recommendation to buy or sell any asset.
2. **Use at Your Own Risk:** All trading decisions you make based on
the information or signals generated by this indicator are made
solely at your own risk.
3. **No Guarantee of Performance:** Past performance is not an
indicator of future results. The author makes no guarantee
regarding the accuracy of the signals or future profitability.
4. **No Liability:** The author shall not be held liable for any
financial losses or damages incurred directly or indirectly from
the use of this indicator.
5. **Signals Are Not Recommendations:** The alerts and visual signals
(e.g., crossovers) generated by this tool are not direct
recommendations to buy or sell. They are technical observations
for your own analysis and consideration.
Beta Coefficient & RSI Table (Midcaps vs Majors)Beta Coefficient & RSI Table (Midcaps vs Majors)
This script builds a comprehensive beta comparison framework between midcap assets and majors for benchmarks, enhanced with a simple RSI midline strategy for clean entry and exit signaling.
In addition to beta-based relative analysis, the script:
Computes raw RSI values on midcap assets for standalone trend qualification
Evaluates every midcap/major ratio combination using the same RSI-based regime logic
Produces binary (0 / 1) signals suitable for systematic filtering and automation
Designed with automation in mind, this script is perfect for daily alerts that can send webhooks externally, and is fully compatible to reliably daily close updates for:
Ratio beta comparisons (midcaps vs majors)
Binary RSI crossover signals on each ratio
Base midcap trend state (RSI > 45 indicating an active uptrend) - 45 made for a slightly faster entry signal if used as a preliminary filter
This makes the table ideal for automated system building, signal aggregates, and hands-off portfolio logic.
Full credits to @MarktQuant and @NianiaFrania🐸 for the original script source.
Volume Weighted Z ScoreThis indicator calculates the Volume Weighted Z-Score (VWZS), a
statistical oscillator that measures the number of standard deviations
the price is removed from its mean. It combines robust volatility
decomposition with advanced divergence detection.
Key Features:
1. **Volatility Decomposition:** The indicator separates volatility
based on the 'Estimate Bar Statistics' option.
- **Standard Mode (`Estimate Bar Statistics` = OFF):** Calculates
a simple (Volume-Weighted) Standard Deviation using the
selected `Source` for both the baseline and the signal.
- **Decomposition Mode (`Estimate Bar Statistics` = ON):**
Uses a hybrid statistical approach:
a) **The Model (Baseline):** Uses an estimator to calculate
the 'within-bar' mean and volatility. This creates a
stable, mathematically idealized expectation value (mu).
b) **The Signal (Observation):** Compares the actual `Source`
(e.g., Close) against this statistical baseline.
(Result: A Z-Score that combines a noise-filtered trend
baseline with a highly reactive price signal).
2. **Visual Decomposition Logic:** Total Standard Deviation is the
primary metric displayed. Since Standard Deviations are not
linearly additive (sqrt(a+b) != sqrt(a)+sqrt(b)), this indicator
plots the *exact* Total StdDev and partitions the area underneath
based on the Variance Ratio. This ensures the displayed total
volatility remains mathematically accurate while showing relative
composition.
3. **Normalization (Geometric Average):** Includes an optional
'Normalize' mode. When enabled, the indicator uses a
Geometric Moving Average (GMA) as its baseline and applies a
statistical correction for the log-normal distribution
ensuring symmetry between upside and downside movements.
4. **Full Divergence Suite (Class A, B, C):** The indicator's
primary feature is its integrated divergence engine. It
automatically detects and plots all three major divergence
classes between price and the Z-Score:
- Regular (A): Signals potential trend exhaustion and reversals.
- Hidden (B): Signals potential trend continuations during pullbacks.
- Exaggerated (C): Signals weakness at double tops/bottoms.
5. **Divergence Filtering and Visualization:**
- **Price Tolerance Filter:** Divergence detection is enhanced
with a percentage-based price tolerance (`pivPrcTol`) to
filter out insignificant market noise, leading to more
robust signals.
- **Persistent Visualization:** Divergence markers are plotted
for the entire duration of the signal and are visually
anchored to the oscillator level of the confirming pivot.
- **Flexible Pivot Algorithms:** Supports various underlying
mathematical models for pivot detection provided by the
core library
6. **Note on Confirmation (Lag):** Divergence signals rely on a
pivot confirmation method to ensure they do not repaint.
- The **Start** of a divergence is only detected *after* the
confirming pivot is fully formed (a delay based on
`Pivot Right Bars`).
- The **End** of a divergence is detected either instantly
(if the signal is invalidated by price action) or with
a delay (when a new, non-divergent pivot is confirmed).
7. **Multi-Timeframe (MTF) Capability:**
- **MTF Calculation:** The Z-Score line *itself* can be calculated on a
higher timeframe, with standard options to handle gaps
(`Fill Gaps`) and prevent repainting (`Wait for...`).
- **Limitation:** The Divergence detection engine (`pivDiv`)
is designed for the active timeframe. Using it in MTF mode
is not recommended as step-data can lead to inaccurate
pivot detection.
8. **Integrated Alerts:** Includes a comprehensive set of built-in
alerts for the Z-Score crossing the neutral line, the configured
Threshold levels, and the start/end of all divergence types.
---
**DISCLAIMER**
1. **For Informational/Educational Use Only:** This indicator is
provided for informational and educational purposes only. It does
not constitute financial, investment, or trading advice, nor is
it a recommendation to buy or sell any asset.
2. **Use at Your Own Risk:** All trading decisions you make based on
the information or signals generated by this indicator are made
solely at your own risk.
3. **No Guarantee of Performance:** Past performance is not an
indicator of future results. The author makes no guarantee
regarding the accuracy of the signals or future profitability.
4. **No Liability:** The author shall not be held liable for any
financial losses or damages incurred directly or indirectly from
the use of this indicator.
5. **Signals Are Not Recommendations:** The alerts and visual signals
(e.g., crossovers) generated by this tool are not direct
recommendations to buy or sell. They are technical observations
for your own analysis and consideration.
ADR% - Average Daily Range % by TrinhDuongSMWThe ADR% (Average Daily Range Percentage) is a volatility measurement tool designed to help traders understand the typical price movement of a stock over a specific period. Unlike the standard ATR (Average True Range) which uses absolute price points, ADR% expresses volatility as a percentage of the stock's price, making it easier to compare volatility across different tickers regardless of their share price.
Multiple Factor Adaptive MA SuperTrendMultiple Factor Adaptive MA SuperTrend
Multiple Factor Adaptive MA SuperTrend is an enhanced trend-following overlay that builds on the classical SuperTrend concept by introducing an adaptive moving-average base. The indicator dynamically adjusts to changing market conditions to produce smoother and faster trend signals, helping traders better track directional moves while reducing unnecessary noise.
Instead of relying on a fixed moving-average base, the indicator updates its baseline only when market conditions justify it. This creates a stabilizing effect during consolidation while allowing quicker reactions when volatility, momentum, or activity increases.
🔍 How It Works
The indicator combines:
• A user-selectable Moving Average as the core trend base
• ATR-based volatility bands to detect trend transitions
• An adaptive filter that determines when the base should update
The adaptive mechanism evaluates market conditions using one of several selectable drivers:
• ATR expansion (volatility increase)
• Rate-of-change acceleration
• Rising trading volume
• Increasing divergence between price and the moving average
If the chosen condition signals increased activity or market change, the moving-average base updates normally. Otherwise, the previous base value is retained, effectively smoothing the trend structure and filtering minor fluctuations.
Volatility bands are then calculated around this adaptive base using ATR multiplied by a configurable factor. Trend changes occur when price crosses these bands.
When price breaks above the upper band, a bullish trend is activated and the lower band becomes the trailing support. When price breaks below the lower band, a bearish trend is activated and the upper band acts as trailing resistance.
⚙️ Key Features
• Adaptive moving-average baseline
• Multiple MA types including SMA, EMA, WMA, HMA, VWMA, DEMA, TEMA, and EWMA
• ATR-based volatility bands
• Multiple adaptation modes (volatility, momentum, volume, divergence)
• Reduced noise during consolidation phases
• Smooth trend visualization and transition markers
🧩 Inputs Overview
• Moving-average type and length
• Price source selection
• ATR length and multiplier
• Adaptive filter method selection
📌 Usage Notes
• Useful for identifying prevailing market direction and trend shifts.
• Adaptive filtering can help reduce false signals during sideways markets.
• Signals may update intrabar on lower timeframes.
• Best results are achieved when combined with confirmation tools or risk management rules.
• This script is intended for analytical purposes and does not provide financial advice.
Adaptive MA SuperTrendAdaptive MA SuperTrend
Adaptive MA SuperTrend is a trend-following overlay indicator designed to deliver smoother and more responsive signals than the classical SuperTrend by dynamically combining two moving averages with volatility-based band calculations.
Instead of relying on a single average, the script calculates a selectable pair of moving averages and continuously assigns them as the upper or lower base depending on which value is greater at each bar. This adaptive swapping allows the structure to respond better to changing market conditions while preserving overall trend stability.
A volatility component is then added to the bases using either:
• Average True Range (ATR)
• Standard Deviation (SD)
The selected volatility measure is multiplied by a configurable factor to create adaptive bands around the moving-average bases. Price crossing these bands determines trend direction changes.
When price crosses above the upper band, the trend switches bullish and the lower band becomes the trailing support line. When price crosses below the lower band, the trend switches bearish and the upper band becomes the trailing resistance line. Only the active trend side is plotted to reduce visual noise and improve chart clarity.
Multiple moving-average pair options are provided, allowing users to choose combinations that match their preferred balance between smoothness and responsiveness, including SMA, EMA, WMA, HMA, VWMA, DEMA, TEMA, and ALMA-based combinations. Additional parameters are available when ALMA is selected.
⚙️ Key Features
• Adaptive swapping between two moving averages
• Choice of MA pairs with different responsiveness profiles
• ATR or Standard Deviation volatility bands
• Configurable volatility length and multiplier
• Optional ALMA tuning parameters
• Trend visualization with color-coded support/resistance lines
• Signal markers displayed on trend transitions
🧩 Inputs Overview
• Moving average pair selection
• Moving average length and price source
• Volatility method, length, and multiplier
• Optional ALMA offset and sigma parameters
📌 Usage Notes
• Designed to help visualize prevailing trend direction and potential trend shifts.
• Can be combined with confirmation tools or risk management rules within broader strategies.
• Signals are generated when price crosses volatility-adjusted moving-average bands; signals may update intrabar, especially on lower timeframes.
• This script is intended for analytical purposes and does not constitute financial advice. Users should test and validate performance within their own workflow before applying it to live trading.
Break asian range break alerts
- stratégie break ou réintégration possible avec alertes intégrées .
asian range break






















