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

Notification

Icon
Error

Options
Go to last post Go to first unread
daiwa  
#1 Posted : Saturday, October 20, 2007 9:51:02 AM(UTC)
daiwa

Rank: Member

Groups: Registered, Registered Users, Subscribers
Joined: 8/27/2006(UTC)
Posts: 16
Location: Finland

I am trying to use scanner adding some oscillators, let´s say that ie. I want to scan stocks in my database and show which one stocastic 8,3 occured, but then adding additional condiditon like swho only those if previous day candle made something else. It´s easy to scan specific parameters and when they happened, but if one need to add additional paramaters from history bars only before formula would come true.

1)

Cross(80,Stoch(8,3)) (occured today)

Cross(100,CCI(30)) (occured yesterday)

2)

Cross(80,Stoch(8,3)) (occured today)

Cross(100,CCI(30)) (occured ie. in last 5 days)




hayseed  
#2 Posted : Wednesday, October 24, 2007 5:48:59 AM(UTC)
hayseed

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/7/2005(UTC)
Posts: 1,346

hey diawa..... have you tried using the alert function for the backdated occurence, it might work.....

also something like below.... don't have metastock to test so might codes might be a little off....h

a:=Alert(cross(100,CCI(30),5); {occured in last 5 days}

aa:=Cross(80,Stoch(8,3)) ; {occured today}

a and aa

daiwa  
#3 Posted : Wednesday, October 24, 2007 7:55:56 PM(UTC)
daiwa

Rank: Member

Groups: Registered, Registered Users, Subscribers
Joined: 8/27/2006(UTC)
Posts: 16
Location: Finland

Hello Hayseed,

Adding a day function gives me error "end of formula required".

(cross(100,CCI(30),5);

I rather not prefer using alert fuction in scanner, I think it´s more meant to use as on-line alert service as I do use metastock mostly offline as a scanner.

The same 5 day function I would like to add to this formula>

Cross(Stoch(5,3),20)
AND
(
Cross(RSI(21),30)
OR
Cross(RSI(30),30)
OR
Cross(RSI(34),30)
OR
Cross(RSI(55),30)
)
AND
Cross(C,Mov(C,200,S))


hayseed  
#4 Posted : Wednesday, October 24, 2007 9:22:46 PM(UTC)
hayseed

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/7/2005(UTC)
Posts: 1,346

hey diawa..... that was my error, i left out a " ) " , the corrected code is below...... the alert function is often used to extend a signal much in the same way your wanting for end of day explorations....

give it a try and you'll see it's perfect for your use.....

----------------------------

a:=Alert(Cross(100,CCI(30)),5); {occured in last 5 days}

aa:=Cross(80,Stoch(8,3)) ; {occured today}

a AND aa

----------------------------

your code below has an lot of crosses.... makes me wonder if they will ever occur on the same bar.....h

Cross(Stoch(5,3),20)
AND
(
Cross(RSI(21),30)
OR
Cross(RSI(30),30)
OR
Cross(RSI(34),30)
OR
Cross(RSI(55),30)
)
AND
Cross(C,Mov(C,200,S))

you might be able to write as here below...
--------------------------------------

a:=Alert(Cross(100,CCI(30)),5); {occured in last 5 days}
aa:=Cross(Stoch(5,3),20);
aaa:=Cross(RSI(21),30) OR Cross(RSI(30),30) OR Cross(RSI(34),30) OR Cross(RSI(55),30);
aaaa:=Cross(C,Mov(C,200,S));


a and aa and aaa and aaaa

------------------------------------

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.