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

[amibroker] Re: C vs (H+L)/2



PureBytes Links

Trading Reference Links

Willem,
it is nice to find out your own parameters...
As for my comment, when the trades last for a long time [as in a slow 
system] you may have a great damage. The DEMA cross will act as a 
stop loss in this case and save some good profits.
Dimitris Tsokakis
--- In amibroker@xxxxxxxxxxxxxxx, "willem1940" <w.j.a.struyck@xxxx> 
wrote:
> Dimitris,
> I applied your suggestion to my reference system CCT StochRSI. 
> Initially I found no improvement, actually in most cases the result 
> became worse. Only when I started to play with the exitlong and 
> lengthened by a simple optimization the period (ti) some 
improvement 
> was achieved (a couple of precent improvement in net profit and 
less 
> loosing trades. See the formula below. For good orders sake the 
> parameters for the StochRSI were first established in the CCT 
> StochRSI system without the smooting addition. Subsequently the 
> result was copied into the system with your smoothing system.
> What I don't understand is your comment about heavy losses in the 
> previoius work. Where did you observe this?
> 
> Period=5;
> period1=25;
> delta=14;
> 
> //Period = Optimize("Period", period,5,15,2); 
> //Period1 = Optimize("Period1", period1,15,40,2); 
> //delta=Optimize("Delta",delta,2,20,2);
> 
> Buy = Cross(delta, TEMA((RSI(period)-LLV(RSI(period),period1))/ (HHV
> (RSI(period),period1)- (LLV(RSI(period),period1))),3)*100); 
> Sell = Cross(TEMA((RSI(period)-LLV(RSI(period),period1))/ (HHV(RSI
> (period),period1)- (LLV(RSI(period),period1))),3)*100, 100-delta); 
> 
> Y=9;
> t0=10;
> t2=8;
> //x=22;
> ti=8;
> 
> t0=Optimize("t0",t0,1,15,1);
> t2=Optimize("t2",t2,1,10,1);
> Y=Optimize("Y",y,0,9,1);
> //ti=Optimize("ti",ti,0,10,1);
> e0=Equity();
> R0=DEMA(e0,T0);
> 
> // Apply cascade smoothing
> R1=DEMA(R0,T0);
> R2=DEMA(R1,T0);Plot(R2,"",1,8);
> R3=DEMA(R2,T0);
> R4=DEMA(R3,T0);Plot(R4,"",4,8);
> R5=DEMA(R4,T0);
> R6=DEMA(R5,T0);Plot(R6,"",7,8);
> R7=DEMA(R6,T0);
> R8=DEMA(R7,T0);Plot(R8,"",5,8);
> R9=DEMA(R8,T0);
> R10=DEMA(R9,T0);Plot(R10,"",2,8);
> // Select smoothing level
> 
> e1=IIf(Y==0,R0,
> IIf(Y==1,R1,
> IIf(Y==2,R2,
> IIf(Y==3,R3,
> IIf(Y==4,R4,
> IIf(Y==5,R5,
> IIf(Y==6,R6,
> IIf(Y==7,R7,
> IIf(Y==8,R8,
> IIf(Y==9,R9,R10))))))))));
> e2=DEMA(e1,t2);
> // Select trading bars 
> 
> //X=Optimize("X",X,10,30,2);
> 
> //Buy=Cross(0,e1);
> //Buy=ExRemSpan(Buy,X);
> exitLong=BarsSince(Buy)>ti AND e1<e2; 
> //Sell=Ref(Buy,-X);
> Sell=Sell OR exitLong;
> Short=Sell;Cover=Buy;
> Plot(e1,"",9,8);
> 
> Buy = ExRem( Buy, Sell ); Sell = ExRem( Sell, Buy ); 
> Short = ExRem( Short, Cover ); Cover = ExRem( Cover, Short ); 
> buybars = BarsSince( Buy );sellbars = BarsSince( Sell );
> coverbars = BarsSince( Cover );shortbars = BarsSince( Short );
> 
> Willem Jan
> 
> a differen--- In amibroker@xxxxxxxxxxxxxxx, "DIMITRIS TSOKAKIS" 
> <TSOKAKIS@xxxx> wrote:
> > Willem
> > Weak or slow systems [less than 5trades/year]] sometimes need an 
> > Equity conditional exit rule which usually improves the final 
> > performance.
> > In the following code I placed a 3-bar filter [to avoid the small 
> > drawdown caused by the 0.5% commission] and give an additional 
Exit 
> > rule, whenever the e1 falls below e2.
> > You will miss the enthusiastic pull backs, but you will surely 
> avoid 
> > the undesirable huge losses.
> > 
> > // Equity conditional exit
> > Buy=...;// your buy rule
> > Sell=...;// your sell rule
> > Buy=ExRem(Buy,Sell);Sell=ExRem(Sell,Buy);
> > t0=10;// Optimize("t0",5,5,10,5);
> > t2=10;// Optimize("t2",5,5,10,5);
> > y=Optimize("Y",7,0,10,1);
> > e0=Equity();
> > // smoothed Equity lines
> > R0=DEMA(e0,T0);
> > R1=DEMA(R0,T0);
> > R2=DEMA(R1,T0);
> > R3=DEMA(R2,T0);
> > R4=DEMA(R3,T0);
> > R5=DEMA(R4,T0);
> > R6=DEMA(R5,T0);
> > R7=DEMA(R6,T0);
> > R8=DEMA(R7,T0);
> > R9=DEMA(R8,T0);
> > R10=DEMA(R9,T0);
> > // Select smoothing factor
> > e1=IIf(Y==0,R0,
> > IIf(Y==1,R1,
> > IIf(Y==2,R2,
> > IIf(Y==3,R3,
> > IIf(Y==4,R4,
> > IIf(Y==5,R5,
> > IIf(Y==6,R6,
> > IIf(Y==7,R7,
> > IIf(Y==8,R8,
> > IIf(Y==9,R9,R10))))))))));
> > e2=DEMA(e1,t2);
> > // Conditional Exit
> > exitLong=BarsSince(Buy)>3 AND e1<e2; 
> > Sell=Sell OR exitLong;
> > Buy=ExRem(Buy,Sell);Sell=ExRem(Sell,Buy);
> > Dimitris Tsokakis
> > 
> >  
> > --- In amibroker@xxxxxxxxxxxxxxx, "Willem Jan A. Struyck" 
> > <w.j.a.struyck@xxxx> wrote:
> > > Dimitris,
> > > 
> > > For evaluation purposes I took the basket of my selection of 
> > favorite Robeco
> > > funds and evaluated them against the system I currently use.
> > > Backtesting over 1 year. Optimized till I found the best set of 
> > parameters.
> > > By lack of another name I named your formula's platform 1, 2 
and 
> 3.
> > > 2 and 3 clearly give better results ocmpared to 1 although the 
> > difference
> > > between 2 and 3 is not that great.
> > > Generally I found for my basket Y=3 or 2 giving the best result.
> > > 
> > > To study the outcome I have attached the respective reports.
> > > 
> > > Willem jan
> > > 
> > > 
> > > Message: 14
> > >    Date: Thu, 10 Jul 2003 19:07:30 -0000
> > >    From: "DIMITRIS TSOKAKIS" <TSOKAKIS@xxxx>
> > > Subject: Re: C vs (H+L)/2 [part two]
> > > 
> > > Willem,
> > > sorry for the delay, the day was not easy.
> > > We may apply DEMA smoothing many times with two main results : 
The
> > > amplitude increment and the phase transition to the right.
> > > The cascade phase transition can immitate the impulse of ^NDX 
> > changes
> > > to other markets.
> > > Y=5 is fine for the long term NDX study, Y=8 for DAX, Y=10 for 
> FCHI
> > > etc.
> > > For indicator builder or AA window use the example
> > > 
> > > N="^NDX";
> > > O=Foreign(N,"O");H=Foreign(N,"H");L=Foreign(N,"L");C=Foreign
> (N,"C");
> > > T1=5;R0=RSIA(C,T1)-RSIA((H+L),T1);
> > > 
> > > t0=50;R0=DEMA(R0,T0);
> > > 
> > > // Apply cascade smoothing
> > > R1=DEMA(R0,T0);
> > > R2=DEMA(R1,T0);Plot(R2,"",1,8);
> > > R3=DEMA(R2,T0);
> > > R4=DEMA(R3,T0);Plot(R4,"",4,8);
> > > R5=DEMA(R4,T0);
> > > R6=DEMA(R5,T0);Plot(R6,"",7,8);
> > > R7=DEMA(R6,T0);
> > > R8=DEMA(R7,T0);Plot(R8,"",5,8);
> > > R9=DEMA(R8,T0);
> > > R10=DEMA(R9,T0);Plot(R10,"",2,8);
> > > // Select smoothing level
> > > Y=Optimize("Y",10,0,10,1);
> > > R=IIf(Y==0,R0,
> > > IIf(Y==1,R1,
> > > IIf(Y==2,R2,
> > > IIf(Y==3,R3,
> > > IIf(Y==4,R4,
> > > IIf(Y==5,R5,
> > > IIf(Y==6,R6,
> > > IIf(Y==7,R7,
> > > IIf(Y==8,R8,
> > > IIf(Y==9,R9,R10))))))))));
> > > // Select trading bars
> > > X=Optimize("X",28,5,30,1);
> > > Buy=Cross(0,R);Buy=ExRemSpan(Buy,X);Sell=Ref(Buy,-X);
> > > Plot(R,"",9,8);
> > > 
> > > to investigate the rhytm of ^NDX affection to other markets.
> > > Dimitris Tsokakis


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Naturally Painless & Spray Away Backaches & Joint Pain. $19.97
http://www.challengerone.com/t/l.asp?cid=2867&lp=m331.html
http://us.click.yahoo.com/tJIe0D/79VGAA/ySSFAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

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