[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[EquisMetaStock Group] Expert adviser formula



PureBytes Links

Trading Reference Links

Hi all,

 

I'm trying to figure out some code I have but can't quite
understand 
one section. Can anyone explain in "English" what it is
I'm trying 
to achieve? (I know that sounds weird, but I had a friend help me 
out with some code and I've forgotten exactly what it's meant
to do 
plus I should be using code I'm not 100% confident about)

 

System is based on a triple moving average 
N is the signal variable ie buy 
 

 

SMA:=Mov(C,20,E);

MMA:=Mov(C,60,E);

LMA:=Mov(C,120,E);

 

N:=C>SMA AND C>MMA AND C>LMA

AND

{No Cross() function used for MA cross overs, not sure if this the 
best alternative, heard the Cross() functions has its limitations}

SMA>MMA AND MMA>LMA

AND 

{ROC() used to highlight that a MA is rising}

ROC(SMA,8,%)>0 AND ROC(MMA,10,%)>0 AND ROC(LMA,6,%)>0

AND 

{Alert used to pickup pull backs in momentum}

Alert(RSI(C,7)<=38,20); 

 

N:=N 

AND

Alert(N=1,2); {lets me know when I have a binary 1 (buy signal) in 
the last 2 days}

{C1 gives me the closing price when my first signal (N) was achieved}

C1:=ValueWhen(1,N,C);

{Today's close must be > the signal close price}

C>C1 AND Ref(C,-1)<=C1

AND

{NOT SURE ABOUT THIS LAST LINE?? Is it to do with being in the trade 
for at least 5 days? Why multiply by the Close?}

BarsSince(N)<=5*C

 

 

Regards,

Lou







 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/equismetastock/

<*> To unsubscribe from this group, send an email to:
    equismetastock-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/