Discussions
»
Product and Service Development
»
Formula Assistance
»
How I find the last highest value without time specified
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
|
|
|
|
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)
|
|
|
|
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
|
|
|
|
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
|
1 user thanked mstt for this useful post.
|
|
|
Users browsing this topic |
Guest (Hidden)
|
Discussions
»
Product and Service Development
»
Formula Assistance
»
How I find the last highest value without time specified
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.