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

Notification

Icon
Error

Options
Go to last post Go to first unread
Candlestix  
#1 Posted : Sunday, March 26, 2006 4:30:01 AM(UTC)
Candlestix

Rank: Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/18/2006(UTC)
Posts: 10

Can someone help me with this formula? Thank you ROC(C ,12 ,% )<= 1.5 AND ROC(C ,12 ,% )<= -1.5 I am trying to write an explorer to locate stocks that have a Price ROC of equal to or less than 1.5, Thanks again
StorkBite  
#2 Posted : Sunday, March 26, 2006 8:01:15 AM(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)
Hey CSx- Good question and you are close. :D Column A [ROC] ROC(C,12,%) Filter colA<=1.5 That should do it. Make sure to check out the Formula Primer. There are many, many examples of writing things like this. Good luck, G
Candlestix  
#3 Posted : Sunday, March 26, 2006 12:40:04 PM(UTC)
Candlestix

Rank: Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/18/2006(UTC)
Posts: 10

Thank you for your help. I cut and pasted the formula in the colums as instructed but I still get returns with the Price ROC higher than the designated filter. Let me try to explain better what I would like to do. In column I am running a BB filter. I now need to run a P Roc filter that will only return securities that are near flat line (say no more than +3 or -3 from the 0 line) Any additional help you can give is appreciated. I am looking for the "Formula Prime". I am sure I saw it here in the forum.
wabbit  
#4 Posted : Sunday, March 26, 2006 12:45:41 PM(UTC)
wabbit

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)
Candlestix, You came close with your first attempt... but your logic failed you! ROC(C ,12 ,% )<= 1.5 AND ROC(C ,12 ,% )<= -1.5 Would return only those stocks with ROC(C ,12 ,% ) less than or equalto -1.5 percent. Read it again, carefully and you will see your mistake. If you are looking to have a ROC() fall within a range, or fall outside a range then the Abs() function might be useful. Try Abs(ROC(C ,12 ,% ))<=1.5 this will return all stocks with ROC()<=1.5% AND ROC()>=-1.5 that is falling in the range +1.5 to -1.5 Hope this helps. wabbit :D
StorkBite  
#5 Posted : Sunday, March 26, 2006 1:46:38 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)
Wow, thanks for picking up that fumble Wabbit. It never dawned on me that the question regarded a range... that is, until I reread the original post. Ahh... those 2 am replies... I suppose you could change your filter to colA<=1.5 AND colA>=-1.5 and get it too. :) CSx, you can find the Primer here: http://forum.equis.com/viewtopic.php?t=2906
Candlestix  
#6 Posted : Sunday, March 26, 2006 1:56:06 PM(UTC)
Candlestix

Rank: Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/18/2006(UTC)
Posts: 10

Thanks to both of you for your quick and courteous replies. I have looked at the Absolute value in my Metastock book but I am not sure of one thing, would the formula Abs(ROC(C ,12 ,% ))<=1.5 return the same finding as Abs(ROC(C ,12 ,% ))>=1.5? If not then can you explain to me how the abs formula knows to have a range on each side of 0. Thank you
StorkBite  
#7 Posted : Sunday, March 26, 2006 4:59:42 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)
The ROC can be either negative or positive. ABS() strips the direction and returns the number only. This will result in a list of all the negatives and positives in a certain range being reported as positive. It allows you to avoid using the AND statement that I showed you earlier. Try this... ColA: ROC(C ,12 ,% ) ColB: Abs(ROC(C ,12 ,% )) ColC: Abs(ROC(C ,12 ,% ))<=1.5 ColD: Abs(ROC(C ,12 ,% ))>=1.5 Are ColC and ColD equal? No; so the functions do not return the same values.
Candlestix  
#8 Posted : Sunday, March 26, 2006 5:54:21 PM(UTC)
Candlestix

Rank: Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/18/2006(UTC)
Posts: 10

Thank you very much! Is is clear now. =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.