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.
Script open-source

Nello spirito di condivisione promosso da TradingView, l'autore (al quale vanno i nostri ringraziamenti) ha deciso di pubblicare questo script in modalità open-source, così che chiunque possa comprenderlo e testarlo. Puoi utilizzarlo gratuitamente, ma il riutilizzo del codice è subordinato al rispetto del Regolamento. Per aggiungerlo al grafico, mettilo tra i preferiti.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.

Vuoi usare questo script sui tuoi grafici?