SwissQuantTrader

Two sided mean deviation Indicator [SQT]

Description
The indicator aims at detecting up and down moves that deviate substantially from their respective means. The up and down means are calculated separately taking the last N up or down candles into account (Use N candles). Based on these means the upper and lower bounds are calculated by adding or subtracting the distributions standard deviation (Sigma bounds), multiplied by a user specified factor. After a substantial move, the bounds will either decay sharply to their mean after N up or down candles have passed (Decay: equally weighted) or gradually (Decay: age weighted, weight can be adjusted in the Pine script). The equally weighted decay is meant to model persistent memory whereas the age weighted decay models fading memory of the market over the last N up or down candles. The upper and lower bounds constitute the shaded area. The signal line is simply an EMA with length 3 of the sum of the last 3 percentage changes. These values can be adjusted from the Pine script directly.
Intended use
The signal line leaving the shaded area indicates a substantial move away from the respective mean under the given parameters. This might be interpreted as a signal for the price to revert back to it's mean during the following candles (mean reversion).
Markets
The indicator may be used on any timeseries that is expected to have mean reverting behaviour. Development was done on BTCUSD.P using 5 minute candles.
開源腳本

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

免責聲明

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

想在圖表上使用此腳本?