DasanC

Signal to Noise Ratio [SNR]

DasanC Aktualisiert   
Intro
This script measures the Signal to Noise ratio of a security and plots it in deciBels scale!

Usage
Ideally, you would want the ratio to be above 10 dB, meaning the Signal strength is 10x the noise strength.
As a baseline, you should not rely on indicators that use any kind of moving average if the SNR is below 6 dB - meaning Signal strength is only 4x noise strength.

I've written the SNR as a functional block so you may simply copy and paste, then call getSNR() to get the ratio in dB.

Principle
I consider a bar's High and Low to be the range of that period and (High + Low)/2 to be the "real" value of the signal.
This script compares a bars range (noise) to the perceived signal using a Hilbert Transform.

Cheers,
DasanC
Versionshinweise:
Changed the visual styles. You can drop this code snippet into another indicator and changed the transparency settings to have it in the background!

Need Indicators/Strategies for TradingView? -> t.me/pinescripters_jobs
General questions about Pinescript? -> t.me/pinescripters
Open-source Skript

Ganz im Spirit von TradingView hat der Autor dieses Skripts es als Open-Source veröffentlicht, damit Trader es besser verstehen und überprüfen können. Herzlichen Glückwunsch an den Autor! Sie können es kostenlos verwenden, aber die Wiederverwendung dieses Codes in einer Veröffentlichung unterliegt den Hausregeln. Sie können es als Favoriten auswählen, um es in einem Chart zu verwenden.

Haftungsausschluss

Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.

Möchten Sie dieses Skript auf einem Chart verwenden?