Ladder StDev

jason5480 アップデート済   
This indicator shows the upwards (green) and downward (red) volatility of the market. It is a standard deviation of the price but with a twist! For the upwards volatility , only the green candles are taken into account, and for the downwards only the red candles are.
Compared to my previous "Ladder ATR" indicator this a different approach to measure the the upwards and downwards volatility of the market by utilizing the standard deviation instead of the ATR. When both measure the volatility they have different "dynamics". Standard deviation increases the weight of larger values over smaller values. The ATR indicator is based on the average of absolute changes. So, if we apply the indicators on a daily chart , ATR considers intraday and between-day data, while the standard deviation calculation includes only daily returns (source price).
  • Added RETURN mode that calculate the standard deviation of the log returns.

Many thanks to @lejmer for his idea of log return mode and for pointing out to me the (un)biased variable option in the standard deviation calculations.

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