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

Notification

Icon
Error

Options
Go to last post Go to first unread
Imothep  
#1 Posted : Sunday, August 28, 2005 2:02:03 PM(UTC)
Imothep

Rank: Member

Groups: Registered, Registered Users, Subscribers
Joined: 8/28/2005(UTC)
Posts: 25

Hi, I am new to the forum and this is my first post :wink: Can anyone help me with this formula ? How to find (since the first day loaded in the chart) : - the 2nd highest value in the RSI - the 3rd highest value in the RSI - and the 4th highest value in the RSI. Conversely, I would like to have the 2nd lowest, 3rd lowest and 4th lowest values in the RSI. Any guidance will be highly appreciated, Many thanks :wink:
StorkBite  
#2 Posted : Sunday, August 28, 2005 5:41:06 PM(UTC)
StorkBite

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 3/19/2005(UTC)
Posts: 2,995

Was thanked: 14 time(s) in 10 post(s)
Welcome to the forum Imothep! Check out Roy Larsen's related work here: Second-Highest High
Jose  
#3 Posted : Sunday, August 28, 2005 6:20:19 PM(UTC)
Jose

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)
From http://www.metastocktools.com/#metastock : [code:1:36ed8e009d] MetaStock -> Tools -> Indicator Builder -> New -> Copy and paste complete formula between "---8<---" lines. =================================== Nth Highest/Lowest indicator values =================================== ---8<------------------------------ { ©Copyright 2005 Jose Silva } { For personal use only } { http://www.metastocktools.com } { User input } Nth:=Input("Nth Highest/Lowest indicator values [1~8, 0=all]",0,8,0); { Indicator example } x:=RSI(14); { Highest/Lowest values } Hi1:=Highest(x); Lo1:=Lowest(x); { 2~8 highest values } Hi2:=Highest(If(x<Hi1,x,Lo1)); Hi3:=Highest(If(x<Hi2,x,Lo1)); Hi4:=Highest(If(x<Hi3,x,Lo1)); Hi5:=Highest(If(x<Hi4,x,Lo1)); Hi6:=Highest(If(x<Hi5,x,Lo1)); Hi7:=Highest(If(x<Hi6,x,Lo1)); Hi8:=Highest(If(x<Hi7,x,Lo1)); { 2~8 lowest values } Lo2:=Lowest(If(x>Lo1,x,Hi1)); Lo3:=Lowest(If(x>Lo2,x,Hi1)); Lo4:=Lowest(If(x>Lo3,x,Hi1)); Lo5:=Lowest(If(x>Lo4,x,Hi1)); Lo6:=Lowest(If(x>Lo5,x,Hi1)); Lo7:=Lowest(If(x>Lo6,x,Hi1)); Lo8:=Lowest(If(x>Lo7,x,Hi1)); { Choose Nth highest value } Hi:= If(Nth=2,Hi2, If(Nth=3,Hi3, If(Nth=4,Hi4, If(Nth=5,Hi5, If(Nth=6,Hi6, If(Nth=7,Hi7, If(Nth=8,Hi8, Hi1))))))); { Choose Nth lowest value } Lo:= If(Nth=2,Lo2, If(Nth=3,Lo3, If(Nth=4,Lo4, If(Nth=5,Lo5, If(Nth=6,Lo6, If(Nth=7,Lo7, If(Nth=8,Lo8, Lo1))))))); { Plot in own window } x; If(Nth=0,Hi1,Hi); If(Nth=0,Hi2,Hi); If(Nth=0,Hi3,Hi); If(Nth=0,Hi4,Hi); If(Nth=0,Hi5,Hi); If(Nth=0,Hi6,Hi); If(Nth=0,Hi7,Hi); If(Nth=0,Hi8,Hi); If(Nth=0,Lo1,Lo); If(Nth=0,Lo2,Lo); If(Nth=0,Lo3,Lo); If(Nth=0,Lo4,Lo); If(Nth=0,Lo5,Lo); If(Nth=0,Lo6,Lo); If(Nth=0,Lo7,Lo); If(Nth=0,Lo8,Lo) ---8<------------------------------ [/code:1:36ed8e009d] jose '-) http://www.metastocktools.com .
Imothep  
#4 Posted : Monday, August 29, 2005 8:41:11 AM(UTC)
Imothep

Rank: Member

Groups: Registered, Registered Users, Subscribers
Joined: 8/28/2005(UTC)
Posts: 25

Hi, Thank you very much :wink: . It is EXACTLY what I was looking for !!! You are wizards :wink:
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.