jasondhadley

Super Smooth Moving Averages

425 8 30
Straight conversion of:
SuperSmoother filter © 2013 John F. Ehlers

Yellow/Green line is Super Smoothing Average, blue line is EMA (10) to give a comparison
Remove from Favorite Scripts Add to Favorite Scripts
Just letting you know it does not work at all period lengths, like if I put in 11,12, or 15 I get jagged MA plot.
Reply
sal157011 JustUncleL
@JustUncleL, I think you are refering to the SuperSmoother when you get de jagged plot and not to the triangular moving average. The triangular moving average has a problem with the odd/even lengths but doesn't jag.
The problem with the jagged SuperSmoother is a very common error when translating scripts from Tradestation Easylanguage, and many more scripts in this library suffer from this error.
The error is that in tradestation Easylanguage when you have cos(x) the angle x must be in degrees and in PineScript in cos(x) the angle x must be in radians.
To solve the problem you must convert the x degrees to radians multiplying de x degrees by pi / 180.
Thus, the line 13 b1 = 2*a1*cos(1.414*180 / ssPeriod)
should be replaced by b1 = 2*a1*cos((3.14159/180)*(1.414*180 / ssPeriod)) and voilà.

Reply
@sal157011, Yes I was referring to the SuperSmoother. I did wonder whether it should have been converted to radian. I had a similar issue when I coded another one of Ehlers Easylanguage indicators.
Reply
Thanks for sharing, this is a smooth curve and gives smoother results than the HullMA particular at lengths less than 10 after that the Hull gives similar results with slightly shorter lengths. I will add to my list of tools. If you want a really slow and smooth curve try the Triangular MA (=sma((source,length),length).
Reply
JustUncleL PRO JustUncleL
Sorry that should be = sma(sma(source,length),length)
Reply
sal157011 JustUncleL
that it is not a triangular moving average
Reply
That is the calculation according to the information I have on the subject. Although, I may be corrected, I am not an expert on the different MA calculations, it may be misnamed in my reference.
Reply
sal157011 JustUncleL
@JustUncleL, I think you are right. I was used to the formula with coeficcients used by John Ehlers on his book Cybernetic Analysis for Stock and Futures but, your formula achieves the same thing.
Reply
United States
United Kingdom
India
Deutschland
France
España
Italia
Polska
Türkiye
Россия
Brasil
Indonesia
Malaysia
Việt Nam
日本
한국
简体
繁體
Home Stock Screener Forex Signal Finder Cryptocurrency Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators Website & Broker Solutions Widgets Stock Charting Library Feature Request Blog & News FAQ Help & Wiki Twitter
Profile Profile Settings Account and Billing My Support Tickets Priority Support Contact Support Ideas Published Followers Following Private Messages Chat Sign Out