Deviation Scaled Moving Average [ChuckBanger]

This is a deviation scaled moving average original designed by John Ehlers . It is a new adaptive moving average that has the ability to rapidly adapt to volatility in price movement with minimal lag. Because it is so smooth and adapts to the volatility of the market it is by far a really great tool for spotting trend changes
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.

Vuoi usare questo script sui tuoi grafici?
My free indicators
For a list of payed indicators:

Tip jar, if you want to support my free indicators work
BTC: 3EV8QGKK689kToo1r8pZJXbWDqzyJQtHy6


Dear Sir;
This is great code

I see in

b1 = 2 * a1 * cos( 1.414 * 3.14159 / ( 0.5 * length) )
b1 = 2 * a1 * cos(1.414 * 180 / (0.5 * length))

And you choose

b1 = 2 * a1 * cos(1.414 * 180 / (0.5 * length))

Why you choose the number "180" ?
+5 Rispondi
Compared with the usual moving and the result was pleasantly surprised. Many thanks.
+1 Rispondi
ChuckBanger novoross86
@novoross86, I'm glad you like it. Thanks for the comment :)
+1 Rispondi
TedPham ChuckBanger
Great code
Hi @ChuckBanger. This is a great script! Thanks for coding and sharing it!

I noticed though, that it gives a different result than the DSMA script that @everget posted in the past.

As well as a different result than the script that @MarcoValente posted (which is different than both yours and everget's).

So my question is, do you happen to have any clue which one is correct as per Ehler's original design?
Hi @ChuckBanger this is a perfect script that I use all the time! is it possible to make it multi time frame? I tried but it returns an error message bellow:

"Cannot use a mutable variable as an argument of the security function."

the code I tried was:

res = input(title="Resolution", type=input.resolution, defval="360")

s1 = security(syminfo.tickerid, res, dsma, gaps=true)

plot(s1, title="upper line",color=color.purple, transp=50)

Do you have a solution for that?
@canpp, You can make it multi time frame by change row 5 from:
study("Deviation Scaled Moving Average ", overlay=true, shorttitle="DSMA")
To this:
study("Deviation Scaled Moving Average ", overlay=true, shorttitle="DSMA", resolution="")
canpp ChuckBanger
@ChuckBanger, Thanks a lot!
+1 Rispondi