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).
Forecasting
US/SPY- Financial Regime Index Swing Strategy Credits: concept inspired by EdgeTools Bloomberg Financial Conditions Index (Proxy)
Improvements: eight component basket, inverse volatility weights, winsorization option( statistical technique used to limit the influence of outliers in a dataset by replacing extreme values with less extreme ones, rather than removing them entirely), slope and price gates, exit guards, table and gradients.
Summary in one paragraph
A macro regime swing strategy for index ETFs, futures, FX majors, and large cap equities on daily calculation with optional lower time execution. It acts only when a composite Financial Conditions proxy plus slope and an optional price filter align. Originality comes from an eight component macro basket with inverse volatility weights and winsorized return z scores that produce a portable yardstick.
Scope and intent
Markets: SPY and peers, ES futures, ACWI, liquid FX majors, BTC, large cap equities.
Timeframes: calculation daily by default, trade on any chart.
Default demo: SPY on Daily.
Purpose: convert broad financial conditions into clear swing bias and exits.
Originality and usefulness
Unique fusion: return z scores for eight liquid proxies with inverse volatility weighting and optional winsorization, then slope and price gates.
Failure mode addressed: false starts in chop and early shorts during easy liquidity.
Testability: all knobs are inputs and the table shows components and weights.
Portable yardstick: z scores center at zero so thresholds transfer across symbols.
Method overview in plain language
Base measures
Return basis: natural log return over a configurable window, standardized to a z score. Winsorization optional to cap extremes.
Components
EQ US and EQ GLB measure equity tone.
CREDIT uses LQD over HYG. Higher credit quality outperformance is risk off so sign is flipped after z score.
RATES2Y uses two year yield, sign flipped.
SLOPE uses ten minus two year yield spread.
USD uses DXY, sign flipped.
VOL uses VIX, sign flipped.
LIQ uses BIL over SPY, sign flipped.
Each component is smoothed by the composite EMA.
Fusion rule
Weighted sum where weights are equal or inverse volatility with exponent gamma, normalized to percent so they sum to one.
Signal rule
Long when composite crosses up the long threshold and its slope is positive and price is above the SMA filter, or when composite is above the configured always long floor.
Short when composite crosses down the short threshold and its slope is negative and price is below the SMA filter.
Long exit on cross down of the long exit line or on a fresh short signal.
Short exit on cross up of the short exit line or on a fresh long signal, or when composite falls below the force short exit guard.
What you will see on the chart
Markers on suggestion bars: L for long, S for short, LX and SX for exits.
Reference lines at zero and soft regime bands at plus one and minus one.
Optional background gradient by regime intensity.
Compact table with component z, weight percent, and composite readout.
Table fields and quick reading guide
Component: EQ US, EQ GLB, CREDIT, RATES2Y, SLOPE, USD, VOL, LIQ.
Z: current standardized value, green for positive risk tone where applicable.
Weight: contribution percent after normalization.
Composite: current index value.
Reading tip: a broadly green Z column with slope positive often precedes better long context.
Inputs with guidance
Setup
Calc timeframe: default Daily. Leave blank to inherit chart.
Lookback: 50 to 1500. Larger length stabilizes regimes and delays turns.
EMA smoothing: 1 to 200. Higher smooths noise and delays signals.
Normalization
Winsorize z at ±3: caps extremes to reduce one off shocks.
Return window for equities: 5 to 260. Shorter reacts faster.
Weighting
Weight lookback: 20 to 520.
Weight mode: Equal or InvVol.
InvVol exponent gamma: 0.1 to 3. Higher compresses noisy components more.
Signals
Trade side: Long Short or Both.
Entry threshold long and short: portable z thresholds.
Exit line long and short: soft exits that give back less.
Slope lookback bars: 1 to 20.
Always long floor bfci ≥ X: macro easy mode keep long.
Force short exit when bfci < Y: macro stress guard.
Confirm
Use price trend filter and Price SMA length.
View
Glow line and Show component table.
Symbols
SPY ACWI HYG LQD VIX DXY US02Y US10Y BIL are defaults and can be changed.
Realism and responsible publication
No performance claims. Past is not future.
Shapes can move intrabar and settle on close.
Execution is on standard candles only.
Honest limitations and failure modes
Major economic releases and illiquid sessions can break assumptions.
Very quiet regimes reduce contrast. Use longer windows or higher thresholds.
Component proxies are ETFs and indexes and cannot match a proprietary FCI exactly.
Strategy notice
Orders are simulated on standard candles. All security calls use lookahead off. Nonstandard chart types are not supported for strategies.
Entries and exits
Long rule: bfci cross above long threshold with positive slope and optional price filter OR bfci above the always long floor.
Short rule: bfci cross below short threshold with negative slope and optional price filter.
Exit rules: long exit on bfci cross below long exit or on a short signal. Short exit on bfci cross above short exit or on a long signal or on force close guard.
Position sizing
Percent of equity by default. Keep target risk per trade low. One percent is a sensible starting point. For this example we used 3% of the total capital
Commisions
We used a 0.05% comission and 5 tick slippage
Legal
Education and research only. Not investment advice. Test in simulation first. Use realistic costs.
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.
Institutional Confluence Suite [SurgeGuru]Executive Summary
This is not an indicator; it is a Predictive Confluence Engine. It represents a quantum leap in technical analysis by synthesizing four distinct analytical dimensions—Fibonacci mathematics, temporal market energy, volume dynamics, and harmonic resonance—into a single, predictive framework. Its specialty lies in identifying High-Probability Confluence Zones where multiple independent factors align to signal potent market turning points.
Core Differentiators
Adaptive Fibonacci-Volume Synthesis:
Dynamic Support/Resistance: Transforms static Fibonacci levels into dynamic, volume-weighted zones. The script calculates a Volume Strength Score (0-100) for each key Fib level (0.236, 0.382, 0.618, 0.786).
Intelligent Visualization: Line thickness and style adapt in real-time: Thick/Solid for high-volume, high-confidence levels, and Thin/Dotted for low-volume, weak levels.
Real-Time Confirmation: Provides immediate ✓/✗ signals when price touches a Fib level, filtered by live volume momentum, distinguishing between high-conviction rejections and weak bounces.
Temporal Power Zone Analysis (Power Hour):
Institutional-Grade Confluence Detection: The system's masterstroke is identifying when a Power Hour Fibonacci level aligns with the Primary Trend Fibonacci level. These rare convergences are marked with a lightning bolt (⚡) and represent a consensus across timeframes and participant groups.
Structural Context: Power Hour zones provide the macro-structure, framing the market's most recent high-volatility battle. The subsequent price action within and around this zone reveals the dominant force's next intended direction.
Solfeggio Harmonic Resonance (Proprietary Beta):
Predictive Convergence: Identifies the rarest and most powerful market condition: a Harmonic Convergence Zone. This occurs when a Fibonacci level, a high-volume node, and a Solfeggio frequency ratio all align within a precise tolerance.
Market "Tuning Fork": The system acts as a resonance detector. A cyan pulse marker (●) signals when price touches a harmonic zone with expanding volume—like striking a tuning fork—indicating a high-probability bounce or reversal.
Unified Trend Framework:
Granular Trend Control: Offers 12 levels of trend sensitivity, from "Extreme" (0.5) for scalpers to "Maximum" (7.0) for position traders, ensuring the analysis is tailored to any trading style or timeframe.
Volume-Fueled Trends: The Angled Volume Profile visually demonstrates whether a trend is pushing (volume dominant on upper bars), breaking (volume dominant on lower bars), or healthy and sustained (balanced volume distribution).
Synthesis: The Confluence Engine
The true genius of this system is how these dimensions interact:
The Power Hour sets the tactical battlefield.
The Fibonacci-Volume analysis identifies the key defensive and offensive lines within that battlefield.
The Solfeggio Harmonics act as a sonar, pinging at the most potent points of alignment.
The Unified Trend Framework provides the strategic context and confirms the overall campaign's direction.
Conclusion
This script moves beyond analysis into the realm of market forecasting. It doesn't just show you what is happening; it predicts where the market is most likely to respect structure by identifying zones where mathematics, market energy, time, and resonance converge. This is institutional-grade intelligence, delivering a definitive and actionable edge by answering the critical question: "Where is the highest probability for the next significant move?"
Overall Architecture
The script operates as a multi-layered event detector. Instead of calculating continuous oscillators, it identifies specific market events (like a new swing high) and then performs complex logic to draw the appropriate structures (like an Order Block). It maintains internal arrays (lists) of these events and their corresponding drawings, constantly updating and cleaning them as new price data arrives.
1. Market Structure & Swing Detection
This is the foundational layer that identifies the market's basic rhythm.
How it Works:
Swing Point Identification: The core function queryPatterns(lastPrice, midPrice, prevPrice, isSwingHigh) looks for a three-bar pattern. For a swing high, it checks if the middle bar is higher than both its immediate neighbor bars. For a swing low, it checks if the middle bar is lower.
Multi-Timeframe Stack: The script creates three independent analyzers for Short-Term (stHigh, stLow), Intermediate-Term (itHigh, itLow), and Long-Term (ltHigh, ltLow) structures.
Short-Term: Reacts directly to the 3-bar pattern on the raw price series.
Intermediate-Term: Its input is the output of the Short-Term detector. It only records a new swing point when the Short-Term system identifies one. This creates a higher-quality, filtered set of swings.
Long-Term: Likewise, it builds upon the Intermediate-Term swings. This hierarchical filtering ensures each timeframe captures genuinely significant structural points.
Structure Breaks (MSS/BOS): The renderStructures() method is the key. It waits for price to "cross" a previously identified swing point.
If price crosses above a prior swing high, it draws a bullish line and labels it a Break of Structure (BOS), indicating renewed bullish momentum.
If price crosses below a prior swing low, it draws a bearish line and labels it a Change of Character (CHoCH) or Market Structure Shift (MSS), indicating a potential trend reversal.
2. Order Block & Breaker Block Detection (LuxAlgo Logic)
This layer identifies areas where "smart money" likely placed significant orders.
How it Works:
Fractal Detection: It uses a fractalHigh and fractalLow system (arrays of recent swing points) to identify the most significant pivot highs and lows, filtered by the user-selected term.
Block Creation - The "Cause": When price closes beyond a fractal high/low, it triggers a lookback period.
For a Bullish Order Block (after breaking a high): It looks back from the break point to the fractal and finds the bar with the lowest low within that range. The high and low (or open/close if body is selected) of that bar define the Order Block. The logic is that this was the last consolidation area before the bullish breakout.
Breaker Block - The "Effect": The script then monitors these Order Blocks.
If price re-enters a Bullish Order Block and breaks below its low, that block is "breached." It is then re-classified as a Breaker Block and visually changes (e.g., color, extended lines). This indicates the failure of that buy-side level, which now becomes resistance.
3. Liquidity Analysis (Buyside/Sellside & Voids)
This layer maps out the market's "why" - the liquidity pools that price is drawn to.
Buyside/Sellside Liquidity:
Pivot-Based Aggregation: It uses the multi-timeframe swing points (topLQ, btmLQ) as potential liquidity targets.
Zone Confirmation: It doesn't just use a single swing point. It checks a historical array of all prior pivots (aZZ). If it finds several pivots clustered within a narrow band (defined by atr / liqMar), it marks the entire zone as a Liquidity Pool.
Visualization: It draws a semi-transparent box around this zone. A "Buyside Liquidity" zone is below price (where sell-stops are hunted), and a "Sellside Liquidity" zone is above price (where buy-stops are hunted).
Liquidity Voids:
Gap Detection: This is a simpler, more geometric concept. It looks for large gaps between candles that exceed a threshold (based on atr200).
Visual Representation: When such a gap is found (e.g., the current low is significantly above the high of two bars ago), it fills the space with a series of small, colored boxes. This creates a clear visual "void" area, indicating a price range with little trading activity that will likely be traversed quickly.
4. Enhanced Liquidity Detection (BigBeluga Logic)
This is a separate, volume-informed system for spotting immediate liquidity.
How it Works:
Volume Spike Context: It calculates a normalized volume value (norm_vol) by comparing current volume to a high percentile of recent volume. This identifies unusually high volume activity.
Price Rejection: It looks for simple price patterns: a bar that makes a new high (or low) and is immediately rejected (the next bar does not continue in that direction).
Dynamic Box Creation: When these two conditions align (high volume + price rejection), it draws a box extending from that high/low. The opacity and size of the box are directly tied to the strength of the volume spike. A massive volume spike creates a very prominent box, signaling a critical liquidity level where a significant battle between buyers and sellers occurred.
Synthesis: The "Behind the Scenes" Workflow
On every new bar, the script performs this orchestrated sequence:
Update & Detect: It updates all its internal swing point arrays and checks for new Market Structure events.
Check Conditions: It runs the Order Block logic to see if any fractal levels have been breached, creating new blocks.
Monitor & Modify: It checks all existing Order Blocks to see if any have been "breached," converting them to Breaker Blocks.
Map Liquidity: It updates the liquidity pools based on the latest swings and checks for new liquidity voids based on recent price gaps.
Volume Analysis: The enhanced system checks for volume-based liquidity zones.
Garbage Collection: It constantly cleans up old drawings (lines, boxes, labels) that are no longer relevant to keep the chart performant and uncluttered.
In essence, the code acts as a state machine that tracks the market's evolution through its structural breaks, order placements, and liquidity interactions, translating this complex state into a clear, visual narrative for the trader.
Credits: LuxAlgo, PrimeChart, Trendoscope
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.
APXTradez - Intraday RSI (8)🔹 APXTradez Intraday RSI (8)
Purpose:
A fast-reacting momentum and bias indicator built for intraday options and scalping setups. This version of RSI (8) identifies immediate shifts in strength, momentum slope, and trend bias—allowing traders to spot reversals, momentum builds, or choppy zones within seconds.
What It Shows
RSI (8) → ultra-responsive short-term strength indicator.
Bias Zones:
- Bull Bias (Green) – RSI rising above 55 with slope up → intraday long setups favored.
- Bear Bias (Red) – RSI falling below 45 with slope down → short setups favored.
- Chop (Gray) – Neutral area between 45–55 → reduced edge, wait for direction.
- Background Color: Highlights current bias (green/red/gray) for quick visual confirmation.
- Dynamic Label: Displays live bias text on chart (Bull, Bear, or Chop).
How to Use
Apply on 1m–15m charts for day trading or scalping options.
Trade in bias direction:
- Enter long when RSI crosses + slopes above 55 (bull bias).
- Enter short when RSI crosses + slopes below 45 (bear bias).
- Avoid chop zones (RSI between 45–55 or flat). Wait for a slope confirmation.
Combine with APX Intraday VWAP + EMA overlay, APX TTM Squeeze, and/or the APX MACD to align direction with trend and volume pressure.
Overbought/Oversold: Above 70 or below 30 still mark exhaustion zones — use for exits, not entries.
Best Use Case
Intraday confirmation of trend bias and momentum strength — helping you stay on the right side of fast-moving setups and avoid low-edge chop.
APXTradez - Intraday Overlay (VWAP + EMAs)🔹 APXTradez Intraday Overlay (VWAP + EMAs)
Purpose:
A clean, real-time intraday framework built for options scalpers and day traders.
This overlay combines VWAP, 8/21 EMAs, Bollinger Bands, and Keltner Channels to visualize short-term momentum, trend structure, and volatility compression directly on your chart.
What It Shows
8 EMA (teal) → Fast momentum and micro-trend direction.
21 EMA (orange) → Short-term trend confirmation and pullback zone.
VWAP (aqua) → Institutional average price; key intraday bias level.
Bollinger Bands (lime) → Standard deviation volatility envelope.
Keltner Channels (fuchsia) → ATR-based volatility range.
Compression Highlight (orange) → Shows when BBs are inside KCs, signaling volatility contraction and potential breakout setup.
How to Use
Apply on 1-min to 15-min charts for intraday trading.
Trend bias:
Price above VWAP and 8/21 EMA stack = bullish intraday momentum.
Price below VWAP and 8/21 EMA stack = bearish bias.
- Compression zones (orange highlights):
Indicates low-volatility consolidation → prepare for breakout.
Wait for breakout direction confirmation before entry.
Combine with momentum indicators (like APX TTM Squeeze, APX RSI or MACD) for confirmation.
Best Use Case
Scalping or day-trading options during high-volume sessions where VWAP and EMA structure drive precision entries and exits.
APXTradez - MACD🔹 APXTradez MACD — Summary & Usage Guide
Purpose
- The APXTradez MACD measures momentum shifts and trend reversals using exponential moving averages (EMAs).
- It helps you see when momentum changes direction before price fully reacts — perfect for catching early entries or confirming strength behind a move.
Core Components
- MACD Line (Aqua / Orange)
- Calculated as the difference between the 12 EMA and 26 EMA.
- Shows short-term vs. long-term momentum.
- Aqua: Fast EMA above slow EMA → bullish momentum building.
- Orange: Fast EMA below slow EMA → bearish momentum dominating.
- Signal Line (Blue)
- A 9-EMA of the MACD line that smooths the momentum swings.
When the MACD Line crosses above it → bullish crossover.
When the MACD Line crosses below it → bearish crossover.
-Histogram (Green/Red Columns)
Represents the distance between the MACD Line and Signal Line.
Lime = Bullish momentum expanding.
Faded Lime = Bullish momentum fading.
Red = Bearish momentum expanding.
Faded Red = Bearish momentum fading.
The histogram visually shows when momentum is increasing or losing strength.
-Zero Line
Center baseline separating bullish (above) and bearish (below) momentum.
Crosses through zero often mark early trend reversals.
How to Use It
1️⃣ Identify Trend Direction
- MACD Line above Signal Line & Histogram above Zero:
→ Bullish momentum. Confirms uptrend or call-side bias.
- MACD Line below Signal Line & Histogram below Zero:
→ Bearish momentum. Confirms downtrend or put-side bias.
2️⃣ Spot Momentum Shifts (Crossovers)
- Bullish Crossover:
MACD (Aqua) crosses above Signal (Blue).
→ Potential start of new upward leg or reversal.
- Bearish Crossover:
MACD (Orange) crosses below Signal (Blue).
→ Possible start of new downward leg.
These are your “momentum pivot” moments — strongest when aligned with a squeeze fire or RSI midline cross.
3️⃣ Read Momentum Strength (Histogram)
- Growing Lime bars → momentum accelerating upward.
- Shrinking Lime bars → bullish side fading.
- Growing Red bars → bearish momentum accelerating.
- Shrinking Red bars → bearish side weakening.
When you see histogram bars shrink or color fade, it often signals a pause or pullback before a potential flip.
4️⃣ Combine with APX Squeeze & RSI
- MACD crosses up + TTM Squeeze fires + RSI > 50 → powerful bullish swing signal.
- MACD crosses down + Squeeze fires down + RSI < 50 → strong bearish setup.
This triple-stack alignment confirms momentum, volatility, and sentiment all pointing in one direction.
- The APXTradez MACD is your momentum confirmation tool.
- It helps you visually see when momentum flips, builds, or fades, giving you precise entry timing inside larger swing or intraday setups.
- Used with the APX RSI and APX TTM Squeeze, it forms one of the three core pillars of the APX Momentum Framework — confirming when volatility, strength, and direction all align.
APXTradez - Swing RSI🔹 APXTradez Swing RSI — Summary & Usage Guide
Purpose
- The APXTradez Swing RSI measures momentum strength and exhaustion in a stock’s price movement.
- It tells you when price is overextended, balanced, or reversing, helping you time entries, exits, and confirmation on swing trades.
This version is tuned for clean visual momentum tracking during 2-to-5-day swings or multi-week trends.
Core Components
-RSI (14-period)
- Uses a standard 14-bar calculation on the closing price (or whichever source you choose).
- Ranges between 0 and 100, showing how strong the recent price push has been.
- Smooth enough for swing trading; reactive enough to catch early turns.
- Color-Coded RSI Line
White = Neutral zone (healthy price action).
Lime = Oversold (< 30) → buying opportunity or short-covering zone.
Red = Overbought (> 70) → profit-taking or potential pullback zone.
Color shifts automatically as RSI crosses key thresholds, so you see sentiment flips instantly.
Horizontal Levels
70 = Overbought (red dashed line)
30 = Oversold (lime dashed line)
50 = Midline (gray dotted line, optional toggle)
These levels frame the RSI’s “zones of strength.”
How to Use It
1️⃣ Identify Momentum Regime
-Above 50 → Bullish Bias
Momentum favors buyers. Use this to confirm call or long positions.
- Below 50 → Bearish Bias
Momentum favors sellers. Confirms put or short setups.
- The 50 midline is your “momentum compass.”
Crosses above or below often precede trend reversals.
2️⃣ Spot Extremes (30 / 70 Zones)
RSI > 70 = Overbought
Price is stretched; risk of pullback or short-term cooling.
→ Good area to trim longs or watch for reversal candles.
RSI < 30 = Oversold
Price is washed out; potential bounce forming.
→ Good area to look for bullish reversal + volume confirmation.
3️⃣ Combine with APX TTM Squeeze and Overlay
- When RSI > 50 and rising + TTM histogram bright teal + Squeeze fires black dot up → high-probability long swing.
- When RSI < 50 and falling + TTM histogram bright yellow + Squeeze fires down → high-probability short swing.
- When RSI flat around 50 → trendless; wait for compression + momentum confirmation.
4️⃣ Divergences (Advanced Use)
- Bullish Divergence: Price makes a lower low, RSI makes a higher low → momentum turning up before price.
- Bearish Divergence: Price makes a higher high, RSI makes a lower high → momentum weakening.
- These signals are strongest when combined with a Squeeze firing or EMA crossover from your Swing Overlay.
Best Timeframes
Daily / 4-Hour: Ideal for swing entries and momentum tracking.
1-Hour: For fine-tuning entries inside larger setups.
- The APXTradez Swing RSI gives you a clean, visual read on who controls momentum and when that strength is fading or reversing.
- It’s not meant to predict exact tops or bottoms — it’s a confirmation and rhythm tool:
Use the 50-line for trend bias.
Use 30/70 for exhaustion.
Use color shifts for quick sentiment reads.
Combine with your APX Squeeze and Overlay for the complete swing-timing system.
APXTradez - Swing Overlay🔹 APX Swing Overlay – Summary & Usage Guide
Purpose
The APX Swing Overlay is built for options swing traders who focus on 1–5 day directional moves.
It visually identifies trend strength, compression zones, and momentum buildup using a combination of EMAs, Bollinger Bands, and Keltner Channels — making it ideal for spotting breakouts early.
Core Components
8 EMA (Exponential Moving Average)
- Tracks short-term price action and momentum.
- Price above = bullish continuation; price below = short-term weakness.
- Acts as the first dynamic support/resistance level.
21 EMA
- Captures the mid-term trend (confirmation layer).
- When the 8 EMA crosses above the 21 EMA → bullish shift.
- When the 8 EMA crosses below the 21 EMA → bearish or consolidation signal.
Bollinger Bands (BB)
- Measures volatility around price.
- When the bands tighten, volatility is compressing → expect expansion soon.
- When the bands expand, volatility is releasing → breakout or breakdown in play.
Keltner Channels (KC)
- Uses ATR to show “normal” price movement range.
- When Bollinger Bands move inside the Keltner Channels, it signals a squeeze — price is coiling up for a potential breakout.
- Compression Highlights
- The overlay visually marks when BB are inside KC (low volatility squeeze).
- These zones are shaded or highlighted so you can easily see when a stock is building pressure.
- Once price exits that zone with momentum, it often begins a new swing leg.
How to Use It
Add to Chart : Apply the APX Swing Overlay on your daily or 4-hour timeframe.
Look for Compression:
- Watch for areas where the bands tighten and the compression highlight appears.
- This means volatility is low — expect an expansion soon.
- Wait for Expansion + EMA Confirmation:
- A breakout above both the 8 & 21 EMA, with bands expanding, signals a potential long swing.
- A breakdown below both EMAs with expanding bands signals potential short swing.
Ride the Trend:
- Stay in the trade as long as price respects the 8 EMA.
- Take profit when momentum slows or the 8 crosses back below the 21 EMA.
Best Timeframes
Daily Chart → Ideal for swing setups (2–5 day hold).
4H Chart → Good for early entry timing and breakout confirmation.
Quick Visual Interpretation
Signal Meaning
8 > 21 and expanding BB Bullish trend continuation
8 < 21 and expanding BB Bearish continuation
BB inside KC Volatility squeeze forming
Highlighted compression zone Potential pre-breakout setup
Price closing above 8/21 Confirmation to enter
EMA Crosses with Independent Fading Background1. Overall Purpose
The script is an EMA crossover indicator with the following features:
Calculates four EMA pairs: 5/13, 21/50, 20/200, 50/200.
Plots optional EMA lines.
Shows fading background highlights for bullish/bearish crosses.
Places labels at the points of crossover.
Provides a price source input, so EMAs can be based on close, hl2, ohlc4, etc.
2. Strengths
Flexible inputs: Users can change EMA lengths, choose a price source, enable/disable plots, adjust background highlight duration and fade.
Independent fading: Each EMA pair has its own counter for background highlights, preventing overlaps from canceling each other.
Clear labeling: Crosses are labeled distinctly with different colors.
Overlay: Works directly on the chart with overlay=true.
XT Buy Sell v1.0 Lite: Non-Repainting Signal Indicator🚀 XT Buy Sell v1.0 Lite: Non-Repainting Signal Indicator
The XT Buy Sell v1.0 Lite indicator is a streamlined version of our flagship tool, designed for traders who need a reliable, ready-to-use source of signals for market entry and exit.
✨ Key Advantages
Non-Repainting Signals: BUY/SELL signals remain permanently on the chart, providing reliability and easy verification on historical data.
High Accuracy: Developed as one of the most accurate tools for identifying entry points.
Ready "Out of the Box": The indicator comes with optimal default settings. All additional and advanced settings are available in the PRO version.
Versatility: Suitable for both Spot and Futures/Leveraged trading.
🔔 Convenience Features
Alerts: Set up alerts for BUY/SELL signals so you don't have to constantly monitor the chart.
Optimization: Configure alerts on the specific coins (tickers) where the indicator shows the best setups (most accurate and profitable).
🧠 Recommendations for Professional Trading (Risk Management)
To achieve maximum results and safety, follow these guidelines:
Historical Backtesting: Always verify the indicator's performance on the history of the selected trading pair before deployment.
Multi-Timeframe Analysis: Utilize the principle of "Signal on Lower TF, Confirmation on Higher TF" to increase your trading confidence.
Entry Confirmation: For maximum entry precision, it is recommended to use it in conjunction with our additional tool "X Trend Dashboard (Lite)".
Sequential Signals: The consecutive appearance of signals in the same direction (e.g., two or more consecutive BUYS) can be interpreted as a signal for re-entry/averaging down the position.
Risk Management:
Always set Stop-Losses.
Move the trade to Break-Even as soon as possible.
Carefully consider the risks and the leverage being used.
Happy trading and profits to all! 📈💰
Pullback Levels from ATH# ATH Pullback Levels
**Assess correction depth with precision – 5%, 10%, 15%, 20% below All-Time High**
---
### Overview
This indicator draws **horizontal support lines** at **5%, 10%, 15%, and 20%** below the **All-Time High (ATH)** of any asset. Perfect for **swing traders**, **long-term investors**, and **bull market participants** who want to:
- Measure **pullback depth** in real-time
- Identify **potential support zones**
- Set **alerts** when price enters key retracement levels
---
### Features
| Feature | Description |
|--------|-------------|
| **Dynamic ATH Tracking** | Automatically updates with every new high |
| **4 Pullback Levels** | 5%, 10%, 15%, 20% below ATH |
| **Live Pullback % Label** | Shows current % drop from ATH (top-right) |
| **Customizable Lines** | Toggle visibility, change colors & styles |
| **Built-in Alerts** | Trigger on entry into each zone |
| **No Errors** | Works on 50k+ bar charts (BTC, SPX, etc.) |
| **Time-Based Lines** | Uses `xloc.bar_time` – no 500-bar future limit |
---
### How to Use
1. Apply to any chart (stocks, crypto, forex, indices)
2. Watch the **info box** for current pullback %
3. Use lines as **potential buy zones** during corrections
4. Set **alerts** to be notified when price enters a level
> Example: If ATH = $100 →
> - 5% = $95
> - 10% = $90
> - 15% = $85
> - 20% = $80
---
### Inputs
- **Show 5% / 10% / 15% / 20% Level** → Toggle on/off
- **Line Colors** → Fully customizable
- **Line Style** → Solid, Dashed, or Dotted
---
### Alerts
Create alerts directly from the indicator:
- `"Entered 5% Pullback"`
- `"Entered 10% Pullback"`
- etc.
---
### Best For
- Bull market corrections
- Long-term position sizing
- Risk management in uptrends
- Swing entries on dips
---
### Notes
- Works on **all timeframes**
- **Log scale compatible** (lines adjust correctly)
- No repainting – ATH only updates on confirmed highs
---
**Built with Pine Script v6 – Clean, fast, reliable.**
*Happy trading!*
Z-Score Bands + SignalsZ-Score Statistical Market Analyzer
A multi-dimensional market structure indicator based on standardized deviation & regime logic
English Description
Concept
This indicator builds a statistical model of price behaviour by converting every candle’s movement into a Z-score — how many standard deviations each close is away from its moving average.
It visualizes the normal distribution structure of returns and provides adaptive entry signals for both Mean Reversion and Breakout regimes.
Rather than predicting price direction, it measures statistical displacement from equilibrium and dynamically adjusts the decision logic according to the market’s volatility regime.
⚙️ Main Components
Z-Score Bands (±1σ, ±2σ, ±3σ)
– The core structure visualizes volatility boundaries based on rolling mean and standard deviation.
– Price outside ±2σ often indicates statistical extremes.
Dual Signal Systems
Mean Reversion (MRL / MRS): when price (or return z-score) crosses back inside ±2σ bands.
Breakout (BOL / BOS): when price continues to expand beyond ±2σ.
Volatility Regime Classification
The indicator detects whether the market is currently in a low-vol or high-vol regime using percentile statistics of σ.
Low vol → Mean Reversion preferred
High vol → Breakout preferred
🧠 Adaptive Switches
A. Freeze MA/σ - Use previous-bar stats to avoid repainting and lag.
B. Confirm on Close - Only generate signals once the base-timeframe bar closes (eliminates look-ahead bias).
C. Return-based Signal - Use log-return Z-score instead of price deviation — normalizes volatility across assets.
D. Outlier Filter - Exclude bars with abnormal single-bar returns (e.g., >20%). Reduces false spikes.
E. Regime Gating - Automatically switch between Mean Reversion and Breakout logic depending on volatility percentile.
Each module can be toggled individually to test different statistical behaviours or tailor to a specific market condition.
📊 Interpretation
When the histogram of returns approximates a normal distribution, mean-reversion logic is often more effective.
When price persistently drifts beyond ±2σ or ±3σ, the distribution becomes leptokurtic (fat-tailed) — a breakout structure dominates.
Hence, this tool can help you:
Identify whether an asset behaves more “Gaussian” or “fat-tailed”;
Select the correct trading regime (MR or BO);
Quantitatively measure market tension and volatility clusters.
🧩 Recommended Use
Works on any timeframe and any asset.
Best used on liquid instruments (e.g., XAU/USD, indices, major FX pairs).
Combine with volume, sentiment or structural filters to confirm signals.
For strategy automation, pair with the companion script:
🧠 “Z-Score Strategy • Multi-Source Confirm (MRL/MRS/BOL/BOS)”.
⚠️ Disclaimer
This script is designed for educational and research purposes.
Statistical deviation ≠ directional prediction — use with sound risk management.
Past distribution patterns may shift under new volatility regimes.
==================================================================================
中文说明(简体)
概念简介
该指标基于价格的统计分布原理,将每根 K 线的波动转化为标准化的 Z-Score(标准差偏离值),用于刻画市场处于均衡或偏离状态。
它同时支持 均值回归(Mean Reversion) 与 突破延展(Breakout) 两种逻辑,并可根据市场波动结构自动切换策略模式。
⚙️ 主要功能模块
Z-Score 通道(±1σ / ±2σ / ±3σ)
用滚动均值与标准差动态绘制的统计波动带,价格超出 ±2σ 区域通常意味着极端偏离。
双信号系统
MRL / MRS(均值回归多空):价格重新回到 ±2σ 以内时触发。
BOL / BOS(突破延展多空):价格持续运行在 ±2σ 之外时触发。
波动率分层
自动识别市场处于高波动还是低波动区间:
低波动期 → 适合均值回归逻辑;
高波动期 → 适合突破趋势逻辑。
🧠 A–E 模块说明
A. 固定统计参数:使用上一根 K 线的均值和标准差,防止重绘。
B. 收盘确认信号:仅在当前时间框架收盘后生成信号,避免前视偏差。
C. 收益率信号模式:采用对数收益率的 Z-Score,更具普适性。
D. 异常波过滤:忽略单根极端波动(如 >20%)的噪声信号。
E. 波动率调节逻辑:根据市场处于高/低波动区间,自动切换 MRL/MRS 或 BOL/BOS。
📊 应用解读
如果收益率分布接近正态分布 → 市场倾向震荡,MRL/MRS 效果较佳;
若价格频繁偏离 ±2σ 或 ±3σ → 市场呈现“肥尾”分布,趋势延展占主导。
因此,该指标的核心目标是:
识别当前市场的统计结构类型;
根据波动特征自动切换交易逻辑;
提供结构化、可量化的市场状态刻画。
💡 使用建议
适用于所有时间框架与金融品种。
建议结合成交量或结构性指标过滤。
若用于策略回测,可搭配同名 “Z-Score Strategy • Multi-Source Confirm” 策略脚本。
⚠️ 免责声明
本指标仅用于研究与教学,不构成任何投资建议。
统计偏离 ≠ 趋势预测,实际市场行为可能在不同波动结构下改变。
Multi-Session Viewer and AnalyzerFully customizable multi-session viewer that takes session analysis to the next level. It allows you to fully customize each session to your liking. Includes a feature that highlights certain periods of time on the chart and a Time Range Marker.
It helps you analyze the instrument that you trade and pinpoint which times are more volatile than others. It also helps you choose the best time to trade your instrument and align your life schedule with the market.
NZDUSD Example:
- 3 major sessions displayed.
- Although this is NZDUSD, Sydney is not the best time to trade this pair. Volatility picks up at Tokyo open.
- I have time to trade in the evening from 18:00 to 22:00 PST. I live in a different time zone, whereas market is based on EST. How does the pair behave during the time I am available to trade based on my time zone? Time Range Marker feature allows you to see this clearly on the chart (black lines).
- I have some time in the morning to trade during New York session, but there is no way I am waking up at 05:00 PST. 06:30 PST seems doable. Blue highlighted area is good time to trade during New York session based on what Bob said. It seem like this aligns with when I am available and when I am able to trade. Volatility is also at its peak.
- I am also available to trade between London close and Tokyo open on some days of the week, but... based on what I see, green highlighted area is clearly showing that I probably don't want to waste my time trading this pair from London close and until Tokyo open. I will use this time for something else rather than be stuck in a range.






















