OPEN-SOURCE SCRIPT

Z-Score with Buy & Sell Signals

업데이트됨
This is my open-source indicator of z-score with buy and sell indicators.
I see there are other z-score indicators, I just am particular about how I like my z-scores calculated and so decided to make my own and add buy and sell signals to help guide me. And I figured I could share it openly here!

What is a Z-Score

A z-score is a statistical measures of the distance, in standard deviations, a value is from its given mean. It is expressed as a standard deviation (or SD). The further a value (in this case, a stock) is from their mean, the more likely a regression to the mean is possible (i.e. a return to the average). So if a stock is trading at 3 standard deviations away from its mean, then we can anticipate it wanting to regress back towards 1 to 0 standard deviations from its mean (i.e. sell off back to a value that brings it closer to that SD).
The inverse is true if it is trading below.

Z-Scores and Stocks
Stocks, like everything in nature, like to trade between -1 and +1 SD away from its mean. Anything above this, we can interpret that there is "stress" on the stock. Anything over 2.50 is tremendous stress on the stock and we can anticipate that it will want to revert to its mean in the near future and bring that value down to at least 1, ideally between the -0.5 and 0.5 range.
Please note, I set the standard VERY high for the indicator to issue a buy and sell signal (</= -2.50 and >/=2.50). Lately with the volatility, stocks have been entering these ranges frequently and so there have been plenty of signals, but traditionally in a stable environment you may not get these signals. I set the bar extremely high because I want to avoid false buy and sell signals (you will still get them though, nothing is perfect!). So the value in this indicator is in interpreting the actual z-score itself, so please be sure you understand exactly what the Z-score is (see the description above).

How the indicator works
The indicator works by calculating the average Z-Score between a stocks high and low. This indicator will present the average deviation a stock has from its high and low average. The higher the Z-Score, the more "overbought" the stock is. The lower the z-score, the more "oversold" the stock is. It uses the previous 500 candles worth of data to calculate its SMA and its Standard deviation in order to calculate the z-score.

Anytime a stock trades 2.50 SDs or more above or below its mean, you will be presented with a Buy or Sell signal, as generally, statistically speaking, after something has travelled 2.50 SDs aware from its mean, there is an increased probability of a reversion happening.

You can use this indicator to determine whether the stock is trading within normal parameters or not and to help you in your analysis as to whether or not a stock could be shorted or longed.

I personally like this for swing trading on the 1 hour chart; however, this can be used on any time from 1 minute to 1 hour. It also allows you to track a stocks progress in its reversion to the mean.

Examples of it in Use:

Gold ETF (ARCA: GLD) on 1 minute
스냅샷

Dow Jones ETF (ARCA: DIA) on 1 minute (my favourite Stock!)
스냅샷

SPY ETF (ARCA: SPY) on 1 hour chart
스냅샷


Disclaimer:
This is not meant to be placed as a sole and single strategy. It should be used in COJUNCTION with your other strategies to help you make a determination.
No indicator is infallible and should never be relied on 100%!


Please let me know your questions/comments/experiences/recommendations below!

Thanks everyone!



릴리즈 노트
Updated the indicator!

Due to the popularity of this indicator, I decided to make some adjustments to make it even more functional.

What's new?

How buy and sell is signaled:

Buy and sell is now signaled based on historic reversal points instead of just a hard value.

Identification of reversal areas:

The indicator now identifies areas where an equity is trading in "extreme" zones, whether they be overly high (overbought) or overly low (oversold). This is shown with the border. A stock that is overbought will show an orange border area (see below):

스냅샷

And a stock that is oversold will show a green border area (see below):

스냅샷

Histogram Chart:

The chart was changed into a histogram style in order for you to visualize divergences easier and reversal points easier.


Hope you enjoy!
릴리즈 노트
스냅샷
릴리즈 노트
Please check out the tutorial video here.
signalsstatisticsz-score

오픈 소스 스크립트

진정한 TradingView 정신에 따라, 이 스크립트의 저자는 트레이더들이 이해하고 검증할 수 있도록 오픈 소스로 공개했습니다. 저자에게 박수를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰에 의해 관리됩니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

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


For real-time updates and premium indicators, consider joining my group at: patreon.com/steversteves
또한 다음에서도:

면책사항