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

Notification

Icon
Error

Options
Go to last post Go to first unread
analias  
#1 Posted : Tuesday, August 4, 2009 9:12:32 AM(UTC)
analias

Rank: Newbie

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

Hello,

Please have a look at the "Buy" code below:
A>=B
AND
C<=D
AND
E>=F
AND
Cross(G,H)

This piece of code works like this: When G crosses over H and at that bar
if the other conditions met, Buy!

However, G might have already crossed H (G>H) and one of the other conditions had
not met yet. I mean, G may cross over H at the ninth bar and at that time since E<F there is no signal produced. At the tenth bar E may be over F, however there would be no signal because G crossed over H a bar ago. So if I convert the code into the following:
A>=B
AND
C<=D
AND
E>=F
AND
G>=H

This time, there would be several continuous signals one after another. But I only need the
first one after the last (Sell) signal.

How could I tell MetaStock to use only the first Buy signal after the last (Sell) signal and override the rest?

hatem  
#2 Posted : Thursday, August 6, 2009 4:46:56 AM(UTC)
hatem

Rank: Member

Groups: Registered, Registered Users
Joined: 10/6/2008(UTC)
Posts: 15

i suggest you use ALERT code

so you should give all your previous coding a name like xyz

alert((fml("xyz")=1),30)

try it

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.