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

[amibroker] ROBUSTNESS TEST



PureBytes Links

Trading Reference Links





Buy=Sell=Short=Cover=<FONT color=#ff00ff 
size=1>0;
function System( TestParameter )
{
// Steve Karnish' CMO5 system 
(Basic)
Threshold1 = 100<FONT 
size=1>-TestParameter;
Threshold2 = TestParameter;
Ind=scCMO(C,5<FONT 
size=1>);
Buy=Cross<FONT 
size=1>(Threshold1 ,Ind);
Sell=Cross<FONT 
size=1>(Ind,Threshold2 );
Short=Sell;
Cover=Buy;
E=Equity();
return E;
}
BestTestParameter = 0<FONT 
size=1>;
InitialEquity= 100<FONT 
size=1>;
SetOption(<FONT color=#ff00ff 
size=1>"InitialEquity",InitialEquity);
TestParameter = 50;
E = System( TestParameter );
Plot(E,"Default 
Equity"<FONT 
size=1>,colorWhite,styleLine|styleThick); 
EMAx = 0<FONT 
size=1>;
for( TestParameter =<FONT color=#ff00ff 
size=1>0; TestParameter <<FONT color=#ff00ff 
size=1>100; TestParameter =TestParameter +<FONT 
color=#ff00ff size=1>1 )
{
E = System( TestParameter );
if ( 
LastValue(E) > EMAx ) 

{ 
EMAx = LastValue(E); 

BestTestParameter = TestParameter ; 
}
Co = IIf<FONT 
size=1>(E<InitialEquity,colorRed,colorBlack);
Plot(E,<FONT 
color=#ff00ff size=1>"Test Equity"<FONT 
size=1>,Co,styleLine|styleNoLabel); 
}
E = System( BestTestParameter );
Plot(E,"Best 
Equity"<FONT 
size=1>,colorBrightGreen,styleLine|styleThick|styleArea);
Title = "Best Threshold= "<FONT 
size=1>+WriteVal<FONT 
size=1>(BestTestParameter ,1.0<FONT 
size=1>)+" gives "<FONT 
size=1>+EncodeColor<FONT 
size=1>(colorGreen)+" Best Equity = 
"+WriteVal<FONT 
size=1>(E,1.0<FONT 
size=1>)+
EncodeColor(colorBlack)+<FONT color=#ff00ff 
size=1>" LastYear's Profit=" + <FONT color=#0000ff 
size=1>WriteVal(<FONT color=#0000ff 
size=1>ROC(E,<FONT color=#ff00ff 
size=1>260),<FONT color=#ff00ff 
size=1>1.0)+<FONT color=#ff00ff 
size=1>"%";






Yahoo! Groups Sponsor


  ADVERTISEMENT 









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 the Yahoo! Terms of Service.