logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
chunwaihome  
#1 Posted : Wednesday, September 14, 2016 1:11:51 PM(UTC)
chunwaihome

Rank: Member

Groups: Registered Users, Subscribers
Joined: 8/8/2016(UTC)
Posts: 11

Was thanked: 3 time(s) in 3 post(s)

Hello,

 

How I find the last first highest value without time specified

for example the follow chart:

 

Stock chart
MS Support  
#2 Posted : Wednesday, September 14, 2016 5:51:22 PM(UTC)
MS Support

Rank: Advanced Member

Groups: Moderators, Registered, Registered Users, Subscribers
Joined: 10/8/2010(UTC)
Posts: 1,960

Thanks: 92 times
Was thanked: 155 time(s) in 150 post(s)
Hi, I am not sure I fully understand what you mean by the 'last first highest', but based on the picture it looks like you are looking for the most recent Peak? With the Peak function you must specify a minimum percent change to what constitutes a peak. For example: Peak(1,H,3)
chunwaihome  
#3 Posted : Thursday, September 15, 2016 6:21:04 AM(UTC)
chunwaihome

Rank: Member

Groups: Registered Users, Subscribers
Joined: 8/8/2016(UTC)
Posts: 11

Was thanked: 3 time(s) in 3 post(s)

the most recent Peak exactly is my mean, I will try peak() function

thx

Edited by user Thursday, September 15, 2016 6:21:39 AM(UTC)  | Reason: Not specified

mstt  
#4 Posted : Saturday, September 17, 2016 1:12:26 AM(UTC)
mstt

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/25/2005(UTC)
Posts: 1,042

Was thanked: 57 time(s) in 54 post(s)
Here are a couple of options that identify peak values without requiring a specific percentage. The 3 bar peak value is not available until 1 bar after the apex, and the 5 bar peak value is not available until 2 bars after the apex.

{3 Peak Bar}
Pk1:=Ref(H,-1)>Ref(H,-2) AND Ref(H,-1)>H;
ValueWhen(1,Pk1,Ref(H,-1));

{5 Peak Bar}
Pk2:=Ref(H,-2)>H AND Ref(H,-2)>Ref(H,-1) AND
Ref(H,-2)>Ref(H,-3) AND Ref(H,-2)>Ref(H,-4);
ValueWhen(1,Pk2,Ref(H,-2));

These alternatives to the Peak() function should not be considered as either better or worse but might well be more appropriate in some situations.

Roy

Edited by user Friday, September 23, 2016 6:51:52 PM(UTC)  | Reason: Not specified

thanks 1 user thanked mstt for this useful post.
MS Support on 9/19/2016(UTC)
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.