TradeAutomation

Relative Standard Deviation

Standard Deviation is a common measure of volatility (the dispersion of data relative to its mean). However, when using it as an indicator, it can be more useful at times to know the deviation relative to the price as a percentage versus the hard value. This normalizes the data so that it is easier to compare the deviation of different assets. By definition, standard deviation is the square root of the variance, and it is how far the price is from the mean 68.2% of the time when there is normative distribution.

What it does: This indicator will tell you the standard deviation of the asset relative to its price (as a %), but also has the option to plot the normal (population) standard deviation.

Example use case: The regular standard deviation of Asset A is $12 and Asset B is $10. Which one is more volatile? Well, it depends on the asset price. If asset A just closed at $900 and asset B just closed at $30, that makes a big difference. In this instance Asset A $12/$900=1.33% (standard deviation relative to the asset price). Asset B $10/$30=33.33% (standard deviation relative to the asset price). Using a normal standard deviation indicator, you would just see that the standard deviation of Asset A is higher as a hard dollar value, when the reality is that Asset A is much less volatile.

How to use it: This indicator plots a blue line by default that is the Relative Standard Deviation of the asset compared to the asset price (a %). There is also an option to turn on / plot regular (population) Standard Deviation, which will plot as a purple line. The mean length used for the average, and the lookback period that the indicator uses to calculate, are both adjustable with inputs.

Want to build custom alerts and custom strategies? Interested in automated trading?

Hire me to code or automate your trading strategy, or schedule a free consultation at:
www.TradeAutomation.net
オープンソーススクリプト

TradingViewの精神に則り、このスクリプトの作者は、トレーダーが理解し検証できるようにオープンソースで公開しています。作者に敬意を表します!無料で使用することができますが、このコードを投稿で再利用するには、ハウスルールに準拠する必要があります。 お気に入りに登録してチャート上でご利用頂けます。

免責事項

これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。

チャートでこのスクリプトを利用したいですか?