chrysopoetics

Yang & Zheng Extension of Garman & Klass

First off, a huge thank you to the following people:

theheirophant: www.tradingview.com/u/theheirophant/
alexgrover: www.tradingview.com/u/alexgrover/
NGBaltic: www.tradingview.com/u/NGBaltic/

This is the Yang & Zhang extension of Garman & Klass. The equation was modified to include the logarithm of the open price divided by the preceding close price. As a result, this function uses the open, high, low and close prices to estimate volatility. This modification allows the volatility estimator to account for the opening jumps, but as the original function, it assumes that the underlying follows a Brownian motion with zero drift (the historical mean return should be equal to zero). This estimator tends to overestimate the volatility when the drift is different from zero, however, for a zero drift motion, this estimator has an efficiency of eight times the classic close-to-close estimator (standard deviation).

This script allows you to transform the volatility reading. The intention of this is to be able to compare volatility across different assets and timeframes. Having a relative reading of volatility also allows you to better gauge volatility within the context of current market conditions.

For the signal lie I chose a repulsion moving average to remove choppy crossovers of the estimator and the signal. This may have been a mistake, so in the near-future I might update so that the MA can be selected. Let me know if you have any opinions either way.

References
www.rdocumentation.o...-4/topics/volatility
www.quantshare.com/i...volatility-estimator

Want to Learn?

If you'd like the opportunity to learn Pine but you have difficulty finding resources to guide you, take a look at this rudimentary list: docs.google.com/document/d/10t3Z...

The list will be updated in the future as more people share the resources that have helped, or continue to help, them. Follow me on Twitter to keep up-to-date with the growing list of resources.

Suggestions or Questions?

Don't even kinda hesitate to forward them to me. My (metaphorical) door is always open.

オープンソーススクリプト

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

免責事項

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

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