Help in making an Explorer

#1
Help in making an Expert

SORRY MY MISTAKE - THIS IS NOT AN EXPLORER, BUT AN EXPERT

Dear friends,

I need some help to build an Expert in Metastock:

Buy Signal - I have already programmed this. Lets call this condition XBUY.

Sell Signal - Lets call it XSELL. It must obey either of the following conditions:
----
1. Price has gone down to 5% or less of the entry price.
OR
2. Price has risen to 5% or more of the entry price.
----

Obs.: IMPORTANT - there must not be simultaneous trades, that is, a buy signal must only appear after a sell signal that ends the prior trade. For each buy there must be only one sell and vice-versa.

Thanks in advance!
 
Last edited:

oxusmorouz

Well-Known Member
#2
Re: Help in making an Expert

SORRY MY MISTAKE - THIS IS NOT AN EXPLORER, BUT AN EXPERT

Dear friends,

I need some help to build an Expert in Metastock:

Buy Signal - I have already programmed this. Lets call this condition XBUY.

Sell Signal - Lets call it XSELL. It must obey either of the following conditions:
----
1. Price has gone down to 5% or less of the entry price.
OR
2. Price has risen to 5% or more of the entry price.
----

Obs.: IMPORTANT - there must not be simultaneous trades, that is, a buy signal must only appear after a sell signal that ends the prior trade. For each buy there must be only one sell and vice-versa.

Thanks in advance!
Buy Rule:

Buy:= XBuy;
Sell1:= C < .95*Ref(C,-1) ;
Sell2:= C > 1.05*Ref(C,-1);
Sell:= Sell1 or Sell2;
Binary:= If(BarsSince(Buy) < BarsSince(Sell),1,0);

Binary > Ref(Binary,-1);

x--------------------------------------------------x
Sell rule:

Buy:= XBuy;
Sell1:= C < .95*Ref(C,-1) ;
Sell2:= C > 1.05*Ref(C,-1);
Sell:= Sell1 or Sell2;
Binary:= If(BarsSince(Buy) > BarsSince(Sell),1,0);

Binary > Ref(Binary,-1);

x--------------------------------------------------x
 

Similar threads