Super Smooth Moving Averages

785 8 149
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.
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à.

JustUncleL sal157011
@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.
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).
JustUncleL JustUncleL
Sorry that should be = sma(sma(source,length),length)
sal157011 JustUncleL
that it is not a triangular moving average
JustUncleL sal157011
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.
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.
EN English
EN English (UK)
EN English (IN)
DE Deutsch
FR Français
ES Español
IT Italiano
PL Polski
SV Svenska
TR Türkçe
RU Русский
PT Português
ID Bahasa Indonesia
MS Bahasa Melayu
TH ภาษาไทย
VI Tiếng Việt
JA 日本語
KO 한국어
ZH 简体中文
ZH 繁體中文
AR العربية
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 Contact Support Ideas Published Followers Following Private Messages Chat Sign Out