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

[EquisMetaStock Group] Re: Expert adviser formula



PureBytes Links

Trading Reference Links

I'll have a go, see below

Regards
MG Ferreira
TsaTsa EOD Programmer and trading model builder
http://www.ferra4models.com
http://fun.ferra4models.com 


--- In equismetastock@xxxxxxxxxxxxxxx, loudhoward2 <no_reply@xxxx> wrote:
> 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
> 

if the latest close is above all three moving averages

> AND

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

the short is above the medium and the medium above the slow moving
average (translate - trend is very strong, question - will it be
sustainable)

> 
> AND 

and ...

> 
> {ROC() used to highlight that a MA is rising}
> 
> ROC(SMA,8,%)>0 AND ROC(MMA,10,%)>0 AND ROC(LMA,6,%)>0


short moving average is higher than 8 days ago, medium is higher than
ten and slow is higher than 6 days ago



> 
> AND 

and ....


> 
> {Alert used to pickup pull backs in momentum}
> 
> Alert(RSI(C,7)<=38,20); 


7 day RSI has been less than 38 during any of the previous 20 days

> 
>  
> 
> N:=N 


Huh? Is this really needed?  Why not continue the formula, or am I
missing something.....


> 
> 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
> 
>  

Huh?  Doesn't make a lot of sense.  If you use the close in the
formula in this way, then it will only work for some tickers.


> 
>  
> 
> 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/