OPEN-SOURCE SCRIPT
Cập nhật Volatility Indicator - MPM

Volatilty Indicator:
Phát hành các Ghi chú
The indicator is inspired by the “Realized Volatility” indicators made by AxelAdlerJr, and uses somewhat the same concept. But this indicator is calculated differently and is more adaptive to the market environment. This means that a low-volatility signal can trigger even in high-volatility environments, if the current volatility is comparatively lower than the previous realized volatility. The indicator allows for the user to calibrate the inputs to their liking, which makes it usable over different timeframes and tokens (other than BTC). There is generally more utility in a low-vol signal compared to a high-vol signal. A low-vol signal usually is followed by high volatility, but a high-vol signal sometimes highlights a mean-reverting market state, although not always correct.
How to use:
The indicator has 5 different states: Very low volatility, low volatility, normal volatility, high volatility and very high volatility.
A very high and/or low volatility state is triggered when the z-score is beyond 2x the user defined z-score threshold. While a high and low volatility state is triggered when the z-score is beyond 1x the user defined z-score threshold. Normal volatility is defined as everything in between the user defined z-score thresholds.
The blue area represents a low volatility area, while the red area represents a high volatility area. Additionally the strength of the signal is also visualised through the strength of the color, which is determined by the z-score.
Calculation:
The indicator has 3 different calculations of volatility:
- Open and close (oc) volatility. This simply just calculates the volatility between the open and close. The volatility has also been z-scored, so the datapoints can be compared better.
- High and low (hl) volatility. This simply just calculates the volatility between the high and low. The volatility has also been z-scored, so the datapoints can be compared better.
- The average signal takes the average between the high/low volatility and the open/close volatility.
User inputs:
Moving Average Length: Sets the length of the MA regarding the realized volatility.
Midline Length: Sets the length of the midline in relation to the realized volatility (this also controls the length of the standard deviation calculation)
Z from midline Low vol: Determines the threshold in z-score where a low volatility area will be triggered.
Z from midline High vol: Determines the threshold in z-score where a high volatility area will be triggered.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.