[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] Re: Empirical Mode Decomposition


  • Date: Thu, 4 Mar 2010 09:06:30 +0100
  • From: "Ton Sieverding" <ton.sieverding@xxxxxxxxxx>
  • Subject: Re: [amibroker] Re: Empirical Mode Decomposition

PureBytes Links

Trading Reference Links



That's better for me. Thanks ...
 
Ton.
 
----- Original Message -----
From: Mike
Sent: Thursday, March 04, 2010 12:56 AM
Subject: [amibroker] Re: Empirical Mode Decomposition

 

John,

If in fact Peak is supposed to retain the value of the previous Peak when not a new Peak (as opposed to zero shown in my previous post) and similarly for Valley, then my earlier post would need to be modified to the following (also corrected to no longer use the AmiBroker keyword Peak as a variable name)

BP1 = Ref( BP, -1 );
BP2 = Ref( BP, -2 );

NewPeak = ( BP1 > BP AND BP1 > BP2 );
Peaks = IIF( NewPeak, BP1, ValueWhen( NewPeak, BP1 ) );
NewValley = ( BP1 < BP AND BP1 < BP2 );
Valleys = IIF( NewValley, BP1, ValueWhen( NewValley, BP1 ) );

AvgPeak = MA( Peaks, 50 );
FracAvgPeak = Fraction * AvgPeak;
AvgValley = MA( Valleys, 50 );
FracAvgValley = Fraction * AvgValley;

Mike

--- In amibroker@xxxxxxxxxps.com, "bbands" <BBands@xxx> wrote:
>
> --- In amibroker@xxxxxxxxxps.com, "Ton Sieverding" <ton.sieverding@> wrote:
> >
> > Hi John. It's not that I cannot translate lines 29 thru 36 in AFL. My problem is that I do not understand the code :
> >
> > 29. if BP[1] > BP and BP[1] > BP[2] then
> > 30. Peak = BP[1]
> > 31. else if BP[1] < BP and BP[1] < BP[2] then
> > 32. Valley = BP[1] ;
> >
> > What's the difference between Peak and Valley in the above code ? For me they always have the same value because whatever happens this value is BP[1] ...
> >
> > BTW BP is an array and AFL handles this with the double if.( Iff( BP<Ref(BP,-1) etc. ) ...
> Ton,
>
> First, I think the John Ehlers' work in the article is quite elegant and very interesting.
>
> As I grok it:
>
> Peaks: If the last period is greater than the current period and the prior period then peak = last period else peak equals the prior value of peak.
>
> c
> c c
>
> Valleys: If the last period is less than the current period and the prior period then valley = last period else valley equals the prior value of valley.
>
> c c
> c
>
> So peak and valley always contains the value to the most recent high point and low point, where a high point is a point surrounded by lower points and a low point is a point surrounded by higher points.
>
> I have done a lot of work on these ideas, which I call hips and lops and Wheeler called circled highs and lows. The big difference here being that closes are used instead of highs and lows.
>
> You can see hips and lops in action on our forex site, www.BBForex.com.
>
> So this neatly combines several area of interest for me, hips and lops and bands.
>
> Thanks for having a look at it,
>
> John Bollinger
>



__._,_.___


**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/





Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___