OPEN-SOURCE SCRIPT

Fetch Z-score

Mis à jour
This script is enspired by the creator of the Z-score probability indicator made by tradingview.com/u/Steversteves/.

I took his calculation for the z-score and created my own strategy based on that z-score.

What is z-score? The Z-score represents how far the current price deviates from the moving average, measured in terms of standard deviations

What does this script do with the Z-score?
The script offers several customizable options, including displaying buy and sell signals based on Z-score thresholds and overlaying these signals directly on the chart or below/above the bars.

The idea is that when the Z-score exceeds a certain treshold, a count will start. The count will lead to a signal. For example: Say the Z-score dipped below -1. From there, the script will by default count whether the current Z-score is higher than the Z-score of the past 10 datapoints. If so, a buy signal will be printed on the chart. The idea is that the Z-score will creep up after a low, making sure you buy earyly in the new uptrend, making this a trend followiung system, with early trend detection.

You can choose whether you want the buy and sell signals on the seperate pane, or on the chart by toggeling a simple setting.

What are my favorite settings?
- Timeframe: weekly
- SMA Length: 75
- Z score buy treshold: -1.5
- Z score sell treshold: 3
- Lookback buy period: 20
- Lookback sell period: 20
Notes de version
This script is enspired by the creator of the Z-score probability indicator made by tradingview.com/u/Steversteves/.

I took his calculation for the z-score and created my own strategy based on that z-score.

What is z-score? The Z-score represents how far the current price deviates from the moving average, measured in terms of standard deviations

What does this script do with the Z-score?
The script offers several customizable options, including displaying buy and sell signals based on Z-score thresholds and overlaying these signals directly on the chart or below/above the bars.

The idea is that when the Z-score exceeds a certain treshold, a count will start. The count will lead to a signal. For example: Say the Z-score dipped below -1. From there, the script will by default count whether the current Z-score is higher than the Z-score of the past 10 datapoints. If so, a buy signal will be printed on the chart. The idea is that the Z-score will creep up after a low, making sure you buy earyly in the new uptrend, making this a trend followiung system, with early trend detection.

You can choose whether you want the buy and sell signals on the seperate pane, or on the chart by toggeling a simple setting.


What are my favorite settings?
- Timeframe: weekly
- SMA Length: 75
- Z score buy treshold: -1.5
- Z score sell treshold: 3
- Lookback buy period: 20
- Lookback sell period: 20

Patch notes v2:
- Bugfix: "lookback sell period"did not influence sell signals, but "lookback buy period" did. They now work as expected
Notes de version
Better precision on pane scale
Notes de version
Add cool down period inputs
Moving AveragesOscillatorsz-score

Script open-source

Dans le plus pur esprit TradingView, l'auteur de ce script l'a publié en open-source, afin que les traders puissent le comprendre et le vérifier. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais la réutilisation de ce code dans une publication est régie par nos Règles. Vous pouvez le mettre en favori pour l'utiliser sur un graphique.

Vous voulez utiliser ce script sur un graphique ?


Aussi sur:

Clause de non-responsabilité