Rank: Newbie
Groups: Registered, Registered Users, Subscribers Joined: 7/14/2007(UTC) Posts: 7
|
Hi all
Need your expertise help here.
I'm trying to define peaks.
my definition of a peak is when the next 3 consecutive bars are either equal or lower than the first bar. if true, the first bar will be the new peak else the previous peak remains. how is the previous peak (oldpeak) 'remembered'?
newpeak:= HHV(H,3); b1:= HHV(H,2); b2:= HHV(H,1); b3:= H; If((b3 <= newpeak AND b2 <=newpeak AND b1<=newpeak),newpeak,oldpeak);
Many thanks!
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 7/21/2005(UTC) Posts: 74 Location: Oklahoma USA
|
use this formula -> PeakBars(1,MACD(),.5) and view the daily data either in the Explorer or in Excel paying attention to zero. You can also see the reverse using TroughBars(1,MACD(),.5) *-1. Plot in the same window and set style to hist with Peak colors in Green and Trough in Red. Also plot a standard MACD in another window and view the peaks in action. Charley
here is an example of PeakBars displayed in Excel:
07/19/2007
0
07/20/2007
1
07/23/2007
2
07/24/2007
3
07/25/2007
4
07/26/2007
5
07/27/2007
6
07/30/2007
7
07/31/2007
8
08/01/2007
9
08/02/2007
10
08/03/2007
11
08/06/2007
12
08/07/2007
13
08/08/2007
0
08/09/2007
1
08/10/2007
2
08/13/2007
3
08/14/2007
4
08/15/2007
5
08/16/2007
6
08/17/2007
7
08/20/2007
8
08/21/2007
9
08/22/2007
10
08/23/2007
11
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 10/28/2004(UTC) Posts: 3,111 Location: Perth, Western Australia
Was thanked: 16 time(s) in 16 post(s)
|
mydancher2 wrote:how is the previous peak (oldpeak) 'remembered'? Have a look at the ValueWhen() function or even the PREV function (slower but still can be useful at times) wabbit [:D]
|
|
|
|
Users browsing this topic |
Guest (Hidden)
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.