Central Limit Theorem Reversion IndicatorDear TV community, let me introduce you to the first-ever Central Limit Theorem indicator on TradingView.
The Central Limit Theorem is used in statistics and it can be quite useful in quant trading and understanding market behaviors.
In short, the CLT states: "When you take repeated samples from any population and calculate their averages, those averages will form a normal (bell curve) distribution—no matter what the original data looks like."
In this CLT indicator, I use statistical theory to identify high-probability mean reversion opportunities in the markets. It calculates statistical confidence bands and z-scores to identify when price movements deviate significantly from their expected distribution, signaling potential reversion opportunities with quantifiable probability levels.
Mathematical Foundation
The Central Limit Theorem (CLT) says that when you average many data points together, those averages will form a predictable bell-curve pattern, even if the original data is completely random and unpredictable (which often is in the markets). This works no matter what you're measuring, and it gets more reliable as you use more data points.
Why using it for trading?
Individual price movements seem random and chaotic, but when we look at the average of many price movements, we can actually predict how they should behave statistically. This lets us spot when prices have moved "too far" from what's normal—and those extreme moves tend to snap back (mean reversion).
Key Formula:
Z = (X̄ - μ) / (σ / √n)
Where:
- X̄ = Sample mean (average return over n periods)
- μ = Population mean (long-term expected return)
- σ = Population standard deviation (volatility)
- n = Sample size
- σ/√n = Standard error of the mean
How I Apply CLT
Step 1: Calculate Returns
Measures how much price changed from one bar to the next (using logarithms for better statistical properties)
Step 2: Average Recent Returns
Takes the average of the last n returns (e.g., last 100 bars). This is your "sample mean."
Step 3: Find What's "Normal"
Looks at historical data to determine: a) What the typical average return should be (the long-term mean) and b) How volatile the market usually is (standard deviation)
Step 4: Calculate Standard Error
Determines how much sample averages naturally vary. Larger samples = smaller expected variation.
Step 5: Calculate Z-Score
Measures how unusual the current situation is.
Step 6: Draw Confidence Bands
Converts these statistical boundaries into actual price levels on your chart, showing where price is statistically expected to stay 95% and 99% of the time.
Interpretation & Usage
The Z-Score:
The z-score tells you how statistically unusual the current price deviation is:
|Z| < 1.0 → Normal behavior, no action
|Z| = 1.0 to 1.96 → Moderate deviation, watch closely
|Z| = 1.96 to 2.58 → Significant deviation (95%+), consider entry
|Z| > 2.58 → Extreme deviation (99%+), high probability setup
The Confidence Bands
- Upper Red Bands: 95% and 99% overbought zones → Expect mean reversion downward as the price is not likely to cross these lines.
- Center Gray Line: Statistical expectation (fair value)
- Lower Blue Bands: 95% and 99% oversold zones → Expect mean reversion upward
Trading Logic:
- When price exceeds the upper 95% band (z-score > +1.96), there's only a 5% probability this is random noise → Strong sell/short signal
- When price falls below the lower 95% band (z-score < -1.96), there's a 95% statistical expectation of upward reversion → Strong buy/long signal
Background Gradient
The background color provides real-time visual feedback:
- Blue shades: Oversold conditions, expect upward reversion
- Red shades: Overbought conditions, expect downward reversion
- Intensity: Darker colors indicate stronger statistical significance
Trading Strategy Examples
Hypothetically, this is how the indicator could be used:
- Long: Z-score < -1.96 (below 95% confidence band)
- Short: Z-score > +1.96 (above 95% confidence band)
- Take profit when price returns to center line (Z ≈ 0)
Input Parameters
Sample Size (n) - Default: 100
Lookback Period (m) - Default: 100
You can also create alerts based on the indicator.
Final notes:
- The indicator uses logarithmic returns for better statistical properties
- Converts statistical bands back to price space for practical use
- Adaptive volatility: Bands automatically widen in high volatility, narrow in low volatility
- No repainting: yay! All calculations use historical data only
Feedback is more than welcome!
Henri
Indicators and strategies
NWOG/NDOG - HOKO (Public Version)This indicator shows you the intervals between the start of the week and the new day, and it is useful for everyone and everyone can use it.
Halt-Risk Guard (5-min / 10%) — TTP Safe🛑 Halt-Risk Guard (5-min / 10%) — TTP Safe
Stay clear of halts, invalidations, and over-extended moves.
🔍 Overview
The Halt-Risk Guard helps traders avoid sudden invalidations by monitoring price velocity over the past X minutes (default: 5 min) and flagging when moves exceed a configurable threshold (default: 10%).
Originally built to meet Trade The Pool (TTP) risk-management rules — where even non-halted 10% moves can void trades — this tool provides a clear, visual warning system and optional entry blocker.
⚙️ Key Features
✅ Halt-Risk Detection – Calculates both reference-based and swing-based (high↔low) percentage change over the chosen lookback period.
✅ TTP Safe Mode – “Swing mode” captures extreme volatility spikes that may invalidate trades even when the market stays open.
✅ Entry Blocker (optional) – Automatically greys candles and dims the background during risky conditions to prevent impulsive entries.
✅ Customisable Positioning – Move the on-chart info box to any corner of your chart (Top Left / Top Right / Bottom Left / Bottom Right).
✅ Clean Alerts –
⚠️ At/Above Threshold
✅ Back to Safe
⛔ Entry Blocker Active
✅ Visual Table Display – Compact dashboard shows current % move, lookback window, and threshold with intuitive green/red status.
✅ Strategy-Ready Output – A hidden 0/1 plot lets you block or filter trades in automated systems.
⚡ How It Works
Monitors the selected symbol using your chosen computation timeframe (recommended 1-minute).
Evaluates either:
REF mode: Close-to-close change over the lookback window.
SWING mode: High-to-low range within the same window.
If the move ≥ Threshold %, the script highlights a halt-risk condition and optionally activates the entry blocker.
🎨 Recommended Settings
Lookback: 5 minutes
Threshold: 10 %
Swing mode: ON (TTP-safe)
Computation timeframe: 1 minute
Entry blocker: ON
Dim background: ON
🧠 Use Cases
TTP and other prop-firm evaluations enforcing price-movement limits.
Volatility-based scalping systems to avoid chasing extended candles.
Strategy filters for algorithmic entries (e.g. pause trading during halt-risk windows).
⚠️ Disclaimer
This tool provides visual and alert-based guidance only. It does not guarantee compliance with any specific firm’s rules or eliminate trading risk. Always verify thresholds and rules with your broker or evaluation provider.
Chart Info Display (HOKO) 2It displays 3 things on the screen in order: symbol, date, time frame. You can use it to capture educational videos to make your chart more beautiful, more private, and more practical.
Mean Reversion Scalping by XtramaskAvoid using this indicator in aggressively trending markets . Best in Non Treanding Markets
7 MM colored 3 BB clouded + MACD + RSI Zones7 MM colored
3 BB clouded
MACD flèches rouges et vertes
RSI Zones sur vente étoile jaune
Hoko Quarterly Theory is it this Quarterly Theory but for faraz................................................................................................................................................................................................................
HOKO Doubling Theorythis script is like Quarterly theory but with bigger box .............................................................................................................................
Chart Info Display (HOKO)this script show you three information , symbol , date , time frame .........................................................................................................................................................
Volume Dry-Up Detector [CANSLIM]by the GPT,
Volume ≤ 50% of 50-day average for ≥3 consecutive days
Highlights the stock as “ready for breakout” (green background + label)
Works on any ticker (WH Group, Smithfield, etc.)
Simple Market Structure Highs & Lows🟩 Simple Market Structure Highs & Lows
This indicator identifies basic swing highs and lows based on simple two-candle patterns, giving traders a clean visual view of short-term market structure shifts.
🔹 Logic
A Swing High (H) is marked when an up candle is followed by a down candle.
→ The high of the up candle (the first one) is plotted as a green triangle above the bar.
A Swing Low (L) is marked when a down candle is followed by an up candle.
→ The low of the down candle (the first one) is plotted as a red triangle below the bar.
🔹 Purpose
This tool helps visualize basic market turning points — useful for:
Spotting local tops and bottoms
Analyzing market structure changes
Identifying potential entry/exit zones
Building the foundation for BOS/CHoCH strategies
🔹 Notes
Works on any timeframe or asset.
No repainting — signals appear after the confirming candle closes.
Simple and lightweight — ideal for traders who prefer clean structure visualization.
ab 3 candle setup range This script identifies a 3-candle range breakout pattern. It looks for two consecutive inside candles following a base candle and triggers a buy or sell signal when price breaks the base candle’s high or low, confirming bullish or bearish momentum.
Simple Market Structure Highs & Lows🟩 Simple Market Structure Highs & Lows
This indicator identifies basic swing highs and lows based on simple two-candle patterns, giving traders a clean visual view of short-term market structure shifts.
🔹 Logic
A Swing High (H) is marked when an up candle is followed by a down candle.
→ The high of the up candle (the first one) is plotted as a green triangle above the bar.
A Swing Low (L) is marked when a down candle is followed by an up candle.
→ The low of the down candle (the first one) is plotted as a red triangle below the bar.
🔹 Purpose
This tool helps visualize basic market turning points — useful for:
Spotting local tops and bottoms
Analyzing market structure changes
Identifying potential entry/exit zones
Building the foundation for BOS/CHoCH strategies
🔹 Notes
Works on any timeframe or asset.
No repainting — signals appear after the confirming candle closes.
Simple and lightweight — ideal for traders who prefer clean structure visualization.
sensex 9-18-50 + VWAP (VWAP-close confirmation)Description:
This script plots EMA 9, 18, and 50 along with VWAP to identify directional bias in Sensex. A buy or sell signal is generated only when all three EMAs align in sequence and a confirmed 7-minute candle closes above or below the VWAP, helping filter trades with institutional bias confirmation.
Volatility Trend Indicator+Overview:
This indicator measures short-term volatility relative to its smoothed average. It helps visualize whether volatility is increasing or decreasing over time. The indicator is displayed in a separate pane below the main price chart for clarity
Visualization:
Line plot of V
Zero line for reference
Background color highlights trend:
Green → rising volatility
Red → falling volatility
Yellow → neutral
Price Movement Alert with Previous Close as ReferenceFunctionality of the Indicator
The "Price Movement Alarm with Previous Day Close as Reference" indicator is a tool that helps you monitor significant price levels based on the previous day's closing price. The indicator calculates both decline and rise thresholds in specified percentages to generate potential trade alerts. The lines on the chart represent these thresholds, and the corresponding labels show the exact percentage.
Usage Instructions:
Previous Day's Close: The indicator uses the previous trading day's close as the reference point.
Setting Decline and Rise Percentages: You can adjust the alarm levels for declines (e.g., 0.5%, 1.0%, 1.5%, 2.0%, 2.5%, 3.0%) and rises (e.g., 0.5%, 1.0%, 1.5%, 2.0%, 2.5%, 3.0%).
Lines and Labels: The indicator draws lines on the chart and displays labels that indicate the percentage of price movement.
Market Analysis: Analyze the price movements to make potential trading decisions.
Market in Equilibrium:
A market is in equilibrium when price movements remain within a narrow range (e.g., 0.5% to 1%). During this phase, volatility is low, and there are no significant price changes.
Market not in Equilibrium:
A market is not in equilibrium when price movements fall outside the narrow range (e.g., above 1%). During this phase, larger price movements can occur, often triggered by news or economic events.
Price Trend Indicator+🧠 What it does
It measures the ratio between average price change and average volatility, showing how strong and directional the trend is.
Higher positive values = steady uptrend, negative = downtrend
📊 How to interpret
P value Signal Meaning
P > +0.5 🟢 Strong Uptrend Steady upward movement
0 < P < +0.5 🟡 Mild Uptrend Weak upward bias
P ≈ 0 ⚪ Sideways No clear direction
-0.5 < P < 0 🟠 Mild Downtrend Slight downward bias
P < -0.5 🔴 Strong Downtrend Consistent decline
Opposing Candle V2🟩 OC (Opposing Candle) Multi–Timeframe Framework
🔍 Overview
The OC Indicator automatically detects and displays Opposing Candles (OCs) across up to three timeframes.
An Opposing Candle is a candle that fully engulfs the previous one, signaling a potential shift in control — either a trend continuation or a trend reversal.
This multi–timeframe framework gives traders a structured way to visualize displacement, pullbacks, and momentum shifts between timeframes.
⚙️ How It Works
Each OC is drawn as a box showing:
High & Low → The candle’s full range
Open Line (black) → Key control level
Midline (white) → Candle equilibrium
Optional labels for timeframe and session
You can enable up to 3 timeframes (e.g., 30m / 1H / 4H) and adjust how many OCs to display for each.
📈 Trading Framework
🔹 Continuation Setup (Trend Following)
1. 4H Bias → Bullish or Bearish
Identify clear trend structure (HH/HL = bullish, LH/LL = bearish).
Confirm strong displacement and visible gaps between OCs — signs of momentum and healthy trend continuation.
2. 1H Confirmation OC
OC forms in the direction of the 4H bias, confirming control.
3. 30min Pullback OC
Opposite–colored OC appears → represents the pullback.
4. Entry Trigger
A yellow candle closes beyond the 30min OC open line, confirming the end of the pullback.
→ Enter in trend direction.
🎯 Targets
Target 1: Next 1H OC high or low (in trend direction)
Target 2: Next 4H OC high or low
🛑 Stop: Beyond the 30min OC’s opposite wick
🔹 Reversal Setup (Trend Shift)
1. 4H Structure → Extended or Losing Momentum
When there are no higher–timeframe gaps and no displacement, momentum weakens — often a sign of potential reversal.
2. Opposing OC Forms on HTF
A strong engulfing OC appears against the previous trend at a key structural level.
3. Lower–Timeframe Alignment
1H and 30min OCs begin forming in the new direction, confirming control shift.
4. Entry Trigger
Break of the lower–timeframe OC open line signals the reversal confirmation.
🟢 Example: Bullish Reversal
4H downtrend shows compression (no displacement)
4H bullish OC forms at support
30min breaks above a bearish OC’s open line → Go long
🔴 Example: Bearish Reversal
4H uptrend stalls at resistance
4H bearish OC forms
30min breaks below a bullish OC’s open line → Go short
🎯 Targets
Target 1: Nearest opposing 1H OC high/low
Target 2: Major 4H structural high/low
🛑 Stop: Beyond the reversal OC wick
🧠 Key Concepts
Displacement = Strength. Strong, impulsive moves with clear gaps between OCs show continuation.
Compression = Weakness. Overlapping candles and no HTF displacement often hint at reversal.
OC = Control Candle. The open line is the “line in the sand” — when price breaks it, control flips.
Multi–TF Confluence = Precision. 4H → 1H → 30m gives you structure → confirmation → entry accuracy.
🎨 Features
✅ Multi–Timeframe OC detection (default: 30m / 1H / 4H)
✅ Bullish & Bearish boxes with open and midlines
✅ Break candles highlighted yellow
✅ Optional labels (timeframe + session)
✅ Session filters (Asia, London, NYAM, NYPM)
✅ Fully customizable visuals and extension lengths
GTI BGTI: RSI Suite (Standard • Stochastic • Smoothed)
A three-layer momentum and trend toolkit that combines Standard RSI, Stochastic RSI, and a Smoothed/“Macro” RSI to help you read intraday swings, trend transitions, and high-probability reversal/continuation spots.
All in one pane with intuitive coloring and optional divergence markers and alerts.
Why this works
* Stochastic RSI (K/D) visualizes fast momentum swings and timing.
* Standard RSI moves more gradually, helping confirm trend transitions that may span several Stochastic cycles.
* Smoothed RSI (Average → Macro) adds a second-pass filter and slope persistence to reveal the macro direction while suppressing noise.
Used together, Stochastic guides entries/exits around local highs/lows, while the RSI layers improve confidence when a small swing is likely part of a larger turn.
What you’ll see
* Standard RSI (yellow; pink above Bull line, aqua below Bear line).
* Stochastic RSI (K/D) with contextual colors:
* Greens when RSI is weak/oversold (bearish conditions → watch for bullish reversals/continuations).
* Reds when RSI is strong/overbought (bullish conditions → watch for bearish reversals/continuations).
* Smoothed (Macro) RSI with trend color:
* Red when macro is ascending (bullish),
* Aqua when macro is descending (bearish).
* Divergences (optional markers):
* Bearish: RSI Lower High + Price Higher High (red ⬇).
* Bullish: RSI Higher Low + Price Lower Low (green ⬆).
* No repaint: pivots confirm after the chosen right-bars window.
How to use it
* Bullish Reversal
* Macro RSI is reversing at a higher low after price has been in a overall downtrend
* Stochastic RSI is switching from green to red in an overall downtrend
* Bullish Oversold
* Macro RSI is reversing from a significantly low level after price has a short but strong dip during an overall uptrend
* Stochastic RSI is switching from green to red in an overall uptrend
* Bullish Continuation
* Macro RSI is ascending with a strong slope or forming a higher low above the 50 line
* Stochastic RSI is reaching a bottom but still painted red
* Bearish Reversal
* Macro RSI is reversing at a lower high after price has been in a overall uptrend
* Stochastic RSI is switching from red to green in an overall uptrend
* Bearish Overbought
* Macro RSI is reversing from a significantly high level after price has a short but strong jump during an overall downtrend
* Stochastic RSI is switching from red to green in an overall downtrend
* Bearish Continuation
* Macro RSI is descending with a strong slope or forming a lower high below the 50 line
* Stochastic RSI is reaching a top but still painted green
* Divergences: Use as signals of exhaustion—best when aligned with Macro RSI color/slope and key levels (e.g., Bull/Bear lines, 50 midline).
*** IMPORTANT ***
* Stack confluence, don’t single-signal trade. Look for:
* 1) Macro RSI color & slope (red = ascending/bullish, aqua = descending/bearish)
* 2) Standard RSI location (above/below Bull/Bear lines or 50)
* 3) Stoch flip + direction
* 4) Price structure (HH/HL vs LH/LL)
* 5) Divergence type (regular vs hidden) at meaningful levels
* Trade with the macro
* Prioritize longs when Macro RSI is red or just flipped up
* Prioritize shorts when Macro RSI is aqua or just flipped down
* Counter-trend setups = smaller size and faster management.
* Location > signal
* The same crossover/divergence is higher quality near Bull (~60)/Bear(~40) or extremes than in the mid-range chop around 50.
* Early vs confirmed
* Use the early pivot heads-up for anticipation, but scale in only after the confirmed pivot (right-bars complete). If early signal fails to confirm, stand down.
* Define invalidation upfront
* For divergence entries, place stops beyond the pivot extreme (LL/HH). If Macro RSI flips against your trade or RSI breaks back through 50 with slope, exit or tighten.
* Multi-timeframe alignment
* Best results come when entry timeframe (e.g., 1H) aligns with higher-TF macro (e.g., 4H/D). If they disagree, treat it as mean-reversion only.
* Avoid common traps
* Skip: isolated Stochastic flips without RSI support, divergences without price HH/LL confirmation, and serial divergences when Macro RSI slope is strong against the idea.
* Parameter guidance
* Start with defaults; then tune: confirmBars 3–7, minSlope 0.05–0.15 RSI pts/bar, pivot left/right tighter for faster but noisier signals, wider for cleaner but fewer.
* Alerts = workflow, not auto-trades
* Use Macro Flip + Divergence alerts as a checklist trigger; enter only when your confluence rules are met and risk is defined.
Key inputs (tweak to your market/timeframe)
* RSI / Stochastic lengths and K/D smoothing.
* Bull / Bear Lines (default 61.1 / 43.6).
* Average RSI Method/Length (SMA/EMA/RMA/WMA) + Macro Smooth Length.
* Trend confirmation: bars of persistence and minimum slope to reduce flip noise.
* Pivot look-back (left/right) for divergence confirmation strictness.
Alerts included
* Macro Flip Up / Down (Smoothed RSI regime change).
* RSI Bullish/Bearish Divergence (confirmed at pivot).
* Stochastic RSI continuation/divergence (optional).
Tips
* Level + Slope matter. High/low RSI level flags conditions; slope confirms impulse/continuation.
* Let Stochastic time the swing; let Macro RSI filter the trend.
* Tighten or loosen pivot windows to trade fewer/cleaner vs. more/faster signals.
AG Pro Dynamic ChannelsAG Pro Dynamic Channels V2
Discover a new lens through which to view market structure with the AG Pro Dynamic Channels V2. This advanced indicator moves beyond simple trendlines, automatically identifying, classifying, and drawing eight distinct types of support and resistance channels directly on your chart.
Built on a sophisticated pivot-point detection engine, this script intelligently distinguishes between Major and Minor price structures, as well as Internal and External channels. This provides a comprehensive and multi-dimensional map of the market's flow, helping you identify trend continuations, corrections, and potential reversals.
The indicator is complete with a powerful, fully customizable alert system designed to notify you of the two most critical events: channel breakouts and price reactions.
Key Features
Fully Automatic Channels: The script automatically analyzes price action to find pivot highs and lows, using them to construct relevant channels without any manual drawing required.
8-Channel Classification: Gain deep market insight by viewing eight distinct channel types:
Major External (Up/Down)
Major Internal (Up/Down)
Minor External (Up/Down)
Minor Internal (Up/Down)
Advanced Pivot Engine: The core logic classifies pivots into categories like Higher Highs (MHH/mHH), Lower Lows (MLL/mLL), Higher Lows (MHL/mHL), and Lower Highs (MLH/mLH) to determine the precise start and end points for each channel.
Deep Customization: Take full control of your chart's appearance. You can individually toggle the visibility, color, line style (solid, dashed, dotted), and line width for all eight channel types.
Chart Clarity: A "Delete Previous" option is available for each channel type, allowing you to keep your chart clean and focused on only the most current and relevant market structures.
Comprehensive Alert System
Never miss a key price interaction. The AG Pro Dynamic Channels V2 features a robust, built-in alert module.
Dual-Alert Conditions: Get notifications for two distinct events:
Break Alert: Triggers when price confirms a close outside of a channel, signaling a potential breakout.
React Alert: Triggers when price touches or interacts with a channel line before closing back inside, signaling a test or rejection.
16 Unique Alerts: You have full control to enable or disable "Break" and "React" alerts for all 8 channel types individually, giving you 16 unique alert conditions to monitor.
Professional Alert Messages: The embedded alert sender provides detailed messages that include the asset, timeframe, and the specific event, such as "Break Major External Up Channel" or "React Minor Internal Down Channel".
Alert Configuration: Easily set your global Alert Name, Message Frequency (e.g., Once Per Bar, Once Per Bar Close), and Alert Time Zone from the script's settings.
How to Use
Trend Identification: Use the Major External Channels (drawn from MHH and MLL pivots) to identify the primary, long-term trend direction.
Pullback & Entry Zones: Use the Internal Channels (drawn from MHL and MLH pivots) to spot corrections and potential entry zones within an established trend.
Breakout Trading: Set Break Alerts on Major channels to be notified of significant, structure-shifting moves.
Short-Term & Counter-Trend: Utilize the Minor Channels to identify shorter-term price swings and potential reversal points.
RVOL CandlesRvol indicator shows relative volume on each candle and can be adjusted and color change.






















