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

Notification

Icon
Error

Options
Go to last post Go to first unread
termi21  
#1 Posted : Sunday, June 3, 2007 4:41:59 PM(UTC)
termi21

Rank: Member

Groups: Registered, Registered Users, Unverified Users
Joined: 3/15/2006(UTC)
Posts: 16

Hello! I have another question about a custom Expert i am make...

Is there a built in formula command so as to make it give a positive result (buy or sell) only for the first signal of a row possible or negative signal. I was thinking of making it to compare the value (0 or 1) of the previous day, but the formulas are too many and it's not productive :)

Thank you in advance,

Termi

Jose  
#2 Posted : Sunday, June 3, 2007 7:03:32 PM(UTC)
Jose

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 1/19/2005(UTC)
Posts: 1,065
Location: Koh Pha-Ngan, Earth

Was thanked: 2 time(s) in 2 post(s)
Termi, post your existing code at the Trader's Consortium MetaStock forum, and we'll have the MetaStock experts take a good look at it and offer a workable solution. jose '-)
hayseed  
#3 Posted : Monday, June 4, 2007 7:30:18 AM(UTC)
hayseed

Rank: Advanced Member

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

hey termi..... yes you can compare any signal to any other signal and make a buy/sell decision.....so todays 'emc' negative or sell signal can be compared to any prior days signal or any signal on any other security...

without more to go on thats about the best i can help..... if more help is needed just holler back.....h

termi21  
#4 Posted : Monday, June 4, 2007 9:51:15 AM(UTC)
termi21

Rank: Member

Groups: Registered, Registered Users, Unverified Users
Joined: 3/15/2006(UTC)
Posts: 16

What i want to do is something like this

a:=Mov(C,3,E) > Mov(C,70,E);

b:=(the same but for the previous day)

if(b=a,0,1)

So if there is a row of "1" signals only the first to be plotted on the graph.

But, if the formula is not that simple, and is derived from many calculations, is there a command that can tell Metastock what i want to do, without re-writting all the formulas for the previous day and then compare? In simpler words, i want the Expert to work like the option that exists in System Tester "Limit number of simultaneous positions to 1". I want the Explorer to give a buy signal only if it is the first one after a "sell" signal and the oposite.

hayseed  
#5 Posted : Monday, June 4, 2007 11:01:03 AM(UTC)
hayseed

Rank: Advanced Member

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

hey termi21.... there are several ways to achive that..... slightly modifying your code is perhaps one of the best methods..... it should plot a 1 only on the initial day the new buy/cross occurs.....holler back if more is needed.....h

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

a:=Mov(C,3,E) > Mov(C,70,E);

b:=Ref(a,-1);

If((a=1 AND b=0),1,0)

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

a second popular method would be to use the cross function..... it also only plots a 1 on the initial day of the cross.....such as;

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

Cross(Mov(C,3,E),Mov(C,70,E))

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

termi21  
#6 Posted : Monday, June 4, 2007 12:16:08 PM(UTC)
termi21

Rank: Member

Groups: Registered, Registered Users, Unverified Users
Joined: 3/15/2006(UTC)
Posts: 16

Thanx man you are the best!... I knew there should be an easy way to do 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.