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

[amibroker] Re: The dmi MA, EMA cross and the Prediction theory



PureBytes Links

Trading Reference Links

Jayson,
many thanks for your comments.
You know, I am a bit lazy, I wouldn´t start this thread without your 
discussion with Yuki Re: the dmi code.
So, the acknowledgements go to both of you.
Thank you for this opportunity.
Dimitris Tsokakis
--- In amibroker@xxxxxxxxxxxxxxx, "Jayson" <jcasavant@xxxx> wrote:
> Dimitris,
> thanks for all your time and effort. I will spend some time 
analyzing it
> this week end. This has been an interesting thread!
> 
> Regards,
> Jayson
> -----Original Message-----
> From: Dimitris Tsokakis [mailto:TSOKAKIS@x...]
> Sent: Friday, July 25, 2003 2:46 AM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] The dmi MA, EMA cross and the Prediction theory
> 
> 
> Yuli, Jason,
> in your dmi example, the Buy, Sell conditions were
> 
> Buy=Cross(EMA(dmi,pds),MA(dmi,pds1));
> Sell=Cross(MA(dmi,pds1),EMA(dmi,pds));
> 
> It is a special case of an EMA, MA cross.
> The mathematical condition for an EMAp, MAk touch is
> 
> tdmi=((p+1)*MA(dmi,k-1)*(k-1)-k*(p-1)*EMAp)/(2*k-(p+1));
> 
> where tdmi is the tomorrow dmi value.
> According to the similar predictions arguments, the crosses of this 
tdmi
> with dmi itself should
> anticipate by one bar the actual EMA, MA crosses.
> You may verify this from the code
> 
> //Dynamic Momentum Index Tushar Chande Translated to AFL by Jayson
> Casavant//Cmo5 formula
> CMO5_1=Sum( IIf( C > Ref( C, -1 ) , ( C - Ref( C ,-1 ) ) ,0 ) ,5 ) ;
> CMO5_2=Sum( IIf( C < Ref( C ,-1 ) , ( Ref( C ,-1 ) - C ) ,0 ) ,5 );
> CMO5=DEMA(100 * (( CMO5_1 -CMO5_2) /( CMO5_1+CMO5_2)),3);//Cmo10 
formula
> CMO10_1=Sum( IIf( C > Ref( C, -1 ) , ( C - Ref( C ,-
1 ) ) ,0 ) ,10 ) ;
> CMO10_2=Sum( IIf( C < Ref( C ,-1 ) , ( Ref( C ,-1 ) - 
C ) ,0 ) ,10 );
> CMO10=DEMA(100 * (( CMO10_1 -CMO10_2) /( 
CMO10_1+CMO10_2)),3);//Cmo20
> formula
> CMO20_1=Sum( IIf( C > Ref( C, -1 ) , ( C - Ref( C ,-
1 ) ) ,0 ) ,20 ) ;
> CMO20_2=Sum( IIf( C < Ref( C ,-1 ) , ( Ref( C ,-1 ) - 
C ) ,0 ) ,20 );
> CMO20=DEMA(100 * (( CMO20_1 -CMO20_2) /( CMO20_1+CMO20_2)),3);// 
dmi formula
> dmi=((StDev(C,5)* CMO5)+(StDev(C,10)* CMO10)+(StDev(C,20)*
> CMO20))/(StDev(C,5)+StDev(C,10)+StDev(C,20));
> pds=Optimize("Smoothing",10,1,10,1);
> pds1=Optimize("Trigger Line",4,1,10,1);
> Buy=Cross(EMA(dmi,pds),MA(dmi,pds1));
> Sell=Cross(MA(dmi,pds1),EMA(dmi,pds));
> 
> // Prediction of actual crosses by D. Tsokakis
> p=pds;EMAp=EMA(dmi,p);
> k=pds1;MAk=MA(dmi,k);
> tdmi=((p+1)*MA(dmi,k-1)*(k-1)-k*(p-1)*EMAp)/(2*k-(p+1));
> Buy1=Cross(t,dmi);Sell1=Cross(dmi,t);
> Plot(Buy,"",5,2);Plot(Sell,"",4,2);
> Plot(Buy1,"",1,1);Plot(Sell1,"",2,1);
> 
> The red [Sell], green [Buy] bars are the actual crosses, the white, 
black
> smaller bars are the respective predictions.
> You may see the prediction success, although let me doubt about the 
probable
> use.
> The system gave me some worse backtesting results, when I tried 
delay=0
> [instead of the regular delay=1]
> and gave also worse results when I tried Buy1/Sell1 instead of 
Buy/Sell.
> Anyway, I hope it will be useful for your study.
> Dimitris Tsokakis
> 
> 
> 
> 
>       Yahoo! Groups Sponsor
>             ADVERTISEMENT
> 
> 
> 
> 
> Send BUG REPORTS to bugs@xxxx
> Send SUGGESTIONS to suggest@xxxx
> -----------------------------------------
> 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 the Yahoo! Terms of Service.


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Free shipping on all inkjet cartridge & refill kit orders to US & Canada. Low prices up to 80% off. We have your brand: HP, Epson, Lexmark & more.
http://www.c1tracking.com/l.asp?cid=5510
http://us.click.yahoo.com/GHXcIA/n.WGAA/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/