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

Notification

Icon
Error

Options
Go to last post Go to first unread
moneypick  
#1 Posted : Monday, September 11, 2006 8:58:00 AM(UTC)
moneypick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/29/2004(UTC)
Posts: 32

Hi,

Buy condition: cross(stoch(14,1),20)

Sell condtion: cross(80,stoch(14,1)) or When close cross the 90% of Buy price or the

90% price when Last buy signal generated.

I want your help to convert this conditon (When close cross the 90% of Buy price or the

90% price when Last buy signal generated ) into metastock code.

Regards,

(moneypick)

wabbit  
#2 Posted : Monday, September 11, 2006 10:51:28 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)

moneypick,

see http://forum.equis.com/forums/thread/20672.aspxng entry based exit criteria.

wabbit [:D]

moneypick  
#3 Posted : Monday, September 11, 2006 12:09:10 PM(UTC)
moneypick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/29/2004(UTC)
Posts: 32

Respected Wabbit,

Thanks for quick reply.

I create the metastock code for above condition with the help of your example:

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

N:=Cross(stoch(14,1),20);

X:=Cross(80,(Stoch(14,1));

StopLoss:=0.9; {percentage multiplier of the trade entry price}

Tr:=If(PREV=0,If(N,CLOSE,0),If(X OR C<=PREV*StopLoss,0,PREV));
Tr;

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

Is it correct?

(moneypick)

wabbit  
#4 Posted : Monday, September 11, 2006 5:21:30 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)

moneypick wrote:
Code:

N:=Cross(stoch(14,1),20);
X:=Cross(150,(Stoch(14,1));
StopLoss:=0.9; {percentage multiplier of the trade entry price}
Tr:=If(PREV=0,If(N,CLOSE,0),If(X OR C<=PREV*StopLoss,0,PREV));
Tr;
Check your X condition, but the rest looks OK for what you are trying to achieve. Are the results as you expect?

I don't think having a fixed 10 percent below the entry price is going to do you any favours? I prefer some sort of trailing stop.

wabbit [:D]

moneypick  
#5 Posted : Tuesday, September 12, 2006 8:06:09 AM(UTC)
moneypick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/29/2004(UTC)
Posts: 32

Thanks Wabbit for your kind help.
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.