### Stock Portfolio Organizer

The ultimate porfolio management solution.

Shares, Margin, CFD's, Futures and Forex

EOD and Realtime

Dividends and Trust Distributions

And Much More ....

### WiseTrader Toolbox

**#1** Selling **Amibroker** Plugin featuring:

Advanced Adaptive Indicators

Advanced Pattern Exploration

Neural Networks

And Much More ....

### EBSW Even Better Sine Wave for Amibroker (AFL)

Rating:

2 / 5 (Votes 6)

Tags:

oscillator, amibroker

Even Better Sine Wave

### Screenshots

### Indicator / Formula

Copy & Paste Friendly

SetBarsRequired( sbrAll ); function EBSW( Duration) { //HighPass filter cyclic components whose periods are shorter than Duration input PI = 3.1415926; alpha1 = (1 - sin (2*PI / Duration)) / cos(2*PI /Duration); //Smooth with a Super Smoother Filter from equation 3-3 a1 = exp(-1.414*PI / 10); b1 = 2*a1*cos(1.414*PI / 10); c2 = b1; c3 = -a1*a1; c1 = 1 - c2 - c3; HP = Close; Filt = HP; Wave = Filt; Pwr = Filt; for( i = 3 ; i < BarCount; i++ ) { HP[ i ]=.5*(1 + alpha1)*(Close[i] - Close[i-1]) + alpha1*HP[i-1]; Filt[i] = c1*(HP[i] + HP[i-1]) / 2 + c2*Filt[i-1] + c3*Filt[i-2]; } //3 Bar average of Wave amplitude and power Wave = (Filt + Ref(Filt,-1) + Ref(Filt,-2)) / 3; Pwr = (Filt^2 + Ref(Filt,-1)^2 + Ref(Filt,-2)^2) / 3; //Normalize the Average Wave to Square Root of the Average Power Wave = Wave / sqrt(Pwr); return wave; } Plot(EBSW(Param("Duration",20,1,200,1,0)),"EBSW"+ _PARAM_VALUES(),colorBlue);//Plot( array, Name, color/barcolor, style = styleLine, minvalue = {empty}, maxvalue = {empty}, XShift = 0, Zorder = 0 ) /* //HighPass filter cyclic components whose periods are shorter 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);

### 4 comments

#### Leave Comment

Please login here to leave a comment.

Back
1.val2004works very well

tks again

2.hotaro3Even though I enjoyed of mathematical formula for calculating the wave but unfortunately using of this indicator is not a good Idea for Market specially Forex. I think you can work more on it to improve it

3.bsedoha@sal157011 -What is the best way to use this indicator ?

@ val2004 – Which market you find it useful and how you are imnplementing in your Trade Plan ?

Thanks in advance.

Regards,

4.val2004Bsedoha

I use it on stocks confirming with other indicators like relative slope