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

[EquisMetaStock Group] Jose ...can you help



PureBytes Links

Trading Reference Links

Morning everyone.

Jose...I've been tryin to plug in your Cycle-adaptive Exponential 
Moving Avg v1.1 study (found at your tools website) to an 
exploration.  I always seem to come up with an error that a Plot is 
called for and all securities scanned are rejected.  Here's my 
modification to your study..... 

{ Cycle-adaptive Exponential Moving Avg v1.1 }
{ EMA periodicity determined by historical
  price cycle based on ZigZag cycles }
{ ©Copyright 2004 Jose Silva }
{ http://www.metastocktools.com }

pr:=5;
choose:=1;
multi:=2;
x:=6;
shift:=1-0)/100;
plot:=1;

x:=If(x=1,O,If(x=2,H,If(x=3,L,If(x=5,V,If(x=6,P,C)))));
zz:=Zig(x,pr,%);
zzpk:=Ref(zz,-1)>zz AND Ref(zz,-1)>Ref(zz,-2);
zztr:=Ref(zz,-1)<zz AND Ref(zz,-1)<Ref(zz,-2);
PkTr:=zzpk OR zztr;
CycleLen:=PkTr*(Ref(BarsSince(PkTr),-1)+1);
CycleCount:=Cum(PkTr)-1;
CycleCount:=If(CycleCount=0,.000001,CycleCount);
CycleLenAvg:=Cum(CycleLen)/CycleCount;

pds:=If(choose=1,ValueWhen(1,CycleLen>0
 AND CycleCount>0,CycleLen),CycleLenAvg)*multi;
Init:=CycleCount=1 AND Alert(CycleCount<1,2);
pds:=
 If(pds>BarsSince(Init),BarsSince(Init),pds);
pds:=If(pds<1,1,pds);
Ema:=x*2/(pds+1)+PREV*(1-2/(pds+1));
Ema:=Ema*shift;
signals:=Cross(x,Ema)-Cross(Ema,x);

{If(plot=1,Ema,If(plot=2,signals,
 If(plot=3,CycleLen,
 If(plot=4,CycleLenAvg,
 If(plot=5,Stdev(CycleLen,21),pds)))))}


I've put the last series in parens thinkining that would cure the 
necessity of a "plot", with no success.  Any advise you could 
offer???

Thanks in advance,

Jim  









------------------------ Yahoo! Groups Sponsor --------------------~--> 
Check out the new improvements in Yahoo! Groups email.
http://us.click.yahoo.com/6pRQfA/fOaOAA/yQLSAA/BefplB/TM
--------------------------------------------------------------------~-> 

 
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/