VIX Regime AnalyzerVIX Regime Analyzer
The VIX Regime Analyzer is an analytical tool that examines historical VIX patterns to provide insights into how your asset typically performs under similar volatility conditions.
Key Features:
Historical Pattern Matching: Automatically scans up to 1,000 bars of history to find all periods when VIX was at levels similar to today, using customizable tolerance ranges (absolute or percentage-based).
Forward-Looking Statistics: For each VIX regime match, calculates what actually happened to your asset over the next 1, 5, 10, and 20 trading days, providing both average returns and probability of positive outcomes.
Regime Classification System: Intelligently categorizes the current market environment as bullish or bearish: Visual Historical Context:
Background shading throughout your chart highlights every historical period when VIX matched current levels, color-coded by subsequent performance (green for gains, red for losses).
User Inputs:
VIX Level Tolerance (+/-): How closely VIX must match (default: ±5 points)
Use Relative Tolerance (%): Switch to percentage-based matching for consistency across different VIX levels
Lookback Period: How many bars to analyze
Highlight Historical VIX Matches: Toggle background highlighting of past matching periods
The Data Table
The statistics box appears in the right handside of your chart and contains three main sections:
Section 1: VIX REGIME
Current VIX: The live VIX closing price
Range: The tolerance band being searched (e.g., if VIX is 18 with ±5 tolerance, range is 13-23)
Historical Samples: Number of matching periods found in the lookback window (minimum 10 required for statistical validity)
Section 2: FORWARD RETURN
Shows the average percentage change in your asset over different timeframes following similar VIX levels:
Avg Next Day: What typically happened by the next trading session
Avg Next 5 Days: Average 5-day forward performance
Avg Next 10 Days: Average 10-day forward performance
Avg Next 20 Days: Average 20-day forward performance (approximately 1 month)
Section 3: PROBABILITY UP
Shows the win rate - the percentage of times your asset closed higher after VIX matched current levels:
Next Day: Probability of being up the next session
Next 5 Days: Probability of being up after 5 days
Next 10 Days: Probability of being up after 10 days
Next 20 Days: Probability of being up after 20 days
Colors:
🟢 Green: Bullish regimes (various strengths)
🔴 Red: Bearish regimes (various strengths)
🟡 Yellow: Choppy/uncertain regime
When "Highlight Historical VIX Matches" is enabled:
Scroll back through your chart and you'll see colored backgrounds highlighting every period when VIX matched today's level. The color tells you whether that match led to gains (green) or losses (red). This provides instant visual pattern recognition - you can quickly see if similar VIX levels historically led to bullish or bearish outcomes.
Practical Example:
If you see that most historical periods with similar VIX levels are highlighted in green, it suggests the current VIX level has historically been a bullish signal for your asset.
How The Indicator Makes Decisions
The regime classification uses both magnitude AND probability to avoid false signals:
Example of Strong Classification:
Average 5-day return: +1.5%
Win rate: 65%
Result: STRONG BULLISH (both high return and high probability)
Example of Weak Signal:
Average 5-day return: +2.0%
Win rate: 35%
Result: CHOPPY (high average but low consistency = unreliable)
This dual-factor approach ensures the indicator doesn't mislead you with regimes that had a few huge winners but mostly losers, or vice versa.
Best Practices
Combine with your existing strategy: Use this as a regime filter rather than standalone signals
Check sample size: More historical matches = more reliable statistics
Consider multiple timeframes: If 5-day and 20-day metrics disagree, proceed with caution
Asset-specific tuning: Different assets may require different tolerance settings
VIX spikes: The indicator is particularly useful during VIX spikes to understand if panic is justified
What Makes This Different
Unlike simple VIX indicators that just plot the fear index, this tool:
Quantifies the actual impact of VIX levels on YOUR specific asset
Provides probability-based forecasts rather than subjective interpretation
Shows historical context visually so you can see patterns at a glance
Uses rigorous statistical criteria to avoid false regime classifications
Forecasting
Trailing 12M % Gain/Lossthis script shows profit or loss for training 12 months, works only on daily time frame
True Range + Average True Range (Status Line Only)This simple yet powerful indicator displays True Range (TR) and Average True Range (ATR) values directly in your TradingView status line, without cluttering your chart.
It’s designed for traders who want to quickly monitor volatility and price range expansion in real time.
⚙️ Features:
Real-time updating TR & ATR values
Clean and minimal — no chart clutter
Customizable ATR length and smoothing method (RMA, SMA, EMA, WMA)
Works on all timeframes and symbols
📈 Use Cases:
Monitor volatility changes during trading sessions
Confirm breakout strength or volatility contraction
Combine with price action or volume-based setups
Doctor Scalp (BUY/SELL) [by Adi]A script for fast scalping using. Works best with a 5-minute-to-1-hour interval.
AI MEDEA FORECASTAI MEDEA searches for similar historical patterns and uses them to generate predictions. The longer it runs, the more data it gathers and the better the predictions become.
Important:
The indicator must remain enabled to:
- Collect predictions and check their accuracy
- Have as much data as possible for comparison
- Provide more accurate results
Recommendation:
Let the indicator run for several days on different timeframes (15m, 30m, 1H, 4H). The accuracy table will show the actual accuracy only after gathering enough predictions.
3D Institutional Battlefield [SurgeGuru]Professional Presentation: 3D Institutional Flow Terrain Indicator
Overview
The 3D Institutional Flow Terrain is an advanced trading visualization tool that transforms complex market structure into an intuitive 3D landscape. This indicator synthesizes multiple institutional data points—volume profiles, order blocks, liquidity zones, and voids—into a single comprehensive view, helping you identify high-probability trading opportunities.
Key Features
🎥 Camera & Projection Controls
Yaw & Pitch: Adjust viewing angles (0-90°) for optimal perspective
Scale Controls: Fine-tune X (width), Y (depth), and Z (height) dimensions
Pro Tip: Increase Z-scale to amplify terrain features for better visibility
🌐 Grid & Surface Configuration
Resolution: Adjust X (16-64) and Y (12-48) grid density
Visual Elements: Toggle surface fill, wireframe, and node markers
Optimization: Higher resolution provides more detail but requires more processing power
📊 Data Integration
Lookback Period: 50-500 bars of historical analysis
Multi-Source Data: Combine volume profile, order blocks, liquidity zones, and voids
Weighted Analysis: Each data source contributes proportionally to the terrain height
How to Use the Frontend
💛 Price Line Tracking (Your Primary Focus)
The yellow price line is your most important guide:
Monitor Price Movement: Track how the yellow line interacts with the 3D terrain
Identify Key Levels: Watch for these critical interactions:
Order Blocks (Green/Red Zones):
When yellow price line enters green zones = Bullish order block
When yellow price line enters red zones = Bearish order block
These represent institutional accumulation/distribution areas
Liquidity Voids (Yellow Zones):
When yellow price line enters yellow void areas = Potential acceleration zones
Voids indicate price gaps where minimal trading occurred
Price often moves rapidly through voids toward next liquidity pool
Terrain Reading:
High Terrain Peaks: High volume/interest areas (support/resistance)
Low Terrain Valleys: Low volume areas (potential breakout zones)
Color Coding:
Green terrain = Bullish volume dominance
Red terrain = Bearish volume dominance
Purple = Neutral/transition areas
📈 Volume Profile Integration
POC (Point of Control): Automatically marks highest volume level
Volume Bins: Adjust granularity (10-50 bins)
Height Weight: Control how much volume affects terrain elevation
🏛️ Order Block Detection
Detection Length: 5-50 bar lookback for block identification
Strength Weighting: Recent blocks have greater impact on terrain
Candle Body Option: Use full candles or body-only for block definition
💧 Liquidity Zone Tracking
Multiple Levels: Track 3-10 key liquidity zones
Buy/Sell Side: Different colors for bid/ask liquidity
Strength Decay: Older zones have diminishing terrain impact
🌊 Liquidity Void Identification
Threshold Multiplier: Adjust sensitivity (0.5-2.0)
Height Amplification: Voids create significant terrain depressions
Acceleration Zones: Price typically moves quickly through void areas
Practical Trading Application
Bullish Scenario:
Yellow price line approaches green order block terrain
Price finds support in elevated bullish volume areas
Terrain shows consistent elevation through key levels
Bearish Scenario:
Yellow price line struggles at red order block resistance
Price falls through liquidity voids toward lower terrain
Bearish volume peaks dominate the landscape
Breakout Setup:
Yellow price line consolidates in flat terrain
Minimal resistance (low terrain) in projected direction
Clear path toward distant liquidity zones
Pro Tips
Start Simple: Begin with default settings, then gradually customize
Focus on Yellow Line: Your primary indicator of current price position
Combine Timeframes: Use the same terrain across multiple timeframes for confluence
Volume Confirmation: Ensure terrain peaks align with actual volume spikes
Void Anticipation: When price enters voids, prepare for potential rapid movement
Order Blocks & Voids Architecture
Order Blocks Calculation
Trigger: Price breaks fractal swing points
Bullish OB: When close > swing high → find lowest low in lookback period
Bearish OB: When close < swing low → find highest high in lookback period
Strength: Based on price distance from block extremes
Storage: Global array maintains last 50 blocks with FIFO management
Liquidity Voids Detection
Trigger: Price gaps exceeding ATR threshold
Bull Void: Low - high > (ATR200 × multiplier)
Bear Void: Low - high > (ATR200 × multiplier)
Validation: Close confirms gap direction
Storage: Global array maintains last 30 voids
Key Design Features
Real-time Updates: Calculated every bar, not just on last bar
Global Persistence: Arrays maintain state across executions
FIFO Management: Automatic cleanup of oldest entries
Configurable Sensitivity: Adjustable lookback periods and thresholds
Scientific Testing Framework
Hypothesis Testing
Primary Hypothesis: 3D terrain visualization improves detection of institutional order flow vs traditional 2D charts
Testable Metrics:
Prediction Accuracy: Does terrain structure predict future support/resistance?
Reaction Time: Faster identification of key levels vs conventional methods
False Positive Reduction: Lower rate of failed breakouts/breakdowns
Control Variables
Market Regime: Trending vs ranging conditions
Asset Classes: Forex, equities, cryptocurrencies
Timeframes: M5 to H4 for intraday, D1 for swing
Volume Conditions: High vs low volume environments
Data Collection Protocol
Terrain Features to Quantify:
Slope gradient changes at price inflection points
Volume peak clustering density
Order block terrain elevation vs subsequent price action
Void depth correlation with momentum acceleration
Control Group: Traditional support/resistance + volume profile
Experimental Group: 3D Institutional Flow Terrain
Statistical Measures
Signal-to-Noise Ratio: Terrain features vs random price movements
Lead Time: Terrain formation ahead of price confirmation
Effect Size: Performance difference between groups (Cohen's d)
Statistical Power: Sample size requirements for significance
Validation Methodology
Blind Testing:
Remove price labels from terrain screenshots
Have traders identify key levels from terrain alone
Measure accuracy vs actual price action
Backtesting Framework:
Automated terrain feature extraction
Correlation with future price reversals/breakouts
Monte Carlo simulation for significance testing
Expected Outcomes
If hypothesis valid:
Significant improvement in level prediction accuracy (p < 0.05)
Reduced latency in institutional level identification
Higher risk-reward ratios on terrain-confirmed trades
Research Questions:
Does terrain elevation reliably indicate institutional interest zones?
Are liquidity voids statistically significant momentum predictors?
Does multi-timeframe terrain analysis improve signal quality?
How does terrain persistence correlate with level strength?
LuxAlgo BigBeluga hapharmonic
ANN TREND SPX500 1m-1HHappy Trading! This indicator is the successor to my previous ANN Trend Prediction, now featuring improved feature vectors, refined backpropagation, and a stronger focus on asset- and timeframe-specific patterns for more precise predictions.
Internally is a collection of nine artificial neural networks (ANNs) trained on the S&P 500 to forecast uptrends, downtrends, or ranging markets. Each ANN is trained on one of the following timeframes: 1m, 2m, 3m, 5m, 10m, 15m, 30m, 45m, and 60m, and the appropriate model is selected automatically.
1. Settings
In the settings menu shown in the image below, you’ll find six options:
Indicator Timeframe – Choose between 1m and 1H.
Intrabar – Choose between Alerts been send intrabar or only at bar closing.
Lookback – Define how many previous bars the ANN should use in its calculations.
Smoothing – To reduce short-term switching of the prediction you can activate Smoothing. Here-by the input datas get filtered by a mean function.
Range Filter – Enable a third class, Ranging, in addition to Uptrend and Downtrend. This enables you to avoid choppy markets.
Class Colors – Here you can change each Class (Up, Down Trend etc) color.
2. Comparison with EMA crossover
The Prediction of the ANN Trend SPX500 1m-1H is more reliable as the prediction of the EMA crossover, shown in the Image below.
Both indicators use the same period of 65 bars and source their input data from the same chart.
While the EMA crosses over multiple times (shown as red vertical lines in the image), the ANN Trend maintains its prediction signal as Uptrend.
This advantage of the ANN comes from its learned knowledge. During training, it was exposed to a vast number of price charts, enabling it to distinguish between a trend setback and a true trend reversal.
3. Alerts
The indicator generates two types of alert signals:
Trade Signal:
1 = Uptrend
0 = Ranging
-1 = Downtrend
-2 = no prediction
Signal Age: Counts the number of bars since the last signal change. With the Signal Age you have access to the entry-price of the actual Trend. If you use You just call close to get the last entry-price.
4. Declaration for TradingView House Rules on Script Publishing
The unique feature of ANN Trend SPX500 1m-1H is it's real-time range detection capability and it's capability to distinguishes between a Trend set back and a Trend reversal which results in longer lasting trend predictions in comparison to any Moving Average Crossover Indicators.
This script is closed-source and invite-only, to support and compensate for months of development work.
5. Disclaimer
Trading involves risk, and losses can and do occur. This script is intended for informational and educational purposes only. All examples are hypothetical and not financial advice.
Decisions to buy, sell, hold, or trade securities, commodities, or other assets should be based on the advice of qualified financial professionals. Past performance does not guarantee future results.
Use this script at your own risk. It may contain bugs, and I cannot be held responsible for any financial losses resulting from its use.
Cheers!
Market Breadth & Forward ReturnsThis indicator shows how future index performance has historically behaved after different levels of market breadth. The heatmap reveals which breadth zones have tended to precede better or worse forward returns. This is strictly a statistical conditional-expectation map, not a set of signals.
Scope
This is not meant for any arbitrary asset.
It is meant for broad indices only (S&P 500, Nasdaq 100, Dow, Russell, major sector families).
The breadth data is derived from index-level market universes.
Do not apply this on single stocks, crypto or FX. The method only makes sense with large diversified universes.
Core method
Daily breadth is normalized 0 to 100.
For each bar, six forward horizons are evaluated on the index: performance after X days.
Each observation is placed into a breadth bin.
Each bin/horizon pair has mean, variance and count computed.
Each bin/horizon mean is t-tested against zero.
Benjamini-Hochberg False Discovery Rate weighting allocates weight only to horizons where evidence exists.
Weighted horizon means are aggregated and annualized (252 trading days).
The map displays annualized conditional forward returns per breadth bin.
Why this is robust
Non-repainting. Breadth is in the past, returns are strictly future, lookahead_off.
Multiple horizons avoid single-window biases.
Variance, t-tests and FDR correction drastically reduce false positives.
Bins with poor sample size are visually suppressed to avoid over-interpretation.
How to use
Daily timeframe only.
Select the correct index family (S&P 500, Nasdaq 100, Russell…).
Bin size 5 to 10 points is a realistic range.
Min occurrences per bin ≥ 5 recommended.
FDR alpha 0.05 to 0.10 is a good working envelope.
Interpret as conditional expectations, not a forecast guarantee.
Notes
Do not use on random assets.
Do not extrapolate outside the chosen index family.
Always keep symbol and timeframe visible when publishing.
Indicator by Julien Eche
Seasonal Performance Analyzer | AlphaNatt📊 Seasonal Performance Analyzer | AlphaNatt
📈 Overview
Unlock the power of seasonality with this advanced visualization tool that reveals hidden patterns in market behavior. The Seasonal Performance Analyzer overlays multiple years of historical data for any selected month, allowing traders to identify recurring seasonal trends, anomalies, and potential trading opportunities.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✨ Key Features
🎯 Month-by-Month Analysis
- Isolate and analyze any single month across multiple years
- Compare up to 20 years of historical performance
- Instantly visualize seasonal patterns and trends
📊 Advanced Visualization
- Beautiful gradient coloring from oldest (light blue) to newest (dark blue) years
- Clean axis system with labeled days and months
- Professional grid layout for easy value reading
- Optional average line showing mean performance across all years
🔧 Flexible Display Options
- Normalize to 100: Start each year at a base value of 100 for easy percentage comparison
- Raw Price Mode: View actual price movements without normalization
- Customizable Colors: Adjust gradient colors and transparency to your preference
- Toggle Features: Show/hide year labels, average line, and day labels
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙️ Input Parameters
📅 Time Settings
- Select Month: Choose any month (1-12) for analysis
- Years to Display: Show 1-20 years of historical data
- Include Current Year: Option to include incomplete current year data
🎨 Visual Settings
- Line Transparency: Adjust the opacity of year lines (0-100)
- Gradient Colors: Customize oldest and newest year colors
- Average Line: Color and width customization
- Legend Display: Toggle year labels on/off
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💡 Use Cases
1. Seasonal Trading Strategies
Identify months with consistent directional bias for seasonal entry/exit timing
2. Risk Management
Spot historically volatile periods and adjust position sizes accordingly
3. Pattern Recognition
Discover recurring intra-month patterns like "first week strength" or "mid-month reversals"
4. Comparative Analysis
Compare current month's performance against historical averages to gauge relative strength
5. Anomaly Detection
Quickly identify years that deviated significantly from typical seasonal patterns
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📖 How to Use
Step 1: Add the indicator to your chart
Step 2: Select the month you want to analyze (default: November)
Step 3: Choose how many years of history to display
Step 4: Toggle normalization based on your analysis needs
Step 5: Look for patterns:
• Consistent trends across multiple years
• Divergences from the average line
• Specific days with recurring movements
• Years that broke the seasonal pattern
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 Pro Tips
✅ For Swing Traders: Focus on months showing consistent multi-day trends
✅ For Day Traders: Identify specific days within a month that show repetitive behavior
✅ For Investors: Use normalized view to compare percentage gains across years
✅ For Risk Analysis: The wider the spread between years, the less reliable the seasonal pattern
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 Example Insights
This indicator can reveal powerful insights such as:
- "November typically shows strength in the first two weeks"
- "Years above the average line tend to continue outperforming"
- "Day 15-20 historically shows consolidation patterns"
- "Election years show different patterns than non-election years"
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠️ Important Notes
- Past performance does not guarantee future results
- Seasonality is one factor among many - combine with other analysis methods
- Major events can override seasonal patterns
- Works best on assets with long price history
- More years of data generally provides more reliable patterns
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🏆 Perfect For:
- Seasonal traders
- Swing traders looking for optimal entry months
- Analysts studying market cycles
- Anyone interested in historical market patterns
- Risk managers assessing seasonal volatility
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Created by AlphaNatt - Empowering traders with advanced seasonal analysis
Version: 1.0
Pine Script: v6
License: Mozilla Public License 2.0
Perpetual Swing [HCR]The Perpetual Swing is a fully automated swing-direction indicator designed to help traders visualize long-term trend regimes and smooth out noise in volatile markets.
It combines:
• Hash Adaptive CCI – a dynamically tuned Commodity Channel Index that adapts to volatility conditions.
• Regime-based SMMA – a Smoothed Moving Average model used to define bullish and bearish environments.
The indicator continuously monitors both momentum and structural trend, switching bias automatically between long and short conditions.
It can be used on any asset or timeframe to identify directional bias, trend transitions, and potential swing entries.
How it works:
– When the adaptive CCI confirms bullish strength above the SMMA regime, the indicator signals a long bias.
– When momentum and regime flip bearish, it switches to short bias.
– The system remains continuously engaged to capture multi-cycle swings.
Eagles CompassFree script
Helps detect specific body/wick ratios on chart for 1HR,2HR,4HR timeframes
Designed to help you detect large squeezes, bounces, and other moves
Ideally use in conjunction with an RSI to filter for false positives
Session Highs & Lows Title:
Session Highs & Lows — Asia, London, New York + NY Open Line
Description:
This indicator automatically plots the session highs and lows for the three major trading sessions:
Asia (5 PM – 2 AM PT) – red rays
London (12 AM – 9 AM PT) – blue rays
Previous New York Session (6:30 AM – 1 PM PT) – brown rays
It also draws a thin dashed red line at 6:30 AM PT, marking the New York open.
The script dynamically updates each session’s range as price action unfolds, then locks it in when the session closes.
Lines extend to the right only (“rays”) so traders can easily identify liquidity zones, previous highs/lows, and intraday reaction points without cluttering the left side of the chart.
The logic uses TradingView’s session-time functions (time() windows) and resets automatically after each New York session ends, ensuring that only the current day’s structure is visible.
Unique features:
Works on any timeframe and any symbol (optimized for ES & NQ futures).
Separate colors for each session for clear visual distinction.
Session lines are “live” during the session and freeze once it closes.
Lightweight code with automatic cleanup — avoids line-count overflow.
Non-repainting and fully timezone-aware.
How to use:
Add the indicator to your chart and select your preferred timezone.
Watch how Asia and London session highs/lows guide liquidity during the New York session open (marked by the red dashed line).
ROBUST iFVG [SurgeGuru]The FVG/iFVG Robust Lifecycle indicator is a sophisticated market structure tool that moves beyond simple gap detection. It tracks the complete narrative of a Fair Value Gap—from its creation as a market imbalance to its resolution and the establishment of a new equilibrium zone. This dual-phase, institutional-grade approach provides a dynamic map of support and resistance, offering a profound edge in predicting price behavior.
Core Concept: The Two-Phase Lifecycle
The indicator is built on the principle that a Fair Value Gap has two distinct lives:
Phase 1: The Imbalance (FVG)
What it is: A rapid price move that leaves behind a "gap" or "void" with no trading activity.
Market Implication: Represents a moment of intense buying or selling pressure, creating an inefficient area price is statistically likely to return to.
Phase 2: The Equilibrium (iFVG)
What it is: A powerful support/resistance zone that forms the instant the original FVG is filled.
Market Implication: Represents the market's new consensus of "fair value" after the initial imbalance has been arbitraged away. This is often where institutional order flow resides for the next significant move.
Differentiators & "Robust" Features
Lifecycle Tracking: Unlike basic FVG tools that disappear once filled, this indicator captures the subsequent, often more important, iFVG phase.
Configurable Longevity: Offers two professional methods for managing iFVG lifespan (Full Cross or Number of Bars), preventing chart clutter while preserving relevant levels.
Advanced Alerting: Provides separate, configurable alerts for both FVG creation and iFVG formation, allowing traders to anticipate both the fill of an imbalance and the reaction at the new equilibrium.
Visual Hierarchy: Uses distinct, customizable colors and borders to instantly communicate the difference between an active imbalance (FVG) and an active decision zone (iFVG).
Code Architecture & How It Works
The script is a state management system built around two primary arrays that track the lifecycle of detected gaps.
1. Core Data Structures
The entire system is powered by parallel arrays that maintain the state of each detected zone:
FVG Arrays (Tracks Phase 1 - The Imbalance):
fvg_boxes : Stores the drawing object for each FVG.
fvg_top & fvg_bot : Store the price boundaries of the gap.
fvg_is_bull : Stores whether the FVG is bullish or bearish.
fvg_mitigated : The core state flag; becomes true when the FVG is filled, triggering the creation of an iFVG.
iFVG Arrays (Tracks Phase 2 - The Equilibrium):
ifvg_boxes : Stores the drawing object for each Inverse FVG.
ifvg_top & ifvg_bot : Inherits the price values from the parent FVG.
ifvg_is_bull : Is the inverse of the parent FVG's bias.
ifvg_original_fvg_index : Maintains a link back to the parent FVG for advanced management.
2. The Operational Workflow (Step-by-Step)
On every new bar, the script executes the following sequence:
STEP A: FVG Detection
The script checks for the 3-bar FVG pattern:
bullish_fvg = low > high (Current low is above the high from two bars ago)
bearish_fvg = high < low (Current high is below the low from two bars ago)
Upon detection, it creates a new box and pushes all its properties (price levels, bullish flag, etc.) into the FVG Arrays.
STEP B: FVG Management & Mitigation Check
The script iterates through all active FVGs in the fvg_boxes array.
For each FVG, it checks if the current price has "mitigated" (filled) the gap:
A Bullish FVG is mitigated if the current bar's low (body_low) crosses below the FVG's bottom boundary (bot_val).
A Bearish FVG is mitigated if the current bar's high (body_high) crosses above the FVG's top boundary (top_val).
If mitigation occurs, the script sets the FVG's fvg_mitigated flag to true.
STEP C: iFVG Creation (The Phase Transition)
The moment an FVG's fvg_mitigated flag is set to true, the script immediately creates a new iFVG.
It takes the exact same price levels from the parent FVG but inverts the bias (a mitigated Bullish FVG creates a Bearish iFVG, and vice versa).
It draws a new box with the user-defined iFVG color and border, and pushes all its properties into the iFVG Arrays.
STEP D: iFVG Lifecycle Management
The script iterates through all active iFVGs.
Depending on the user's setting, it manages the iFVG's lifespan:
Full Cross Mode: The iFVG remains active until price fully crosses through it again. Once crossed, the iFVG and its parent FVG are permanently deleted.
Number of Bars Mode: The iFVG remains visible for a fixed number of bars after its creation, then is automatically deactivated.
STEP E: Cleanup & Garbage Collection
The script constantly manages the visibility of boxes based on user toggles (show_normal_fvg, show_ifvg). If a feature is turned off, the boxes are not deleted but made transparent, allowing for fast performance and instant reactivation.
3. Alert System Architecture
The alert system is integrated into the state transitions:
FVG Alerts fire during STEP A (on creation).
iFVG Alerts fire during STEP C (on creation, which is the moment of FVG mitigation).
iFVG Mitigation Alerts fire during STEP D (when an iFVG is removed in Full Cross mode).
Conclusion
The FVG/iFVG Robust Lifecycle is not a mere indicator; it is a state-aware market analysis engine. By architecting a system that tracks the entire lifecycle of a price gap, it provides a dynamic, self-cleaning map of market imbalance and subsequent equilibrium. This offers a systematic framework for identifying high-probability support/resistance zones, making it an indispensable tool for discerning the underlying structure of price action.
Credits: TONO . this robust system was upgraded from his code.
Altseason Probability (BTC.D • USDT • TOTAL3 • DXY)Testing phase, workig out the kinks.
Works by aggregating several factors to define altseason probability in any given moment
USD News Indicator by ModishThe USD News Indicator overlays arrows and labels on TradingView charts to mark key USD economic releases (e.g., NFP, CPI, PCE, FOMC) from Jan-Oct 2025, with red arrows for high-impact (e.g., CPI, NFP) and orange for medium (e.g., ISM PMI). The main purpose of the indicator is to show the impact of the news in different markets upon release and their movement. Customize via inputs: toggle news types (NFP, CPI, etc.), colors, and timezone display (global options like UTC, New York, Nairobi). A top-right table lists upcoming events with dates/times and impacts, auto-updating weekly based on hardcoded schedules.
Yield Curve Phase Signal - Macro OpticsThe Yield Curve Phase Signal identifies where we are in the 10s–2s curve by detecting pivots and classifying each span as Bull Steepening, Bear Steepening, Bear Flattening, or Bull Flattening with clear background shading and date labels.
A live table tracks 10-year and 2-year yield performance across current, previous, 1-week, 1-month, and 3-month windows, plus the curve delta, so you can see phase shifts in real time.
Use the chart, table, and the Yield Curve Phase Signal PDF presentation slides together to spot regime transitions that tend to precede rotations across equities, rates, and risk assets.
To get your copy of the pdf slides that go with this indicator, go to macro-optics.com
Smart Risk - Three Institutional Models📘 Smart Risk – Three Institutional Entry Models
A precision-engineered institutional framework that blends liquidity, structure, and multi-time-frame confirmation.
🧠 Concept Overview
The Smart Risk indicator models how institutional traders and algorithms engineer entries around liquidity, imbalance, and structural shifts .
It unifies t hree distinct institutional entry models —each built around core Smart Money Concepts (SMC)—and enhances them with a Multi-Time-Frame Confluence (MTF) engine for directional alignment.
This tool doesn’t simply merge indicators.
It connects l iquidity sweeps, order-block reactions, breaker validation, and fair-value-gap mitigation into one cohesive trading logic—filtering every setup through trend, structure, and volume confirmation.
⚙️ How It Works
Setup #1 – Liquidity Sweep + Order Block Revisit + FVG Mitigation
Identifies engineered stop-hunts where price sweeps external liquidity and returns to a prior Order Block or Fair Value Gap (FVG).
Signals reversal-style entries with high probability of mean-reversion or mitigation.
Setup #2 – Supply/Demand + Mitigation / Breaker / FVG Continuation
Captures continuation trades inside trending structure.
When trend bias (via moving-average context) aligns with breaker or mitigation blocks, signals confirm institutional continuation sequences.
Setup #3 – Sweep + Classic FVG Reaction
Tracks clean displacement gaps following a liquidity sweep—ideal for scalpers and intraday reversals where imbalances act as magnets for price.
Each setup can be independently enabled or disabled from the panel.
A built-in signal-cooldown prevents repetitive triggers on the same leg.
🕒 Multi-Time-Frame Confluence
The new MTF module aligns lower-time-frame precision entries with higher-time-frame market structure.
When enabled, each setup only validates if the HTF trend confirms the same directional bias as the LTF pattern—e.g. a 5-minute bullish FVG signal requires a bullish 1-hour structure.
This ensures institutional logic respects global liquidity flow and avoids counter-trend traps.
MTF Controls:
• ✅ Enable MTF Confluence toggle
• ⏱️ Lower Time-Frame (LTF) selector (default 5 min)
• ⏱️ Higher Time-Frame (HTF) selector (default 1 hour)
• 🔄 Automatic SMA-based HTF trend detection
🎨 Visualization & Dashboard
• Order Block / Supply–Demand Zones — highlight institutional footprints
• Fair Value Gaps (FVGs) — reveal displacement inefficiencies
• Liquidity Sweeps (X / $) — mark engineered stops
• BOS & CHoCH — confirm structure continuation or reversal
• Compact Dashboard — live “Armed” state for each setup and MTF bias
Color-coded background cues emphasize active trade phases without clutter.
🧩 Core Algorithm Highlights
• Dynamic swing and pivot structure detection
• Breaker / Mitigation / Volume confirmation filters
• Fair-Value-Gap logic with directional alignment
• Cooldown control for signal throttling
• Multi-Time-Frame bias filter for contextual precision
⸻
📈 How to Use
1. Apply indicator to any asset or timeframe.
2. Select which institutional setups you want active.
3. Optionally enable MTF Confluence (5 min → 1 hr recommended).
4. Wait for BOS/CHoCH confirmation + zone alignment before entry.
5. Use OB and FVG zones for entry/exit planning with risk management.
⸻
💡 Originality Statement
This script introduces a multi-layered institutional logic engine that merges liquidity, mitigation, and imbalance behavior into a unified framework—augmented with time-frame synchronization and signal-cooldown management.
All logic, calculations, and visualization structure were built from scratch for this model.
It is not a mash-up of existing public indicators and offers measurable analytical value through MTF-aware trade validation.
⸻
⚠️ Disclaimer
This tool is intended for educational and analytical purposes only.
It does not provide financial advice or guaranteed trading outcomes.
Always back-test, validate setups, and apply proper risk management.
Volatility Cones **Volatility Cones - Interactive**
This indicator visualizes volatility cones based on historical or manual volatility and projects them up to 252 trading days into the future.
**Features:**
- Automatic start at the first trading day of the year (customizable)
- Volatility calculation from historical data or manual input
- Display of ±1σ, ±2σ, and ±3σ bands
- Projection of expected price movements based on volatility
**Use Case:**
Ideal for options traders and risk management to assess expected price movements over different time horizons.
EMA 20/50/100/200 Multi-Layer Trend Panel 📘 EMA 20/50/100/200 Multi-Layer Trend Panel
A clean and advanced trend structure analyzer designed to help traders monitor short-, medium-, and long-term market momentum simultaneously.
This indicator combines four key EMAs — 20, 50, 100, and 200 — with visual clouds, dynamic color coding, crossover labels, and a powerful real-time summary panel.
🔍 How It Works
Each EMA line changes color depending on its slope direction
→ Green tone = uptrend, Red tone = downtrend.
Detects and labels important crossovers automatically:
20/50 GC → Short-term bullish shift (Golden Cross).
50/200 GC → Long-term strong bullish breakout.
DC labels indicate Death Cross or bearish reversals.
Cloud zones between EMAs visualize the interaction between short- and long-term trends.
A compact top-right panel displays each EMA’s current value, slope direction, and overall trend alignment status (BULL / BEAR / MIXED).
⚙️ Advantages
✅ Tracks trend structure on multiple layers (short → medium → long).
✅ Highlights momentum shifts using dynamic EMA slope coloring.
✅ Provides early visual warnings of trend reversals (GC/DC).
✅ Clean, minimal panel offers an instant multi-EMA overview.
✅ Compatible with multi-timeframe (MTF) analysis — view higher-TF EMAs within lower charts.
✅ Optional bar and background coloring makes trend zones easy to interpret.
💡 Pro Tips
On higher timeframes (1D / 4H), the 50/200 cross defines the macro market direction.
On lower timeframes (5m – 15m), the 20/50 cross helps refine entry timing.
When the panel shows
→ Aligned BULL (20>50>100>200) → Strong trending condition.
→ Mixed → Ranging or transition phase.
Combine with volume or RSI for confluence in entry/exit decisions.
🧭 Purpose
This indicator aims to simplify complex market structure into an elegant, color-coded system — allowing traders to stay aligned with the dominant trend while spotting early reversals across multiple time horizons.
🧩 Ideal For
Swing & position traders confirming long-term bias.
Intraday traders aligning entries with higher-TF EMAs.
Strategy developers seeking multi-EMA trend filters.
Anyone who wants a clean, informative, and unobtrusive visual trend dashboard.
⚠️ Notes
The script supports optional MTF (multi-timeframe) mode — use carefully, as MTF data may repaint during incomplete bars.
No trading system is perfect; always combine with your personal strategy and proper risk management.
8x Heikin Ashi Streak (1m) by Bitcoin Benito🧭 Indicator Description: “8x Heikin Ashi Streak (1m) by Bitcoin Benito”
**Purpose:**
The *8x Heikin Ashi Streak* indicator helps traders quickly identify strong short-term momentum on the **1-minute timeframe**. It automatically tracks Heikin Ashi candles and alerts you whenever **8 consecutive bullish or bearish candles** appear — a visual cue that a strong intraday trend or exhaustion point might be forming.
---
🔍 **How It Works**
* The indicator continuously counts Heikin Ashi candles in real-time.
* When it detects **8 bullish (green)** or **8 bearish (red)** candles in a row:
* A green ▲ marker appears **below** the 8th candle for bullish streaks.
* A red ▼ marker appears **above** the 8th candle for bearish streaks.
* You can set alerts to automatically notify you when these streaks occur.
This makes it ideal for **momentum traders**, **scalpers**, and **trend-reversal spotters** who want to:
* Catch strong intraday moves early.
* Identify potential overextension zones before pullbacks.
* Automate alert signals for short-term trading setups.
IMPORTANT: Only trade when most of the 8 candles are below/above the EMA 8 Line respectively. Add an EMA 8 indicator to see if this is the case
---
⚙️ **How to Use**
1. **Apply to a 1-minute chart** (this script is optimized for 1m timeframes).
2. When the indicator plots a green or red triangle:
* **Green triangle (8 bullish candles):** Trend momentum is strong upward.
* **Red triangle (8 bearish candles):** Downward momentum is dominant.
3. Optionally, combine with volume or EMA filters to confirm breakouts or exhaustion.
---
🔔 **Setting Up Alerts**
* Click the **Alert (🔔)** icon on TradingView.
* Under *Condition*, select:
* “8x Heikin Ashi Streak (1m)” → “8 Bullish Heikin Ashi (1m)”
* OR “8x Heikin Ashi Streak (1m)” → “8 Bearish Heikin Ashi (1m)”
* Choose **Once per bar close** to trigger the alert when the 8th candle completes.
* Add your custom message, e.g.
> “🚀 8 bullish Heikin Ashi candles in a row on 1-minute chart!”
> “🔻 8 bearish Heikin Ashi candles in a row on 1-minute chart!”
---
📊 **Best Practices**
* Works best on **liquid assets** (major forex pairs, indices, BTC/USD, etc.).
* Pair with **RSI**, **EMA**, or **Volume** indicators for stronger confirmation.
* Not a standalone buy/sell signal — treat it as a **momentum or exhaustion alert**.
* Can be adapted to other timeframes by changing chart resolution.
---
⚠️ **Disclaimer**
This indicator is for **educational and analytical purposes only**.
Trading carries risk — always test on demo accounts and use proper risk management.
No indicator guarantees profit; this is a tool for insight and timing, not financial advice.
True Range(TR) & ATR Combined – Volatility Strength IndicatorThis indicator combines True Range (TR) and Average True Range (ATR) into a single panel for a clearer understanding of price volatility.
True Range (TR) measures the absolute price movement between highs, lows, and previous closes — showing raw, unsmoothed volatility.
Average True Range (ATR) is a moving average of the True Range, providing a smoother, more stable volatility signal.
📊 Usage Tips:
High TR/ATR values indicate strong price movement or volatility expansion.
Low values suggest compression or a potential volatility breakout zone.
Can be used for stop-loss placement, volatility filters, or trend strength confirmation.
⚙️ Features:
Multiple smoothing methods: RMA, SMA, EMA, WMA.
Adjustable ATR length.
Separate colored plots for TR (yellow) and ATR (red).
Works across all timeframes and instruments.
Best Time Slots — Auto-Adapt (v6, TF-safe) + Range AlertsTime & binning
Auto-adapt to timeframe
Makes all time windows scale to your chart’s bar size (so it “just works” on 1m, 15m, 4H, Daily).
• On = recommended. • Off = fixed default lengths.
Minimum Bin (minutes)
The size of each daily time slot we track (e.g., 5-min bins). The script uses the larger of this and your bar size.
• Higher = fewer, broader slots; smoother stats. • Lower = more, narrower slots; needs more history.
• Try: 5–15 on intraday, 60–240 on higher TFs.
Lookback windows (used when Auto-adapt = ON)
Target ER Window (minutes)
How far back we look to judge Efficiency Ratio (how “straight” the move was).
• Higher = stricter/smoother; fewer bars qualify as “movement”. • Lower = more sensitive.
• Try: 60–120 min intraday; 240–600 min for higher TFs.
Target ATR Window (minutes)
How far back we compute ATR (typical range).
• Higher = steadier ATR baseline. • Lower = reacts faster.
• Try: 30–120 min intraday; 240–600 min higher TFs.
Target Normalization Window (minutes)
How far back for the average ATR (the baseline we compare to).
• Higher = stricter “above average range” check. • Lower = easier to pass.
• Try: ~500–1500 min.
What counts as “movement”
ER Threshold (0–1)
Minimum efficiency a bar must have to count as movement.
• Higher = only very “clean, one-direction” bars count. • Lower = more bars count.
• Try: 0.55–0.65. (0.60 = balanced.)
ATR Floor vs SMA(ATR)
Requires range to be at least this many × average ATR.
• Higher (e.g., 1.2) = demand bigger-than-usual ranges. • Lower (e.g., 0.9) = allow smaller ranges.
• Try: 1.0 (above average).
How history is averaged
Recent Days Weight (per-day decay)
Gives more weight to recent days. Example: 0.97 ≈ each day old counts ~3% less.
• Higher (0.99) = slower fade (older days matter more). • Lower (0.95) = faster fade.
• Try: 0.97–0.99.
Laplace Prior Seen / Laplace Prior Hit
“Starter counts” so early stats aren’t crazy when you have little data.
• Higher priors = probabilities start closer to average; need more real data to move.
• Try: Seen=3, Hit=1 (defaults).
Min Samples (effective)
Don’t highlight a slot unless it has at least this many effective samples (after decay + priors).
• Higher = safer, but fewer highlights early.
• Try: 3–10.
When to highlight on the chart
Min Probability to Highlight
We shade/mark bars only if their slot’s historical movement probability is ≥ this.
• Higher = pickier, fewer highlights. • Lower = more highlights.
• Try: 0.45–0.60.
Show Markers on Good Bins
Draws a small square on bars that fall in a “good” slot (in addition to the soft background).
Limit to market hours (optional)
Restrict to Session + Session
Only learn/score inside this time window (e.g., “0930-1600”). Uses the chart/exchange timezone.
• Turn on if you only care about RTH.
Range (chop) alerts
Range START if ER ≤
Triggers range when efficiency drops below this level (price starts zig-zagging).
• Higher = easier to call “range”. • Lower = stricter.
Range START if ATR ≤ this × SMA(ATR)
Also triggers range when ATR shrinks below this fraction of its average (volatility contraction).
• Higher (e.g., 1.0) = stricter (must be at/under average). • Lower (e.g., 0.9) = easier to call range.
Alerts on bar close
If ON, alerts fire once per bar close (cleaner). If OFF, they can trigger intrabar (faster, noisier).
Quick “what happens if I change X?”
Want more highlighted times? ↓ Min Probability, ↓ ER Threshold, or ↓ ATR Floor (e.g., 0.9).
Want stricter highlights? ↑ Min Probability, ↑ ER Threshold, or ↑ ATR Floor (e.g., 1.2).
Want recent days to matter more? ↑ Recent Days Weight toward 0.99.
On 4H/Daily, widen Minimum Bin (e.g., 60–240) and maybe lower Min Probability a bit.






















