9 AM 12-Bar Zoneplaces a 12 bar box around the 9 am hour. The idea is to see if there is a pattern of activity around suspected institutional moves that occur in the opening hour of the new york market
المؤشرات والاستراتيجيات
THF Scalp & Trend + FVG [English]This indicator is a comprehensive "All-In-One" trading suite designed for Scalpers and Day Traders who look for confluence between Trend Following indicators and Price Action (Fair Value Gaps).
It combines two powerful concepts into a single chart overlay:
1. Moving Average Crossovers & Trend Filtering (THF Logic).
2. Fair Value Gaps (FVG) detection for entry/exit targets.
### 🛠️ Key Features:
**1. Trend & Scalp Signals:**
- **Scalp Signals:** Based on fast EMA crossovers (default 7/21). These signals can be filtered by a long-term SMA (200) to ensure you are trading with the major trend.
- **Trend Signals:** Identifies stronger trend shifts using EMA 21 crossing SMA 50.
- **Major Crosses:** Automatically highlights Golden Cross (SMA 50 > 200) and Death Cross events.
**2. Price Action (FVG - Fair Value Gaps):**
- Integrated **LuxAlgo's Fair Value Gap** logic to identify imbalances in the market.
- Displays Bullish/Bearish zones which act as magnets for price or support/resistance levels.
- Includes a Dashboard to track mitigated vs. unmitigated zones.
**3. Momentum & Volume Confluence:**
- **Visual Volume:** Candles are colored based on volume relative to the average (Volume SMA).
- **RSI & MACD Signals:** Optional overlays to spot overbought/oversold conditions or momentum shifts directly on the chart.
### 🎯 How to Use:
- **For Scalping:** Wait for a "SCALP BUY" signal while the price is above the SMA 200 (Trend Filter). Use the FVG boxes as potential Take Profit targets.
- **For Trend Trading:** Look for the "Trend BUY" label and confirm with the Golden Cross.
- **Stop Loss:** Can be placed below the recent swing low or below the EMA 50.
----------------------------------------------------------------
**CREDITS & ATTRIBUTION:**
This script is a mashup of custom trend logic and open-source community codes.
- **Fair Value Gap:** Full credit goes to **LuxAlgo** for the FVG detection algorithm and dashboard logic. This script utilizes their open-source calculation methods to enhance the trend strategy.
- **Trend Logic:** Based on classic Moving Average crossover strategies tailored for scalping.
*Disclaimer: This tool is for educational purposes only. Always manage your risk.*
Swing v 3Swing v.3 Indicator Description
Swing v.3 is an advanced swing analysis indicator with deep liquidity and volume analysis, designed to identify institutional movements and high-probability reversal points:
Key Components:
🎯 Swing Points Detection:
Intelligent detection of swing highs and lows (SH/SL)
Proper sequencing of peaks and valleys (prevents duplicates)
Identifies strong swings (★) based on high volume
Automatic support and resistance level mapping
📊 Delta Volume Analysis:
Calculates buying/selling pressure for each candle
Identifies strong swings based on Delta threshold
Filters by positive buying or negative selling pressure
Displays detailed liquidity ratios (buy/sell volumes)
⚡ Displacement Candles:
Detects powerful momentum candles with rapid price movement
Multiple conditions: large body, small wicks, high volume
ATR filter to measure strength relative to volatility
Color-codes candles by strength rating
🔍 Wave Analysis:
Tracks waves between swing points
Calculates cumulative buy/sell volume per wave
Detects bullish/bearish divergence patterns
Alerts for fake breakouts and strong accumulation
📊 Live Dashboard:
Real-time statistics for swings and liquidity
Measures price proximity to support/resistance levels
Current Delta information and active wave data
Proximity alerts for nearby key levels
⚙️ Additional Features:
Color-codes candles for strong swing points
Multiple filters for precision (Delta, volume, ATR)
Detailed tooltips for each marker
Flexible color and display settings
The indicator helps traders identify strong reversal points, institutional liquidity zones, and high-momentum candles for more accurate trading decisions.
وصف مؤشر Swing v.3
Swing v.3 هو مؤشر متقدم لتحليل نقاط التأرجح (السوينق) والزخم السعري مع تحليل عميق للسيولة وحجم التداول:
المكونات الرئيسية:
🎯 نقاط السوينق (Swing Points):
كشف نقاط التأرجح العليا والسفلى (SH/SL) بطريقة ذكية
ترتيب صحيح للقمم والقيعان (يمنع التكرار)
تحديد السوينقات القوية (★) بناءً على حجم التداول العالي
رسم مستويات الدعم والمقاومة تلقائياً
📊 تحليل Delta Volume:
حساب ضغط الشراء/البيع لكل شمعة
تحديد السوينقات القوية بناءً على Delta
فلترة حسب ضغط الشراء الإيجابي أو البيع السلبي
عرض نسب السيولة التفصيلية (شراء/بيع)
⚡ شموع Displacement (الإزاحة السريعة):
كشف الشموع القوية ذات الحركة السريعة
شروط متعددة: جسم كبير، ذيول صغيرة، حجم تداول عالي
فلتر ATR لقياس القوة نسبة للتقلبات
تلوين الشموع حسب قوتها
🔍 تحليل الموجات (Wave Analysis):
تتبع الموجات بين السوينقات
حساب إجمالي حجم الشراء/البيع لكل موجة
كشف التباين الإيجابي/السلبي (Divergence)
تنبيهات الاختراق الوهمي والتجميع القوي
📊 لوحة المعلومات (Dashboard):
عرض إحصائيات حية للسوينقات والسيولة
قياس قرب السعر من مستويات الدعم/المقاومة
معلومات Delta الحالية والموجة النشطة
تنبيهات للمستويات القريبة
⚙️ المميزات الإضافية:
تلوين الشموع للسوينقات القوية
فلاتر متعددة للدقة (Delta، حجم التداول، ATR)
معلومات تفصيلية في Tooltips لكل علامة
إعدادات مرنة للألوان والعرض
US Session jdjpjdnIf something looks wrong
If the box appears shifted: check the time mode (New York vs. UTC).
If boxes do not show: confirm the session hours really overlap your visible chart time and that the “show box” checkbox is enabled.
The idea is simple:
SNP420/RSI_GOD_KOMPLEXRSI_GOD_KOMPLEX is a multi–timeframe RSI scanner for TradingView that displays a compact table in the top-right corner of the chart. For each timeframe (1m, 5m, 15m, 30m, 1h, 4h, 1d) it tracks the fast RSI line (not the smoothed/main one) and marks BUY in green when RSI crosses up through 30 (leaving oversold territory) and SELL in red when RSI crosses down through 70 (leaving overbought territory), always using only closed candles for reliable, non-repainting signals. The indicator remembers the last valid signal per timeframe, so the table always shows the most recent directional impulse from RSI across all selected timeframes on the same instrument.
author: SNP420 + Jarvis
project: FNXS
ps: piece and love
Smart Money ProSmart Money Pro V 8.1 is an advanced trading indicator that tracks institutional "smart money" movements using multiple Smart Money Concepts (SMC) techniques:
Market Structure: Identifies Change of Character (CHoCH), Break of Structure (BOS), and Internal/External Market Structure (IDM)
Order Blocks: Detects demand/supply zones including EXT OB, IDM OB, SCOB, and mitigation/breaker blocks
Order Flow: Tracks major and minor order flows with mitigation levels
Fair Value Gaps (FVG): Highlights price inefficiencies and imbalance zones
Liquidity Levels: Maps liquidity sweeps and key pivot levels
Price Structure: Shows OTE (Optimal Trade Entry) zones, PDH/PDL (Previous Day High/Low), equilibrium levels, and swing sweeps
Candle Patterns: Detects Inside and Outside bars
The indicator helps traders identify institutional entry/exit points, liquidity grabs, and high-probability trading zones.
Smart Money Pro V 8.1 هو مؤشر متقدم لتتبع تحركات المؤسسات المالية "الأموال الذكية" باستخدام مفاهيم Smart Money Concepts (SMC):
هيكل السوق: يحدد تغيير الاتجاه (CHoCH)، كسر الهيكل (BOS)، والهيكل الداخلي/الخارجي (IDM)
مناطق الطلب والعرض: يكتشف Order Blocks بأنواعها (EXT OB, IDM OB, SCOB) ومناطق الاختراق والتخفيف
تدفق الأوامر: يتتبع التدفقات الرئيسية والثانوية مع مستويات التخفيف
فجوات القيمة العادلة (FVG): يبرز مناطق عدم الكفاءة السعرية وعدم التوازن
مستويات السيولة: يرسم مصائد السيولة والنقاط المحورية الرئيسية
هيكل السعر: يعرض مناطق OTE (نقاط الدخول المثلى)، أعلى/أدنى سعر سابق (PDH/PDL)، مستويات التوازن، وكسر القمم/القيعان
أنماط الشموع: يكتشف شموع Inside و Outside Bar
AlphaRank MA Lens – Multi-Timeframe Moving Average MapAlphaRank MA Lens – Multi-Timeframe Moving Average Map
AlphaRank MA Lens is a clean, open-source moving-average overlay that turns price action into an easy-to-read trend map. It focuses on structure and context only — no signals, no backtest, no hype — just a clear view of where price sits relative to key moving averages.
The script plots the 10 / 20 / 50 / 100 / 150 / 200 / 730 moving averages with full color control and a single “MA Type” switch, so you can flip the whole stack between SMA and EMA in one click. Instead of loading multiple separate MA indicators, this puts the full trend stack in one tool.
An optional background highlight lets you choose a reference MA (for example the 200 MA) and softly shade the chart:
Green when price is above that MA
Red when price is below it
This makes trend regime changes easy to see at a glance.
How traders typically use it (education only):
10/20/50 MAs → short-term trend and momentum.
100/150/200/730 MAs → bigger structural trend and “where price lives” in the long-term range.
Many traders consider conditions healthier when price and the short MAs are stacked above the longer MAs, and weaker when price trades below them.
Follow my work: AlphaRank
This script is for educational and analytical purposes only and does not provide trading advice or performance promises. Always combine it with your own judgment, testing, and risk management.
CRT MTF + HTF Candles - Milana TradesCRT MTF + HTF Candles is an educational tool that helps you visualize higher-timeframe CRT and HTF candles on your intraday chart
The script automatically tracks key HTF levels and shows three types of CRT events:
1. Pending CRT
When a higher-timeframe candle breaks the previous high or low, the indicator marks this as a “pending” CRT.
This helps you see potential liquidity grabs and where price is currently trapped inside the HTF range
2. Completed CRT
A CRT becomes “completed” when price reaches the opposite side of the previously broken level
3. Invalid CRT
If price closes outside the HTF range before completion, the CRT is marked as invalid.
This helps you identify failed breaks and possible reversals.
Multi-Timeframe HTF Candles
The script draws clean higher-timeframe candles directly on your lower timeframe chart.
Each candle includes:
Body and wicks
HTF open & close
Swing high/low markers
Timeframe labels
Optional timers (showing time remaining in the candle)
Optional imbalances (FVG / volume imbalance)
Optional Midpont line (0.5)
HTF candle spacing
You can adjust candle width, spacing, and alignment so HTF candles fit nicely over lower-TF bars.
Gaps & Imbalances
The tool can highlight:
Fair value gaps
Volume imbalance
Swing Sweep line
When price tried update swing but closed inside the candle cange
Equlibrium line (Midpoint 0.5)
Timeframe tags & timers
Shows clear labels for each HTF candle
You can choose which timeframes to show (1H, 2H, 4H, Daily, etc.) and how many candles should be displayed
Trade smart, stay disciplined, and keep improving every day
Enjoy :)
️Omega RatioThe Omega Ratio is a risk-return performance measure of an investment asset, portfolio, or strategy. It is defined as the probability-weighted ratio, of gains versus losses for some threshold return target. The ratio is an alternative for the widely used Sharpe ratio and is based on information the Sharpe ratio discards.
█ OVERVIEW
As we have mentioned many times, stock market returns are usually not normally distributed. Therefore the models that assume a normal distribution of returns may provide us with misleading information. The Omega Ratio improves upon the common normality assumption among other risk-return ratios by taking into account the distribution as a whole.
█ CONCEPTS
Two distributions with the same mean and variance, would according to the most commonly used Sharpe Ratio suggest that the underlying assets of the distribution offer the same risk-return ratio. But as we have mentioned in our Moments indicator, variance and standard deviation are not a sufficient measure of risk in the stock market since other shape features of a distribution like skewness and excess kurtosis come into play. Omega Ratio tackles this problem by employing all four Moments of the distribution and therefore taking into account the differences in the shape features of the distributions. Another important feature of the Omega Ratio is that it does not require any estimation but is rather calculated directly from the observed data. This gives it an advantage over standard statistical estimators that require estimation of parameters and are therefore sampling uncertainty in its calculations.
█ WAYS TO USE THIS INDICATOR
Omega calculates a probability-adjusted ratio of gains to losses, relative to the Minimum Acceptable Return (MAR). This means that at a given MAR using the simple rule of preferring more to less, an asset with a higher value of Omega is preferable to one with a lower value. The indicator displays the values of Omega at increasing levels of MARs and creating the so-called Omega Curve. Knowing this one can compare Omega Curves of different assets and decide which is preferable given the MAR of your strategy. The indicator plots two Omega Curves. One for the on chart symbol and another for the off chart symbol that u can use for comparison.
When comparing curves of different assets make sure their trading days are the same in order to ensure the same period for the Omega calculations. Value interpretation: Omega<1 will indicate that the risk outweighs the reward and therefore there are more excess negative returns than positive. Omega>1 will indicate that the reward outweighs the risk and that there are more excess positive returns than negative. Omega=1 will indicate that the minimum acceptable return equals the mean return of an asset. And that the probability of gain is equal to the probability of loss.
█ FEATURES
• "Low-Risk security" lets you select the security that you want to use as a benchmark for Omega calculations.
• "Omega Period" is the size of the sample that is used for the calculations.
• “Increments” is the number of Minimal Acceptable Return levels the calculation is carried on. • “Other Symbol” lets you select the source of the second curve.
• “Color Settings” you can set the color for each curve.
TRharmonic Ultimate
TRharmonic Ultimate - Professional Harmonic Pattern Detection System
Technical Overview
TRharmonic Ultimate is a real-time harmonic pattern recognition system built on Pine Script v5. The system analyzes 25+ harmonic formations across multiple ZigZag depths simultaneously, providing traders with instant pattern detection and pre-calculated trading levels.
Core Features
The indicator uses a zero-lag ZigZag algorithm with right offset set to 0, eliminating the typical 1-5 bar delay found in standard pivot-based systems.
Pattern detection operates across 10 simultaneous ZigZag depth calculations ranging from 15 to 150 bars, ensuring coverage of both short-term and long-term formations.
Each detected pattern includes automatically calculated entry price, stop loss, and three take-profit levels based on standard Fibonacci retracement principles.
The system validates patterns using adjustable tolerance bands between 7% and 10%, allowing traders to balance between detection sensitivity and accuracy.
MACD confirmation can be optionally enabled to filter signals, reducing false positives by requiring momentum alignment with pattern direction.
Dragon pattern detection uses proprietary ratio validation specifically designed for this rare formation's unique Fibonacci relationships.
Wolfe Wave recognition includes full 6-point structure analysis with automatic EPA (Estimated Price Arrival) line projection.
The algorithm performs geometric validation beyond simple ratio checking, including trendline mathematics and positional requirements.
Pattern drawings automatically adapt to chart theme (dark/light mode) with customizable color schemes for all 25+ formations.
A built-in deduplication system prevents multiple alerts for the same pattern within a specified bar range.
Technical Advantages
The ZigZag calculation method processes pivot points in real-time without requiring bar closure confirmation.
Memory management is optimized to handle 500+ bars of historical data while maintaining calculation speed.
Pattern-specific algorithms account for individual formation characteristics rather than using generic detection logic.
The system can detect rare patterns like Dragon and Wolfe Wave that most commercial indicators cannot identify reliably.
All Fibonacci calculations are performed automatically, eliminating manual measurement errors common in discretionary trading.
The indicator maintains clean chart visualization by automatically removing outdated pattern drawings after a configurable time period.
Multi-layer validation processes include ratio checks, geometric positioning, and optional momentum confirmation.
Pattern labels display Fibonacci ratios directly on formations, providing transparency in detection criteria.
EMA Crossover + Angle + Candle Pattern + Breakout (Clean) finalmayank raj startegy of 9 15 ema with angle more th5 and bullish croosover or bearish crooswoveran 3
Elliott Wave - Wave 3 Entry EngineThis indicator is a Wave 3 entry engine built on top of an Elliott Wave–style 1-2-3 structure. It automatically finds potential Wave 3 trades, manages a simple R-multiple target/stop model, and marks outcomes directly on the chart.
What the indicator does
At a high level, the script:
Detects swing points on three “degrees”
Small (S) – fast, local swings
Medium (M) – broader swings
Large (L) – higher-timeframe context only
Looks for a 3-pivot pattern (W0 → W1 → W2)
Bullish setup: Low → High → Higher Low (L-H-L)
Bearish setup: High → Low → Lower High (H-L-H)
Checks whether that pattern is a valid Wave 1–2 structure
Using multiple rules:
Wave 2 retraces Wave 1 by a configurable fraction
Wave 1 is strong enough (percentage move + slope)
Wave 2 doesn’t overshoot Wave 0 too far
Trend direction and swing “consensus” across S/M/L degrees line up
Scores the setup (Pre-W3 Score)
The script calculates a 0–1 score based on:
How “nice” the Wave 2 retracement is vs the ideal level
How much stronger Wave 1’s slope is vs Wave 2’s pullback
How much consensus there is across the swing engine (S/M/L)
Only setups above your chosen minimum Pre-W3 score and that pass alignment checks become Wave 3 candidates.
Waits for breakout → creates a Wave 3 “entry”
For longs: price breaks above the Wave 1 high (plus an optional tick buffer)
For shorts: price breaks below the Wave 1 low (minus buffer)
When triggered, the indicator:
Stores entry price (close at breakout)
Sets a stop beyond Wave 2 (with optional extra ticks)
Calculates a target based on a fixed R multiple (e.g., 2R)
Tracks the trade until exit or timeout
For each open W3 trade, it monitors:
Target hit → marks “W3 ✅”
Stop hit → marks “W3 ❌”
Bar where both could have hit → conservative loss “W3 ?/❌”
Time-based expiry (too many bars in trade) → “W3 ⏰”
Candidates that never get a breakout within your chosen max bars from W2 can also be marked as timeout (⏰).
Visual elements on the chart
The script can plot several helpful visuals:
Swing connector lines (Small/Medium/Large)
Small = blue
Medium = purple
Large = orange
These show the detected swings at each degree
Pre-W3 labels at Wave 2 (optional)
Signals :
"Pre-W3 Long XX%" or"Pre-W3 Short XX%"
Placed at the Wave 2 pivot
Colored yellow, with the % score rounded to an integer
W3 Entry labels (optional)
"W3 Long Entry" below the bar for longs (green)
"W3 Short Entry" above the bar for shorts (red)
Outcome labels (optional)
W3 ✅ – target hit
W3 ❌ – stop hit
W3 ?/❌ – both hit on same bar, treated as loss
W3 ⏰ – candidate or trade timed out
All these can be toggled in the “Wave 3 Engine (Pre-W3 + Entries + Outcomes)” group.
Input groups & how to use them
Swing Detection (Small / Medium / Large)
These groups control how the script finds swing highs/lows using a multi-parameter pivot scan:
Left Min / Left Max / Right Min / Right Max
Define the pivot “strength” ranges (how many bars to the left/right the high/low must dominate).
Minimum swing % (post-aggregation)
Ensures that, once swings are merged and cleaned up, each swing is at least this % move from the prior opposite swing.
Loop Filters (Small/Medium/Large loop min % change)
Extra gating inside the pivot-search loop, so small noise pivots can be ignored even before final swing construction.
Practical use:
Tighten % thresholds or increase left/right bars to reduce noise.
Loosen them to get more swings and more potential W3 setups.
Wave 3 Logic
Wave 2 depth
W2 min / max retracement of W1 (fraction)
Example: 0.30–0.80 means W2 must retrace 30–80% of W1.
Ideal W2 retracement (for scoring)
Often set around 0.618 (classic fib). The closer W2 is to this, the higher the retracement part of the score.
Max W2 beyond W0 (%)
How far W2 may push past W0 (in %) before the setup is invalid. Set to 0 to disable this filter.
Wave 1 strength
Min W1 move (%)
Ensures Wave 1 itself is meaningful.
Min |W1 slope| / |W2 slope|
Wave 1 must be “steeper” than Wave 2’s correction.
Slope ratio for max score
Above this, extra slope advantage doesn’t improve the score further.
Scoring & Trend Alignment
Min Pre-W3 score (0..1)
Hard gate: anything below this won’t become a W3 candidate.
Trend alignment (S/M/L)
Options:
None – ignore swing directions, purely pattern/score based
Majority – at least 2 of S/M/L must point in the W3 direction
AllThree, S+M, S+L, M+L – stricter alignment variants
Alignment uses the latest swing direction (up or down) for each degree.
Max W3 candidates to track
Limits how many candidates + trades are stored. Old, already-closed items are pruned first; open trades are never pruned.
This is an indicator, not an order engine**:** it doesn’t place trades; it only marks hypothetical Wave 3 entries and outcomes based on your settings. Always validate on historical data and combine with your own analysis and risk management before using it in live trading.
EMA Crossover + Angle + Candle Pattern + Breakout (Clean) finalmayank raj 9 15 ema strategy which will give me 1 crore
Linear Moments█ OVERVIEW
The Linear Moments indicator, also known as L-moments, is a statistical tool used to estimate the properties of a probability distribution. It is an alternative to conventional moments and is more robust to outliers and extreme values.
█ CONCEPTS
█ Four moments of a distribution
We have mentioned the concept of the Moments of a distribution in one of our previous posts. The method of Linear Moments allows us to calculate more robust measures that describe the shape features of a distribution and are anallougous to those of conventional moments. L-moments therefore provide estimates of the location, scale, skewness, and kurtosis of a probability distribution.
The first L-moment, λ₁, is equivalent to the sample mean and represents the location of the distribution. The second L-moment, λ₂, is a measure of the dispersion of the distribution, similar to the sample standard deviation. The third and fourth L-moments, λ₃ and λ₄, respectively, are the measures of skewness and kurtosis of the distribution. Higher order L-moments can also be calculated to provide more detailed information about the shape of the distribution.
One advantage of using L-moments over conventional moments is that they are less affected by outliers and extreme values. This is because L-moments are based on order statistics, which are more resistant to the influence of outliers. By contrast, conventional moments are based on the deviations of each data point from the sample mean, and outliers can have a disproportionate effect on these deviations, leading to skewed or biased estimates of the distribution parameters.
█ Order Statistics
L-moments are statistical measures that are based on linear combinations of order statistics, which are the sorted values in a dataset. This approach makes L-moments more resistant to the influence of outliers and extreme values. However, the computation of L-moments requires sorting the order statistics, which can lead to a higher computational complexity.
To address this issue, we have implemented an Online Sorting Algorithm that efficiently obtains the sorted dataset of order statistics, reducing the time complexity of the indicator. The Online Sorting Algorithm is an efficient method for sorting large datasets that can be updated incrementally, making it well-suited for use in trading applications where data is often streamed in real-time. By using this algorithm to compute L-moments, we can obtain robust estimates of distribution parameters while minimizing the computational resources required.
█ Bias and efficiency of an estimator
One of the key advantages of L-moments over conventional moments is that they approach their asymptotic normal closer than conventional moments. This means that as the sample size increases, the L-moments provide more accurate estimates of the distribution parameters.
Asymptotic normality is a statistical property that describes the behavior of an estimator as the sample size increases. As the sample size gets larger, the distribution of the estimator approaches a normal distribution, which is a bell-shaped curve. The mean and variance of the estimator are also related to the true mean and variance of the population, and these relationships become more accurate as the sample size increases.
The concept of asymptotic normality is important because it allows us to make inferences about the population based on the properties of the sample. If an estimator is asymptotically normal, we can use the properties of the normal distribution to calculate the probability of observing a particular value of the estimator, given the sample size and other relevant parameters.
In the case of L-moments, the fact that they approach their asymptotic normal more closely than conventional moments means that they provide more accurate estimates of the distribution parameters as the sample size increases. This is especially useful in situations where the sample size is small, such as when working with financial data. By using L-moments to estimate the properties of a distribution, traders can make more informed decisions about their investments and manage their risk more effectively.
Below we can see the empirical dsitributions of the Variance and L-scale estimators. We ran 10000 simulations with a sample size of 100. Here we can clearly see how the L-moment estimator approaches the normal distribution more closely and how such an estimator can be more representative of the underlying population.
█ WAYS TO USE THIS INDICATOR
The Linear Moments indicator can be used to estimate the L-moments of a dataset and provide insights into the underlying probability distribution. By analyzing the L-moments, traders can make inferences about the shape of the distribution, such as whether it is symmetric or skewed, and the degree of its spread and peakedness. This information can be useful in predicting future market movements and developing trading strategies.
One can also compare the L-moments of the dataset at hand with the L-moments of certain commonly used probability distributions. Finance is especially known for the use of certain fat tailed distributions such as Laplace or Student-t. We have built in the theoretical values of L-kurtosis for certain common distributions. In this way a person can compare our observed L-kurtosis with the one of the selected theoretical distribution.
█ FEATURES
Source Settings
Source - Select the source you wish the indicator to calculate on
Source Selection - Selec whether you wish to calculate on the source value or its log return
Moments Settings
Moments Selection - Select the L-moment you wish to be displayed
Lookback - Determine the sample size you wish the L-moments to be calculated with
Theoretical Distribution - This setting is only for investingating the kurtosis of our dataset. One can compare our observed kurtosis with the kurtosis of a selected theoretical distribution.
Historical Volatility EstimatorsHistorical volatility is a statistical measure of the dispersion of returns for a given security or market index over a given period. This indicator provides different historical volatility model estimators with percentile gradient coloring and volatility stats panel.
█ OVERVIEW There are multiple ways to estimate historical volatility. Other than the traditional close-to-close estimator. This indicator provides different range-based volatility estimators that take high low open into account for volatility calculation and volatility estimators that use other statistics measurements instead of standard deviation. The gradient coloring and stats panel provides an overview of how high or low the current volatility is compared to its historical values.
█ CONCEPTS We have mentioned the concepts of historical volatility in our previous indicators, Historical Volatility, Historical Volatility Rank, and Historical Volatility Percentile. You can check the definition of these scripts. The basic calculation is just the sample standard deviation of log return scaled with the square root of time. The main focus of this script is the difference between volatility models.
Close-to-Close HV Estimator: Close-to-Close is the traditional historical volatility calculation. It uses sample standard deviation. Note: the TradingView build in historical volatility value is a bit off because it uses population standard deviation instead of sample deviation. N – 1 should be used here to get rid of the sampling bias.
Pros:
• Close-to-Close HV estimators are the most commonly used estimators in finance. The calculation is straightforward and easy to understand. When people reference historical volatility, most of the time they are talking about the close to close estimator.
Cons:
• The Close-to-close estimator only calculates volatility based on the closing price. It does not take account into intraday volatility drift such as high, low. It also does not take account into the jump when open and close prices are not the same.
• Close-to-Close weights past volatility equally during the lookback period, while there are other ways to weight the historical data.
• Close-to-Close is calculated based on standard deviation so it is vulnerable to returns that are not normally distributed and have fat tails. Mean and Median absolute deviation makes the historical volatility more stable with extreme values.
Parkinson Hv Estimator:
• Parkinson was one of the first to come up with improvements to historical volatility calculation. • Parkinson suggests using the High and Low of each bar can represent volatility better as it takes into account intraday volatility. So Parkinson HV is also known as Parkinson High Low HV. • It is about 5.2 times more efficient than Close-to-Close estimator. But it does not take account into jumps and drift. Therefore, it underestimates volatility. Note: By Dividing the Parkinson Volatility by Close-to-Close volatility you can get a similar result to Variance Ratio Test. It is called the Parkinson number. It can be used to test if the market follows a random walk. (It is mentioned in Nassim Taleb's Dynamic Hedging book but it seems like he made a mistake and wrote the ratio wrongly.)
Garman-Klass Estimator:
• Garman Klass expanded on Parkinson’s Estimator. Instead of Parkinson’s estimator using high and low, Garman Klass’s method uses open, close, high, and low to find the minimum variance method.
• The estimator is about 7.4 more efficient than the traditional estimator. But like Parkinson HV, it ignores jumps and drifts. Therefore, it underestimates volatility.
Rogers-Satchell Estimator:
• Rogers and Satchell found some drawbacks in Garman-Klass’s estimator. The Garman-Klass assumes price as Brownian motion with zero drift.
• The Rogers Satchell Estimator calculates based on open, close, high, and low. And it can also handle drift in the financial series.
• Rogers-Satchell HV is more efficient than Garman-Klass HV when there’s drift in the data. However, it is a little bit less efficient when drift is zero. The estimator doesn’t handle jumps, therefore it still underestimates volatility.
Garman-Klass Yang-Zhang extension:
• Yang Zhang expanded Garman Klass HV so that it can handle jumps. However, unlike the Rogers-Satchell estimator, this estimator cannot handle drift. It is about 8 times more efficient than the traditional estimator.
• The Garman-Klass Yang-Zhang extension HV has the same value as Garman-Klass when there’s no gap in the data such as in cryptocurrencies.
Yang-Zhang Estimator:
• The Yang Zhang Estimator combines Garman-Klass and Rogers-Satchell Estimator so that it is based on Open, close, high, and low and it can also handle non-zero drift. It also expands the calculation so that the estimator can also handle overnight jumps in the data.
• This estimator is the most powerful estimator among the range-based estimators. It has the minimum variance error among them, and it is 14 times more efficient than the close-to-close estimator. When the overnight and daily volatility are correlated, it might underestimate volatility a little.
• 1.34 is the optimal value for alpha according to their paper. The alpha constant in the calculation can be adjusted in the settings. Note: There are already some volatility estimators coded on TradingView. Some of them are right, some of them are wrong. But for Yang Zhang Estimator I have not seen a correct version on TV.
EWMA Estimator:
• EWMA stands for Exponentially Weighted Moving Average. The Close-to-Close and all other estimators here are all equally weighted.
• EWMA weighs more recent volatility more and older volatility less. The benefit of this is that volatility is usually autocorrelated. The autocorrelation has close to exponential decay as you can see using an Autocorrelation Function indicator on absolute or squared returns. The autocorrelation causes volatility clustering which values the recent volatility more. Therefore, exponentially weighted volatility can suit the property of volatility well.
• RiskMetrics uses 0.94 for lambda which equals 30 lookback period. In this indicator Lambda is coded to adjust with the lookback. It's also easy for EWMA to forecast one period volatility ahead.
• However, EWMA volatility is not often used because there are better options to weight volatility such as ARCH and GARCH.
Adjusted Mean Absolute Deviation Estimator:
• This estimator does not use standard deviation to calculate volatility. It uses the distance log return is from its moving average as volatility.
• It’s a simple way to calculate volatility and it’s effective. The difference is the estimator does not have to square the log returns to get the volatility. The paper suggests this estimator has more predictive power.
• The mean absolute deviation here is adjusted to get rid of the bias. It scales the value so that it can be comparable to the other historical volatility estimators.
• In Nassim Taleb’s paper, he mentions people sometimes confuse MAD with standard deviation for volatility measurements. And he suggests people use mean absolute deviation instead of standard deviation when we talk about volatility.
Adjusted Median Absolute Deviation Estimator:
• This is another estimator that does not use standard deviation to measure volatility.
• Using the median gives a more robust estimator when there are extreme values in the returns. It works better in fat-tailed distribution.
• The median absolute deviation is adjusted by maximum likelihood estimation so that its value is scaled to be comparable to other volatility estimators.
█ FEATURES
• You can select the volatility estimator models in the Volatility Model input
• Historical Volatility is annualized. You can type in the numbers of trading days in a year in the Annual input based on the asset you are trading.
• Alpha is used to adjust the Yang Zhang volatility estimator value.
• Percentile Length is used to Adjust Percentile coloring lookbacks.
• The gradient coloring will be based on the percentile value (0- 100). The higher the percentile value, the warmer the color will be, which indicates high volatility. The lower the percentile value, the colder the color will be, which indicates low volatility.
• When percentile coloring is off, it won’t show the gradient color.
• You can also use invert color to make the high volatility a cold color and a low volatility high color. Volatility has some mean reversion properties. Therefore when volatility is very low, and color is close to aqua, you would expect it to expand soon. When volatility is very high, and close to red, you would it expect it to contract and cool down.
• When the background signal is on, it gives a signal when HVP is very low. Warning there might be a volatility expansion soon.
• You can choose the plot style, such as lines, columns, areas in the plotstyle input.
• When the show information panel is on, a small panel will display on the right.
• The information panel displays the historical volatility model name, the 50th percentile of HV, and HV percentile. 50 the percentile of HV also means the median of HV. You can compare the value with the current HV value to see how much it is above or below so that you can get an idea of how high or low HV is. HV Percentile value is from 0 to 100. It tells us the percentage of periods over the entire lookback that historical volatility traded below the current level. Higher HVP, higher HV compared to its historical data. The gradient color is also based on this value.
█ HOW TO USE If you haven’t used the hvp indicator, we suggest you use the HVP indicator first. This indicator is more like historical volatility with HVP coloring. So it displays HVP values in the color and panel, but it’s not range bound like the HVP and it displays HV values. The user can have a quick understanding of how high or low the current volatility is compared to its historical value based on the gradient color. They can also time the market better based on volatility mean reversion. High volatility means volatility contracts soon (Move about to End, Market will cooldown), low volatility means volatility expansion soon (Market About to Move).
█ FINAL THOUGHTS HV vs ATR The above volatility estimator concepts are a display of history in the quantitative finance realm of the research of historical volatility estimations. It's a timeline of range based from the Parkinson Volatility to Yang Zhang volatility. We hope these descriptions make more people know that even though ATR is the most popular volatility indicator in technical analysis, it's not the best estimator. Almost no one in quant finance uses ATR to measure volatility (otherwise these papers will be based on how to improve ATR measurements instead of HV). As you can see, there are much more advanced volatility estimators that also take account into open, close, high, and low. HV values are based on log returns with some calculation adjustment. It can also be scaled in terms of price just like ATR. And for profit-taking ranges, ATR is not based on probabilities. Historical volatility can be used in a probability distribution function to calculated the probability of the ranges such as the Expected Move indicator. Other Estimators There are also other more advanced historical volatility estimators. There are high frequency sampled HV that uses intraday data to calculate volatility. We will publish the high frequency volatility estimator in the future. There's also ARCH and GARCH models that takes volatility clustering into account. GARCH models require maximum likelihood estimation which needs a solver to find the best weights for each component. This is currently not possible on TV due to large computational power requirements. All the other indicators claims to be GARCH are all wrong.















