TradingView
cheatcountry
28 de Jun de 2021 21:23

Ehlers Smoothed Adaptive Momentum [CC] 

Apple Inc.NASDAQ

Descrição

The Smoothed Adaptive Momentum indicator was created by John Ehlers and this indicator gives a lot of useful information. When the indicator is above 0 then there is very strong upward momentum and when the indicator falls below 0 then there is very strong downward momentum. A very profitable way to use this particular indicator is buy long when the indicator is below 0 and it crosses over it's signal line and then sell of course when you get the first sell signal. I have included strong buy and sell signals in addition to normal ones so darker colors mean strong signals and lighter colors are normal signals. Buy when the line turns green and sell when it turns red.

Let me know if you have any other scripts you would like to see me publish!

Notas de Lançamento

Added the zero line as requested
Comentários
CharlesPark
Thank you for your nice translation and the "Trigger" line is another great idea.
I have a question about the code.

at the line 30,
q1 = ((0.0962 * cycle) + (0.5769 * nz(cycle[2])) - (0.5769 * nz(cycle[4])) - (0.0962 * nz(cycle[6]))) * (0.5 + (0.08 * nz(instPeriod[1])))
instPeriod is 0 at the moment because InstPeriod is not calculated yet( it'll be calculated at line 38)
what's the point of the instPeriod[1] if they have all zero value?
I also read the original code in Easylanguage(from the cybernetic analysis book) but it has same problem.
cheatcountry
@CharlesPark, That is actually referring to the previous instPeriod so it wouldn't be 0 unless it is the very first time it is being calculated
CharlesPark
@cheatcountry, I see. I misunderstood how TV code works.
The code is using the previous parameter(instPeriod) and the previous signal(SAM) for the present data processing, and I guess that's why it is called "adaptive".
Thank you for your kind answer.
cheatcountry
@CharlesPark, np glad I could help
NetoDav
Thanks. It would be great if you could add the zero line to your indicators. cheers
cheatcountry
@NetoDav, Thanks and I'm trying to get better about including the zero line. I updated this one and a few others to include it
NetoDav
@cheatcountry, thanks a lot my friend
cheatcountry
Mais