FVG – (auto close + age) GR V1.0FVG – Fair Value Gaps (auto close + age counter)
Short Description
Automatically detects Fair Value Gaps (FVGs) on the current timeframe, keeps them open until price fully fills the gap or a maximum bar age is reached, and shows how many candles have passed since each FVG was created.
Full Description
This indicator automatically finds and visualizes Fair Value Gaps (FVGs) using the classic 3-candle ICT logic on any timeframe.
It works on whatever timeframe you apply it to (M1, M5, H1, H4, etc.) and adapts to the current chart.
FVG detection logic
The script uses a 3-candle pattern:
Bullish FVG
Condition:
low > high
Gap zone:
Lower boundary: high
Upper boundary: low
Bearish FVG
Condition:
high < low
Gap zone:
Lower boundary: high
Upper boundary: low
Each detected FVG is drawn as a colored box (green for bullish, red for bearish in this version, but you can adjust colors in the inputs).
Auto-close rules
An FVG remains on the chart until one of the following happens:
Full fill / mitigation
A bullish FVG closes when any candle’s low goes down to or below the lower boundary of the gap.
A bearish FVG closes when any candle’s high goes up to or above the upper boundary of the gap.
Maximum bar age reached
Each FVG has a maximum lifetime measured in candles.
When the number of candles since its creation reaches the configured maximum (default: 200 bars), the FVG is automatically removed even if it has not been fully filled.
This keeps the chart cleaner and prevents very old gaps from cluttering the view.
Age counter (labels inside the boxes)
Inside every FVG box there is a small label that:
Shows how many bars have passed since the FVG was created.
Moves together with the right edge of the box and stays vertically centered in the gap.
This makes it easy to distinguish fresh gaps from older ones and prioritize which zones you want to pay attention to.
Inputs
FVG color – Main fill color for all FVG boxes.
Show bullish FVGs – Turn bullish gaps on/off.
Show bearish FVGs – Turn bearish gaps on/off.
Max bar age – Maximum number of candles an FVG is allowed to stay on the chart before it is removed.
Usage
Works on any symbol and any timeframe.
Can be combined with your own ICT / SMC concepts, order blocks, session ranges, market structure, etc.
You can also choose to only display bullish or only bearish FVGs depending on your directional bias.
Disclaimer
This script is for educational and informational purposes only and is not financial advice. Always do your own research and use proper risk management when trading.
Statistics
Average Daily Range by EleventradesThis indicator calculates the Average Daily Range based on any number of past candles you choose, and it shows you the projected expansion for the current daily candle. You can also enable features like mean-reversion for large-range days, reversal thresholds, and filters for candles with big wicks. The full guide is already posted on YouTube along with a PDF.
Intraday Close Price VariationShows in the graph the intraday variation, being useful when using the replay feature.
PIP BOOSTER (Desktop) DemoversionThe PIP BOOSTER from underground-traders.com is a very intelligent indicator with integrated win-rate tracking (%), which can be used on all markets and timeframes. Thanks to its two fundamentally different algorithms, the PIP BOOSTER is able to find a profitable setup in over 80% of all charts. The win-rate tracking (%) is highly detailed and can be applied to up to 5,000 candles.
It updates after every single signal, ensuring that performance monitoring is always up to date. Additionally, PIP BOOSTER users can apply different time filters, which can further optimize performance.
There is both a desktop version and a mobile version, which can be used with the TradingView mobile app. All signals are displayed clearly in the mobile app, making it possible to trade directly from your smartphone.
Please note that the demo version does not include any live signals. The demo version is only for you to evaluate the performance (win-rate %) of the two algorithms.
We guarantee that there are no repaint signals, and the signals in the demo version are 100% identical to those in the full version.
For any questions, please visit:
underground-traders.com
Or contact us at:
help@underground-traders.com
PIP BOOSTER (Mobile) DemoversionThe PIP BOOSTER from underground-traders.com is a very intelligent indicator with integrated win-rate tracking (%), which can be used on all markets and timeframes. Thanks to its two fundamentally different algorithms, the PIP BOOSTER is able to find a profitable setup in over 80% of all charts. The win-rate tracking (%) is highly detailed and can be applied to up to 5,000 candles.
It updates after every single signal, ensuring that performance monitoring is always up to date. Additionally, PIP BOOSTER users can apply different time filters, which can further optimize performance.
There is both a desktop version and a mobile version, which can be used with the TradingView mobile app. All signals are displayed clearly in the mobile app, making it possible to trade directly from your smartphone.
Please note that the demo version does not include any live signals. The demo version is only for you to evaluate the performance (win-rate %) of the two algorithms.
We guarantee that there are no repaint signals, and the signals in the demo version are 100% identical to those in the full version.
For any questions, please visit:
underground-traders.com
Or contact us at:
help@underground-traders.com
PIP BOOSTER (Desktop) FullversionThe PIP BOOSTER from underground-traders.com is a very intelligent indicator with integrated win-rate tracking (%), which can be used on all markets and timeframes. Thanks to its two fundamentally different algorithms, the PIP BOOSTER is able to find a profitable setup in over 80% of all charts. The win-rate tracking (%) is highly detailed and can be applied to up to 5,000 candles.
It updates after every single signal, ensuring that performance monitoring is always up to date. Additionally, PIP BOOSTER users can apply different time filters, which can further optimize performance.
There is both a desktop version and a mobile version, which can be used with the TradingView mobile app. All signals are displayed clearly in the mobile app, making it possible to trade directly from your smartphone.
Please note that the demo version does not include any live signals. The demo version is only for you to evaluate the performance (win-rate %) of the two algorithms.
We guarantee that there are no repaint signals, and the signals in the demo version are 100% identical to those in the full version.
For any questions, please visit:
underground-traders.com
Or contact us at:
help@underground-traders.com
PIP BOOSTER (Mobile) FullversionThe PIP BOOSTER from underground-traders.com is a very intelligent indicator with integrated win-rate tracking (%), which can be used on all markets and timeframes. Thanks to its two fundamentally different algorithms, the PIP BOOSTER is able to find a profitable setup in over 80% of all charts. The win-rate tracking (%) is highly detailed and can be applied to up to 5,000 candles.
It updates after every single signal, ensuring that performance monitoring is always up to date. Additionally, PIP BOOSTER users can apply different time filters, which can further optimize performance.
There is both a desktop version and a mobile version, which can be used with the TradingView mobile app. All signals are displayed clearly in the mobile app, making it possible to trade directly from your smartphone.
Please note that the demo version does not include any live signals. The demo version is only for you to evaluate the performance (win-rate %) of the two algorithms.
We guarantee that there are no repaint signals, and the signals in the demo version are 100% identical to those in the full version.
For any questions, please visit:
underground-traders.com
Or contact us at:
help@underground-traders.com
VWAP ±2σ Entry Signals (volume Weighted)This indicator builds a session based VWAP and plots the upper and lower 2nd standard deviation bands around it. These bands act as dynamic volatility edges for the session. When price reaches these outer bands, it often represents an extreme stretch away from fair value a place where mean reversion or exhaustion can occur.
The indicator generates trade signals only when price approaches the band from the correct direction, which filters out a lot of noise and reduces false touches.
How It Works
VWAP is calculated from the start of each session.
Standard deviation is computed using volume weighted prices, so the bands expand and contract with real market activity.
The upper and lower 2σ bands form natural "overextended" zones around VWAP.
Most VWAP band strategies fire signals every time price touches a band which produces a lot of junk signals.
This version avoids that by requiring direction based touches, meaning:
If price is already above the band, no sell signal appears.
If price is already below the band, no buy signal appears.
BTC Macro Heatmap (Fed Cuts & Hikes)🔴 1. Red line – Fed Funds Rate (policy trend)
This line tells you what stage of the monetary cycle we’re in.
Rising red line = the Fed is hiking → liquidity is tightening → money leaves risk assets like BTC.
Flat = pause → markets start pricing in the next move (often sideways BTC).
Falling = easing / cutting → liquidity returns → bullish environment builds.
The rate of change matters more than the level. When the slope turns down, capital starts seeking yield again — BTC benefits first because it’s the most volatile asset.
💚 2. Dim green zones – detected cuts
These are data-based easing events pulled directly from FRED.
They show when the actual effective rate began moving down, not necessarily the exact meeting day.
Think of them as the Fed’s “foot off the brake” — that’s when risk markets begin responding.
🟩 3. Bright green lines – official FOMC cuts
These are the real policy shifts — the Fed formally changed direction.
After these appear, BTC historically transitions from accumulation → markup phase.
Look at 2020: the bright green lines came right before BTC’s full reversal.
You’re seeing the same thing now with the 2025 lines — early-stage liquidity return.
🟠 4. Orange line – DXY (US Dollar Index)
DXY is your “risk-off” gauge.
When DXY rises, global investors flock to dollars → BTC usually weakens.
When DXY peaks and starts dropping, it means risk appetite is coming back → BTC rallies.
BTC and DXY are inversely correlated about 70–80% of the time.
Watch for DXY lower highs after rate cuts — that’s your macro confirmation of a BTC-friendly environment.
🟦 5. Aqua line – BTC (normalized)
You’re not looking for the price itself here, but its shape relative to DXY and the Fed line.
When BTC curls up as the red line flattens and DXY rolls over → that’s historically the start of a major bull phase.
BTC tends to bottom before the first cut and explode once DXY decisively breaks down.
🧠 Putting it together
Here’s the rhythm this chart shows over and over:
Fed hikes (red line rising) → BTC weakens, DXY climbs.
Fed pauses (red line flat) → BTC stops falling, DXY tops.
Fed cuts (dim + bright green) → DXY turns down → BTC begins long recovery → bull cycle starts.
Weekday Close vs Open — Last N (per weekday)# Weekday Close vs Open - Last N Occurrences
This indicator distills every weekday's historical open-to-close behavior into a compact table so you can see how "typical" the current session is before the day even closes. It runs independently of your chart timeframe by pulling daily OHLCV data under the hood, tracking the last **N** completed occurrences for each weekday, and refreshing only when a daily bar closes. On daily charts you can also shade every past bar that matches today's weekday (excluding the in-progress session) to reinforce the pattern visually while the table remains non-repainting.
## What It Shows
- **Win/Loss/Tie counts** - how many of the last `N` occurrences closed above the open (wins), below (losses), or inside the tie threshold you define as "flat".
- **Win % heatmap** - the win column is color-coded (deep green > deep red) so you immediately recognize strong or weak weekdays.
- **Advanced metrics (optional)** - average daily volume plus the average percentage excursion above/below the open (`AvgUp%`, `AvgDn%`) for that weekday.
- **Totals row** - aggregates every weekday into one row to estimate overall hit rate and average stats across the entire data set.
- **Weekday shading (optional)** - on daily charts you can tint every bar that matches today's weekday (all Mondays, all Fridays, etc.) for instant pattern recognition.
## How It Works
1. The script requests daily OHLCV data (non-repainting) regardless of the chart timeframe.
2. When a new daily bar confirms, it packs that day's data into one of seven arrays (one per weekday). Each day contributes five floats (O/H/L/C/V) so trimming and statistics stay in lockstep.
3. A helper function (`f_dayMetrics`) scans daily history to compute average volume, average excursion above/below the open, and win/loss/tie counts for the requested weekday.
4. The table populates on the last bar of the chart session, respecting your advanced/totals toggles and keeping text at `size.normal`.
## Reading the Table
- **Win/Loss/Tie columns**: raw counts taken from your chosen `N`.
- **Win %***: excludes ties from the denominator so it reflects only decisive closes.
- **AvgUp% / AvgDn%**: typical intraday extension (high vs open, open vs low) in percent.
- **Avg Vol**: arithmetic mean of daily volume for that weekday.
- **TOTAL row**: provides a global win rate plus volume/up/down averages weighted by how many samples each weekday contributed.
## Practical Uses
- Spot weekdays that historically trend higher or lower before entering a trade.
- Compare current price action against the typical intraday range (`AvgUp%` vs today's move).
- Filter mean-reversion vs breakout setups based on the most reliable weekday patterns.
- Quickly gauge whether today is behaving "in character" by referencing the highlighted row or the optional whole-chart weekday shading.
> **Tip:** Use smaller `N` values (e.g., 10-20) for adaptive, recent behavior and larger values (50+) to capture longer-term seasonality. Tighten the tie threshold if you want almost every candle to register as win/loss, or widen it to focus only on meaningful moves.
Forward Returns – (Next Month Start)This indicator calculates 1-month, 3-month, 6-month, and 12-month forward returns starting from the first trading day of the month following a defined price event.
A price event occurs when the selected asset drops below a user-defined threshold over a chosen timeframe (Day, Week, or Month).
For monthly conditions, the script evaluates the entire performance of the previous calendar month and triggers the event only at the first trading session of the next month, ensuring accurate forward-return alignment with historical monthly cycles.
The forward returns for each detected event are displayed in a paginated performance table, allowing users to navigate through large datasets using a page selector. Each page includes:
Entry Date
Forward returns (1M, 3M, 6M, 12M)
Average forward return
Win rate (percentage of positive outcomes)
This tool is useful for studying historical performance after major drawdowns, identifying seasonal patterns, and building evidence-based risk-management or timing models.
Frank Strategy V2.06 Quantum FilterThe Frank Strategy indicator version 2.06 is designed to:
Identify high-probability entries
Filter out false signals typical of XAUUSD (especially M1–M5)
Enter only when trend + momentum + market coherence are aligned
Provide automatic TP/SL based on volatility
Get additional confirmation with the quant filter
It is a strategy for short and medium-term trends, not for impulsive scalping or excessively long cycles.
The Frank Strategy aims to:
Do not chase the price
Do not enter sideways
Do not trade without momentum
Do not trade without coherence between trend + strength + volatility
Avoid impulsive and noisy entries
It is a strategy designed to be:
selective
precise
repeatable
disciplined
Liquidation Cascade Detector [QuantAlgo]🟢 Overview
The Liquidation Cascade Detector employs multi-dimensional microstructure analysis to identify forced liquidation events by synthesizing volume anomalies, price acceleration dynamics, and volatility regime shifts. Unlike conventional momentum indicators that merely track directional bias, this indicator isolates the specific market conditions where leveraged positions experience forced unwinding, creating asymmetric opportunities for mean reversion traders and market makers to take advantage of temporary liquidity imbalances.
These liquidation cascades manifest through various catalysts: overwhelming spot selling coupled with leveraged long liquidation forced unwinding creates downward spirals where organic sell pressure triggers margin calls, which generate additional selling that triggers more margin calls. Conversely, sudden large buy orders or coordinated buying can squeeze overleveraged shorts, forcing buy-to-cover orders that push price higher, triggering additional short stops in a self-reinforcing feedback loop. The indicator captures both scenarios, regardless of whether the initial catalyst is organic flow or forced liquidation.
For sophisticated traders/market makers deploying amplification strategies, this indicator serves as an early warning system for distressed order flow. By detecting the moments when cascading stop-losses and margin calls create self-reinforcing price movements, the system enables traders to: (1) identify forced participants experiencing capital pressure, (2) strategically add liquidity in the direction of panic flow to amplify displacement, (3) accumulate contra-positions during the overshoot phase, and (4) capture mean reversion profits as equilibrium pricing reasserts itself. This approach transforms destructive liquidation events into potential profit opportunities by systematically front-running and then fading coordinated forced selling/buying.
🟢 How It Works
The detection engine operates through a three-tier confirmation framework that validates liquidation events only when multiple independent market stress indicators align simultaneously:
► Tier 1: Volume Anomaly Detection
The system calculates bar-to-bar volume ratios to identify abnormal participation spikes characteristic of forced liquidations. The Volume Spike threshold filters for transactions where current volume significantly exceeds previous bar volume. When leveraged positions hit stop-losses or margin requirements, their simultaneous unwinding creates distinctive volume signatures absent during organic price discovery. This metric isolates moments when market makers face one-sided order flow from distressed participants unable to control execution timing, whether triggered by whale orders absorbing liquidity or cascading margin calls creating relentless directional pressure.
► Tier 2: Price Acceleration Measurement
By comparing current bar's absolute body size against the previous bar's movement, the algorithm quantifies momentum acceleration. The Price Acceleration threshold identifies scenarios where price velocity increases dramatically, a hallmark of cascading liquidations where each stop-loss triggers additional stops in a feedback loop. This calculation distinguishes between gradual trend development (irrelevant for amplification attacks) and explosive moves driven by forced order flow requiring immediate liquidity provision. The metric captures both panic selling scenarios where spot sellers overwhelm bid liquidity triggering long liquidations, and short squeeze dynamics where aggressive buying exhausts offer-side depth forcing short covering.
► Tier 3: Volatility Expansion Analysis
The indicator measures bar range expansion by computing the current high-low range relative to the previous bar. The Volatility Spike threshold captures regime shifts where intrabar price action becomes erratic, evidence that market depth has evaporated and order book imbalance is driving price. Combined with body-to-range analysis indicating strong directional conviction, this metric confirms that volatility expansion reflects genuine liquidation pressure rather than random noise or low-volume chop.
*Supplementary Confirmation Metrics
Beyond the three primary detection tiers, the system analyzes additional candle characteristics that distinguish genuine liquidation events from ordinary volatility:
► Candle Strength: Measures the ratio of candle body size to total bar range. High readings (above 60%) indicate strong directional conviction where price moved decisively in one direction with minimal retracement. During liquidations, distressed traders execute market orders that drive price aggressively without the normal back-and-forth of balanced trading. Strong-bodied candles with minimal wicks confirm forced participants are accepting any available price rather than attempting to minimize slippage, validating that observed volume and price acceleration stem from liquidation pressure rather than routine trading.
► Volume Climax: Identifies when current volume reaches the highest level within recent history. Climax volume events mark terminal liquidation phases where maximum panic or squeeze intensity occurs. These extreme participation spikes typically represent the final wave of forced exits as the last remaining stops are triggered or the final shorts capitulate. For mean reversion traders, volume climax signals provide optimal reversal entry timing, as they mark maximum displacement from equilibrium when all forced sellers/buyers have been exhausted.
*Directional Classification
The system categorizes cascades into two actionable classes:
1. Short Liquidation (Bullish Cascade): Upward price movement combined with cascade patterns equals forced short covering. This occurs when aggressive spot buying (often from whales placing large market orders) or coordinated buy programs exhaust available offer liquidity, spiking price upward and triggering clustered short stop-losses. Short sellers experiencing margin pressure must buy-to-close regardless of price, creating artificial demand spikes that compound the initial buying pressure. The combination of organic buying and forced covering creates explosive upward moves as each liquidated short adds buy-side pressure, triggering additional shorts in a self-reinforcing loop. Market makers can amplify this by lifting offers ahead of forced buy orders, then selling into the exhaustion at elevated levels.
2. Long Liquidation (Bearish Cascade): Downward price movement combined with cascade patterns equals forced long liquidation. This manifests when heavy spot selling (panic sellers, large institutional unwinds, or coordinated distribution) overwhelms bid-side liquidity, breaking through support levels where long stop-losses cluster. Over-leveraged longs facing margin calls must sell-to-close at any price, generating artificial supply waves that compound the initial selling pressure. The dual force of organic selling coupled with forced long liquidation creates downward spirals where each margin call triggers additional margin calls through further price deterioration. Amplification opportunities exist by hitting bids ahead of panic selling, accumulating long positions during the capitulation, and reversing as sellers exhaust.
🟢 How to Use
1. For Mean Reversion Traders
When the indicator highlights a short liquidation cascade (green background), this signals that shorts are experiencing forced buy-to-cover pressure, often initiated by whale bids or aggressive spot buying that triggered the squeeze. Mean reversion traders can interpret this as a temporary upward dislocation from fair value. As the dashboard shows declining momentum metrics and the cascade highlighting stops, this represents a potential fade opportunity. Enter short positions expecting price to revert back toward pre-cascade levels once the forced buying exhausts and the initial large buyer completes their accumulation.
When a long liquidation cascade triggers (red background), longs are undergoing forced sell-to-close liquidation, typically catalyzed by overwhelming spot selling that breached key support levels. This creates artificial downward pressure disconnected from fundamental value, as margin-driven forced selling compounds organic sell flow. Mean reversion traders wait for the cascade to complete (dashboard transitions from active liquidation status to neutral), then enter long positions anticipating snap-back toward equilibrium pricing as panic subsides and forced sellers are exhausted.
You can also monitor the dashboard's Volume Climax indicator. When it displays "YES" during an active cascade, this suggests the liquidation is reaching its terminal phase, whether driven by the final shorts being squeezed out or the last leveraged longs capitulating. Mean reversion entries become highest probability at this point, as maximum displacement from fair value has occurred. Wait for the next 1-3 bars after climax confirmation, then enter contra-trend positions with tight stops.
The Candle Strength metric also helps validate entry timing. When candle strength readings drop significantly after maintaining elevated levels during the cascade, this divergence indicates absorption is occurring. Market makers are stepping in to provide liquidity, supporting your mean reversion thesis. Strong candle bodies during the cascade followed by weaker bodies signal the forced flow is diminishing.
2. For Momentum & Trend Following Traders
When price breaks through a significant resistance level and immediately triggers a short liquidation cascade (green background), this confirms breakout validity through forced participation. Shorts positioned against the breakout are now experiencing margin pressure from the combination of breakout momentum and potential whale buying, creating self-reinforcing buying that propels price higher. Enter long positions during the cascade or immediately after, as the forced covering provides fuel for extended momentum continuation.
Conversely, when price breaks below key support and triggers a long liquidation cascade (red background), the breakdown is validated by forced selling from trapped longs. Heavy spot selling coupled with margin liquidations creates accelerated downside momentum as liquidations cascade through clustered stop-loss levels. Enter short positions as the cascade develops, riding the combined force of organic selling and forced liquidation for extended trend moves.
3. For Sophisticated Traders & Market Makers
► Amplification Attack Execution
Sophisticated operators can exploit cascades through systematic amplification positioning. When a short liquidation is detected (green highlight activating), often initiated by whale bids absorbing offer liquidity, place aggressive buy orders to front-run and amplify the forced short covering. This exacerbates upward pressure, pushing price further from equilibrium and triggering additional clustered stops. Simultaneously begin accumulating short positions at these artificially elevated levels. As dashboard metrics indicate cascade exhaustion (volume spike declining, climax signal appearing, candle strength weakening), flatten amplification longs and hold accumulated shorts into the mean reversion.
For long liquidations (red highlight), typically catalyzed by heavy spot selling overwhelming bid depth, execute the inverse strategy. Place aggressive sell orders to compound the panic selling, amplifying downward displacement and accelerating margin call triggers. Layer long entries at depressed prices during this amplification phase as forced liquidation selling creates artificial supply. When dashboard signals cascade completion (metrics normalizing, volume climax passing), exit amplification shorts and maintain long positions for the reversal trade.
► Market Making During Liquidity Crises
During detected cascades, temporarily adjust quote placement strategy. When dashboard shows all three confirmation metrics activating simultaneously with strong candle bodies, this indicates the highest probability liquidation event, whether from whale order flow or cascading margin calls. Widen spreads dramatically to capture enhanced edge during the liquidity vacuum. Alternatively, step away from quote provision entirely on your natural inventory side (stop offering during short cascades driven by aggressive buying, stop bidding during long cascades driven by overwhelming selling) to avoid adverse selection from forced flow.
Use cascade detection to inform inventory management. During short cascades initiated by large buy orders or short squeezes, reduce existing short inventory exposure while allowing the forced buying to push price higher. Rebuild short inventory only at the inflated levels created by liquidation pressure. During long cascades where spot selling compounds leveraged liquidation, reduce long inventory and use the forced selling to reaccumulate at artificially depressed prices rather than providing stabilizing liquidity too early.
► Sequential Positioning Strategy
Advanced traders can structure trades in phases: (1) Initial amplification orders placed immediately upon cascade detection to front-run forced flow, (2) Contra-position accumulation scaled in as displacement extends and dashboard readings intensify, (3) Amplification trade exit when metrics show deceleration or candle strength weakens, (4) Contra-position hold through mean reversion, targeting pre-cascade price levels. This sequential approach extracts profit from both the dislocation phase and the subsequent equilibrium restoration.
► Risk Monitoring
If cascade highlighting persists across many consecutive bars while dashboard volume readings remain extremely elevated with sustained strong candle bodies, this suggests sustained institutional deleveraging or persistent whale activity rather than simple retail liquidation. Reduce amplification position sizing significantly, as these extended events can exhibit delayed mean reversion. Professional counter-parties may be establishing dominant positions, limiting your edge.
When volatility spike metrics decline while cascade highlighting continues, professional absorption is occurring. Proceed cautiously with amplification strategies, as intelligent liquidity providers are already positioning for the reversal, potentially front-running your intended reversal trade. Similarly, if large liquidation wicks appear during cascades, this indicates partial absorption is happening, suggesting more sophisticated players are taking the opposite side of distressed flow.
52-Week High Drawdown (Events, Freq & Current)52-Week High Drawdown - Events, Freq & Current
OVERVIEW
Track and analyze drawdowns from 52-week highs with comprehensive statistics on drawdown events, frequency, and current market positioning. Perfect for risk management, historical analysis, and understanding volatility patterns.
KEY FEATURES
📊 Real-Time Drawdown Tracking
Visual area chart showing current intraday maximum drawdown from rolling high
Automatically plots depth below zero line for easy interpretation
Color-coded reference lines at -10% and -20% levels
📈 Event-Based Historical Analysis
Automatically categorizes drawdown cycles across four severity zones:
5-10% Drawdowns - Minor corrections
10-15% Drawdowns - Moderate pullbacks
15-20% Drawdowns - Significant corrections
20%+ Drawdowns - Major corrections/bear markets
⏱️ Frequency Metrics
Calculates average time between events for each category, displayed as "Every X months" to understand typical correction patterns.
🎯 Current Cycle Tracking
Real-time display of maximum drawdown depth in the current cycle, helping you gauge present market position.
📅 Smart Timeframe Adaptation
Auto-Adjust Mode: Automatically selects optimal lookback (Daily=252, Weekly=52, Monthly=12)
Manual Mode: Set custom lookback period for specialized analysis
HOW IT WORKS
The indicator identifies drawdown cycles - periods from one high to the next. When price touches a new rolling high, the previous cycle ends and is categorized by its maximum depth.
Cycle Logic:
Tracks deepest point reached since last high
When price touches/exceeds rolling high, cycle completes
Cycle categorized into appropriate drawdown zone
New cycle begins
This provides accurate event counting without double-counting fluctuations within larger drawdowns.
PRACTICAL APPLICATIONS
Risk Management
Understand typical drawdown patterns for position sizing
Set realistic stop-loss levels based on historical norms
Anticipate potential correction depths during bull markets
Market Context
Identify when current drawdowns are extreme vs. typical
Compare across different assets and timeframes
Historical perspective during volatile periods
Strategic Planning
Time entries during typical correction zones
Recognize when drawdowns exceed historical norms
Build resilience strategies based on frequency data
SETTINGS GUIDE
Auto-Adjust Lookback by Timeframe
Checked: Automatically uses appropriate period for chart timeframe
Unchecked: Uses manual lookback value
Manual Lookback Length
Default: 252 (trading days in a year)
Customize for specific analysis periods
Higher values = longer historical perspective
Table Position
Choose from Top Right, Bottom Right, Top Left, or Bottom Left based on your chart layout.
INTERPRETATION TIPS
Frequency data becomes more reliable with longer history (5+ years ideal)
"Never" frequency indicates zero events in available data range
Current Cycle Max shows 0.00% at new highs, otherwise displays deepest point
Compare frequencies across assets to understand relative volatility profiles
BEST USED FOR
Stocks, ETFs, and Indices with sufficient historical data
Long-term investing and swing trading strategies
Portfolio risk assessment and stress testing
Educational purposes - understanding market behavior
Multi-timeframe analysis (daily, weekly, monthly)
TECHNICAL NOTES
Uses ta.highest() for efficient rolling high calculation
Event detection logic prevents double-counting
Frequency calculated from actual data start time to present
All calculations update in real-time with each new bar
💡 Tip: Run this indicator on major indices like SPY or QQQ with maximum available history to build a comprehensive baseline for equity market corrections.
Created to provide institutional-grade drawdown analysis in an accessible format. Free to use and modify.
Alpha V3 proAlpha V3 pro is a custom technical indicator designed specifically for binary options trading. It analyzes market structure, price action behavior, and momentum shifts to generate high-probability buy and sell signals. The indicator filters out noise and focuses on identifying clear market reversals or trend continuations, helping traders take more accurate entries within short-term timeframes. With its optimized signal logic, Alpha V3 aims to provide timely alerts, improved decision-making, and greater consistency for traders looking to capitalize on fast binary option opportunities.
MTF-SumTabThis is Summary Table of different Time Frames, and this gives an insight into the Trend...
SVE Daily ATR + SDTR Context BandsSVE Daily ATR + SDTR Context Bands is a free companion overlay from The Volatility Engine™ ecosystem.
It plots daily ATR-based expansion levels and a Standardized Deviation Threshold Range (SDTR) to give traders a clean, quantitative view of where intraday price sits relative to typical daily movement and volatility extremes.
This module is designed as an SVE-compatible context layer—using discrete, RTH-aligned daily zones, expected-move bands, and a standardized volatility shell—so traders can build situational awareness even without the full SPX Volatility Engine™ (SVE).
It does not generate trade signals.
Its sole purpose is to provide a clear volatility framework you can combine with your own structure, Fibonacci, or signal logic (including SVE, if you use it).
🔍 What It Shows
* Daily ATR Bands (expHigh / expLow)
- Expected high/low based on smoothed daily ATR
- Updates at the RTH open
* Daily SDTR Bands (expHighSDTR / expLowSDTR)
- Standard deviation threshold range for volatility extremes
- Helps identify overextended conditions
Discrete RTH-aligned Zones
- Bands reset cleanly at each RTH session
No continuous carry-over from prior days
Daily ATR & SDTR stats label
Quick-reference box showing current ATR and SDTR values
🎯 Purpose
This tool helps traders:
- Gauge intraday context relative to expected daily movement
- Assess volatility state (quiet, normal, expanded, extreme)
- Identify likely exhaustion or expansion zones
- Frame intraday price action inside daily volatility rails
- Support decision-making with objective context rather than emotion
It complements any strategy and works on any intraday timeframe.
⚙️ Inputs
- ATR Lookback (default: 20 days)
- RTH Session Times
- SDTR Lookback
- Show/Hide Daily Stats Label
🧩 Part of the SVE Ecosystem
This module is part of the broader SPX Volatility Engine™ framework.
The full SVE system includes:
- Composite signal scoring
- Volatility compression logic
- Histogram slope and momentum analysis
- Internals (VIX / VVIX / TICK)
- Structural zone awareness
- Real-time bias selection
- High-clarity decision support
⚠️ Disclaimer
This tool is provided for educational and informational purposes only.
No performance claims are made or implied.
Not investment advice.
Chronos Reversal Labs - SPChronos Reversal Labs - Shadow Portfolio
Chronos Reversal Labs - Shadow Portfolio: combines reinforcement learning optimization with adaptive confluence detection through a shadow portfolio system. Unlike traditional indicator mashups that force traders to manually interpret conflicting signals, this system deploys 4 multi-armed bandit algorithms to automatically discover which of 5 specialized confluence strategies performs best in current market conditions, then validates those discoveries through parallel shadow portfolios that track virtual P&L for each strategy independently.
Core Innovation: Rather than relying on static indicator combinations, this system implements Thompson Sampling (Bayesian multi-armed bandits), contextual bandits (regime-specific learning), advanced chop zone detection (geometric pattern analysis), and historical pre-training to build a self-improving confluence detection engine. The shadow portfolio system runs 5 parallel virtual trading accounts—one per strategy—allowing the system to learn which confluence approach works best through actual position tracking with realistic exits.
Target Users: Intermediate to advanced traders seeking systematic reversal signals with mathematical rigor. Suitable for swing trading and day trading across stocks, forex, crypto, and futures on liquid instruments. Requires understanding of basic technical analysis and willingness to allow 50-100 bars for initial learning.
Why These Components Are Combined
The Fundamental Problem
No single confluence method works consistently across all market regimes. Kernel-based methods (entropy, DFA) excel during predictable phases but fail in chaos. Structure-based methods (harmonics, BOS) work during clear swings but fail in ranging conditions. Technical methods (RSI, MACD, divergence) provide reliable signals in trends but generate false signals during consolidation.
Traditional solutions force traders to either manually switch between methods (slow, error-prone) or interpret all signals simultaneously (cognitive overload). Both fail because they assume the trader knows which regime the market is in and which method works best.
The Solution: Meta-Learning Through Reinforcement Learning
This system solves the problem through automated strategy selection : Deploy 5 specialized confluence strategies designed for different market conditions, track their real-world performance through shadow portfolios, then use multi-armed bandit algorithms to automatically select the optimal strategy for the next trade.
Why Shadow Portfolios? Traditional bandit implementations use abstract "rewards." Shadow portfolios provide realistic performance measurement : Each strategy gets a virtual trading account with actual position tracking, stop-loss management, take-profit targets, and maximum holding periods. This creates risk-adjusted learning where strategies are evaluated on P&L, win rate, and drawdown—not arbitrary scores.
The Five Confluence Strategies
The system deploys 5 orthogonal strategies with different weighting schemes optimized for specific market conditions:
Strategy 1: Kernel-Dominant (Entropy/DFA focused, optimal in predictable markets)
Shannon Entropy weight × 2.5, DFA weight × 2.5
Detects low-entropy predictable patterns and DFA persistence/mean-reversion signals
Failure mode: High-entropy chaos (hedged by Technical-Dominant)
Strategy 2: Structure-Dominant (Harmonic/BOS focused, optimal in clear swing structures)
Harmonics weight × 2.5, Liquidity (S/R) weight × 2.0
Uses swing detection, break-of-structure, and support/resistance clustering
Failure mode: Range-bound markets (hedged by Balanced)
Strategy 3: Technical-Dominant (RSI/MACD/Divergence focused, optimal in established trends)
RSI weight × 2.0, MACD weight × 2.0, Trend weight × 2.0
Zero-lag RSI suite with 4 calculation methods, MACD analysis, divergence detection
Failure mode: Choppy/ranging markets (hedged by chop filter)
Strategy 4: Balanced (Equal weighting, optimal in unknown/transitional regimes)
All components weighted 1.2×
Baseline performance during regime uncertainty
Strategy 5: Regime-Adaptive (Dynamic weighting by detected market state)
Chop zones: Kernel × 2.0, Technical × 0.3
Bull/Bear trends: Trend × 1.5, DFA × 2.0
Ranging: Mean reversion × 1.5
Adapts explicitly to detected regime
Multi-Armed Bandit System: 4 Core Algorithms
What Is a Multi-Armed Bandit Problem?
Formal Definition: K arms (strategies), each with unknown reward distribution. Goal: Maximize cumulative reward while learning which arms are best. Challenge: Balance exploration (trying uncertain strategies) vs. exploitation (using known-best strategy).
Trading Application: Each confluence strategy is an "arm." After each trade, receive reward (P&L percentage). Bandits decide which strategy to trust for next signal.
The 4 Implemented Algorithms
1. Thompson Sampling (DEFAULT)
Category: Bayesian approach with probability distributions
How It Works: Model each strategy as Beta(α, β) where α = wins, β = losses. Sample from distributions, select highest sample.
Properties: Optimal regret O(K log T), automatic exploration-exploitation balance
When To Use: Best all-around choice, adaptive markets, long-term optimization
2. UCB1 (Upper Confidence Bound)
Category: Frequentist approach with confidence intervals
Formula: UCB_i = reward_mean_i + sqrt(2 × ln(total_pulls) / pulls_i)
Properties: Deterministic, interpretable, same optimal regret as Thompson
When To Use: Prefer deterministic behavior, stable markets
3. Epsilon-Greedy
Category: Simple baseline with random exploration
How It Works: With probability ε (0.15): random strategy. Else: best average reward.
Properties: Simple, fast initial learning
When To Use: Baseline comparison, short-term testing
4. Contextual Bandit
Category: Context-aware Thompson Sampling
Enhancement: Maintains separate alpha/beta for Bull/Bear/Ranging regimes
Learning: "Strategy 2: 60% win rate in Bull, 40% in Bear"
When To Use: After 100+ bars, clear regime shifts
Shadow Portfolio System
Why Shadow Portfolios?
Traditional bandits use abstract scores. Shadow portfolios provide realistic performance measurement through actual position simulation.
How It Works
Position Opening:
When strategy generates validated signal:
Opens virtual position for selected strategy
Records: entry price, direction, entry bar, RSI method
Optional: Open positions for ALL strategies simultaneously (faster learning)
Position Management (Every Bar):
Current P&L: pnl_pct = (close - entry) / entry × direction × 100
Exit if: pnl_pct <= -2.0% (stop-loss) OR pnl_pct >= +4.0% (take-profit) OR held ≥ 100 bars (time)
Position Closing:
Calculate final P&L percentage
Update strategy equity, track win rate, gross profit/loss, max drawdown
Calculate risk-adjusted reward:
text
base_reward = pnl_pct / 10.0
win_rate_bonus = (win_rate - 0.5) × 0.3
drawdown_penalty = -max_drawdown × 0.05
total_reward = sigmoid(base + bonus + penalty)
Update bandit algorithms with reward
Update RSI method bandit
Statistics Tracked Per Strategy:
Equity curve (starts at $10,000)
Win rate percentage
Max drawdown
Gross profit/loss
Current open position
This creates closed-loop learning : Strategies compete → Best performers selected → Bandits learn quality → System adapts automatically.
Historical Pre-Training System
The Problem with Live-Only Learning
Standard bandits start with zero knowledge and need 50-100 signals to stabilize. For weekly timeframe traders, this could take years.
The Solution: Historical Training
During Chart Load: System processes last 300-1000 bars (configurable) in "training mode":
Detect signals using Balanced strategy (consistent baseline)
For each signal, open virtual training positions for all 5 strategies
Track positions through historical bars using same exit logic (SL/TP/time)
Update bandit algorithms with historical outcomes
CRITICAL TRANSPARENCY: Signal detection does NOT look ahead—signals use only data available at entry bar. Exit tracking DOES look ahead (uses future bars for SL/TP), which is acceptable because:
✅ Entry decisions remain valid (no forward bias)
✅ Learning phase only (not affecting shown signals)
✅ Real-time mirrors training (identical exit logic)
Training Completion: Once chart reaches current bar, system transitions to live mode. Dashboard displays training vs. live statistics for comparison.
Benefit: System begins live trading with 100-500 historical trades worth of learning, enabling immediate intelligent strategy selection.
Advanced Chop Zone Detection Engine
The Innovation: Multi-Layer Geometric Chop Analysis
Traditional chop filters use simple volatility metrics (ATR thresholds) that can't distinguish between trending volatility (good for signals) and choppy volatility (bad for signals). This system implements three-layer geometric pattern analysis to precisely identify consolidation zones where reversal signals fail.
Layer 1: Micro-Structure Chop Detection
Method: Analyzes micro pivot points (5-bar left, 2-bar right) to detect geometric compression patterns.
Slope Analysis:
Calculates slope of pivot high trendline and pivot low trendline
Compression ratio: compression = slope_high - slope_low
Pattern Classification:
Converging slopes (compression < -0.05) → "Rising Wedge" or "Falling Wedge"
Flat slopes (|slope| < 0.05) → "Rectangle"
Parallel slopes (|compression| < 0.1) → "Channel"
Expanding slopes → "Expanding Range"
Chop Scoring:
Rectangle pattern: +15 points (highest chop)
Low average slope (<0.05): +15 points
Wedge patterns: +12 points
Flat structures: +10 points
Why This Works: Geometric patterns reveal market indecision. Rectangles and wedges create false breakouts that trap technical traders. By quantifying geometric compression, system detects these zones before signals fire.
Layer 2: Macro-Structure Chop Detection
Method: Tracks major swing highs/lows using ATR-based deviation threshold (default 2.0× ATR), projects channel boundaries forward.
Channel Position Calculation:
proj_high = last_swing_high + (swing_high_slope × bars_since)
proj_low = last_swing_low + (swing_low_slope × bars_since)
channel_width = proj_high - proj_low
position = (close - proj_low) / channel_width
Dead Zone Detection:
Middle 50% of channel (position 0.25-0.75) = low-conviction zone
Score increases as price approaches center (0.5)
Chop Scoring:
Price in dead zone: +15 points (scaled by centrality)
Narrow channel width (<3× ATR): +15 points
Channel width 3-5× ATR: +10 points
Why This Works: Price in middle of range has equal probability of moving either direction. Institutional traders avoid mid-range entries. By detecting "dead zones," system avoids low-probability setups.
Layer 3: Volume Chop Scoring
Method: Low volume indicates weak conviction—precursor to ranging behavior.
Scoring:
Volume < 0.5× average: +20 points
Volume 0.5-0.8× average: +15 points
Volume 0.8-1.0× average: +10 points
Overall Chop Intensity & Signal Filtering
Total Chop Calculation:
chop_intensity = micro_score + macro_score + (volume_score × volume_weight)
is_chop = chop_intensity >= 40
Signal Filtering (Three-Tier Approach):
1. Signal Blocking (Intensity > 70):
Extreme chop detected (e.g., tight rectangle + dead zone + low volume)
ALL signals blocked regardless of confluence
Chart displays red/orange background shading
2. Threshold Adjustment (Intensity 40-70):
Moderate chop detected
Confluence threshold increased: threshold += (chop_intensity / 50)
Only highest-quality signals pass
3. Strategy Weight Adjustment:
During Chop: Kernel-Dominant weight × 2.0 (entropy detects breakout precursors), Technical-Dominant weight × 0.3 (reduces false signals)
After Chop Exit: Weights revert to normal
Why This Three-Tier Approach Is Original: Most chop filters simply block all signals (loses breakout entries). This system adapts strategy selection during chop—allowing Kernel-Dominant (which excels at detecting low-entropy breakout precursors) to operate while suppressing Technical-Dominant (which generates false signals in consolidation). Result: System remains functional across full market regime spectrum.
Zero-Lag Filter Suite with Dynamic Volatility Scaling
Zero-Lag ADX (Trend Regime Detection)
Implementation: Applies ZLEMA to ADX components:
lag = (length - 1) / 2
zl_source = source + (source - source ) × strength
Dynamic Volatility Scaling (DVS):
Calculates volatility ratio: current_ATR / ATR_100period_avg
Adjusts ADX length dynamically: High vol → shorter length (faster), Low vol → longer length (smoother)
Regime Classification:
ADX > 25 with +DI > -DI = Bull Trend
ADX > 25 with -DI > +DI = Bear Trend
ADX < 25 = Ranging
Zero-Lag RSI Suite (4 Methods with Bandit Selection)
Method 1: Standard RSI - Traditional Wilder's RSI
Method 2: Ehlers Zero-Lag RSI
ema1 = ema(close, length)
ema2 = ema(ema1, length)
zl_close = close + (ema1 - ema2)
Method 3: ZLEMA RSI
lag = (length - 1) / 2
zl_close = close + (close - close )
Method 4: Kalman-Filtered RSI - Adaptive smoothing with process/measurement noise
RSI Method Bandit: Separate 4-arm bandit learns which calculation method produces best results. Updates independently after each trade.
Kalman Adaptive Filters
Fast Kalman: Low process noise → Responsive to genuine moves
Slow Kalman: Higher measurement noise → Filters noise
Application: Crossover logic for trend detection, acceleration analysis for momentum inflection
What Makes This Original
Innovation 1: Shadow Portfolio Validation
First TradingView script to implement parallel virtual portfolios for multi-armed bandit reward calculation. Instead of abstract scoring metrics, each strategy's performance is measured through realistic position tracking with stop-loss, take-profit, time-based exits, and risk-adjusted reward functions (P&L + win rate + drawdown). This provides orders-of-magnitude better reward signal quality for bandit learning than traditional score-based approaches.
Innovation 2: Three-Layer Geometric Chop Detection
Novel multi-scale geometric pattern analysis combining: (1) Micro-structure slope analysis with pattern classification (wedges, rectangles, channels), (2) Macro-structure channel projection with dead zone detection, (3) Volume confirmation. Unlike simple volatility filters, this system adapts strategy weights during chop —boosting Kernel-Dominant (breakout detection) while suppressing Technical-Dominant (false signal reduction)—allowing operation across full market regime spectrum without blind signal blocking.
Innovation 3: Historical Pre-Training System
Implements two-phase learning : Training phase (processes 300-1000 historical bars on chart load with proper state isolation) followed by live phase (real-time learning). Training positions tracked separately from live positions. System begins live trading with 100-500 trades worth of learned experience. Dashboard displays training vs. live performance for transparency.
Innovation 4: Contextual Multi-Armed Bandits with Regime-Specific Learning
Beyond standard bandits (global strategy quality), implements regime-specific alpha/beta parameters for Bull/Bear/Ranging contexts. System learns: "Strategy 2: 60% win rate in ranging markets, 45% in bull trends." Uses current regime's learned parameters for strategy selection, enabling regime-aware optimization.
Innovation 5: RSI Method Meta-Learning
Deploys 4 different RSI calculation methods (Standard, Ehlers ZL, ZLEMA, Kalman) with separate 4-arm bandit that learns which calculation works best. Updates RSI method bandit independently based on trade outcomes, allowing automatic adaptation to instrument characteristics.
Innovation 6: Dynamic Volatility Scaling (DVS)
Adjusts ALL lookback periods based on current ATR ratio vs. 100-period average. High volatility → shorter lengths (faster response). Low volatility → longer lengths (smoother signals). Applied system-wide to entropy, DFA, RSI, ADX, and Kalman filters for adaptive responsiveness.
How to Use: Practical Guide
Initial Setup (5 Minutes)
Theory Mode: Start with "BALANCED" (APEX for aggressive, CONSERVATIVE for defensive)
Enable RL: Toggle "Enable RL Auto-Optimization" to TRUE, select "Thompson Sampling"
Enable Confluence Modules: Divergence, Volume Analysis, Liquidity Mapping, RSI OB/OS, Trend Analysis, MACD (all recommended)
Enable Chop Filter: Toggle "Enable Chop Filter" to TRUE, sensitivity 1.0 (default)
Historical Training: Enable "Enable Historical Pre-Training", set 300-500 bars
Dashboard: Enable "Show Dashboard", position Top Right, size Large
Learning Phase (First 50-100 Bars)
Monitor Thompson Sampling Section:
Alpha/beta values should diverge from initial 1.0 after 20-30 trades
Expected win% should stabilize around 55-60% (excellent), >50% (acceptable)
"Pulls" column should show balanced exploration (not 100% one strategy)
Monitor Shadow Portfolios:
Equity curves should diverge (different strategies performing differently)
Win rate > 55% is strong
Max drawdown < 15% is healthy
Monitor Training vs Live (if enabled):
Delta difference < 10% indicates good generalization
Large negative delta suggests overfitting
Large positive delta suggests system adapting well
Optimization:
Too few signals: Lower "Base Confluence Threshold" to 2.5-3.0
Too many signals: Raise threshold to 4.0-4.5
One strategy dominates (>80%): Increase "Exploration Rate" to 0.20-0.25
Excessive chop blocking: Lower "Chop Sensitivity" to 0.7-0.8
Signal Interpretation
Dashboard Indicators:
"WAITING FOR SIGNAL": No confluence
"LONG ACTIVE ": Validated long entry
"SHORT ACTIVE ": Validated short entry
Chart Visuals:
Triangle markers: Entry signal (green = long, red = short)
Orange/red background: Chop zone
Lines: Support/resistance if enabled
Position Management
Entry: Enter on triangle marker, confirm direction matches dashboard, check confidence >60%
Stop-Loss: Entry ± 1.5× ATR or at structural swing point
Take-Profit:
TP1: Entry + 1.5R (take 50%, move SL to breakeven)
TP2: Entry + 3.0R (runner) or trail
Position Sizing:
Risk per trade = 1-2% of capital
Position size = (Account × Risk%) / (Entry - SL)
Recommended Settings by Instrument
Stocks (Large Cap): Balanced mode, Threshold 3.5, Thompson Sampling, Chop 1.0, 15min-1H, Training 300-500 bars
Forex Majors: Conservative-Balanced mode, Threshold 3.5-4.0, Thompson Sampling, Chop 0.8-1.0, 5min-30min, Training 400-600 bars
Cryptocurrency: Balanced-APEX mode, Threshold 3.0-3.5, Thompson Sampling, Chop 1.2-1.5, 15min-4H, Training 300-500 bars
Futures: Balanced mode, Threshold 3.5, UCB1 or Thompson, Chop 1.0, 5min-30min, Training 400-600 bars
Technical Approximations & Limitations
1. Thompson Sampling: Pseudo-Random Beta Distribution
Standard: Cryptographic RNG with true beta sampling
This Implementation: Box-Muller transform using market data as entropy source
Impact: Not cryptographically random but maintains exploration-exploitation balance. Sufficient for strategy selection.
2. Shadow Portfolio: Simplified Execution Model
Standard: Order book simulation with slippage, partial fills
This Implementation: Perfect fills at close price, no fees modeled
Impact: Real-world performance ~0.1-0.3% worse per trade due to execution costs.
3. Historical Training: Forward-Looking for Exits Only
Entry signals: Use only past data (causal, no bias)
Exit tracking: Uses future bars to determine SL/TP (forward-looking)
Impact: Acceptable because: (1) Entry logic remains valid, (2) Live trading mirrors training, (3) Improves learning quality. Training win rates reflect 8-bar evaluation window—live performance may differ if positions held longer.
4. Shannon Entropy & DFA: Simplified Calculations
Impact: 10-15% precision loss vs. academic implementations. Still captures predictability and persistence signals effectively.
General Limitations
No Predictive Guarantee: Past performance ≠ future results
Learning Period Required: Minimum 50-100 bars for stable statistics
Overfitting Risk: May not generalize to unprecedented conditions
Single-Instrument: No multi-asset correlation or sector context
Execution Assumptions: Degrades in illiquid markets (<100k volume), major news events, flash crashes
Risk Warnings & Disclaimers
No Guarantee of Profit: All trading involves substantial risk of loss. This indicator is a tool, not a guaranteed profit system.
System Failures: Software bugs possible despite testing. Use appropriate position sizing.
Market Regime Changes: Performance may degrade during extreme volatility (VIX >40), low liquidity periods, or fundamental regime shifts.
Broker-Specific Issues: Real-world execution includes slippage (0.1-0.5%), commissions, overnight financing costs, partial fills.
Forward-Looking Bias in Training: Historical training uses 8-bar forward window for exit evaluation. Dashboard "Training Win%" reflects this method. Real-time performance may differ.
Appropriate Use
This Indicator IS:
✅ Entry trigger system with confluence validation
✅ Risk management framework (automated SL/TP)
✅ Adaptive strategy selection engine
✅ Learning system that improves over time
This Indicator IS NOT:
❌ Complete trading strategy (requires position sizing, portfolio management)
❌ Replacement for due diligence
❌ Guaranteed profit generator
❌ Suitable for complete beginners
Recommended Complementary Analysis: Market context, volume profile, fundamental catalysts, higher timeframe alignment, support/resistance from other sources.
Conclusion
Chronos Reversal Labs V2.0 - Elite Edition synthesizes research from multi-armed bandit theory (Thompson Sampling, UCB, contextual bandits), market microstructure (geometric chop detection, zero-lag filters), and machine learning (shadow portfolio validation, historical pre-training, RSI method meta-learning).
Unlike typical indicator mashups, this system implements mathematically rigorous bandit algorithms with realistic performance validation, three-layer chop detection with adaptive strategy weighting, regime-specific learning, and full transparency on approximations and limitations.
The system is designed for intermediate to advanced traders who understand that no indicator is perfect, but through proper machine learning and realistic validation, we can build systems that improve over time and adapt to changing markets without manual intervention.
Use responsibly. Understand the limitations. Risk disclosure applies. Past performance does not guarantee future results.
Taking you to school. — Dskyz, Trade with insight. Trade with anticipation.
Z-Score IndicatorA Z-Score measures how many standard deviations a value is from its mean.
In finance, it indicates how far the current price is from its historical average in statistical terms.
Practically speaking, the Z-Score quantifies price anomalies and serves as the statistical foundation behind mean-reversion strategies and dispersion analysis (pairs trading, Z-bands, etc.).
±1σ: normal movement.
±2σ: moderate overextension.
±3σ: statistically extreme event (≈ 0.3% probability under a normal distribution).
Static Beta for Pair and Quant Trading A beta coefficient shows the volatility of an individual stock compared to the systematic risk of the entire market. Beta represents the slope of the line through a regression of data points. In finance, each point represents an individual stock's returns against the market.
Beta effectively describes the activity of a security's returns as it responds to swings in the market. It is used in the capital asset pricing model (CAPM), which describes the relationship between systematic risk and expected return for assets. CAPM is used to price risky securities and to estimate the expected returns of assets, considering the risk of those assets and the cost of capital.
Calculating Beta
A security's beta is calculated by dividing the product of the covariance of the security's returns and the market's returns by the variance of the market's returns over a specified period. The calculation helps investors understand whether a stock moves in the same direction as the rest of the market. It also provides insights into how volatile—or how risky—a stock is relative to the rest of the market.
For beta to provide useful insight, the market used as a benchmark should be related to the stock. For example, a bond ETF's beta with the S&P 500 as the benchmark would not be helpful to an investor because bonds and stocks are too dissimilar.
Beta Values
Beta equal to 1: A stock with a beta of 1.0 means its price activity correlates with the market. Adding a stock to a portfolio with a beta of 1.0 doesn’t add any risk to the portfolio, but it doesn’t increase the likelihood that the portfolio will provide an excess return.
Beta less than 1: A beta value less than 1.0 means the security is less volatile than the market. Including this stock in a portfolio makes it less risky than the same portfolio without the stock. Utility stocks often have low betas because they move more slowly than market averages.
Beta greater than 1: A beta greater than 1.0 indicates that the security's price is theoretically more volatile than the market. If a stock's beta is 1.2, it is assumed to be 20% more volatile than the market. Technology stocks tend to have higher betas than the market benchmark. Adding the stock to a portfolio will increase the portfolio’s risk, but may also increase its return.
Negative beta: A beta of -1.0 means that the stock is inversely correlated to the market benchmark on a 1:1 basis. Put options and inverse ETFs are designed to have negative betas. There are also a few industry groups, like gold miners, where a negative beta is common.
LET'S START
Now I'll give my own definition.
Beta:
If we assume market caps are equal ,
it is an indicator that shows how much of the second instrument we should buy if we buy one of the first, taking into account the price volatility of two instruments.
But if the market caps are not equal:
For example, the ETF for A is $300.
The ETF for B is $600.
If static beta predicted by this script is 0.5:
300 * 1 * a = 600 * 0.5 * b
Then we should use 1 b for 1 a.
(Long a and short b or vice versa )
So, we can try pair trading for a/b or a-b.
However, these values are generally close to each other, such as 0.8 and 0.93. However, the closer we can adjust our lot purchases to bring the double beta to a value closer to 1, the higher the hedge ratio will be.
Large commercials use dynamic betas, which are updated periodically, in addition to static betas
However, scaling this is very difficult for individual investors with limited investment tools.
But a static beta of 5,000 bars is still much better than not considering any beta at all.
Note: The presence of a beta value for two instruments does not necessarily mean they can be included in pair trading.
It is also important (%99) to consider historically very high correlations and cointegration relationships, as well as the compatibility of security structures.
Note 2 : This script is designed for low timeframes.
Do not use betas from different timeframes.
Beta dynamics are different for each timeframe.
Note 3 : I created this script with the help of ChatGPT.
Source for beta definition ( ) :
www.investopedia.com
Regards.
Breakouts & Pullbacks [Trendoscope®]🎲 Breakouts & Pullbacks - All-Time High Breakout Analyzer
Probability-Based Post-Breakout Behavior Statistics | Real-Time Pullback & Runup Tracker
A professional-grade Pine Script v6 indicator designed specifically for analyzing the historical and real-time behavior of price after strong All-Time High (ATH) breakouts. It automatically detects significant ATH breakouts (with configurable minimum gap), measures the depth and duration of pullbacks, the speed of recovery, and the subsequent run-up strength — then turns all this data into easy-to-read statistical probabilities and percentile ranks.
Perfect for swing traders, breakout traders, and anyone who wants objective, data-driven insight into questions like:
“How deep do pullbacks usually get after a strong ATH breakout?”
“How many bars does it typically take to recover the breakout level?”
“What is the median run-up after recovery?”
“Where is the current pullback or run-up relative to historical ones?”
🎲 Core Concept & Methodology
Indicator is more suitable for indices or index ETFs that generally trade in all-time highs however subjected to regular pullbacks, recovery and runups.
For every qualified ATH breakout, the script identifies 4 distinct phases:
Breakout Point – The exact bar where price closes above the previous ATH after at least Minimum Gap bars.
Pullback Phase – From breakout candle high → lowest low before price recovers back above the breakout level.
Recovery Phase – From the pullback low → the bar where price first trades back above the original breakout price.
Post-Recovery Run-up Phase – From the recovery point → current price (or highest high achieved so far).
Each completed cycle is stored permanently and used to build a growing statistical database unique to the loaded chart and timeframe.
🎲 Visual Elements
Yellow polyline triangle connecting Previous ATH / Pullback point(start), New ATH Breakout point (end), Recovery point (lowest pullback price), and extends to recent ATH price.
Small green label at the pullback low showing detailed tooltip on hover with all measured values
Clean, color-coded statistics table in the top-right corner (visible only on the last bar)
Powerful Statistics Table – The Heart of the Indicator
The table constantly compares the current situation against all past qualified breakouts and shows details about pullbacks, and runups that help us calculate the probability of next pullback, recovery or runup.
🎲 Settings & Inputs
Minimum Gap
The minimum number of bars that must pass between breaking a new ATH and the previous one.
Higher values = stricter filter → only the strongest, cleanest breakouts are counted.
Lower values = more data points (useful on lower timeframes or very trending instruments).
Recommendation:
Daily charts: 30–50
4H charts: 40–80
1H charts: 100–200
🎲 How to Use It in Practice
This indicator helps investors to understand when to be bullish, bearish or cautious and anticipate regular pullbacks, recovery of markets using quantitative methods.
The indicator does not generate buy/sell signals. However, helps traders set expectations and anticipate market movements based on past behavior.






















