OPEN-SOURCE SCRIPT
Machine Learning Z-Score Buy and Sell [SS]

Hey everyone,
Releasing this Z-Score based buy and sell indicator.
What it does
This indicator:
What is Z-Score
Z-Score is a measure of the mean. Thus, this is a mean reverting type strategy, as it uses z-score to determine price's distance from the mean (or a Z-Score of 0) and then it looks at historic deviations from the mean to signal the buy and sell signals (i.e. how far has price traditionally drifted from the mean before reverting).
Z-Score is a powerful tool in this sense, and if you folow my other indicators, you will know how much I love Z-score!
How to use the indicator
If you want to use the full Machine Learning capabilities of the indicator, its best to just leave all default settings. These default settings will automatically adjust the mean target price and buy and sell signals to align with the current price action.
If you want to be more aggressive in your
Then you can opt to manually input a lookback length and mean reversion standard deviation. However, I generally suggest to avoid this as you are then making your own determination of trend by qualitative assessment. It can work, but its just not suggested.
In the input menu, you will see the option to "Manually select lookback" thus over-riding the auto-determination of trend and targets.
You will also see "manual pullback" enabler and "Pullback Standard Deviation". You can set your pullback standard deviation if you want to be more aggressive. The indicator will naturally shift to conservative target prices based on a neutral mean. However, if you want to increase the aggressiveness of the target price, you can increase or decrease the pullback standard deviation.
General Tips about Manually Adjusting Pullback Target
Here are some tips if you want to manually adjust the pullback targets:
Again, I do suggest leaving the indicator to decide for itself, but the options are there for those who wish.
Overall strategy
This is a mean reverting strategy. So if you are a mean reversion trader, this may be of particular interest to you.
Optional
Optionally, you can have the indicator plot the target prices or not, simply toggle this functionality off or on in the settings menu.
Concluding remarks
That is the indicator in a nutshell!
I hope you enjoy it and find it helpful.
Feel free to check out my other Z-Score based indicators if you find this interesting or want to learn more about the power of Z-Score in trading!
Thanks all and safe trades!
Releasing this Z-Score based buy and sell indicator.
What it does
This indicator:
- Uses Z-score and trend to identify potential buy and sell areas.
- Signals those buy and sell areas and provides a target price based on the mean.
- Plots the target price for buy and sell signals as a red line (for sell signals) or green line (for buy signals).
- Has some "machine learning" aspects, namely, it is able to auto select its lookback length based on its analysis of the trend using Pienscript's trend correlation function iterated over multiple lengths, in order for the indicator to identify:
a) The strongest trend; and
b) The correct target price
What is Z-Score
Z-Score is a measure of the mean. Thus, this is a mean reverting type strategy, as it uses z-score to determine price's distance from the mean (or a Z-Score of 0) and then it looks at historic deviations from the mean to signal the buy and sell signals (i.e. how far has price traditionally drifted from the mean before reverting).
Z-Score is a powerful tool in this sense, and if you folow my other indicators, you will know how much I love Z-score!
How to use the indicator
If you want to use the full Machine Learning capabilities of the indicator, its best to just leave all default settings. These default settings will automatically adjust the mean target price and buy and sell signals to align with the current price action.
If you want to be more aggressive in your
- Target Price; and
- Signals
Then you can opt to manually input a lookback length and mean reversion standard deviation. However, I generally suggest to avoid this as you are then making your own determination of trend by qualitative assessment. It can work, but its just not suggested.
In the input menu, you will see the option to "Manually select lookback" thus over-riding the auto-determination of trend and targets.
You will also see "manual pullback" enabler and "Pullback Standard Deviation". You can set your pullback standard deviation if you want to be more aggressive. The indicator will naturally shift to conservative target prices based on a neutral mean. However, if you want to increase the aggressiveness of the target price, you can increase or decrease the pullback standard deviation.
General Tips about Manually Adjusting Pullback Target
Here are some tips if you want to manually adjust the pullback targets:
- The pullback target needs to be in a standard deviation value, this can be anywhere from 0 to 4 or 0 to -4 (you can theoretically go higher but its not really realistic). You can also do decimals, so 1.5 or 1.25 etc.
- To determine whether you should be doing negative or positive standard deviation, you should determine the trend. If it is a downtrend and you are looking to short the rips, you will want to select a negative number, like -1.
- If it is an uptrend and you want to buy the dips, you should be selecting a positive number, like 1 or 1.5.
Again, I do suggest leaving the indicator to decide for itself, but the options are there for those who wish.
Overall strategy
This is a mean reverting strategy. So if you are a mean reversion trader, this may be of particular interest to you.
Optional
Optionally, you can have the indicator plot the target prices or not, simply toggle this functionality off or on in the settings menu.
Concluding remarks
That is the indicator in a nutshell!
I hope you enjoy it and find it helpful.
Feel free to check out my other Z-Score based indicators if you find this interesting or want to learn more about the power of Z-Score in trading!
Thanks all and safe trades!
오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
Get:
- Live Updates,
- Discord access,
- Access to my Proprietary Merlin Software,
- Access to premium indicators,
patreon.com/steversteves
Now on X!
- Live Updates,
- Discord access,
- Access to my Proprietary Merlin Software,
- Access to premium indicators,
patreon.com/steversteves
Now on X!
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.
오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
Get:
- Live Updates,
- Discord access,
- Access to my Proprietary Merlin Software,
- Access to premium indicators,
patreon.com/steversteves
Now on X!
- Live Updates,
- Discord access,
- Access to my Proprietary Merlin Software,
- Access to premium indicators,
patreon.com/steversteves
Now on X!
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.