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

Notification

Icon
Error

Options
Go to last post Go to first unread
EFHL62  
#1 Posted : Friday, April 1, 2011 6:28:04 PM(UTC)
EFHL62

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 5/6/2009(UTC)
Posts: 9

How can one write the expression:

RSI(14) today must be above RSI(14) yesterday {I can do that} AND

The Lowest value of RSI(14) within the last 20 days must have been < 18

{I don't know how to write the 2nd part. All the LLV, LowestSince, etc... expressions seem to want to do is return the value for what the lowest low was, or how many bars since, etc... That's of no importance or use. I'm looking for the ability to know when a FML has indeed been beneath a certain threshold value within the last "x" days. And, today is higher than yesterday; the easy part to write).

Thank you one and all! I'm stumped.
johnl  
#2 Posted : Friday, April 1, 2011 7:01:24 PM(UTC)
johnl

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 11/7/2005(UTC)
Posts: 602

How about:

{RSI(14) today must be above RSI(14) yesterday {I can do that} AND}
a1:=RSI(14);
a2:=a1>Ref(a1,-1);
{The Lowest value of RSI(14) within the last 20 days must have been < 18}
a3:=LLV(a1,20);
a4:=a3<18;
a5:=a2*a4;
a5


EFHL62  
#3 Posted : Friday, April 1, 2011 7:46:17 PM(UTC)
EFHL62

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 5/6/2009(UTC)
Posts: 9

I think you're on to something! In EXPLORER, however, after using this, I get the message (for "a1") that it isn't "a recognized name, constant or operator".

What am I missing? Or, better put, how do I type this coding into the EXPLORATION EDITOR as one of it's "tabs" (A, B, C, etc...)? If u know.

Thanks again!
wabbit  
#4 Posted : Saturday, April 2, 2011 5:26:59 AM(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)
EFHL62,
I think you might benefit from doing a little more homework with the MS User manual and free Equis Formula Primer to get a better understanding of the MS functions and also how to see and correct simple syntax errors in your codes (such as you have this a1 situation).

In the mean time, you can use explorer columns to see the result of the search criteria and use Colx=1 in the filter, but this is slow and I don't think a column of 1's is really that helpful? As you are looking for "defined" values, it might be more appropriate to see those values in the column and use the filter for what it is designed to do, something like:

Code:

{col A - RSI}
RSI(14);

{col B - minRSI}
ind:=RSI(14);
LLV(ind,20);

{filter}
ind:=RSI(14);

ROC(ind,1,%)>0 AND
LLV(ind,20)<18;



wabbit [:D]

[edit]
FYI, the second part of the problem can also be coded using the Alert() function:
Code:

Alert(ind<18,20);


EFHL62  
#5 Posted : Saturday, April 2, 2011 12:15:33 PM(UTC)
EFHL62

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 5/6/2009(UTC)
Posts: 9

Ah yes, I got it after a while. The "a1", etc... were just placemarkers for filling in the formula. I went that route rather than using many columns, but I see where that would work too.

The "ind" is not something I've seen before. I assume I'll find it in Meta ver 10? I like the simplicity using it offers.

Thanks so much for your input!


EFHL62  
#6 Posted : Saturday, April 2, 2011 12:30:27 PM(UTC)
EFHL62

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 5/6/2009(UTC)
Posts: 9

Oh, OK, "ind" is just another placemarker like a1, a2... Haven't used these before. Which is why my formulas look so long vs these. Thanks for all your tips!
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.