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

Notification

Icon
Error

Options
Go to last post Go to first unread
saeedi  
#1 Posted : Monday, July 17, 2006 4:57:10 PM(UTC)
saeedi

Rank: Newbie

Groups: Registered, Registered Users
Joined: 7/17/2006(UTC)
Posts: 3

i am new to metastock i would like to build explorer indicator that will show me stocks that will make 52 week high and then trade below this high for 20 bars or more and the lowest low in this range will be 10% from 52 week high and the stock will be in the list until it goes below 10% or a new 52 week high reached. Also the same rules for stock making 52 week low then trade for 20 bars or more above the low and the highest high in this range is 10% above 52 week low. can some body help to do this indicator. Thank you.
wabbit  
#2 Posted : Tuesday, July 18, 2006 12:39:24 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)
saeedi, Welcome to the Forum. You have joined us at an exciting time as we are just about to migrate the entire Forum into the new system, providing faster browsing, searching and a whole lot more functionality. As for your problem; there has been enough written about 52week highs and lows to sink a battleship. Have a read through the Forum, or wait until the new Forum gets its proper search function back. There is enough code for you to use and modify. Combine the 52week high and low codes with the LowestSince() function and the HighestSince() function and your problem is solved. Have a read through your MS Users Manual for the functions. If you do not want to take the time to learn the MSFL and coding, please employ a professional programmer who can do the work for you. wabbit :D
saeedi  
#3 Posted : Tuesday, July 18, 2006 5:09:56 PM(UTC)
saeedi

Rank: Newbie

Groups: Registered, Registered Users
Joined: 7/17/2006(UTC)
Posts: 3

Thanx Wabbit for the help i used Lowsincebars and HighsinceBars . Also i have one more quistion i test this code in Expert Advisor to plot symbol on the price Bars and i would like to use code in explorer i would liket to get only symbols that shows signal Today(recent data in my database) and to ignore perivious signals. If you can tell me which code to use that i can add it to my conditions statments. Thank you.
wabbit  
#4 Posted : Thursday, July 20, 2006 5:45:31 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)
saeedi, If you post your code that you use for your expert advisor symbols, then we can turn that into an exploration... wabbit :D
saeedi  
#5 Posted : Thursday, July 20, 2006 12:43:14 PM(UTC)
saeedi

Rank: Newbie

Groups: Registered, Registered Users
Joined: 7/17/2006(UTC)
Posts: 3

a:= FmlVar("52 Week","YEARHISIGNALS") ; b:=BarsSince(a); g:=HighestSinceBars(1,a,HIGH); f:=LowestSinceBars(1,a,LOW); move:=Mov(CLOSE,200,E); k:=f/g; If((b>=20) AND (k>=0.85) AND (CLOSE>move),1,0) ;
wabbit  
#6 Posted : Thursday, July 20, 2006 2:31:02 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)
You dont actually need to change anything here.... just put it in your exploration filter... (just make one minor change to the last line) --8<---------------------------- {filter} a:= FmlVar("52 Week","YEARHISIGNALS") ; b:=BarsSince(a); g:=HighestSinceBars(1,a,HIGH); f:=LowestSinceBars(1,a,LOW); move:=Mov(CLOSE,200,E); k:=f/g; (b>=20) AND (k>=0.85) AND (CLOSE>move); --8<---------------------------- Make sure you load at least 1000 bars of data ( 200 period EMA x 5 = 1000 ) to make the results of the exploration match the results on your charts! wabbit :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.