PureBytes Links
Trading Reference Links
|
Tim,
I can confirm that the code has errors in it. Remember that TASC is
notorius for not editing code and I'm not sure about article context
sometimes.
As far as duplicating the results, the use of zig renders backtesting
to errors unless you load only needed data. Load only data to 5/30/03
(6/1/03 was a weekend)and you should be able to duplicate.
Using something other than zig to verify flag and pennant formations
would be a great improvement in the coding but I haven't seen anything
else being used.
Here is the enter long code. Maybe someone else will have an idea on
replacing the zig.
{katsanos Enter Long}
ZZ:=Zig(C,17,%);
X:=BarsSince(ZZ < Ref(ZZ,-1) AND Ref(ZZ,-1) > Ref(ZZ,-2));
X1:=LastValue(X)+1; {flag duration}
X2:=X1+1;
SD:=Stdev(C,X2);
PERIOD:=22;
COEF:=.1;
INTRA:=Log(H)-Log(L);
VINTRA:=Stdev(INTRA,PERIOD);
INTER:=Log(Typical())-Log(Ref(Typical(),-1));
VINTER:=Stdev(INTER,PERIOD);
CUTOFF:=COEF*(VINTER+VINTRA)*C;
MF:=C-(H+L)/2+Typical()-Ref(Typical(),-1);
FVE:=Sum(If(MF>CUTOFF,+V,If(MF<-CUTOFF,-V,0)),
PERIOD)/Mov(V,PERIOD,S)/PERIOD*100;
denominator:=Ref(V,-X2);
noZero:=If(denominator=0,0.00001,denominator);
X1<21 AND X1>2 AND {Condition 1}
Ref(LinRegSlope(C,13)/Ref(C,-13)*100,-X1)>2.2{Condition 2}
AND Ref(LinRegSlope(C,X2)/Ref(C,-X2),-1)*100<.2
AND LinRegSlope(C,X1)/Ref(C,-X1)>-1.2 {Condition 3}
AND Ref(LinRegSlope(V,X2)/noZero,-1)*100<-2 {Condition 4}
AND Ref(LinRegSlope(SD,X1),-1)<0 {Condition 5}
AND Stoch(20,3)>55 AND ADX(10)>30{Condition 6}
AND FVE>10 AND Fml("VFI")>-3 {Condition 7}
AND C>Ref(C,-1) AND C>O {Condition 8}
{end}
Preston
--- In equismetastock@xxxxxxxxxxxxxxx, "kopchic2" <kopchic2@xxxx> wrote:
>
>
> I'm not gonna post it here because I'm not sure if thats copyright
> infringement. I had some trouble duplicating the results that the
> author showed in his article. I copied the code directly from the
> website and did notice and error in the second line of the exit code
> on TASC's website. I corrected this to match the article, but I was
> still unable to duplicate the results in the system tester. I made
> sure to test the same stocks and date ranges. All the same setting.
> I was just wondering if anyone else had this problem.
>
> thanks,
> Tim
------------------------ Yahoo! Groups Sponsor --------------------~-->
What would our lives be like without music, dance, and theater?
Donate or volunteer in the arts today at Network for Good!
http://us.click.yahoo.com/Tcy2bD/SOnJAA/cosFAA/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/
|