Hey IRT,
Here's Ehlers' code, in EasyLanguage, for the SUPER SMOOTHER:
-------
Vars:
a1(0), b1(0), c1(0), c2(0), c3(0), Filt(0);
a1 = expvalue(-1.414*3.14159/10);
b1 = 2*a1*Cosine(1.414*180/10);
c2 = b1;
c3 = -a1*a1;
c1 = 1 -c2 -c3;
Filt = c1*(Close + Close[1]) / 2 + c2*Filt[1] + c3*Filt[2];
Plot1(Filt);
Plot2(0);
-------
Here's Ehlers' code, in Easy Language (with some comments in code), for the ROOFING FILTER:
-------
Vars:
alpha1(0), HP(0), a1(0), b1(0), c1(0), c2(0), c3(0), Filt(0), Filt2(0);
//Highpass filter cyclic components whose periods are shorter than 48 bars
alpha1 = (Cosine(.707*360 / 48) + Sine (.707*360 / 48) -1) / Cosine(.707*360 / 48);
HP = (1 -alpha1 / 2)*(1 -alpha1 / 2)*(Close - 2*Close[1] + Close[2]) + 2*(1 -alpha1)*HP[1] - (1 - alpha1)*(1 - alpha1)*HP[2];
//Smooth with a Super Smoother Filter
a1 = expvalue( -1.414*3.14159 / 10);
b1 = 2*a1*Cosine(1.414*180 / 10);
c2 = b1;
c3 = -a1*a1;
c1 = 1 - c2 -c3;
Filt = c1*(HP + HP[1]) / 2 + c2*Filt[1] + c3*Filt[2];
Plot1(Filt);
Plot2(0);
-------
Can the Super Smoother or Roofing Filter be created with RTL?
I'm guessing I would need to change look-back manually in the RTL code and this could be a downside of using RTL. For instance, the above code uses a 10 bar look-back for the Super Smoother and 48 bar for the Roofing Filter.
I'm also guessing that it would be better to go the RTX route, but can it be done in RTL?
If so, can you please give me an example of how to translate EasyLanguage to RTL, maybe using the Super Smoother?
-------
For anybody following along, more on Super Smoother and Roofing Filter here: