Ameno09

Z Score & Trend Following

Introduction:
The Z Score & Trend Following indicator is a tool used in financial markets to assess the standard deviation of a data point from its mean value over a specified period. It calculates the Z score, which is a measure of how many standard deviations an element is from the mean. This indicator also incorporates trend-following characteristics, allowing traders to visualize trends based on the Z score.

Indicator Parameters:

Standard Deviation Length: Determines the length of the standard deviation calculation.
Average Length: Specifies the length of the moving average used for the mean calculation.
Calculation Type: Allows users to choose between different types of moving averages (SMA, EMA, WMA, VMA, TMA).
Standard Deviations: Sets the number of standard deviations to be used for trend analysis.
Bar Color: Option to enable or disable bar coloring based on trend conditions.

Calculations:

Z Score Calculation: The Z score is calculated as the difference between the source data point and the moving average divided by the standard deviation.
zscore = (src - (getMA(src, length))) / ta.stdev(src, slength)

Plots:

Z Score Plot: Plots the Z score values, typically in green.
Inverted Z Score Plot: Plots the inverted Z score values (multiplied by -1), typically in red.

Lines:

Zero Line: A horizontal dotted line indicating zero.
Upper Threshold Line: A dotted line representing the upper threshold defined by the number of standard deviations.
Lower Threshold Line: A dotted line representing the lower threshold defined by the negative number of standard deviations.

Bar Color:

The bar color changes based on the Z score values and the predefined standard deviation thresholds. Green bars indicate values above the upper threshold, red bars indicate values below the lower threshold, lime bars indicate positive Z scores, and maroon bars indicate negative Z scores. Neutral values are represented by black bars.

Conclusion:

The Z Score & Trend Following indicator combines the statistical concept of Z score with trend-following characteristics to provide traders with insights into market trends and potential reversal points. By visualizing Z scores alongside trend analysis, traders can make more informed decisions regarding market entry and exit points.
오픈 소스 스크립트

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

면책사항

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

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