Stochastic Z-Score [AlgoAlpha]🟠 OVERVIEW
This indicator is a custom-built oscillator called the Stochastic Z-Score , which blends a volatility-normalized Z-Score with stochastic principles and smooths it using a Hull Moving Average (HMA). It transforms raw price deviations into a normalized momentum structure, then processes that through a stochastic function to better identify extreme moves. A secondary long-term momentum component is also included using an ALMA smoother. The result is a responsive oscillator that reacts to sharp imbalances while remaining stable in sideways conditions. Colored histograms, dynamic oscillator bands, and reversal labels help users visually assess shifts in momentum and identify potential turning points.
🟠 CONCEPTS
The Z-Score is calculated by comparing price to its mean and dividing by its standard deviation—this normalizes movement and highlights how far current price has stretched from typical values. This Z-Score is then passed through a stochastic function, which further refines the signal into a bounded range for easier interpretation. To reduce noise, a Hull Moving Average is applied. A separate long-term trend filter based on the ALMA of the Z-Score helps determine broader context, filtering out short-term traps. Zones are mapped with thresholds at ±2 and ±2.5 to distinguish regular momentum from extreme exhaustion. The tool is built to adapt across timeframes and assets.
🟠 FEATURES
Z-Score histogram with gradient color to visualize deviation intensity (optional toggle).
Primary oscillator line (smoothed stochastic Z-Score) with adaptive coloring based on momentum direction.
Dynamic bands at ±2 and ±2.5 to represent regular vs extreme momentum zones.
Long-term momentum line (ALMA) with contextual coloring to separate trend phases.
Automatic reversal markers when short-term crosses occur at extremes with supporting long-term momentum.
Built-in alerts for oscillator direction changes, zero-line crosses, overbought/oversold entries, and trend confirmation.
🟠 USAGE
Use this script to track momentum shifts and identify potential reversal areas. When the oscillator is rising and crosses above the previous value—especially from deeply negative zones (below -2)—and the ALMA is also above zero, this suggests bullish reversal conditions. The opposite holds for bearish setups. Reversal labels ("▲" and "▼") appear only when both short- and long-term conditions align. The ±2 and ±2.5 thresholds act as momentum warning zones; values inside are typical trends, while those beyond suggest exhaustion or extremes. Adjust the length input to match the asset’s volatility. Enable the histogram to explore underlying raw Z-Score movements. Alerts can be configured to notify key changes in momentum or zone entries.
Ketidakstabilan
Lorentzian Theory Classifier🧮 Lorentzian Theory Classifier: An Observatory for Market Spacetime
Transcend the flat plane of traditional charting. Enter the curved, dynamic reality of market spacetime. The Lorentzian Theory Classifier (LTC) is not an indicator; it is a computational observatory. It is an instrument engineered to decode the geometry of market behavior, revealing the hidden curvatures and resonant frequencies that precede significant turning points.
We discard the outdated tools of Euclidean simplicity and embrace a more profound truth: financial markets, much like the cosmos described by general relativity, are governed by a fabric that is warped by the mass of participation and the energy of volatility. The LTC is your lens to perceive this fabric, to move beyond predicting lines on a chart and begin reading the very architecture of probability.
The Resonance Manifold: Standard Euclidean models search for historical analogues within a rigid sphere, missing the crucial outliers that define market extremes. The LTC's Lorentzian Resonance engine operates in a curved, non-Euclidean space, allowing it to connect with these "fat-tail" events—the true genesis points of major reversals.
🌌 THE THEORETICAL FRAMEWORK: A new Grand Unified Theory of Market Analysis
The LTC is built upon a revolutionary synthesis of concepts from special relativity, quantum mechanics, and information theory. It reframes market analysis not as a problem of forecasting, but as a problem of state recognition in a non-Euclidean manifold.
1. The Lorentzian Kernel: The Mathematics of Reality
Financial markets are not Gaussian. Their reality is one of "fat tails"—sudden, high-impact events that standard models dismiss as anomalies. The LTC acknowledges this reality by using the mathematically pure and robust Lorentzian kernel as its core engine:
Similarity(x, y) = 1 / (1 + (||x − y||² / γ²))
||x − y||²: The squared distance between the current market state (x) and a historical state (y) in our 8-dimensional feature space.
γ (Gamma): A dynamic bandwidth parameter, our "Lorentz factor," which adapts to market entropy (chaos). In calm markets, gamma is small, demanding precise resonance. In chaotic markets, gamma expands, intelligently seeking broader patterns.
This heavy-tailed function is revolutionary. It correctly assigns profound significance to the rare, extreme events that truly define market structure, while gracefully tuning out the noise of mundane price action. It doesn't just calculate; it understands context.
2. The 8-Dimensional State Vector: The Market's Quantum Fingerprint
To achieve a holistic view, the LTC projects the market onto an 8-dimensional Hilbert space, where each dimension represents a critical "observable":
Momentum & Acceleration (f_rsi, f_roc): The market's velocity and its rate of change.
Cyclical Position (f_stoch, f_cci): The market's location within its recent oscillation cycles.
Energy & Participation (f_vol, f_cor): The force of capital flow and its harmony with price.
Chaos & Uncertainty (f_ent, f_mom): The degree of randomness and the standardized force of price changes.
These are not eight separate indicators. They are entangled properties of a single "market wavefunction." The LTC's genius lies in measuring the geometric distance between these complete quantum states.
3. The k-NN Oracle: A Council of Past Universes
The LTC employs a k-Nearest Neighbors algorithm, but in our curved Lorentzian spacetime. It poses a constant, profound question: " Which moments in history are most geometrically congruent to the present moment across all eight dimensions? "
It then summons a "council" of these historical neighbors. Each neighbor's future outcome (did price ascend or descend?) casts a vote, weighted by its resonant similarity. The result is a probabilistic forecast of stunning clarity:
Prognosis: The final weighted consensus on future direction.
Assurance: The degree of unanimity within the council—a direct measure of the prediction's confidence.
The Funnel of Conviction: The LTC's process is a rigorous distillation of information. Raw, chaotic market data is resolved into a clean 8-dimensional state vector. The Lorentzian Kernel filters these states for resonance, which are then passed to the k-NN Oracle for a vote. Noise is eliminated at each stage, resulting in a single, validated, high-conviction signal.
⚙️ THE COMMAND CONSOLE: A Guide to Calibrating Your Observatory
Mastering the LTC's inputs is to become an architect of your own analytical universe. Each parameter is a dial that tunes the observatory's focus, from galactic structures to subatomic fluctuations. The tooltips in-script—over 6,000 words of documentation—provide immediate reference; this guide provides the philosophy.
A summarized guide to the Core, Signal, Supreme, and Visual controls is included directly in the indicator's code and tooltips. We encourage all users to explore these settings to tune the LTC to their unique analytical style.
🏆 THE SUPREME DASHBOARD: Your Mission Control
The dashboard is not a data table; it is your command interface with market reality. It translates the intricate dance of probabilities and vectors into clear, actionable intelligence.
⚡ ORACLE STATUS
Prognosis: The primary directional vector. Its color, magnitude, and emoji (⚡) reveal the strength and conviction of the Oracle's forward guidance.
Assurance: A real-time gauge of prediction quality, from "LOW" (high uncertainty) to "ELITE" (overwhelming statistical consensus). Interpret this as your core risk metric: trade with conviction when Assurance is ELITE; trade with caution when it is LOW.
🔮 RESONANCE ANALYSIS
Chaos: A direct measurement of market entropy. "LOW CHAOS" signifies a predictable, orderly regime. "HIGH CHAOS" is a warning of randomness and unpredictability, where trend-following logic may fail.
Turbulence: A measure of raw volatility. When the market is "TURBULENT," expect wider price swings and increased risk. Use this metric to adjust stop-loss distances and profit targets dynamically.
🏆 PERFORMANCE & ⚔️ GUARD METRICS
These sections provide illustrative statistics on the script's recent historical behavior. Metrics like Yield Ratio and Guard Index offer a quick heuristic on the prevailing risk-reward environment. Crucially, these are for observational context only and are not a substitute for your own rigorous testing and analysis.
🎨 THE VISUAL MANIFESTATION: Charting the Unseen
The LTC's visuals are designed to transform your chart from a 2D price graph into a 4D informational battlespace.
The Dynamic Aura (Background Color): This is the ambient energy field of the market. A luminous green (Ascend) signifies a bullish resonance field; a deep red (Descend) indicates bearish pressure.
The Assurance Shroud (Blue Bands): A visualization of confidence. When the shroud is wide and expansive , the Oracle's vision is clear and its predictions are robust.
The Prognosis Arc (Curved Line): A geodesic projection of the market's most likely path, based on the current Prognosis.
The Turbulence Cloud (Orange Mist): A visual warning system for market chaos. When this entropic mist expands , it is a clear sign that you are navigating a nebula of high unpredictability.
Oracle Markers (▲▼): The final, validated signals. These are not merely pivot points. They are moments in spacetime where a structural pivot has been confirmed and then ratified by a high-conviction vote from the Lorentzian Oracle. They are the pinnacles of confluence.
The Analyst's Observatory: The LTC transforms your chart into a command center for market analysis, providing a complete, at-a-glance view of market state, risk, and probabilistic trajectory.
🔧 THE ARCHITECT'S VISION: From a Blank Slate to a New Cosmos
The LTC was not assembled; it was derived. It began not with code, but with first principles, asking: "If we were to build an instrument to measure the market today, unbound by the technical dogmas of the 20th century, what would it look like?" The answer was clear: it must be multi-dimensional, it must be adaptive, and it must be built on a mathematical framework that respects the "fat-tailed" nature of reality.
The decision to use a pure Lorentzian kernel was non-negotiable. It represented a commitment to intellectual honesty over computational ease. The development of the Supreme Dashboard was driven by the philosophy of the "glass cockpit"—a belief that a trader's greatest asset is not a black box signal, but a transparent and intuitive flow of high-quality information. This script is the result of that unwavering vision: to create not just another indicator, but a new lens through which to perceive the market.
⚠️ RISK DISCLOSURE & PHILOSOPHY OF USE
The Lorentzian Theory Classifier is an instrument of profound analytical power, intended for the serious, discerning trader. It does not generate infallible signals. It generates high-probability, data-driven hypotheses based on a rigorous and transparent methodology. All trading involves substantial risk, and the future is fundamentally unknowable. Past performance, whether real or simulated, is no guarantee of future results. Use this tool to augment your own skill, to confirm your own analysis, and to manage your own risk within a well-defined trading plan.
"The effort to understand the universe is one of the very few things that lifts human life a little above the level of farce, and gives it some of the grace of tragedy."
— Steven Weinberg, Nobel Laureate in Physics
Trade with rigor. Trade with perspective. Trade with enlightenment. Trade with insight. Trade with anticipation.
— Dskyz, for DAFE Trading Systems
[DIP] Double Bollinger BandClassic Bollinger Bands based off of the SMA. Allowing choice between the 2nd and 3rd standard deviation or showing both. By default it is colored such that the 2nd deviation jumps out more while the 3rd deviation lurks in the background for the sake of clarity. For those who are not just satisfied with 2 OR 3 standard deviations, you can now have both.
All deviations have default cross-over and cross-under alerts for easy access, no more messing with which line is which although that is certainly still possible.
Includes a default for "Any alert() function call" condition, if you enable this alert it will trigger for any of the alert conditions when met, this allows you to use one alert instead of 6. The alert will include a message identifying which alert it is, especially useful for watchlist wide alerts.
Trend Impulse Channels [With Simple MA]Trend Impulse Channels + MA | Premium Modified Version
This is a **premium modified version** of the original **Trend Impulse Channels** script by **Zeiierman**, enhanced and republished by **Markking77**.
This version includes a clean **Moving Average (MA)** overlay to add extra trend confirmation.
*What’s New:**
- MA overlay for better trend visibility.
- All original trend impulse logic retained.
- Clean, customizable signals for retests & trend steps.
- Fully adjustable style for premium look.
Original Script Info:**
- **Original Author:** © Zeiierman
- **Modified & Published by:** © Markking77
- **License:** (creativecommons.org)
**Disclaimer:**
This script is **for educational purposes only** and not financial advice. Always do your own research and trade responsibly.
Fair Value Gap [Dova Lazarus]Fair Value Gap (FVG) indicator detects and visualizes price inefficiencies between three consecutive candles:
* Bullish FVG: current candle’s low > high of two candles ago
* Bearish FVG: current candle’s high < low of two candles ago
Includes automatic detection of mitigations:
* Partial mitigation: price enters but doesn’t fully fill the gap
* Full mitigation: price completely fills the gap
* Optional **50% mitigation** based on midpoint reach
**Display styles**:
* Box (filled rectangle)
* High & Low lines only
* Midpoint lines (optional, with customizable style and color)
Multi-timeframe support:
* Up to 5 higher timeframes (HTF), each with individual color, label, and visibility settings
* HTF gaps help identify key support/resistance and price magnet zones
Customization options:
* Separate colors for unmitigated and mitigated gaps
* Adjustable width and extension of boxes
* Optional deletion of mitigated gaps
* Label positioning, size, and visibility
All settings are grouped for clarity:
* FVG Appearance
* HTF FVGs
* Mitigation
* General Settings
Supertrend with ADX & MTF MA Filter# **Supertrend with ADX & MTF MA Filter - Comprehensive Explanation**
---
## **1. Purpose of This Indicator**
This indicator combines three powerful technical analysis tools to create a robust trading system:
✅ **Supertrend** (Trend-following)
✅ **ADX Filter** (Trend strength confirmation)
✅ **MTF MA Filter** (Multi-timeframe trend direction confirmation)
**Primary Goals:**
✔ **Identify high-probability trend reversals** with confirmation from multiple indicators
✔ **Filter out weak trends** using ADX (Average Directional Index)
✔ **Add higher timeframe context** with MTF (Multi-TimeFrame) Moving Average
✔ **Reduce false signals** by requiring confluence between all three components
---
## **2. Core Logic & Components**
### **A. Supertrend (Base Indicator)**
- **Calculation:**
```pine
up = hl2 - (Multiplier * ATR(Periods))
dn = hl2 + (Multiplier * ATR(Periods))
```
- **Bullish trend** when price > `up` (green line)
- **Bearish trend** when price < `dn` (red line)
- **Why Supertrend?**
- Simple yet effective trend-following system
- Adapts to volatility via ATR (Average True Range)
---
### **B. ADX Filter (Trend Strength Confirmation)**
- **ADX Calculation:**
```pine
= calcADX(adxLength, adxSmoothing)
strongTrend = adxVal >= adxThreshold
```
- **ADX > Threshold (Default: 20)** = Strong trend
- **DI+ > DI-** = Bullish momentum
- **DI- > DI+** = Bearish momentum
- **Why ADX?**
- Avoids trading in choppy markets (low ADX = weak trend)
- Confirms if Supertrend signals occur in a strong trend
---
### **C. MTF MA Filter (Higher Timeframe Trend Alignment)**
- **Moving Average Calculation:**
```pine
= getMA(maSource, maLength, maType, maTF)
```
- **MA Type:** SMA, EMA, WMA, or DEMA
- **Timeframe:** Any (1m, 5m, 1H, 4H, D, W, M)
- **Trend Direction:**
- **Buy Signal:** MA must be **rising**
- **Sell Signal:** MA must be **falling**
- **Why MTF MA?**
- Aligns trades with the **higher timeframe trend**
- Reduces counter-trend entries
---
## **3. How to Use This Indicator**
### **A. Buy Conditions (All Must Be True)**
1. **Supertrend turns bullish** (price crosses above `up` line)
2. **ADX ≥ Threshold** (trend is strong)
3. **Higher timeframe MA is rising** (confirms bullish bias)
### **B. Sell Conditions (All Must Be True)**
1. **Supertrend turns bearish** (price crosses below `dn` line)
2. **ADX ≥ Threshold** (trend is strong)
3. **Higher timeframe MA is falling** (confirms bearish bias)
### **C. Recommended Settings**
| Parameter | Recommended Value | Description |
|-----------|------------------|-------------|
| **ATR Period** | 14 | Sensitivity of Supertrend |
| **Multiplier** | 1.5-3.0 | Adjust for volatility |
| **ADX Threshold** | 20-25 | Higher = stricter trend filter |
| **MA Length** | 20-50 | Smoothness of trend filter |
| **MA Timeframe** | 1H/D | Align with trading style |
---
## **4. Trading Strategies**
### **A. Trend-Following Strategy**
- **Enter:** When all 3 conditions align (Supertrend + ADX + MA)
- **Exit:** When Supertrend flips or ADX drops below threshold
### **B. Pullback Strategy**
- **Wait for:**
- Supertrend in trend direction
- ADX remains strong
- MA still aligned
- **Enter:** On pullback to Supertrend line
### **C. Multi-Timeframe Confirmation**
- **Intraday traders:** Use 4H/D MA for trend bias
- **Swing traders:** Use D/W MA for trend bias
---
## **5. Advantages Over Standard Supertrend**
✔ **Fewer false signals** (ADX filters weak trends)
✔ **Higher timeframe alignment** (avoids trading against larger trends)
✔ **Customizable MA types** (SMA, EMA, WMA, DEMA)
✔ **Works on all markets** (stocks, forex, crypto)
---
### **Final Thoughts**
This indicator is designed for traders who want **high-confidence trend signals** by combining:
🔹 **Supertrend** (entry trigger)
🔹 **ADX** (trend strength filter)
🔹 **MTF MA** (higher timeframe trend alignment)
By requiring all three components to align, it significantly improves signal quality compared to standalone Supertrend systems.
**→ Best for:** Swing trading, trend-following, and avoiding choppy markets.
Key Indicators Dashboard (KID)📌 Overview
Key Indicators Dashboard (KID) is a comprehensive all-in-one technical analysis tool designed for discretionary, systematic, and quantitative traders. It brings together multiple essential trading metrics into a highly customizable, interactive dashboard that overlays directly on your TradingView chart.
🎯 What Does KID Do?
KID consolidates all vital market metrics into a single, glanceable dashboard—saving screen space and analysis time. Whether you are screening equities or monitoring open positions, the KID panel updates dynamically, highlighting actionable signals and market conditions based on your own thresholds and trading style.
🛠 Key Features
⦿ Volatility and Range Metrics
ADR (Average Daily Range, % and Value): Quantifies average price movement over a defined period, with threshold-based color highlights.
ATR (Average True Range, % and Value): Measures volatility as both value and percentage of price.
⦿ Relative Strength and Trend Metrics
Relative Strength (RS) vs. Benchmark: Dynamically calculated using a customizable comparative symbol (default: NSE:NIFTYMIDSML400).
IBD-style RS Rating: Weighted average of price changes over several periods (3, 6, 9, and 12 months).
Trend Detection: Uses Supertrend indicator to visually identify up/down market trends.
⦿ Liquidity and Volume Analysis
Relative Volume (RVol): Comparison of current volume to moving average volume.
Turnover (in Cr): Average turnover calculation to assess liquidity.
Market Cap & Free Float: Real-time computation using price and outstanding/floating shares.
⦿ Trend Strength and Structure
MA Extensions: Compares price extension from a selected moving average, depicted as ATR multiples and percentages.
Moving Averages (MAs): Choice of EMA/SMA with customizable lengths, including up to four plotted MAs and detection of MA crossovers.
⦿ Breakout and Tightness Detectors
52-Week High/Low: Calculates and optionally marks the highest and lowest prices over 252 trading days, including percentage distance from current price.
Minervini Trend Template: The Trend Template is a set of technical criteria designed to identify stocks in strong uptrends.
• Price > 50-DMA > 150-DMA > 200-DMA
• 200-DMA is trending up for at least 1 month
• Price ≥ 52-week high proximity
• Price is at least 30% above its 52-week low.
• Price is within at least 25 percent of its 52-week high
• Table highlights when a stock meets all above criteria.
Tightness Indicator: Highlights periods with compressed price action relative to historical ranges.
⦿ Candlestick Patterns and Power Bars
Inside Bar Detection: Color- and shape-based highlighting of "inside bars" for pattern traders.
PowerBar (Purple Dot): Flags bars with strong price movement paired with high volume, using ROC and volume thresholds.
⦿ Sector/Industry
Automatically reflects symbol sector and industry if available from trading platform data.
⚙️ Customizable Visualization
Switchable between vertical or horizontal layout.
Works in dark/light mode
User-configurable to toggle any indicator ON or OFF.
User-configurable Moving (EMA/SMA), Period/Lengths and thresholds.
🔔 Built-in Alerts
Supports automatic alert creation for:
ADR%, ATR/ATR %, RS, RS Rating, Turnover
Moving Average Crossover (Bullish/Bearish)
52-Week High/Low
Inside Bars (Bullish/Bearish)
Tightness
Minervini Trend Template
⏳PineScreener Capabilities
The indicator’s alert conditions act as filters for PineScreener.
Available Screener Filters & Alerts:
Price Filters: Minimum and maximum price cutoffs.
Daily Change Filters: Minimum and maximum daily percent move.
Volatility Filters: ADR% and ATR% thresholds met or exceeded.
Liquidity Filters: Minimum average turnover and relative volume cutoffs.
Momentum/Trend Filters:
• Strong RS/RS Rating
• Uptrend/Downtrend state (Supertrend-based)
• Price extensions (detect overbought/oversold situations quickly)
• Breakout proximity via 52-week high/low alerts
Pattern and Setup Detection:
• Minervini Trend Template
• Inside Bar
• Tightness (compressed/volatility contraction setups)
• PowerBar (High ROC + high volume bars)
• MA crossover or above/below specific MAs
⦿ (Optional) : For horizontal table orientation increase Top Margin to 16% in Chart (Canvas) settings to avoid chart overlapping with table.
⚡ Add this script to your chart and start making smarter trade decisions today! 🚀
Buyer/Seller Zone (Simplified Version)📌 Indicator: Buyer/Seller Zone (Simplified Version)
This indicator is designed to highlight potential areas of strong buyer or seller activity based on advanced volume and volatility analysis. It identifies key candles that exhibit anomalous behavior — those standing out from typical market noise — and marks them as potential interest zones.
🔍 What it does:
Detects candles with unusually high volume (anomalies).
Filters them further based on strong price movement (volatility).
Marks bullish and bearish zones using customizable visuals: area, circle, or diamond.
Provides optional alerts when a buyer/seller signal is detected.
💡 How to use:
Use this tool to identify potential reversal or continuation zones.
Zones may act as strong support/resistance areas.
Some levels are more significant than others — do not trade every level blindly. Combine with your own analysis or wait for a retest/confirmation before entry.
⚙️ Customization:
Volume filter threshold
Volatility sensitivity
Visualization type, size, and transparency
🚨 Alerts: Set alerts for bullish, bearish, or any signal type.
WT + Stoch RSI Reversal Combo📊MR.Z RSI : WT + Stochastic RSI Reversal Combo
This custom indicator combines WaveTrend oscillator and Stochastic RSI to detect high-confidence market reversal points, filtering signals so they only appear when both indicators align.
🔍 Core Components:
✅ WaveTrend Oscillator
Based on smoothed deviation from EMA (similar to TCI logic)
Plots:
WT1 (main line)
WT2 (signal line = SMA of WT1)
Uses overbought/oversold thresholds (default: ±53) to filter signals
✅ Stochastic RSI
Momentum oscillator based on RSI's stochastic value
Plots:
%K: smoothed Stoch of RSI
%D: smoothed version of %K
Adjustable oversold/overbought thresholds (default: 20/80)
🔁 Combined Reversal Signal Logic:
🔼 Buy Signal
WT1 crosses above WT2 below WT oversold level (e.g., -53)
%K crosses above %D below Stoch RSI oversold level (e.g., 20)
🔽 Sell Signal
WT1 crosses below WT2 above WT overbought level (e.g., 53)
%K crosses below %D above Stoch RSI overbought level (e.g., 80)
🔔 Signals are only plotted and alerted if both conditions are true.
📌 Features:
Toggle on/off:
WaveTrend lines and histogram
Stochastic RSI
Combined Buy/Sell signals
Horizontal reference lines (±100, OB/OS)
Fully customizable smoothing lengths and thresholds
Signal plots:
✅ Green up-triangle = Combo Buy
✅ Red down-triangle = Combo Sell
Optional: Circle/cross markers for WT-only and Stoch-only signals
🔔 Built-in alerts for Buy/Sell signals
📈 Use Cases:
Reversal Trading: Wait for both indicators to confirm momentum shift
Entry Filter: Use in combination with trend indicators (like EMA)
Scalping or Swing: Works on intraday and higher timeframes
RV Indicator This Pine Script defines a custom Relative Volatility (RV) Indicator, which measures the ratio of directional price movement to volatility over a specified number of bars. Below is a full explanation of what this script does.
Title:
RV Indicator — Relative Volatility Oscillator
Purpose:
This indicator measures how aggressively price is moving compared to recent volatility, and smooths the result with a signal line. It can be used to gauge momentum shifts and trend strength.
How It Works – Step by Step
1. Measuring Price Momentum (v1)
It calculates the difference between the close and open prices of the last 4 candles.
A weighted average is applied:
The current candle and the one 3 bars ago get weight 1.
The two middle candles (1 and 2 bars ago) get weight 2.
This creates a smoothed momentum measure:
If close > open (bullish), v1 is positive.
If close < open (bearish), v1 is negative.
2. Measuring Volatility (v2)
Similarly, it calculates the high-low range for the last 4 candles.
The same weighting (1, 2, 2, 1) is applied.
This gives a smoothed volatility measure.
3. Combining Momentum and Volatility (RV Ratio)
For the past ti bars (default: 10), it sums up:
All v1 values (momentum sum)
All v2 values (volatility sum)
Then it divides them:
𝑅𝑉= sum of price momentum % sum of volatility
This produces the RV value:
RV > 0: Momentum is bullish (price is generally moving up relative to its volatility).
RV < 0: Momentum is bearish (price is moving down relative to its volatility).
4. Smoothed Signal Line (rvsig)
A smoothed version of the RV is created using a weighted average of the latest 4 RV values.
This acts like a signal line, similar to how MACD uses a signal line.
Crossovers between RV and this signal line can be used to detect shifts in momentum.
5. Visual Output
Orange Line (RV): Shows the raw momentum/volatility ratio.
Blue Line (Signal): A smoother line that follows RV more slowly.
Zero Line: Divides bullish vs. bearish momentum.
How to Use It in Trading
1. Look for Crossovers:
If RV crosses above its signal line → Possible buy signal (momentum turning bullish).
If RV crosses below its signal line → Possible sell signal (momentum turning bearish).
2. Check the Zero Line:
If both RV and Signal are above zero, momentum is bullish.
If both are below zero, momentum is bearish.
3. Filter False Signals:
Combine RV with a trend filter (like a 50 or 200 EMA) to avoid trading against the main trend.
Disclaimer: This script is for informational and educational purposes only. It does not constitute financial advice or a recommendation to buy or sell any asset. All trading decisions are solely your responsibility. Use at your own risk.
Synthetic VX3! & VX4! continuous /VX futuresTradingView is missing continuous 3rd and 4th month VIX (/VX) futures, so I decided to try to make a synthetic one that emulates what continuous maturity futures would look like. This is useful for backtesting/historical purposes as it enables traders to see how their further out VX contracts would've performed vs the front month contract.
The indicator pulls actual realtime data (if you subscribe to the CBOE data package) or 15 minute delayed data for the VIX spot (the actual non-tradeable VIX index), the continuous front month (VX1!), and the continuous second month (VX2!) continually rolled contracts. Then the indicator's script applies a formula to fairly closely estimate how 3rd and 4th month continuous contracts would've moved.
It uses an exponential mean‑reversion to a long‑run level formula using:
σ(T) = θ+(σ0−θ)e−kT
You can expect it to be off by ~5% or so (in times of backwardation it might be less accurate).
Combined Predictive Indicator### Summary
The **Combined Predictive Indicator** is a comprehensive tool designed to provide traders with a multi-faceted view of potential future price action. It merges several well-known analytical concepts into a single, cohesive indicator, helping to identify key levels of support, resistance, and volatility-based price targets.
This script is an amalgamation of two different concepts:
1. A prediction model based on historical range, ATR, and Fibonacci levels.
2. The "Predictive Ranges" concept, which uses an adaptive ATR-based moving average to project dynamic support and resistance zones.
### Key Components
**1. Original Prediction Model:**
* **Bollinger Bands (BB):** Standard volatility bands that help gauge whether prices are high or low on a relative basis.
* **ATR-Based Predicted Range:** A channel calculated using the Average True Range (ATR) and the average historical bar range. This provides a statistically-based estimate of the potential trading range for the next period. The upper band (green) and lower band (red) represent potential bullish and bearish targets.
* **Fibonacci Levels:** Automatically drawn based on the highest high and lowest low over a user-defined lookback period. These classic 0.382 and 0.618 levels act as potential retracement or target zones.
* **HH/LL Markers:** Small triangles appear above or below the price bars to signal a new Highest High (HH) or Lowest Low (LL) within the lookback period, helping to identify shifts in market structure.
**2. Predictive Ranges (PR):**
* This component calculates five dynamic levels based on an adaptive moving average. When the price moves significantly away from the average, the levels recalculate and project new zones.
* **Resistance Levels (PR Upper 1 & 2):** Red zones that indicate potential areas of selling pressure.
* **Support Levels (PR Lower 1 & 2):** Green zones that indicate potential areas of buying pressure.
* **Average (PR Average):** The blue line serves as the centerline or equilibrium point for the ranges.
**3. Data Table:**
* A convenient table is displayed on the top-right of the chart, showing the real-time values of all key predictive levels. This allows for a quick glance without having to hover over the plotted lines.
### How to Use
* **Confluence is Key:** Look for areas where multiple levels from different components overlap. For example, if the `Predicted Upper Range` aligns with a `PR Upper` resistance level and a `Fibonacci` level, it signifies a strong area of potential resistance.
* **Range Trading:** The `Predicted Range` (gray-filled area) can be used to identify the expected volatility. Prices moving outside this range could signal a strong breakout.
* **Trend Confirmation:** Use the `New HH/LL` markers to confirm trend direction. A series of new higher highs and higher lows suggests an uptrend, and vice-versa.
* **Dynamic S/R:** The `Predictive Ranges` are excellent for identifying dynamic support and resistance in trending or ranging markets. Watch for price reactions as it approaches these zones.
### Settings
* **Original Indicators:** Customize the lengths for Bollinger Bands, ATR, and the HH/LL lookback period. Adjust Fibonacci levels if needed.
* **Predictive Ranges:** Adjust the `Length`, `Factor` (multiplier for ATR), `Timeframe`, and `Source` to fine-tune the sensitivity and responsiveness of the PR levels.
*Disclaimer: This indicator is for educational and analytical purposes only. It is not financial advice. Always perform your own due diligence before making any trading decisions.*
BB with Heikin Ashi + Reversal CheckThis indicator combines Bollinger Bands (BB) with Heikin Ashi candles to detect potential reversal points after price breaks the BB boundaries. It works on any symbol and timeframe, retrieving Heikin Ashi data via request.security().
Core Features
Heikin Ashi Candle Plot
Smooths price action by using Heikin Ashi candles instead of regular candles.
Candles are plotted directly on the chart with green (bullish) and red (bearish) colors.
Bollinger Bands (BB)
Calculated from Heikin Ashi close price.
Includes Basis (MA), Upper Band, and Lower Band, with customizable MA type, length, and standard deviation multiplier.
Break & Reversal Detection
The indicator tracks whether the price has broken above the Upper Band (p1) or below the Lower Band (p2).
It remembers the last breakout direction until the opposite breakout occurs (mutually exclusive logic).
Signal Logic
Long Signal (▲):
Price was previously below the Lower Band and then reversed upward (BB Lower rising + Heikin Ashi candle rising).
Short Signal (▼):
Price was previously above the Upper Band and then reversed downward (BB Upper falling + Heikin Ashi candle falling).
Alerts
Custom alert conditions trigger when Long or Short signals occur, allowing automated notifications or bot integration.
Use Cases
✅ Swing Trading / Trend Reversal – Identify potential bottom/top reversals after BB breakouts.
✅ Mean Reversion Strategies – Enter trades when the price reverts to the BB mean after an extreme breakout.
✅ Multi-Timeframe Analysis – Works with any timeframe and symbol via request.security().
Customization
MA Type: SMA, EMA, RMA, WMA, VWMA
BB Length & StdDev Multiplier
Timeframe & Symbol Selection
Squeeze Pro Momentum BAR color - KLTDescription:
The Squeeze Pro Momentum indicator is a powerful tool designed to detect volatility compression ("squeeze" zones) and visualize momentum shifts using a refined color-based system. This script blends the well-known concepts of Bollinger Bands and Keltner Channels with an optimized momentum engine that uses dynamic color gradients to reflect trend strength, direction, and volatility.
It’s built for traders who want early warning of potential breakouts and clearer insight into underlying market momentum.
🔍 How It Works:
📉 Squeeze Detection:
This indicator identifies "squeeze" conditions by comparing Bollinger Bands and Keltner Channels:
When Bollinger Bands are inside Keltner Channels → Squeeze is ON
When Bollinger Bands expand outside Keltner Channels → Squeeze is OFF
You’ll see squeeze zones classified as:
Wide
Normal
Narrow
Each represents varying levels of compression and breakout potential.
⚡ Momentum Engine:
Momentum is calculated using linear regression of the price's deviation from a dynamic average of highs, lows, and closes. This gives a more accurate representation of directional pressure in the market.
🧠 Smart Candle Coloring (Optimized):
The momentum color logic is inspired by machine learning principles (no hardcoded thresholds):
EMA smoothing and rate of change (ROC) are used to detect momentum acceleration.
ATR-based filters help remove noise and false signals.
Colors are dynamically assigned based on both direction and trend strength.
🧪 How to Use It:
Look for Squeeze Conditions — especially narrow squeezes, which tend to precede high-momentum breakouts.
Confirm with Momentum Color — strong colors often indicate trend continuation; fading colors may signal exhaustion.
Combine with Price Action — use this tool with support/resistance or patterns for higher probability setups.
Recommended For:
Trend Traders
Breakout Traders
Volatility Strategy Users
Anyone who wants visual clarity on trend strength
📌 Tip: This indicator works great when layered with volume and price action patterns. It is fully non-repainting and supports overlay on price charts.
Minimalist Trend & Risk For 5-Min Timeframe
Of course. Here is a professionally written TradingView description for your indicator, following the specified formatting and incorporating the strategy you outlined.
Minimalist Trend & Risk For 5-Min Timeframe
Overview
This is a clean, on-chart visual tool designed to identify high-probability entries and manage risk, specifically tailored for a 5-minute scalping or day trading strategy. It combines a higher-timeframe trend anchor with a current-timeframe trigger line and a volatility-based stop loss level, keeping your chart uncluttered and your decisions clear.
Visual Components
Trend EMA (50-period, 15-min): This is your main trend guide. The thick, colored line represents the 50 EMA from the 15-minute chart.
Green: Confirmed uptrend.
Red: Confirmed downtrend.
Gray: Neutral or consolidating market.
Price EMA (21-period, 5-min): The thin white line is the 21 EMA based on your current chart (5-minute). This acts as a dynamic trigger line that price must reclaim after a pullback.
Stop Loss Zone (ATR-based): The thin red line provides a suggested stop loss level based on current market volatility (ATR). It automatically appears below price in an uptrend and above price in a downtrend, helping you define your risk on every trade.
How To Use for a Long Entry Strategy
The strategy is to trade pullbacks in the direction of the higher-timeframe trend. This indicator helps you visualize each step of the setup.
1. Identify the Trend: Wait for the main Trend EMA (the thick line) to be green. This confirms you are in an established uptrend on the 15-minute timeframe and should only be looking for long entries.
2. Wait for a Pullback: The core of the strategy is patience. Wait for a 5-minute candlestick to pull back and close below the 15-minute Trend EMA. This confirms a temporary dip within the larger uptrend, offering a better entry price.
3. Spot the Entry Trigger: After the pullback, the entry signal occurs when a 5-minute candlestick closes back above the faster, white Price EMA (21-period). This signals that momentum is returning in the direction of the main trend.
4. Manage Your Risk: Use the red Stop Loss Zone line that appears below your entry as a guide to set your initial stop loss. This helps ensure your risk is managed dynamically based on current volatility.
This indicator simplifies a powerful pullback strategy by plotting all the necessary components directly on your chart, allowing for quick and disciplined trade execution.
Buy and Sell Signals by Raja Saien📈 Buy and Sell Signals by Raja Saien 💹
"Simple. Clean. Powerful."
🔥 This indicator is built for those who believe in price action and clarity. No confusion, no clutter — just pure EMA crossover logic to catch early trends and filter false moves.
✅ Buy Signal when the 9 EMA crosses above the 21 EMA — indicating momentum shift to the upside.
❌ Sell Signal when the 9 EMA crosses below the 21 EMA — signaling potential downside momentum.
🧠 Designed for traders who trust the trend, respect momentum, and want to stay ahead of the crowd.
🔍 Perfect for scalping, intraday, and swing trading. Combine it with support/resistance or price action zones for even more 🔥 accuracy.
✨ Created by Raja Saien — for serious traders only.
💪 "Indicators don’t make you money, but discipline with clarity does."
Daily % MoveThis indicator notates each candle with the total percentage that the stock moved for that candle.
Penguin Trend with RSI on Diff🐧 Penguin Trend with RSI on Diff
Overview
This is a modified version of the original "Penguin Trend" indicator. Instead of displaying the magnitude of volatility with a histogram, this version uses an RSI oscillator to analyze the "momentum of volatility".
The main goal is to help traders see whether volatility is accelerating or decelerating, while still providing color signals on the price bars to indicate the primary trend direction during periods of volatility expansion.
---
How It Works
1. Volatility Difference Calculation
The indicator still calculates the difference value (diff) between the Bollinger Bands and Keltner Channels in the background. This value remains the core component for identifying a Squeeze (consolidation) or a Squeeze Release (volatility expansion).
2. RSI of Volatility Difference
Instead of plotting the diff value as a histogram, this script calculates an RSI based on the diff value. The result is an oscillator line (ranging from 0-100).
This RSI line represents the "momentum" or "rate of change" of the volatility itself.
- A rising RSI indicates that volatility is expanding at an increasing rate.
- A falling RSI indicates that volatility is decelerating or contracting.
3. Bar Coloring
This feature remains identical to the original version. The colors on the price bars are determined by MACD and EMA conditions to reflect the price trend and momentum.
- Lime: Strong bullish trend.
- Red: Strong bearish trend.
- Yellow: Pullback or weakening trend.
Important: The bar colors will only appear during a Squeeze Release (when diff > 0).
---
How to Use
1. Analyze Volatility Momentum with the RSI:
- RSI crossing above 50: Signals that volatility momentum is increasing; the market may be starting to trend.
- RSI above 70: Volatility expansion is in an "overbought" state and might slow down soon.
- RSI below 30: Volatility is very low ("oversold"), which could be a precursor to a new volatility expansion.
2. Confirm with Bar Colors:
After observing that the volatility RSI is rising, look for the bar colors on the main chart to confirm a trade.
- Example: If the RSI line crosses above 50 and, at the same time, the price bars turn "Lime", it could be a strong signal to enter a long position.
Tip: This version is ideal for traders who want a deeper analysis of the strength of a volatility breakout. As always, use it in conjunction with other technical analysis tools for confirmation.
Penguin Trend🐧 Penguin Trend
Overview
The "Penguin Trend" indicator is designed to help traders identify potential breakouts after a period of low volatility or consolidation. It combines the concept of a Volatility Squeeze (Bollinger Bands vs. Keltner Channels) with a MACD-based trend filter to provide higher-probability signals.
---
How It Works
The indicator is based on three core components:
1. Volatility Squeeze:
The histogram bars appear only when volatility expands (the Upper BB moves outside the Upper KC). This event is known as a "Squeeze Release" and signals that the market may be about to make a significant move.
During periods of low volatility or sideways consolidation, the histogram will disappear.
2. Trend & Momentum Filter:
The color of the histogram bars is determined by the MACD and a fast EMA to gauge the direction and strength of the trend.
Lime: Strong Bullish Signal - The trend is up (MACD Cross-up) and short-term momentum is positive.
Red: Strong Bearish Signal - The trend is down (MACD Cross-down) and short-term momentum is negative.
Yellow: Weakening Momentum or Pullback - Indicates that while the primary trend is intact, short-term price is moving against it (e.g., a pullback in an uptrend).
3. Signal Line and Bar Coloring:
White Line: A moving average of the histogram, helping to visualize the general tendency of the volatility expansion.
Bar Coloring: The indicator also colors the price bars on the main chart to match the histogram (Lime, Red, Yellow) but only during a "Squeeze Release". This provides a clear visual cue directly on your chart.
---
How to Use
1. Look for the Squeeze: Identify periods where the histogram is flat (disappeared). This is the market consolidation phase.
2. Wait for the Release: The appearance of the first histogram bar signals that volatility is returning.
3. Confirm with Color:
Lime bars suggest a potential entry for a long position.
Red bars suggest a potential entry for a short position.
Yellow bars serve as a warning of a potential pullback or weakening trend; caution is advised.
Tip: For best results, use this indicator in conjunction with other technical analysis tools like support/resistance levels or volume analysis.
```
SPX Late-Day Call/Put SignalThis is an indicator that shows call/put signals for trading SPX at the end of day. It uses volume, momentum, RSI divergence, VWAP, price action.
SPY Hybrid ORE Strategy v3This Pine Script strategy implements a SPY Hybrid Opening Range Expansion (ORE) Strategy that trades breakouts from the daily opening range during specific market hours (9:30-11:30 AM). The strategy identifies "sucker moves" - situations where the opening range is unusually large compared to historical volatility (ATR) - and then trades breakouts in the opposite direction of the initial move.
For long positions, it enters when price breaks above the previous bar's high after a large opening range in bullish market conditions (price above 50-day SMA), using the opening low as a stop loss and targeting a profit equal to half the opening range. For short positions, it enters on breaks below the previous bar's low during bearish conditions (price significantly below 50-day SMA with bearish momentum), using more aggressive stops and partial profit-taking. The strategy incorporates multiple filters including volatility (ATR), volume, RSI momentum, and includes risk management through position sizing based on account equity and stop distance, along with time-based exits and cooldown periods between trades.
Beta calculatorCalculates the market beta for the stock that is on your screen. You may change the parameters by changing the symbol you are using as benchmark to calculate market beta in the settings. This will affect the market beta you get. VTI is used since it has a theoretical market beta of 1.
Days Since ±1% Move on CloseInterpretation & Use‑Case
The “Days Since ±1% Move” indicator simply tells you how many trading days have passed since the last daily close that moved at least 1% in either direction. Here’s how to put it to work:
Complacency Gauge
A long stretch without a ≥1% move often signals that realized volatility has collapsed and market participants may be under‑positioned for a sudden swing.
Positioning Insight
When institutional hedges and systematic strategies see low recent volatility, they tend to scale back protection (fewer options hedges, tighter risk limits), which can amplify the impact of any eventual volatility pickup.
Mean‑Reversion Signal
After an extended streak (e.g. 20–30 days), a fresh ≥1% move is more likely—and often more violent—because pent‑up positioning flows rush to adjust.
Trend Confirmation
Conversely, a reset in the count (i.e., a new ≥1% move) that coincides with strong volume and follow‑through suggests genuine directional conviction rather than just a volatility “blip.”