PureBytes Links
Trading Reference Links
|
Dimitris,
I pasted the code listed below into the Automatic Analysis window and
ran an optimization from Jan 1 2000 thru July 2 2002 with the
following optimization results:
Z = 15
D1 = 14
D2 = 16.5
But there are no trades after Oct 4, 2001!
Obviously I'm doing something wrong.
My Settings are:
Positions = long and short
commissions = 20 points ( I am assuming that this is $20)
Buy/sell/short/cover = open with delay of 1
Max Stop Loss of 10% with exit at stop
Profit target and trailing stop are disabled.
What am I doing wrong?
R=500*(H-L)/(H+L);
Z=Optimize("Z",10,5,20,5);
RRR=DEMA(R,Z);
Rmin=LastValue(Lowest(R));RminF=floor(LastValue(Lowest(R)))+1;
Rmax=LastValue(Highest(R));RmaxC=ceil(LastValue(Highest(R)))-1;
RRRmin=LastValue(Lowest(RRR));RRRminF=floor(LastValue(Lowest(RRR)))+1;
RRRmax=LastValue(Highest(RRR));RRRmaxC=ceil(LastValue(Highest(RRR)))-
1;
D1=Optimize("D1",14,RRRminF,RRRminF+0.5*(RRRmaxC-RRRminF),1);
D2=Optimize("D2",16.5,RRRminF+0.5*(RRRmaxC-RRRminF),RRRmaxC,1);
F1=RRR>=D2;F2=RRR<=D1;
Sell=F2;Buy=F1;
Buy=ExRem(Buy,Sell);Sell=ExRem(Sell,Buy);
Short=Sell;Cover=Buy;
Short=ExRem(Short,Cover);Cover=ExRem(Cover,Short);
Plot(R,"D-ratio",1,1);Plot(RRR,"DEMA D-ratio",7,8);
Plot(D2,"Buy Level",5,1);Plot(D1,"Sell Level",4,1);
--- In amibroker@xxxx, "dtsokakis" <TSOKAKIS@xxxx> wrote:
> Sometimes it is good to estimate the efficiency of your tool.
> Read http://groups.yahoo.com/group/Trading_Systems/message/588 to
see
> better.
> Dimitris Tsokakis
|