Login Page - Create Account

Support Board


Date/Time: Sun, 23 Feb 2025 17:29:42 +0000



Post From: Ehlers Even Better Sine Wave

[2021-01-21 14:28:22]
cmet - Posts: 643
Is it possible to get a native version of John Ehlers' Even Better Sine Wave in Sierrachart?

This study is from the 2013 book "Cycle Analytics for Traders" and is a great timing tool. Especially for intraday Futures data.


Here is the Easylanguage code from the book:


{
Even Better Sinewave Indicator © 2013 John F. Ehlers
}

Inputs:
Duration(40);
Vars:
alpha1(0),
HP(0),
a1(0),
b1(0),
c1(0),
c2(0),
c3(0),
Filt(0),
count(0),
Wave(0),
Pwr(0);

//HighPass filter cyclic components whose periods areshorter than Duration input

alpha1 = (1 - Sine (360 / Duration)) / Cosine(360 /
Duration);
HP = .5*(1 + alpha1)*(Close - Close[1]) + alpha1*HP[1];

//Smooth with a Super Smoother Filter from equation 3-3
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];

//3 Bar average of Wave amplitude and power

Wave = (Filt + Filt[1] + Filt[2]) / 3;

Pwr = (Filt*Filt + Filt[1]*Filt[1] + Filt[2]*Filt[2]) / 3;

//Normalize the Average Wave to Square Root of the Average Power

Wave = Wave / SquareRoot(Pwr);

Plot1(Wave);



Image of plot attached.
imageebs.png / V - Attached On 2021-01-21 14:27:48 UTC - Size: 130.42 KB - 512 views