OPEN-SOURCE SCRIPT

Exponantial Spread Strategy

It is strongly recommended to evaluate the strategy's performance on long time frames such as 1D or 4H.

This strategy calculates a custom moving average by the formula EMA+(TEMA-DEMA)*G,
G being the gain parameter. The main idea behind that is since TEMA is much more adaptive than DEMA their spread give us momentum, and incorporating this with a gain allows us to calculate a very responsive but yet not noisy moving average.

We calculate 4 MAs like described with gains 0,1,2,3 from less adaptive (normal EMA) to most adaptive. When they align in terms of position and the price is above the original MA we enter a long position, and do partial exits at each crossunder weighted by how adaptive ma is, the more adaptive the less weight, we do a full stop when the price crossed below under the original MA or the position aligment changed.
Double Exponential Moving Average (DEMA)Exponential Moving Average (EMA)Triple Exponential Moving Average (TEMA)

Script de código aberto

No verdadeiro espírito do TradingView, o autor desse script o publicou como código aberto, para que os traders possam compreendê-lo e analisá-lo. Parabéns ao autor! Você pode usá-lo gratuitamente, mas a reutilização desse código em publicações é regida pelas Regras da Casa. Você pode favoritá-lo para usá-lo em um gráfico.

Quer usar esse script no gráfico?

Aviso legal