Rank: Member
Groups: Registered, Registered Users, Subscribers Joined: 10/6/2005(UTC) Posts: 18
|
Hi All:
With the help and suggestion from other members including Jose, I am able to code the Descending Peak. Now, what I trying to do is identify the Lowest Low in between the descending Peak. I try using the forward reference functions but it didnt work out well.
Please advise. Any suggestion is always welcome!
TIA!
:)
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 9/8/2004(UTC) Posts: 2,266
Was thanked: 1 time(s) in 1 post(s)
|
Please post the code you are currently using for the descending peak ...
Patrick :mrgreen:
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 1/19/2005(UTC) Posts: 1,065 Location: Koh Pha-Ngan, Earth
Was thanked: 2 time(s) in 2 post(s)
|
... or simply replace Highest() function for Lowest() in the original formula.
jose '-)
|
|
|
|
Rank: Member
Groups: Registered, Registered Users, Subscribers Joined: 10/6/2005(UTC) Posts: 18
|
Patrick wrote:Please post the code you are currently using for the descending peak ...
Patrick :mrgreen:
Hi Patrick:
This is what I wrote with assistance from Jose:
[code:1:b58781c0c8]
pk:=Ref(H,1)<H AND Ref(H,-1)<H;
pkV1:=ValueWhen(1,pk,H);
pkV2:=ValueWhen(2,pk,H);
desP:=pk AND pkV1<pkV2;
desP;
[/code:1:b58781c0c8]
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 1/19/2005(UTC) Posts: 1,065 Location: Koh Pha-Ngan, Earth
Was thanked: 2 time(s) in 2 post(s)
|
buddy wrote:This is what I wrote with assistance from Jose:
Your variation of the original code plots future values, and cannot plot a value on the last bar of any chart.
jose '-
|
|
|
|
Rank: Member
Groups: Registered, Registered Users, Subscribers Joined: 10/6/2005(UTC) Posts: 18
|
Hi Jose:
You mean I cant identify the Lowest Low in between the descending Peak with the above codes? :(
What should I do? Please advise.
TIA!
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 1/19/2005(UTC) Posts: 1,065 Location: Koh Pha-Ngan, Earth
Was thanked: 2 time(s) in 2 post(s)
|
The forward-referenced Ref(H,1) in your formula, means that the indicator cannot plot any values on the last bar. I would stick with the original formula and adapt it. Sorry, that's all I can help for now with my busy schedule.
jose '-)
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 9/8/2004(UTC) Posts: 2,266
Was thanked: 1 time(s) in 1 post(s)
|
I went back to Jose original formula so you can thank him.
As he explained your formula was looking into the future ...
Try the following:
pk:=Ref(H,-1)>H AND Ref(H,-1)>Ref(H,-2);
pkVal1:=ValueWhen(1,pk,Ref(H,-1));
pkVal2:=ValueWhen(2,pk,Ref(H,-1));
CD:=pk AND pkVal1<pkVal2;
LowestSince(1,CD,L)
This will plot the lowest value between the peaks. if a new low is created the value will change to the new low.
Hope this helps.
Patrick :mrgreen:
|
|
|
|
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.