federalTacos5392b

Z-Score Based Momentum Zones with Advanced Volatility Channels

federalTacos5392b 업데이트됨   
The indicator "Z-Score Based Momentum Zones with Advanced Volatility Channels" combines various technical analysis components, including volatility, price changes, and volume correction, to calculate Z-Scores and determine momentum zones and provide a visual representation of price movements and volatility based on multi timeframe highest high and lowest low values.

Note: THIS IS A IMPROVEMNT OF "Multi Time Frame Composite Bands" INDICATOR OF MINE WITH MORE EMPHASIS ON MOMENTUM ZONES CALULATED BASED ON Z-SCORES

Input Options

look_back_length: This input specifies the look-back period for calculating intraday volatility. correction It is set to a default value of 5.

lookback_period: This input sets the look-back period for calculating relative price change. The default value is 5.

zscore_period: This input determines the look-back period for calculating the Z-Score. The default value is 500.

avgZscore_length: This input defines the length of the momentum block used in calculations, with a default value of 14.

include_vc: This is a boolean input that, if set to true, enables volume correction in the calculations. By default, it is set to false.

1. Volatility Bands (Composite High and Low):

Composite High and Low: These are calculated by combining different moving averages of the high prices (high) and low prices (low). Specifically:
a_high and a_low are calculated as the average of the highest (ta.highest) and lowest (ta.lowest) high and low prices over various look-back periods (5, 8, 13, 21, 34) to capture short and long-term trends.

b_high and b_low are calculated as the simple moving average (SMA) of the high and low prices over different look-back periods (5, 8, 13) to smooth out the trends.

high_c and low_c are obtained by averaging a_high with b_high and a_low with b_low respectively.

IDV Correction Calulation : In this script the Intraday Volatility (IDV) is calculated as the simple moving average (SMA) of the daily high-low price range divided by the closing price. This measures how much the price fluctuates in a given period.
Composite High and Low with Volatility: The final c_high and c_low values are obtained by adjusting high_c and low_c with the calculated intraday volatility (IDV). These values are used to create the "Composite High" and "Composite Low" plots.

Composite High and Low with Volatility Correction: The final c_high and c_low values are obtained by adjusting high_c and low_c with the calculated intraday volatility (IDV). These values are used to create the "Composite High" and "Composite Low" plots.

2. Momentum Blocks Based on Z-Score:

Relative Price Change (RPC):

The Relative Price Change (rpdev) is calculated as the difference between the current high-low-close average (hlc3) and the previous simple moving average (psma_hlc3) of the same quantity. This measures the change in price over time.

Additionally, std_hlc3 is calculated as the standard deviation of the hlc3 values over a specified look-back period. The standard deviation quantifies the dispersion or volatility in the price data.

The rpdev is then divided by the std_hlc3 to normalize the price change by the volatility. This normalization ensures that the price change is expressed in terms of standard deviations, which is a common practice in quantitative analysis.

Essentially, the rpdev represents how many standard deviations the current price is away from the previous moving average.

Volume Correction (VC): If the include_vc input is set to true, volume correction is applied by dividing the trading volume by the previous simple moving average of the volume (psma_volume). This accounts for changes in trading activity.

Volume Corrected Relative Price Change (VCRPD): The vcrpd is calculated by multiplying the rpdev by the volume correction factor (vc). This incorporates both price changes and volume data.

Z-Scores: The Z-scores are calculated by taking the difference between the vcrpd and the mean (mean_vcrpd) and then dividing it by the standard deviation (stddev_vcrpd). Z-scores measure how many standard deviations a value is away from the mean. They help identify whether a value is unusually high or low compared to its historical distribution.

Momentum Blocks: The "Momentum Blocks" are essentially derived from the Z-scores (avgZScore). The script assigns different colors to the "Fill Area" based on predefined Z-score ranges. These colored areas represent different momentum zones:

Positive Z-scores indicate bullish momentum, and different shades of green are used to fill the area.

Negative Z-scores indicate bearish momentum, and different shades of red are used.

Z-scores near zero (between -0.25 and 0.25) suggest neutrality, and a yellow color is used.
릴리즈 노트:
updated default momentum block length to 14
오픈 소스 스크립트

이 스크립트의 오써는 참된 트레이딩뷰의 스피릿으로 이 스크립트를 오픈소스로 퍼블리쉬하여 트레이더들로 하여금 이해 및 검증할 수 있도록 하였습니다. 오써를 응원합니다! 스크립트를 무료로 쓸 수 있지만, 다른 퍼블리케이션에서 이 코드를 재사용하는 것은 하우스룰을 따릅니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.

차트에 이 스크립트를 사용하시겠습니까?