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.
Open-source Skript

Ganz im Spirit von TradingView hat der Autor dieses Skripts es als Open-Source veröffentlicht, damit Trader es besser verstehen und überprüfen können. Herzlichen Glückwunsch an den Autor! Sie können es kostenlos verwenden, aber die Wiederverwendung dieses Codes in einer Veröffentlichung unterliegt den Hausregeln. Sie können es als Favoriten auswählen, um es in einem Chart zu verwenden.

Haftungsausschluss

Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.

Möchten Sie dieses Skript auf einem Chart verwenden?