VIX Expiration + Month Turn MarkersThis script mark the VIX option expiration dates and the turn on=f the month dates from 2021 to 2026
There can be increased volatility in the market at these dates or +- 3 days from those dates.
Forecasting
Support Resistance-Session Box Breakout Support Resistance-Session Box Breakout สามารถใช้แนวรับแนวต้านจากSupport Resistance-Session Box หาจุกลับตัวหรือหาจุดเข้าเทรดได้
VIXO - VIX OscillatorVIXO (VIX Oscillator) is a volatility oscillator built from the CBOE Volatility Index (symbol: TVC:VIX). It helps visualize volatility regime shifts by combining a smoothed VIX RSI with a normalized VIX momentum component, plus a VIX histogram that becomes more/less prominent depending on how far VIX is from its moving average. It helps you assess whether market conditions may be approaching rare but powerful squeeze phases.
WHAT THIS INDICATOR PLOTS
1) VIX RSI (cyan line)
- RSI is calculated on the VIX close and then smoothed (SMA) to reduce noise.
- Use it to observe short-term momentum in volatility rather than price.
2) VIX Normalized Momentum (gray line)
- Momentum is measured as ROC (rate of change) of the VIX close.
- That ROC is normalized to a 0–100 scale using a rolling lookback window:
- 50 is the midpoint of the recent momentum range (neutral within the selected window).
- Values near 0/100 indicate momentum near the low/high of that lookback window.
3) VIX Value Bars (histogram)
- Histogram shows the raw VIX value.
- Bar visibility is dynamically adjusted (transparency changes) based on the ratio of VIX to its 21-period SMA:
- When VIX is close to its MA, bars are more transparent.
- When VIX deviates more from its MA (within a capped range), bars become more visible.
- If VIX High is below 30, the script intentionally keeps bars fully transparent to reduce visual clutter.
LEVELS (REFERENCE ONLY)
The horizontal levels are visual guides to help segment oscillator zones. They are not guarantees and should not be treated as standalone trade signals:
- 80: “Panic of Market”
- 60: “VIX says BUY” (label only; not financial advice)
- 50: “Neutral / Momentum Mid”
- 40: “Get Ready”
HOW TO USE
- Apply VIXO to any chart. The indicator always pulls TVC:VIX data, regardless of the chart symbol.
- Typical interpretation:
- Rising VIX RSI and/or rising normalized momentum can indicate increasing volatility pressure.
- Falling readings can indicate volatility easing.
- Compare changes in VIXO with your chart’s price structure, trend filters, or risk management framework.
INPUTS
- RSI Length: RSI period on VIX close (smoothed afterward).
- Momentum Length: ROC period on VIX close.
- Momentum Normalization Lookback: window used to scale ROC into 0–100.
DATA & BEHAVIOR NOTES
- Data source: request.security("TVC:VIX", timeframe.period, OHLC).
- The script does not use lookahead to access future data.
- On realtime bars, values can update while the current bar is forming; historical bars remain fixed once closed.
- Availability of TVC:VIX data depends on your TradingView data access.
IMPORTANT DISCLAIMER
This indicator is provided for educational and informational purposes only and does not constitute financial, investment, or trading advice. It does not predict the future, does not guarantee results, and should not be used as the sole basis for any trading decision. Always validate signals with additional analysis and use appropriate risk management.
MACD Histogram Expansion Alerts (Scalp)Purpose: Alerts when MACD histogram is expanding (momentum increasing) rather than simply crossing. Designed for 1-minute scalping and intraday momentum confirmation.
This script is for traders who are tired of late MACD cross alerts.
Instead of firing when MACD lines cross (which often happens after the move), this indicator alerts when the MACD histogram is expanding — meaning momentum is actually increasing right now, not rolling over.
I use it as a “heads up” alert, not a buy/sell signal. When it fires, I check price action, volume, VWAP, support/resistance, etc., to see if the move is worth trading.
Best suited for 1-minute charts, scalping, and fast intraday momentum.
MACD Histogram Expansion Alerts (Scalp) is a lightweight alert-focused indicator designed for intraday traders and scalpers, particularly on lower timeframes such as the 1-minute chart.
Rather than triggering alerts on standard MACD line crossovers (which tend to lag in fast or volatile markets), this script detects MACD histogram expansion — a condition that indicates momentum acceleration, not just direction.
🔍 What this script does
Uses a fast MACD configuration suitable for lower timeframes
Monitors the MACD histogram slope and magnitude
Triggers alerts only when the histogram expands for multiple consecutive bars
Alerts are fired on bar close only, reducing noise and false intrabar signals
🚀 Why focus on histogram expansion?
Histogram expansion highlights when momentum is building, which can be useful for:
Continuation setups
Early momentum confirmation
Avoiding entries when momentum is already fading
This approach is especially helpful in small caps, news-driven stocks, and volatile intraday instruments, where traditional MACD cross alerts can arrive too late.
🔔 Alert Types
Bullish MACD Histogram Expansion
Bearish MACD Histogram Expansion
Each alert can be enabled independently and is intended as an attention signal, not a standalone trading system.
⚙️ Customizable Inputs
MACD Fast / Slow / Signal lengths
Number of consecutive expanding histogram bars required
Optional minimum histogram magnitude filter
Optional directional filter (above/below zero line)
⚠️ Important Notes!!!!
This script does not place trades
Alerts should be used with additional context, such as price action, volume, VWAP, or support/resistance
Not designed for higher-timeframe or swing trading use .
If you find this helpful, feel free to adapt it to your own trading style or timeframe. This script is meant to be simple, flexible, and non-opinionated.
Intuitive Predictive MACD TargetsThis indicator uses Reverse Engineering math to calculate the exact price the market needs to reach for specific MACD events to happen on the current bar.
Standard MACD is a lagging indicator—you usually wait for the candle to close to confirm a signal. This script changes that by drawing "Finish Lines" on your chart, showing you exactly where price must go right now to trigger a Crossover or a Momentum Hook.
The "Reverse Engineering" Concept
Instead of calculating MACD from Price, we calculate the Required Price from the Target MACD.
Q: "At what price will the MACD line cross the Signal line?"
A: The script solves this and draws the Green/Red "Crossover" Line.
Key Features
1. Three Distinct Targets
Crossover Target (PCO/NCO): The exact price needed to trigger a Buy/Sell signal on the current candle.
Dynamic Coloring: Turns Green if price needs to go UP to cross, Red if price needs to go DOWN.
Settlement Target (The Hook): The exact price where the MACD momentum flattens out (Angle = 0). If price touches this Orange Dashed Line, the trend is likely pausing or preparing to reverse.
Zero Cross Target: The price needed for MACD to reclaim the Zero Line.
2. Smart "Staggered" Labels (No Overlap)
Unlike other scripts where text piles up and becomes unreadable, this indicator automatically spreads labels horizontally.
Crossover info stays near the price.
Settlement info is shifted to the right.
Zero info is shifted further right.
Result: You can read all three targets clearly, even if the prices are almost identical.
3. Full Customization
Line Length: Choose "Infinite" to see targets as Support/Resistance levels across the screen, or "Short" to keep your chart background clean.
Text Visibility: Option to force text to White or Black for high contrast on Dark/Light themes.
Styles: Fully adjustable colors, line widths, and styles (Solid, Dashed, Dotted) for each target type.
How to Use
The "Finish Line" Strategy: If you are Long, and the Red NCO Line appears just below the current price, be cautious. It means a very small drop will confirm a Bearish Cross.
Momentum Checks: Watch the Orange "Settlement" Line.
If price is moving away from the Orange line, the trend is accelerating (Safe to hold).
If price touches the Orange line, momentum has died (Consider taking profit).
Settings
Visual Settings: Change Line Length (Infinite/Short) and Text Color.
MACD Settings: Standard inputs (Default 12, 26, 9).
Toggles: Option to show/hide the Zero Line target.
CVD Absorption & Distribution Pro v3 (With Logit Regression)CVD Absorption & Distribution Pro v3 - Complete Guide
Introduction and Overview
The CVD Absorption and Distribution Pro v3 is an advanced trading indicator designed for TradingView that reveals hidden market dynamics invisible on standard price charts. This tool analyzes the battle between buyers and sellers at the micro level, identifying when large institutional players are quietly accumulating or distributing positions while price remains deceptively stable.
Traditional volume indicators fail traders because they treat all volume the same way. They cannot distinguish between aggressive buying and aggressive selling. More importantly, they cannot reveal when significant selling pressure is being absorbed by hidden buyers, or when strong buying pressure is being quietly distributed by large sellers. This information asymmetry has historically given institutional traders a massive advantage over retail participants.
This indicator solves that problem by implementing Cumulative Volume Delta analysis combined with machine learning prediction models, hidden liquidity detection, and comprehensive statistical validation. The result is a professional-grade analytical tool that was previously available only on expensive specialized platforms, now accessible to the entire TradingView community.
What is Cumulative Volume Delta
Cumulative Volume Delta, commonly known as CVD, is a method of categorizing trading volume based on whether it represents buying or selling pressure. The concept is straightforward. When price ticks upward from one moment to the next, the volume associated with that price movement is classified as buying volume. When price ticks downward, that volume is classified as selling volume. The difference between total buying volume and total selling volume over a given period is the delta.
A positive delta indicates that buyers were more aggressive during that period. A negative delta indicates sellers were more aggressive. By tracking this delta cumulatively over time, traders can see the underlying pressure that may not be immediately visible in price action alone.
However, raw CVD analysis has limitations. The real trading edge emerges when we compare what the CVD suggested should happen to price versus what actually happened. When there is significant selling pressure but price fails to decline, something interesting is occurring. Someone is absorbing all that selling. This is where the concepts of absorption and distribution become critically important.
Core Functionality Explained
The indicator operates by accessing one-second bar data from TradingView, the finest granularity available on the platform. This micro-level data is then grouped into clusters, which are user-configurable time blocks. The default setting creates clusters of sixty one-second bars, effectively creating one-minute analysis blocks. However, traders can adjust this to create clusters representing anywhere from a few seconds to several minutes depending on their trading style.
For each one-second bar within a cluster, the script must determine whether to classify the volume as buying or selling. This classification happens based on whether price moved up or down compared to the previous bar. But what happens when price does not change at all? The indicator provides three methods to handle this situation.
The first method, called Last Direction, assigns unchanged volume to whichever direction occurred most recently. If the previous tick was an uptick, the unchanged volume is counted as buying. This approach assumes market momentum tends to persist at very short timeframes.
The second method, called Split Fifty-Fifty, divides unchanged volume equally between buying and selling. This conservative approach acknowledges that when price does not move, we genuinely cannot know whether buyers or sellers were responsible.
The third method simply ignores unchanged ticks entirely, excluding them from the CVD calculation. This purist approach ensures only directionally confirmed volume influences the analysis.
Understanding Absorption
Absorption is one of the two primary signals this indicator detects. Absorption occurs when significant selling pressure fails to push price lower. Imagine a scenario where the delta is strongly negative, meaning sellers are aggressively hitting bids and overwhelming buyers. Under normal circumstances, this should drive price down. But if price stays flat or even rises despite this selling pressure, something unusual is happening. A large buyer is absorbing all that selling without allowing price to fall.
This behavior is characteristic of institutional accumulation. Large players who want to build substantial positions cannot simply place massive buy orders because that would move price against them immediately. Instead, they often buy by absorbing selling pressure. They let other participants sell to them at stable prices, quietly accumulating shares without revealing their intentions.
The indicator identifies absorption by first checking whether the CVD magnitude exceeds a calculated threshold based on historical averages. If the CVD is significantly negative and exceeds this threshold, the script then examines what happened to price. If price moved up or stayed flat, this is classified as full absorption. If price moved down but moved less than expected given the selling pressure, this is classified as partial absorption.
The expected price move is calculated based on the relationship between CVD magnitude and typical price movement observed historically. If current CVD is twice the average, the expected price move would be approximately twice the average price move. When actual price movement falls short of this expectation, the shortfall percentage quantifies the absorption.
Understanding Distribution
Distribution is the mirror image of absorption. It occurs when significant buying pressure fails to push price higher. When delta is strongly positive but price stays flat or even declines, someone is distributing shares into that buying pressure. They are selling to eager buyers without allowing price to rise.
This behavior characterizes institutional distribution. Large holders who want to exit substantial positions face the same challenge as accumulators. They cannot simply dump massive sell orders because that would crash the price before they finish selling. Instead, they often sell by distributing into buying pressure, letting other participants buy from them at stable prices while quietly reducing their position.
The indicator identifies distribution using the same logic as absorption but in reverse. Strongly positive CVD that exceeds the threshold combined with flat or declining price signals distribution. Partial distribution is identified when price rises but rises less than the CVD magnitude would suggest.
Hidden Liquidity Detection
Perhaps the most valuable feature of this indicator is its ability to quantify hidden liquidity. Hidden liquidity refers to large orders that are not fully visible in the order book. Institutional traders commonly use iceberg orders, which display only a small portion of the total order size while the rest remains hidden. As the visible portion gets filled, more of the hidden quantity is revealed.
The indicator estimates hidden liquidity by analyzing partial absorption and partial distribution events. When price moves less than expected given the CVD, the difference represents volume that was absorbed by hidden orders. The cumulative hidden buy liquidity and hidden sell liquidity provide insight into institutional activity that remains completely invisible on standard charts.
A high ratio of hidden buy liquidity to hidden sell liquidity suggests institutional accumulation is occurring. Conversely, a high ratio of hidden sell liquidity to hidden buy liquidity suggests institutional distribution. These signals often precede significant price movements as the institutional positioning eventually influences market direction.
The Prediction Model
This indicator goes beyond simple pattern detection by implementing a genuine machine learning model trained on historical data. The model uses logistic regression to predict whether price will move up or down in subsequent clusters based on current market conditions.
The model considers three primary factors. First, it looks at the normalized CVD, which measures current CVD relative to its historical average and variability. Second, it examines net flow, which is the difference between absorption and distribution. Third, it analyzes hidden flow, the difference between hidden buy liquidity and hidden sell liquidity.
During the training process, the model examines historical clusters where price actually moved significantly. It learns the relationship between these three factors and subsequent price direction. Through iterative gradient descent, the model adjusts its coefficients to best fit the historical data.
The output is a probability between zero and one representing the likelihood that the next cluster will see upward price movement. A probability above sixty percent suggests bullish conditions. A probability below forty percent suggests bearish conditions. Values between forty-five and fifty-five percent indicate neutral or uncertain conditions.
Model Validation Metrics
The indicator provides several metrics to help traders assess whether the prediction model is actually useful for the specific instrument they are analyzing. This validation is critically important because not all instruments exhibit predictable CVD-price relationships.
Logistic Accuracy shows the percentage of correct binary predictions across the training window. An accuracy of fifty percent is essentially random, providing no edge. Accuracy above fifty-five percent suggests the model has genuine predictive value.
Sign Agreement Rate measures how often CVD direction matched price direction historically. When CVD is positive and price goes up, or when CVD is negative and price goes down, this counts as agreement. A sign agreement rate significantly above fifty percent indicates that CVD provides useful directional information for this instrument.
Weighted Sign Agreement applies the same concept but weights each observation by CVD magnitude. High-magnitude CVD events that correctly predict direction count more than low-magnitude events. This metric reveals whether strong CVD signals are more reliable than weak ones.
If these validation metrics are close to fifty percent, traders should be cautious about relying on the model for that particular instrument. The CVD-price relationship may be too noisy or the market microstructure may not suit this type of analysis.
Bucket Analysis
The indicator performs bucket analysis by segmenting historical data into five groups based on CVD magnitude. The first bucket contains clusters where CVD was very strongly negative, more than twice the average in the negative direction. The second bucket contains moderately negative CVD clusters. The third bucket represents neutral conditions where CVD was within one standard average of zero in either direction. The fourth bucket contains moderately positive CVD, and the fifth bucket contains very strongly positive CVD.
For each bucket, the indicator calculates what percentage of clusters saw price move upward. In a market where CVD has predictive value, we would expect to see low upward percentages in negative CVD buckets and high upward percentages in positive CVD buckets. The spread between the highest and lowest buckets indicates how useful CVD is for predicting direction.
If the bucket analysis shows similar upward percentages across all buckets, the CVD-price relationship is essentially random for that instrument. If the pattern shows the expected gradient from low to high, CVD analysis should provide genuine trading edge.
Strength Tiers
Not all absorption and distribution events are equally significant. The indicator classifies events into three strength tiers based on their magnitude relative to baseline averages.
Normal events occur when CVD is between one and two times the average magnitude. These events happen regularly throughout trading sessions and represent standard market dynamics.
Strong events occur when CVD is between two and three times the average magnitude. These elevated significance events warrant additional attention and may indicate more substantial institutional activity.
Exceptional events occur when CVD exceeds three times the average magnitude. These rare occurrences often precede significant price movements and represent major institutional footprints in the market.
The indicator tracks how many events of each tier occurred during the display period, helping traders identify sessions with unusual institutional activity.
Divergence Detection
The indicator implements sophisticated divergence detection that compares trends in CVD with trends in price over a rolling window of recent clusters. Divergence occurs when these two metrics move in opposite directions or when one moves significantly while the other remains flat.
Bullish divergence manifests in two forms. Hidden accumulation occurs when the CVD trend turns increasingly positive while price remains flat, suggesting buying pressure is building without yet moving price. CVD accumulation occurs when average CVD is positive but average price movement is minimal.
Bearish divergence also manifests in two forms. Hidden distribution occurs when CVD trend turns increasingly negative while price remains stable, suggesting selling pressure is building. CVD distribution occurs when average CVD is negative but price refuses to decline.
Divergence signals are quantified by their strength relative to baseline averages, allowing traders to prioritize the most significant divergences.
Display and Interface
The indicator presents all its analysis through a comprehensive table overlay positioned on the chart. The table is organized into logical sections that can be individually enabled or disabled based on trader preferences.
The Direction Prediction section shows the current signal, probability, and period cluster breakdown between bullish, bearish, and neutral predictions. The Model Performance section displays accuracy metrics and training sample counts.
The CVD Bucket Analysis section shows the five-bucket breakdown with upward percentages for each, along with an interpretation of whether a predictable pattern exists.
The Baselines section displays the calculated averages for CVD and price movement, along with the current threshold being used for event detection.
The Results section shows total absorption and distribution for the display period, the ratio between them, net values, and an overall flow signal interpretation.
The Full versus Partial section breaks down events by type, showing how much activity was full absorption or distribution versus partial events indicating hidden liquidity.
The Hidden Liquidity section displays estimated hidden buy and sell volumes, their ratio, average shortfall percentages, and an iceberg signal interpretation.
The Strength Tiers section shows event counts by tier for both absorption and distribution, highlighting any exceptional events.
The Divergence section indicates whether bullish or bearish divergence is currently present and its strength.
The Statistics section provides cluster counts and event counts for reference.
Configuration Recommendations
For scalping and very short-term trading with holding periods of one to five minutes, traders should use smaller cluster sizes around thirty to sixty seconds, shorter average lengths around two to three hundred clusters, and enable intensity weighting to emphasize high-magnitude events.
For day trading with holding periods of fifteen to sixty minutes, the default settings work well. Cluster size of sixty for one-minute analysis, average length of seven hundred fifty for approximately two trading days of history, and single-day display period provide balanced analysis.
For swing trading with multi-day holding periods, larger cluster sizes of three hundred to six hundred representing five to ten minute blocks reduce noise. Longer average lengths of seven fifty to fifteen hundred clusters capture broader patterns. Multi-day display periods of three to five days reveal accumulation and distribution over meaningful timeframes.
Interpreting Results
When the absorption to distribution ratio exceeds one point five, this suggests bullish underpinnings. Selling pressure is being absorbed, potentially indicating institutional accumulation. Traders should look for confirmation from hidden buy liquidity metrics, model probability favoring upside, and any bullish divergence signals.
When the ratio falls below zero point six seven, this suggests bearish underpinnings. Buying pressure is meeting distribution, potentially indicating institutional selling. Validate with hidden sell liquidity metrics, model probability favoring downside, and any bearish divergence signals.
When the ratio falls between zero point eight and one point two, the market is in relative equilibrium. Traders should wait for the ratio to break out of this neutral range, watch for exceptional tier events that might signal a shift, or wait for divergence to develop.
Regarding model predictions, when accuracy exceeds fifty-eight percent and sign agreement exceeds fifty-five percent, there is a strong predictive relationship. CVD analysis provides genuine edge for this instrument. When accuracy falls between fifty-four and fifty-eight percent or sign agreement falls between fifty-two and fifty-five percent, there is moderate edge. Use signals for confirmation but not as standalone entry triggers. When both metrics fall below their respective thresholds, the relationship is weak or random. Traders should reconsider whether CVD analysis adds value for this particular instrument.
Best Practices
Allow adequate training time before relying on model predictions. The prediction model requires substantial data to train effectively. Ensure at least five hundred clusters have accumulated before trusting model outputs. The indicator displays training sample count for verification.
Always validate model quality before trading based on predictions. A fifty-two percent accuracy is statistically indistinguishable from random chance. Ensure your edge is real by checking all validation metrics.
Context matters tremendously in interpretation. Absorption during an established uptrend suggests continuation strength. Absorption during a downtrend suggests potential reversal. Always interpret signals within the broader market context rather than in isolation.
Combine this indicator with price action analysis. The CVD analysis reveals hidden dynamics but should not be used alone. Combine with support and resistance levels, trend structure analysis, volume profile, and traditional technical patterns for comprehensive market assessment.
Monitor for regime changes over time. Market microstructure can change as participation patterns evolve. Regularly review bucket analysis to ensure the CVD-price relationship remains stable. Significant deterioration in predictive patterns may indicate changing market conditions requiring parameter recalibration.
Value to the Trading Community
This indicator democratizes institutional-grade analysis. Historically, this level of order flow analysis required expensive specialized platforms that cost hundreds or thousands of dollars monthly. By implementing these concepts within TradingView Pine Script, this tool makes professional analysis accessible to all traders regardless of budget.
The indicator serves as an educational framework. Beyond practical trading applications, the visible statistics help traders understand the CVD-price relationship. Bucket analysis teaches probabilistic thinking. Model coefficients reveal which factors matter most. Validation metrics prevent overconfidence in unreliable signals.
The customization depth accommodates diverse trading styles. With over thirty configurable parameters, the indicator adapts to virtually any approach from rapid scalping to patient swing trading.
The transparent methodology builds trust. Unlike black-box commercial solutions where algorithms remain hidden, every calculation is visible in the source code. Traders can verify the logic, understand the assumptions, and modify the approach to suit their specific needs.
Conclusion
The CVD Absorption and Distribution Pro v3 represents a significant advancement in accessible order flow analysis for retail traders. By combining time-tested CVD concepts with modern statistical validation and machine learning techniques, it provides a comprehensive toolkit for understanding the hidden dynamics driving price action.
Its value lies not merely in generating trading signals but in providing the framework to understand why those signals occur and whether they are statistically meaningful for the specific instrument being traded. This combination of actionable intelligence and educational transparency makes it an invaluable addition to any serious trader analytical arsenal.
The indicator rewards those who invest time in understanding its methodology, optimizing its parameters for their specific trading style, and validating its signals against their own market experience. Used thoughtfully, it reveals the institutional footprints that remain invisible on conventional charts. The absorption, distribution, and hidden liquidity patterns it detects often presage significant market movements, giving attentive traders the opportunity to position themselves alongside smart money rather than against it.
15-Minute High Low Short LinesThis indicator plots short horizontal lines showing the **high** and **low** of the most recently completed 15-minute candle, regardless of the chart's timeframe.
Key Features:
- Lines start exactly at the open time of the previous completed 15-minute bar
- Lines extend forward for a user-defined number of minutes (default: 60 minutes = 1 hour ahead)
- Only the latest lines are displayed (old lines are automatically removed for a clean chart)
- Fully customizable: line colors, width, and extension length
- Non-repainting and works perfectly on any timeframe (1m, 5m, 1h, daily, etc.)
- Ideal for marking recent 15-minute range levels for breakout or support/resistance trading
Great for intraday traders who want quick visual reference to the prior 15-minute high and low without clutter.
ORB Asia London NYThis script plots the highs & lows of all three market sessions Asia, London, and NY. in UTC The time frames can be adjusted to you're own ORB strategy.
The time period of opening range & the max timeframe to display it on can be adjusted from the settings.
So for eg. if want to use 15m NY ORB to trade, then set "NY time " as 14:30-14:45
UTC Daily High / Low Tracker (UTC Anchored)This indicator will track the Daily high and low AKA daily range of each day using UTC (00:00)
ATR Price ZoneThe ATR Price Zone is an indicator which takes the Daily Average True Range of a stock and shows how high and low the price of the stock could possibly go from the opening price.
Key features:
The ATR Price Zone is an indicator which takes the Daily Average True Range of a stock and shows how high and low the priced the stock could possibly go from the opening price.
Key features:
ATR Price Zone uses zones looking forward to help strategize possible movements in price.
This indicator is customizable with zones, horizontal lines, a quick reference chart and colors.
The indicator continues to move forward with the chart.
It references the Daily True Average Range regardless of which Time Frame you are using.
It also references the opening candle with a blue arrow when using less than daily time frames.
Create by BothwellTrader
Benchmark & Multi-Correlation CombinedScann the correlation of your asset to different (variable benchmarks)
Kernel Filter Histogram (RBF)The Kernel Filter Histogram (RBF) is a regime-detection and edge-confirmation tool built on Gaussian (RBF) kernel regression.
It is designed to identify when market conditions are favorable for participation and when traders should stay defensive.
Instead of reacting to price noise, this indicator measures the normalized slope of a smoothed kernel regression curve, converts it into a z-score, and displays it as a histogram representing directional edge pressure.
What It Measures
Underlying market regime (bullish, bearish, or neutral)
Strength and quality of directional momentum
Statistical edge expansion vs compression
When trend continuation is more likely vs chop
How It Works
Applies Nadaraya–Watson kernel regression using a Gaussian (RBF) kernel
Calculates the slope of the regression curve
Normalizes slope using ATR for cross-instrument consistency
Converts the result into a z-score to measure statistical deviation
Smooths the output into a readable histogram + signal line
Uses an optional threshold gate to filter low-quality conditions
Reading the Histogram
Green bars → Bullish regime / positive edge
Red bars → Bearish regime / negative edge
Gray bars → Neutral / low-edge environment
Above zero → Bullish pressure dominates
Below zero → Bearish pressure dominates
Threshold gating allows you to require minimum edge strength before treating signals as actionable.
Best Use Cases
Trade filter (only take longs when bullish, shorts when bearish)
Regime confirmation for existing strategies
Momentum quality assessment
Avoiding chop and low-probability setups
Multi-timeframe alignment tool
What This Is (and Is Not)
✔ IS: A high-quality regime and edge filter
✔ IS: Designed for professional trading systems
✔ IS: Instrument-agnostic and timeframe-agnostic
✖ NOT: A buy/sell signal generator
✖ NOT: A lagging moving average
✖ NOT: A beginner indicator
Recommended Usage
Use this indicator as a gatekeeper:
Only execute setups when the histogram confirms favorable regime conditions
Combine with your entry trigger, not instead of it
Works exceptionally well with trend-following, momentum, and mean-expansion systems
Perfect Reversal - LogicPrecision reversal indicator built specifically for Nasdaq (NQ) futures.
✅ No repaint — what you see stays
✅ No delay — real-time signals
✅ Optimized for 3min & 5min timeframes
✅ Built-in alerts for long & short entries
Detects high-probability reversal points before the move happens. Designed for day traders and scalpers who want an edge on timing.
Works on NQ futures. Clean signals. No noise.
Gann Sacred Geometry Hexagram Ver 1.0# **Gann Sacred Geometry Hexagram Ver 1.0**
### **Advanced Gann Theory with Sacred Geometry Confluence Signals**
---
## ** Background:**
**W.D. Gann (1878-1955)** was one of the most legendary traders in history, reportedly achieving over 90% trading accuracy. He discovered that markets don't move randomly—they follow geometric and mathematical laws encoded in nature itself.
Gann spent years studying:
- **Ancient Egyptian geometry and pyramids**
- **Pythagorean mathematics** (sacred ratios)
- **Biblical numerology and Hebrew Kabbalah**
- **Astronomical cycles and planetary movements**
- **Musical harmonics and octaves**
His core discovery: **"When time and price square, expect a market change."**
### **Sacred Geometry in Markets:**
The **Hexagram (Star of David)** represents perfect market balance:
- **△ Triangle Up** = Bullish forces, Yang energy, Fire element, Expansion
- **▽ Triangle Down** = Bearish forces, Yin energy, Water element, Contraction
- **Together (🔯)** = Market equilibrium—where opposing forces meet
When price reaches these geometric intersections at precise time intervals, major reversals or continuations occur.
### **Gann's Key Principles:**
1. **Price-Time Balance** - Markets must balance price movement with time elapsed
2. **Geometric Angles** - Price moves along predictable geometric rays (45°, steeper, shallower)
3. **Square of Nine** - Markets move in "squares" completing geometric cycles
4. **Harmonic Divisions** - 8ths, quarters, halves—like musical octaves—mark turning points
5. **Cardinal Cross** - 0%, 25%, 50%, 75%, 100% are magnetically important levels
**Gann's Philosophy:**
> "Markets are based on natural law. What has occurred before will occur again because markets operate on cycles. Understanding geometry and time unlocks market behavior."
---
## **What This Indicator Does:**
This script translates Gann's complex theories into visual, actionable trading signals by:
1. **Creating a geometric grid** based on major swings (Square of Nine principle)
2. **Overlaying sacred hexagram patterns** at key price-time zones
3. **Calculating all 9 Gann angles** dynamically as support/resistance
4. **Detecting confluence** when multiple Gann principles align simultaneously
5. **Generating high-probability signals** with scoring (0-30 points)
When price touches multiple geometric levels + angles + time cycles + trend alignment = **Maximum Gann Confluence** 🎯
---
## **Core Methodology:**
**Gann Principles Implemented:**
- **9 Gann Angles** (1x1, 2x1, 1x2, 3x1, 1x3, 4x1, 1x4, 8x1, 1x8)
- 1x1 (45°) is the "Master Angle"—most important
- Steeper/shallower angles provide support/resistance layers
- **Cardinal Cross Levels** (0%, 25%, 50%, 75%, 100%)
- 50% level = center of gravity (most powerful)
- Quarter divisions mark psychological/geometric zones
- **Gann's 8ths Timing** - Markets turn at 1/8, 1/4, 3/8, 1/2, 5/8, 3/4, 7/8 of cycle
- Based on musical octaves and harmonic vibrations
- **Price-Time Squaring**
- When price moved = time elapsed → market is "squared" → change imminent
- **Square of Nine Grid**
- Geometric cells extending forward in time
- Each cell = complete price-time cycle
**Sacred Geometry Elements:**
- **Hexagram Pattern** (Star of David) - Balance of opposing forces
- **Golden Ratio (Phi 1.618)** - Nature's proportion in market structure
- **Geometric Confluence Zones** - Where multiple patterns intersect
---
## **How Signals Are Generated:**
**Buy Signals** occur when multiple confirmations align:
- ✅ Price touches **downward Gann angles** (support)
- ✅ Near **Cardinal Cross levels** (especially 50%)
- ✅ At **Gann 8th cycle divisions** (timing)
- ✅ **Price-time relationship is squared** (balanced)
- ✅ **3+ angles cluster together** (confluence zone)
- ✅ **Aligned with uptrend** (optional filter)
**Sell Signals** trigger when:
- ✅ Price touches **upward Gann angles** (resistance)
- ✅ At geometric levels during cycle timing
- ✅ Multiple Gann principles converge
**Confluence Scoring (0-30 points):**
| Element | Points | Meaning |
|---------|--------|---------|
| 50% Cardinal Level | 6 | Center of gravity |
| 3+ Angle Cluster | 6 | Strong confluence |
| 1x1 Master Angle | 5 | Most important angle |
| 0%/100% Boundaries | 5 | Square edges |
| Price-Time Squared | 4 | Gann balance |
| Gann 8th Timing | 3 | Cycle turning point |
| Trend Alignment | 3 | Direction confirmation |
**Higher score = Stronger confluence = Higher probability setup**
Default minimum: 12 points (customizable 8-30)
---
## **Key Features:**
### **Visual Elements:**
✅ Square grid cells (Square of Nine)
✅ Hexagram overlays (Star of David sacred geometry)
✅ Golden ratio inner triangles (Phi 1.618)
✅ 9 Gann angle projections
✅ Cardinal Cross levels (0-25-50-75-100%)
✅ Extended price levels into future
✅ Time cycle divisions
✅ All elements toggle on/off
### **Signal Controls:**
✅ Minimum confluence score (8-30, default: 12)
✅ Price/angle tolerance adjustments
✅ Signal cooldown periods
✅ Boundary requirement filters
✅ Trend alignment (EMA-based)
✅ Counter-trend signal toggle
✅ Gann 8ths timing on/off
✅ Price-Time Square filter
✅ Angle clustering detection
### **Customization:**
✅ Gann numbers: 11, 22, 44, 88, 176, 352 (harmonic choices)
✅ Grid size: 1x1 to 7x7
✅ Line thickness controls
✅ Color schemes
✅ Signal display styles (Labels, Diamonds, Circles, Stars)
✅ Confluence score display on/off
### **Alert System:**
✅ Built-in TradingView alerts
✅ Real-time signal notifications
✅ Custom alert messages
---
## **Best Use Cases:**
📊 **Swing Trading** - Identify key reversal zones days in advance
⏰ **Time Cycle Analysis** - Predict turning points with 8ths divisions
📈 **Trend Trading** - Gann angles show dynamic support in trends
🎯 **Confluence Trading** - Multiple confirmations reduce false signals
⚖️ **Balance Point Trading** - Find where price-time squares
**Optimal Timeframes:** 1H, 4H, Daily (works on all timeframes)
---
## **Settings Guide:**
**Conservative Approach (Higher Accuracy):**
- Min Confluence Score: 15+
- Trend Filter: ON
- Require Boundary: ON
- Allow Counter-Trend: OFF
- Price-Time Square: ON
**Aggressive Approach (More Signals):**
- Min Confluence Score: 10-12
- Trend Filter: Optional
- Allow Counter-Trend: ON
- Price-Time Square: Optional
**Recommended Starting Settings:**
- Gann Number: 88 (harmonic choice)
- Grid Size: 3x3 (balanced view)
- Min Score: 12 (good confluence)
- Trend Filter: ON (safer)
---
## **Important Disclaimers:**
⚠️ **Educational Tool** - Based on historical Gann principles. Not financial advice.
⚠️ **Learning Curve** - Sacred geometry and Gann analysis are advanced concepts. Study the patterns before live trading.
⚠️ **Risk Management** - Always use stop losses and position sizing. No indicator is 100% accurate.
⚠️ **Best Combined With:**
- Market structure understanding
- Your own trading strategy
- Fundamental analysis
⚠️ **Market Conditions** - Works best in trending markets with clear swings. Less effective in choppy, range-bound conditions.
---
## **How to Use:**
1. **Let Grid Form** - Wait for major swing high-to-low to establish grid
2. **Watch Confluences** - Look for signals with scores 12+
3. **Confirm Direction** - Use trend filter or check higher timeframe
4. **Enter on Signal** - Buy/Sell labels appear at confluence zones
5. **Manage Risk** - Set stops at opposite grid levels
6. **Target Next Level** - Grid shows natural targets at cardinal levels
**Pro Tip:** Higher confluence scores (18+) = exceptional setups. Wait for these!
---
## **Version History:**
**Version 1.0** - Initial Release
- Complete 9-angle Gann system
- Cardinal Cross levels (0-25-50-75-100%)
- Gann 8ths harmonic timing
- Price-Time Square detection
- Angle clustering confluence
- Trend alignment filters
- Hexagram sacred geometry overlay
- Golden ratio (Phi) triangles
- Customizable scoring system
---
**Gann's Final Wisdom:**
> "The future is but a repetition of the past. Study the past to know the future. The market moves in circles and cycles because human nature never changes."
---
**Trade with geometry. Trade with time. Trade with Gann.** 🎯🔯📐
Expansion Setup: Entries & structure + AlertsThis is a specific market condition often called a Broadening Formation or an Expansion Move, where volatility increases enough to break both the previous structural low and then immediately break the previous structural high (or vice versa).
1. LL to HH: A New Lower Low is formed, followed immediately by a New Higher High.
2. HH to LL: A New Higher High is formed, followed immediately by a New Lower Low.
3. Entry Levels: When a setup is detected (LL ➔ HH or HH ➔ LL), the script now draws two specific entry lines extending forward:
The "Breaker" Level: The previous structure point that was broken. (Often a safe retest entry).
The 50% Retracement: The midpoint of the expansion move (The "Equilibrium" or "Discount" entry).
PIT Zone IndicatorPOC Levels , Supply & Demand Zones and Institutions buying (Blue ) and Selling (Black ) Activity
POC shows where institutions traded the most. 4Hr , Day , Weekly POC.
Support is a price zone where buying interest is strong enough to stop or slow down a decline, often causing price to bounce upward.
Resistance is a price zone where selling pressure tends to overpower buying, frequently preventing price from moving higher and causing pullbacks.
Institutions buying (Blue ) and Selling (Black ) Activity - Institutions buy by absorbing selling at key support zones and sell by absorbing buying at resistance, clear footprints in volume, structure, and price behavior.
Market Regime | NY Session Killzones Indicator [ApexLegion]Market Regime | NY Session Killzones Indicator
Introduction and Theoretical Background
The Market Regime | NY Session Killzones indicator is designed exclusively for New York market hours (07:00-16:00 ET). Unlike universal indicators that attempt to function across disparate global sessions, this tool employs session-specific calibration to target the distinct liquidity characteristics of the NY trading day: Pre-Market structural formation (08:00-09:30), the Morning breakout window (09:30-12:00), and the Afternoon Killzone (13:30-16:00)—periods when institutional order flow exhibits the highest concentration and most definable technical structure. By restricting its operational scope to these statistically significant time windows, the indicator focuses on signal relevance while filtering the noise inherent in lower-liquidity overnight or extended-hours trading environments.
I. TECHNICAL RATIONALE: THE PRINCIPLE OF CONTEXTUAL FUSION
1. The Limitation of Acontextual Indicators
Traditional technical indicators often fail because they treat every bar and every market session equally, applying static thresholds (e.g., RSI > 70) without regard for the underlying market structure or liquidity environment. However, institutional volume and market volatility are highly dependent on the time of day (session) and the prevailing long-term risk environment.
This indicator was developed to address this "contextual deficit" by fusing three distinct yet interdependent analytical layers:
• Time and Structure (Macro): Identifying high-probability trading windows (Killzones) and critical structural levels (Pre-Market Range, PDH/PDL).
• Volatility and Scoring (Engine): Normalizing intraday momentum against annual volatility data to create an objective, statistically grounded AI Score.
• Risk Management (Execution): Implementing dynamic, volatility-adjusted Stop Loss (SL) and Take Profit (TP) parameters based on the Average True Range (ATR).
2. The Mandate for 252-Day Normalization (Z-Score)
What makes this tool unique is its 252-day Z-Score normalization engine that transforms raw momentum readings into statistically grounded probability scores, allowing the same indicator to deliver consistent, context-aware signals across any timeframe—from 1-minute scalping to 1-hour swing trades—without manual recalibration.
THE PROBLEM OF SCALE INVARIANCE
A high Relative Strength Index (RSI) reading on a 1-minute chart has a completely different market implication than a high RSI reading on a Daily chart. Simple percentage-based thresholds (like 70 or 30) do not provide true contextual significance. A sudden spike in momentum may look extreme on a 5-minute chart, but if it is statistically insignificant compared to the overall volatility of the last year, it may be a poor signal.
THE SOLUTION: CROSS-TIMEFRAME Z-SCORE NORMALIZATION
This indicator utilizes the Pine Script function request.security to reference the Daily timeframe for calculating the mean (μ) and standard deviation (σ) of a momentum oscillator (RSI) over the past 252 trading days (one year).
The indicator then calculates the Z-Score (Z) for the current bar's raw momentum (x): Z = (x - μ) / σ
Core Implementation: float raw_rsi = ta.rsi(close, 14) // x
= request.security(syminfo.tickerid, "D",
, // σ (252 days)
lookahead=barmerge.lookahead_on)
float cur_rsi_norm = d_rsi_std != 0 ? (raw_rsi - d_rsi_mean) / d_rsi_std : 0.0 // Z
This score provides an objective measurement of current intraday momentum significance by evaluating its statistical extremity against the yearly baseline of daily momentum. This standardized approach provides the scoring engine with consistent, global contextual information, independent of the chart's current viewing timeframe.
II. CORE COMPONENTS AND TECHNICAL ANALYSIS BREAKDOWN
1. TIME AND SESSION ANALYSIS (KILLZONES AND BIAS)
The indicator visually segments the trading day based on New York (NY) trading sessions, aligning the analysis with periods of high institutional liquidity events.
Pre-Market (PRE)
• Function: Defines the range before the core market opens. This range establishes structural support and resistance levels (PMH/PML).
• Technical Implementation: Uses a dedicated Session input (ny_pre_sess). The High and Low values (pm_h_val/pm_l_val) within this session are stored and plotted for structural reference.
• Smart Extension Logic: PMH/PML lines are automatically extended until the next Pre-Market session begins, providing continuous support/resistance references overnight.
NY Killzones (AM/PM)
• Function: Highlights high-probability volatility windows where institutional liquidity is expected to be highest (e.g., NY open, lunch, NY close).
• Technical Implementation: Separate session inputs (kz_ny_am, kz_ny_pm) are utilized to draw translucent background fills, providing a clear visual cue for timing.
Market Regime Bias
• Function: Determines the initial directional premise for the trading day. The bias is confirmed when the price breaks either the Pre-Market High (PMH) or the Pre-Market Low (PML).
• Technical Implementation: Involves the comparison of the close price against the predefined structural levels (check_h for PMH, check_l for PML). The variable active_bias is set to Bullish or Bearish upon confirmed breakout.
Trend Bar Coloring
• Function: Applies a visual cue to the bars based on the established regime (Bullish=Cyan, Bearish=Red). This visual filter helps mitigate noise from counter-trend candles.
• Technical Implementation: The Pine Script barcolor() function is tied directly to the value of the determined active_bias.
2. VOLATILITY NORMALIZED SCORING ENGINE
The internal scoring mechanism accumulates points from multiple market factors to determine the strength and validity of a signal. The purpose is to apply a robust filtering mechanism before generating an entry.
The score accumulation logic is based on the following factors:
• Market Bias Alignment (+3 Points): Points are awarded for conformance with the determined active_bias (Bullish/Bearish).
• VWAP Alignment (+2 Points): Assesses the position of the current price relative to the Volume-Weighted Average Price (VWAP). Alignment suggests conformity with the average institutional transaction price.
• Volume Anomaly (+2 Points): Detects a price move accompanied by an abnormally high relative volume (odd_vol_spike). This suggests potential institutional participation or significant order flow.
• VIX Integration (+2 Points): A score derived from the CBOE VIX index, assessing overall market stability and stress. Stable VIX levels add points, while high VIX levels (stress regimes) remove points or prevent signal generation entirely.
• ML Probability Score (+3 Points): This is the core predictive engine. It utilizes a Log-Manhattan Distance Kernel to compare the current market state against historical volatility patterns. The script implements a Log-linear distance formula (log(1 + |Δ|) ). This approach mathematically dampens the impact of extreme volatility spikes (outliers), ensuring that the similarity score reflects true structural alignment rather than transient market noise.
Core Technical Logic (Z-Score Normalization)
float cur_rsi_norm = d_rsi_std != 0 ? (raw_rsi - d_rsi_mean) / d_rsi_std : 0.0
• Technical Purpose: This line calculates the Z-Score (cur_rsi_norm) of the current momentum oscillator reading (raw_rsi) by normalizing it against the mean (d_rsi_mean) and standard deviation (d_rsi_std) derived from 252 days of Daily momentum data. If the standard deviation is zero (market is perfectly flat), it safely returns 0.0 to prevent division by zero runtime errors. This allows the AI's probability score to be based on the current signal's significance within the context of the entire trading year.
3. EXECUTION AND RISK MANAGEMENT (ATR MODEL)
The indicator utilizes the Average True Range (ATR) volatility model. This helps risk management scale dynamically with market volatility by allowing users to define TP/SL distances independently based on the current ATR.
Stop Loss Multiplier (sl_mult)
• Function: Sets the Stop Loss (SL) distance as a configurable multiple of the current ATR (e.g., 1.5 × ATR).
• Technical Logic: The price level is calculated as: last_sl_price := close - (atr_val * sl_mult). The mathematical sign is reversed for short trades.
Take Profit Multiplier (tp_mult)
• Function: Sets the Take Profit (TP) distance as a configurable multiple of the current ATR (e.g., 3.0 × ATR).
• Technical Logic: The price level is calculated as: last_tp_price := close + (atr_val * tp_mult). The mathematical sign is reversed for short trades.
Structural SL Option
• Function: Provides an override to the ATR-based SL calculation. When enabled, it forces the Stop Loss to the Pre-Market High/Low (PMH/PML) level, aligning the stop with a key institutional structural boundary.
• Technical Logic: The indicator checks the use_struct_sl input. If true, the calculated last_sl_price is overridden with either pm_h_val or pm_l_val, dependent on the specific trade direction.
Trend Continuation Logic
• Function: Enables signal generation in established, strong trends (typically in the Afternoon session) based on follow-through momentum (a new high/low of the previous bar) combined with a high Signal Score, rather than exclusively relying on the initial PMH/PML breakout.
• Technical Logic: For a long signal, the is_cont_long logic specifically requires checks like active_bias == s_bull AND close > high , confirming follow-through momentum within the established regime.
Smart Snapping & Cleanup (16:00 Market Close)
• Function: To maintain chart cleanliness, all trade boxes (TP/SL), AI Prediction zones, Killzone overlays (NY AM/PM), and Liquidity lines (PDH/PDL) are automatically "snapped" and cut off precisely at 16:00 NY Time (Market Close).
• Technical Logic: When is_market_close condition is met (hour == 16 and minute == 0), the script executes cleanup logic that:
◦ Closes active trades and evaluates final P&L
◦ Snaps all TP/SL box widths to current bar
◦ Truncates AI Prediction ghost boxes at market close
◦ Cuts off NY AM/PM Killzone background fills
◦ Terminates PDH/PDL line extensions
◦ Prevents visual clutter from extending into post-market sessions
4. LIQUIDITY AND STRUCTURAL ANALYSIS
The indicator plots key structural levels that serve as high-probability magnet zones or areas of potential liquidity absorption.
• Pre-Market High/Low (PMH/PML): These are the high and low established during the configured pre-market session (ny_pre_sess). They define the primary structural breakout level for the day, often serving as the initial market inflection point or the key entry level for the morning session.
• PDH (Previous Day High): The high of the calendar day immediately preceding the current bar. This represents a key Liquidity Pool; large orders are often placed above this level, making it a frequent target for stop hunts or liquidity absorption by market makers.
• PDL (Previous Day Low): The low of the calendar day immediately preceding the current bar. This also represents a key Liquidity Pool and a high-probability reversal or accumulation point, particularly during the Killzones.
FIFO Array Management
The indicator uses FIFO (First-In-First-Out) array structures to manage liquidity lines and labels, automatically deleting the oldest objects when the count exceeds 500 to comply with drawing object limits.
5. AI PREDICTION BOX (PREDICTIVE MODEL)
Function: Analyzes AI scores and volatility to project predicted killzone ranges and duration with asymmetric directional bias.
A. DIRECTIONAL BIAS (ASYMMETRIC EXPANSION)
The prediction model calculates directional probability using the ML kernel's 252-day Normalized RSI (Z-Score) and Relative Volume (RVOL). The prediction box dynamically adjusts its range based on this probability to provide immediate visual feedback on high-probability direction.
Bullish Scenario (ml_prob > 1.0):
• Upper Range: Expands significantly (1.5x multiplier) to show the aggressive upside target
• Lower Range: Tightens (0.5x multiplier) to show the invalidation level
• Visual Intent: The box is visibly skewed upward, immediately communicating bullish bias without requiring numerical analysis.
Bearish Scenario (ml_prob < -1.0):
• Upper Range: Tightens (0.5x multiplier) to show the invalidation level
• Lower Range: Expands significantly (1.5x multiplier) to show the aggressive downside target
• Visual Intent: The box is visibly skewed downward, immediately communicating bearish bias.
Neutral Scenario (-1.0 < ml_prob < 1.0):
Both ranges use balanced multipliers, creating a symmetrical box that indicates uncertainty.
B. DYNAMIC VOLATILITY BOOSTER (SESSION-BASED ADAPTATION)
The prediction box adjusts its volatility multiplier based on the current session and market conditions to account for intraday volatility patterns.
AM Session (Morning: 07:00-12:00):
• Base Multiplier: 1.0x (Neutral Base)
• Logic: Morning sessions often contain false breakouts and noise. The base multiplier starts neutral to avoid over-projecting during consolidation.
• Trend Booster: Multiplier jumps to 1.5x when:
Price > London Session Open AND AI is Bullish (ml_prob > 0), OR
Price < London Session Open AND AI is Bearish (ml_prob < 0)
• Logic: When the London trend (typically 03:00-08:00 NY time) aligns with the AI model's directional conviction, the indicator aggressively targets higher volatility expansion. This filters for "institutional follow-through" rather than random morning chop.
PM Session (Afternoon: 13:00-16:00):
• Fixed Multiplier: 1.8x
• Logic: The PM session, particularly the 13:30-16:00 ICT Silver Bullet window, often contains the "True Move" of the day. A higher baseline multiplier is applied to emphasize this session's significance over morning noise.
Safety Floor:
A minimum range of 0.2% of the current price is enforced regardless of volatility conditions.
• Purpose: Maintains the prediction box visibility during extreme low-volatility consolidation periods where ATR might collapse to near-zero values.
Volatility Clamp Protection:
Maximum volatility is capped at three times the current ATR value. During flash crashes, circuit breaker halts, or large overnight gaps, raw volatility calculations can spike to extreme levels. This clamp prevents prediction boxes from expanding to unrealistic widths.
Technical Implementation:
f_get_ai_multipliers(float _prob) =>
float _abs_prob = math.abs(_prob)
float _range_mult = 1.0
float _dur_mult = 1.0
if _abs_prob > 30
_range_mult := 1.8
else if _abs_prob > 10
_range_mult := 1.2
else
_range_mult := 0.7
C. PRACTICAL INTERPRETATION
• Wide Upper Range + Tight Lower Range: Strong bullish conviction. The model expects significant upside with limited downside risk.
• Tight Upper Range + Wide Lower Range: Strong bearish conviction. The model expects significant downside with limited upside.
• Symmetrical Range: Neutral/uncertain market. Wait for directional confirmation before entry.
• Large Box (Extended Duration): High-confidence prediction expecting sustained movement.
• Small Box (Short Duration): Low-confidence or choppy conditions. Expect quick resolution.
III. PRACTICAL USAGE GUIDE: METHODOLOGY AND EXECUTION
A. ESTABLISHING TRADING CONTEXT (THE THREE CHECKS)
The primary goal of the dashboard is to filter out low-probability trade setups before they occur.
• Timeframe Selection: Although the core AI is normalized to the Daily context, the indicator performs optimally on intraday timeframes (e.g., 5m, 15m) where session-based volatility is most pronounced.
• PHASE Check (Timing): Always confirm the current phase. The highest probability signals typically occur within the visually highlighted NY AM/PM Killzones because this is when institutional liquidity and volume are at their peak. Signals outside these zones should be treated with skepticism.
• MARKET REGIME Check (Bias): Ensure the signal (BUY/SELL arrow) aligns with the established MARKET REGIME bias (BULLISH/BEARISH). Counter-bias signals are technically allowed if the score is high, but they represent a higher risk trade.
• VIX REGIME Check (Risk): Review the VIX REGIME for overall market stress. Periods marked DANGER (high VIX) indicate elevated volatility and market uncertainty. During DANGER regimes, reducing position size or choosing a wider SL Multiplier is advisable.
B. DASHBOARD INTERPRETATION (THE REAL-TIME STATUS DISPLAY)
The indicator features a non-intrusive dashboard that provides real-time, context-aware information based on the core analytical engines.
PHASE: (PRE-MARKET, NY-AM, LUNCH, NY-PM)
• Meaning: Indicates the current institutional session time. This is derived from the customizable session inputs.
• Interpretation: Signals generated during NY-AM or NY-PM (Killzones) are generally considered higher-probability due to increased institutional participation and liquidity.
MARKET REGIME: (BULLISH, BEARISH, NEUTRAL)
• Meaning: The established directional bias for the trading day, confirmed by the price breaking above the Pre-Market High (PMH) or below the Pre-Market Low (PML).
• Interpretation: Trading with the established regime (e.g., taking a BUY signal when the regime is BULLISH) is the primary method. NEUTRAL indicates that the PMH/PML boundary has not yet been broken, suggesting market ambiguity.
VIX REGIME: (STABLE, DANGER)
• Meaning: A measure of overall market stress and stability, based on the CBOE VIX index integration. The thresholds (20.0 and 35.0 default) are customizable by the user.
• Interpretation: STABLE indicates stable volatility, favoring momentum trades. DANGER (VIX > 35.0) indicates extreme stress; signals generated in this environment require caution and often necessitate smaller position sizing.
SIGNAL SCORE: (0 to 10+ Points)
• Meaning: The accumulated score derived from the VOLATILITY NORMALIZED AI SCORING ENGINE, factoring in bias, VWAP alignment, volume, and the Z-Score probability.
• Interpretation: The indicator generates a signal when this score meets or exceeds the Minimum Entry Score (default 3). A higher score (e.g., 7+) indicates greater statistical confluence and a stronger potential entry.
AI PROBABILITY: (Bull/Bear %)
• Meaning: Directional probability derived from the ML kernel, expressed as a percentage with Bull/Bear label.
• Interpretation: Higher absolute values (>20%) indicate stronger directional conviction from the ML model.
LIVE METRICS SECTION:
• STATUS: Shows current trade state (LONG, SHORT, or INACTIVE)
• ENTRY: Displays the entry price for active trades
• TARGET: Shows the calculated Take Profit level
• ROI | KILL ZONE:
◦ For Active Trades: Displays real-time P&L percentage during NY session hours.
◦ At Market Close (16:00 NY): Since this is a NY session-specific indicator, any active position is automatically evaluated and closed at 16:00. The final result (VALIDATED or INVALIDATED) is determined based on whether the trade reached profit or loss at market close.
◦ Result Persistence: The killzone result (VALIDATED/INVALIDATED) remains displayed on the dashboard until the next NY AM KILLZONE session begins, providing a clear performance reference for the previous trading day.
Note: If a trade is still trending at 16:00, it will be force-closed and evaluated at that moment, as the indicator operates strictly within NY trading hours.
C. SIGNAL GENERATION AND ENTRY LOGIC
The indicator generates signals based on two distinct technical setups, both of which require the accumulated SIGNAL SCORE to be above the configured Minimum Entry Score.
Breakout Entry
• Trigger Condition: Price closes beyond the Pre-Market High (PMH) or Low (PML).
• Rationale: This setup targets the initial directional movement for the day. A breakout confirms the institutional bias by decisively breaking the first major structural boundary, making the signal high-probability.
Continuation Entry
• Trigger Condition: The market is already in an established regime (e.g., BULLISH), and the price closes above the high (or below the low) of the previous bar, while the SIGNAL SCORE remains high. Requires the Allow Trend Continuation parameter to be active.
• Rationale: This setup targets follow-through trades, typically in the afternoon session, capturing momentum after the morning's direction has been confirmed. This filters for sustainability in the established trend.
Execution: Execute the trade immediately upon the close of the bar that prints the BUY or SELL signal arrow.
D. MANAGING RISK AND EXITS
1. RISK PARAMETER SELECTION
The indicator immediately draws the dynamic TP/SL zones upon entry.
• Volatility-Based (Recommended Default): By setting the SL Multiplier (e.g., 1.5) and the TP Multiplier (e.g., 3.0), the indicator enforces a constant, dynamically sized risk-to-reward ratio (e.g., 1:2 in this example). This helps that risk management scales proportionally with the current market volatility (ATR).
• Structural Override: Selecting the Use Structural SL parameter fixes the stop-loss not to the ATR calculation, but to the more significant structural level of the PMH or PML. This is utilized by traders who favor institutional entry rules where the stop is placed behind the liquidity boundary.
2. EXIT METHODS
• Hard Exit: Price hits the visual TP or SL box boundary.
• Soft Exit (Momentum Decay Filter): If the trade is active and the SIGNAL SCORE drops below the Exit Score Threshold (default 3), it indicates that the momentum supporting the trade has significantly collapsed. This serves as a momentum decay filter, prompting the user to consider a manual early exit even if the SL/TP levels have not been hit, thereby preserving capital during low-momentum consolidation.
• Market Close Auto-Exit: At 16:00 NY time, any active trade is automatically closed and classified as VALIDATED (profit) or INVALIDATED (loss) based on current price vs. entry price.
IV. PARAMETER REFERENCE AND CONFIGURATION
A. GLOBAL SETTINGS
• Language (String, Default: English): Selects the language for the dashboard and notification text. Options: English, Korean, Chinese, Spanish, Portuguese, Russian, Ukrainian, Vietnamese.
B. SESSION TIMES (3 BOX SYSTEM)
• PRE-MARKET (Session, Default: 0800-0930): Defines the session range used for Pre-Market High/Low (PMH/PML) structural calculation.
• REGULAR (Morning) (Session, Default: 0930-1200): Defines the core Morning trading session.
• AFTERNOON (PM) (Session, Default: 1300-1600): Defines the main Afternoon trading session.
• Timezone (String, Default: America/New_York): Sets the timezone for all session and time-based calculations.
C. NY KILLZONES (OVERLAYS)
• Show NY Killzones (Bool, Default: True): Toggles the translucent background fills that highlight high-probability trading times (Killzones).
• NY AM Killzone (Session, Default: 0700-1000): Defines the specific time window for the first key liquidity surge (Open overlap).
• NY PM Killzone (Session, Default: 1330-1600): Defines the afternoon liquidity window, aligned with the ICT Silver Bullet and PM Trend entry timing.
• Allow Entry in Killzones (Bool, Default: True): Enables or disables signal generation specifically during the defined Killzone hours.
• Activate AI Prediction Box (Bool, Default: True): Toggles the drawing of the predicted target range boxes on the chart.
D. CORE SCORING ENGINE
• Minimum Entry Score (Int, Default: 3): The lowest accumulated score required for a Buy/Sell signal to be generated and plotted.
• Allow Trend Continuation (Bool, Default: True): Enables the secondary entry logic that fires signals based on momentum in an established trend.
• Force Ignore Volume (Bool, Default: False): Overrides the volume checks in the scoring engine. Useful for markets where volume data is unreliable or nonexistent.
• Force Show Signals (Ignore Score) (Bool, Default: False): Debug mode that displays all signals regardless of score threshold.
• Integrate CBOE:VIX (Bool, Default: True): Enables the connection to the VIX index for market stress assessment.
• Stable VIX (<) (Float, Default: 20.0): VIX level below which market stress is considered low (increases score).
• Stress VIX (>) (Float, Default: 35.0): VIX level above which market stress is considered high (decreases score/flags DANGER).
• Use ML Probability (Bool, Default: True): Activates the volatility-normalized AI Z-Score kernel. Disabling this removes the cross-timeframe normalization filter.
• Max Learning History (Int, Default: 2000): Maximum number of bars stored in the ML training arrays.
• Normalization Lookback (252 Days) (Int, Default: 252): The number of DAILY bars used to calculate the Z-Score mean and standard deviation (representing approximately 1 year of data).
E. RISK MANAGEMENT (ATR MODEL)
• Use Structural SL (Bool, Default: False): Overrides the ATR-based Stop Loss distance to use the Pre-Market High/Low as the fixed stop level.
• Stop Loss Multiplier (x ATR) (Float, Default: 1.5): Defines the Stop Loss distance in multiples of the current Average True Range (ATR).
• Take Profit Multiplier (x ATR) (Float, Default: 3.0): Defines the Take Profit distance in multiples of the current Average True Range (ATR).
• Exit Score Threshold (<) (Int, Default: 3): The minimum score below which an active trade is flagged for a Soft Exit due to momentum collapse.
F. VISUAL SETTINGS
• Show Dashboard (Bool, Default: True): Toggles the real-time data panel.
• Show NY Killzones (Bool, Default: True): Toggles killzone background fills.
• Show TP/SL Zones (Bool, Default: True): Toggles the drawing of Take Profit and Stop Loss boxes.
• Show Pre-Market Extensions (Bool, Default: True): Extends PM High/Low lines across the entire chart for support/resistance reference.
• Activate AI Prediction Box (Bool, Default: True): Enable or disable the predictive range projection.
• Light Mode Optimization (Bool, Default: True): Toggles dashboard and plot colors for optimal visibility on white (light) chart backgrounds.
• Enforce Trend Coloring (Bool, Default: True): Forces candle colors based on Market Regime (Bullish=Cyan, Bearish=Pink) to emphasize trend direction.
• Label Size (String, Default: Normal): Options: Tiny, Small, Normal.
G. LIQUIDITY POOLS (PDH/PDL)
• Show Liquidity Lines (Bool, Default: True): Toggles the display of the Previous Day High (PDH) and Low (PDL) lines.
• Liquidity High Color (Color, Default: Green): Color setting for the PDH line.
• Liquidity Low Color (Color, Default: Red): Color setting for the PDL line.
🔔 ALERT CONFIGURATION GUIDE
The indicator is equipped with specific alert conditions.
How to Set Up an Alert:
Click the "Alert" (Clock icon) in the top TradingView toolbar.
Select "Market Regime NY Session " from the Condition dropdown menu.
Choose one of the specific trigger conditions below depending on your strategy:
🚀 Available Alert Conditions
1. BUY (Long Entry)
Trigger: Fires immediately when a confirmed Bullish Setup is detected.
Conditions: Market Bias is Bullish (or valid Continuation) + Signal Score ≥ Minimum Entry Score.
Usage: Use this alert to open new Long positions or close existing Short positions.
2. SELL (Short Entry)
Trigger: Fires immediately when a confirmed Bearish Setup is detected.
Conditions: Market Bias is Bearish (or valid Continuation) + Signal Score ≥ Minimum Entry Score.
Usage: Use this alert to open new Short positions or close existing Long positions.
V. IMPORTANT TECHNICAL LIMITATIONS
⚠️ Intraday Only (Timeframe Compatibility)
This indicator is strictly designed for Intraday Timeframes (1m to 4h).
Daily/Weekly Charts: The session logic (e.g., "09:30-16:00") cannot function on Daily bars because a single bar encompasses the entire session. Session boxes, TP/SL zones, and AI prediction boxes will NOT draw on the Daily timeframe. Only the PDH/PDL liquidity lines remain visible on Daily charts. This is expected behavior, not a limitation.
Maximum Supported Timeframe: All visual components (session boxes, killzone overlays, TP/SL zones, AI prediction boxes) are displayed up to the 4-hour timeframe. Above this timeframe, only PDH/PDL lines and the dashboard remain functional.
⚠️ Drawing Object Limit (Max 500)
A single script can display a maximum of 500 drawing objects (boxes/lines) simultaneously.
On lower timeframes (e.g., 1-minute), where many signals and session boxes are generated, older history (typically beyond 10-14 days) will automatically disappear to make room for new real-time data.
For deeper historical backtesting visualization, switch to higher timeframes (e.g., 15m, 1h).
The indicator implements FIFO array management to comply with this limit while maintaining the most recent and relevant visual data.
VI. PRACTICAL TRADING TIPS AND BEST PRACTICES
• Killzone Confirmation: The highest statistical validity is observed when a high-score signal occurs directly within a visible NY AM/PM Killzone. Use the Killzones as a strict time filter.
• Liquidity Awareness (PDH/PDL): Treat the Previous Day High (PDH) and Low (PDL) lines as magnets. If your dynamic Take Profit (TP) is placed just above PDH, consider adjusting your target slightly below PDH or utilizing the Soft Exit, as liquidity absorption at these levels often results in sudden, sharp reversals that stop out a trade just before the target is reached.
• VIX as a Position Sizer: During DANGER VIX regimes, the resulting high volatility means the ATR value will be large. It is prudent to either reduce the SL Multiplier or, more commonly, reduce the overall position size to maintain a constant currency risk exposure per trade.
• Continuation Filter Timing: Trend Continuation signals are most effective during the Afternoon (PM) session when the morning's directional breakout has had time to establish a strong, clear, and sustainable trend. Avoid using them in the initial AM session when the direction is still being contested.
• 16:00 Market Close Rule: All trades, boxes, and lines are automatically cleaned up at 16:00 NY time. This prevents overnight chart clutter and maintains visual clarity.
VII. DISCLAIMER & RISK WARNINGS
• Educational Purpose Only
This indicator, including all associated code, documentation, and visual outputs, is provided strictly for educational and informational purposes. It does not constitute financial advice, investment recommendations, or a solicitation to buy or sell any financial instruments.
• No Guarantee of Performance
Past performance is not indicative of future results. All metrics displayed on the dashboard (including "ROI" and trade results) are theoretical calculations based on historical data. These figures do not account for real-world trading factors such as slippage, liquidity gaps, spread costs, or broker commissions.
• High-Risk Warning
Trading cryptocurrencies, futures, and leveraged financial products involves a substantial risk of loss. The use of leverage can amplify both gains and losses. Users acknowledge that they are solely responsible for their trading decisions and should conduct independent due diligence before executing any trades.
• Software Limitations
The software is provided "as is" without warranty. Users should be aware that market data feeds on analysis platforms may experience latency or outages, which can affect signal generation accuracy.
PIT Magic Pro IndicatorPOC Levels , Support & Resistance and Magic Level
POC shows where institutions traded the most, Support & Resistance show where price previously reacted, and Magic Levels reveal psychological & algorithmic zones — together they create high-probability trading setups.






















