alexgrover

QMA/SMA Difference

Introduction

The quadratic moving average (QMA) or quadratic weighted moving average (QWMA) is a type of moving average who is closer to the price when price is up trending. This moving average is defined as the square root of the moving average of the squared price. The QMA-SMA difference use this moving average to provide a new volatility indicator who aim to be reactive and filter noisy volatility in order to only provide essential information.

QMA - SMA

This indicator is defined as the difference between a quadratic moving average and a simple moving average of same period. Since the QMA emphasize up movements and tend to be away from down movements she is always greater than the simple moving average, so a simple difference between those moving average provide our volatility indicator. Below is a comparison with a standard deviation and the indicator of both period 100.


Since its a difference between two moving average it can be interesting to use a simple moving as source for the standard deviation to provide another comparison


The standard deviation is smoother but still contain more information as well as having less reactivity.

Conclusion

I have a presented a new volatility indicator based on the quadratic moving average and compared it with a classic standard deviation. It is possible to change the power order of the QMA in order to provide different results, in order to do so you must also change the root, this is done in pine with : pow(sma(pow(close,w),length),1/w) where w is the power order, notice that an high power order can provide non attributed values.

Check out the indicators we are making at luxalgo: www.tradingview.com/u/LuxAlgo/
開源腳本

本著真正的TradingView精神,該腳本的作者將其開源發布,以便交易者可以理解和驗證它。為作者喝彩吧!您可以免費使用它,但在出版物中重複使用此代碼受網站規則的約束。 您可以收藏它以在圖表上使用。

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。

想在圖表上使用此腳本?