PDA

View Full Version : Expert advisor Help


gapellegrini
19th October 2004, 03:54 PM
Hi Jose , how are you?
I have this Formula.

El
Mov(C,14,S) > Mov(C,25,S) AND Mov(C,120,S) > Mov(C,200,S) AND ADX(26) > ADX(28)

Cl
Mov(C,14,S) < Mov(C,25,S)

Es
Mov(C,14,S) < Mov(C,25,S)
AND Mov(C,120,S) < Mov(C,200,S) AND ADX(26) > ADX(28)

Cs
Mov(C,14,S) > Mov(C,25,S)


I ´d like to use this system with the expert advisor for intraday trade.

Thanks
Gabriel

Jose
20th October 2004, 12:07 AM
MetaStock -> Tools -> Expert Advisor -> New -> Symbols -> New -> copy & paste each formula into a new symbol.

Easy huh? :)

jose '-)

gapellegrini
29th October 2004, 11:18 PM
hehehehheeheheeheeheheh.
The problem with this formula is: 1 if I insert each formula in a simbol , every bar in the chart will have a simbol , and not only when the condition change.
2 - If I insert the formula in the highlight , when the adx ( in the entry formula) cross , the highlighted area will desapear with the system on the position.

Thanks
Gabriel

Jose
30th October 2004, 04:41 AM
For your Long signals:


&#123; EntryLong &#125;
In&#58;=Mov&#40;C,14,S&#41;>Mov&#40;C,25,S&#41;
AND Mov&#40;C,120,S&#41;>Mov&#40;C,200,S&#41;
AND ADX&#40;26&#41;>ADX&#40;28&#41;;

&#123; ExitLong &#125;
Out&#58;=Mov&#40;C,14,S&#41;<Mov&#40;C,25,S&#41;;

&#123; Cleanup signals &#125;
Init&#58;=Cum&#40;In+Out>-1&#41;=1;
InInit&#58;=Cum&#40;In&#41;=1;
flag&#58;=BarsSince&#40;Init OR In&#41;
<BarsSince&#40;Init OR Out&#41;+InInit;
signals&#58;=&#40;InInit AND Alert&#40;InInit=0,2&#41;
OR flag AND Alert&#40;flag=0,2&#41;&#41;
-&#40;flag=0 AND Alert&#40;flag,2&#41;&#41;;

&#123; Long signals &#125;
signals


For your Short signals:

&#123; EntryShort &#125;
In&#58;=Mov&#40;C,14,S&#41;<Mov&#40;C,25,S&#41;
AND Mov&#40;C,120,S&#41;<Mov&#40;C,200,S&#41;
AND ADX&#40;26&#41;>ADX&#40;28&#41;;

&#123; ExitShort &#125;
Out&#58;=Mov&#40;C,14,S&#41;>Mov&#40;C,25,S&#41;;

&#123; Cleanup signals &#125;
Init&#58;=Cum&#40;In+Out>-1&#41;=1;
InInit&#58;=Cum&#40;In&#41;=1;
flag&#58;=BarsSince&#40;Init OR In&#41;
<BarsSince&#40;Init OR Out&#41;+InInit;
signals&#58;=&#40;InInit AND Alert&#40;InInit=0,2&#41;
OR flag AND Alert&#40;flag=0,2&#41;&#41;
-&#40;flag=0 AND Alert&#40;flag,2&#41;&#41;;

&#123; Short signals &#125;
signals


jose '-)