OPEN-SOURCE SCRIPT
Investor Tool - Z Score

The Investor Tool is intended as a tool for long term investors, indicating periods where prices are likely approaching cyclical tops or bottoms. The tool uses two simple moving averages of price as the basis for under/overvalued conditions: the 2-year MA (green) and a 5x multiple of the 2-year MA (red).
Price trading below the 2-year MA has historically generated outsized returns, and signalled bear cycle lows.
Price trading above the 2-year MA x5 has been historically signalled bull cycle tops and a zone where investors de-risk.
Just like the Glassnode one, but here on TV and with StDev bands
Now with Z-SCORE calculation:
The Z-Score is calculated to be -3 Z at the bottom bands and 3 Z at the top bands
Pine Script®
Created for TRW
Price trading below the 2-year MA has historically generated outsized returns, and signalled bear cycle lows.
Price trading above the 2-year MA x5 has been historically signalled bull cycle tops and a zone where investors de-risk.
Just like the Glassnode one, but here on TV and with StDev bands
Now with Z-SCORE calculation:
The Z-Score is calculated to be -3 Z at the bottom bands and 3 Z at the top bands
mean = (upper_sma + bottom_sma) / 2
bands_range = upper_sma - bottom_sma
stdDev = bands_range != 0 ? bands_range / 6 : 0
zScore = stdDev != 0 ? (close - mean) / stdDev : 0
Created for TRW
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.