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

[amibroker] Holy Grail? NOT!



PureBytes Links

Trading Reference Links

Hi, All,




When I ran the attached AFL file below on CIEN (daily), it generated 
RAR% > 1900 (from 2000-1-1 to today), which is incredible, look like a 
holy grail found. I ran more tickers and more ridiculous profit.




However, when I ran the 'explore', I just could not match up my code 
with the output, nor the ARROWS. I do not even understand why the 
'explore' output was presented the way it was.




Any kind sould please help, I just could not see what I did wrong.


If there is any use of future data, I could find it nor AB.


Please run 'backtest', then compare it with the output of 'explore'




Thanks.




Thomas




--------------------------------------------------------------




// ATR range breakout system, run on daily bars


//


// 
----------------------------------------------------------------------
----------------------------------


// System defines


// 
----------------------------------------------------------------------
----------------------------------


SetTradeDelays(0, 0, 0, 0);




// 
----------------------------------------------------------------------
----------------------------------


// System Parameters


// 
----------------------------------------------------------------------
---------------------------------- 


smoothB = 10; 


multipleB = 0.6;


wait = 20;


smoothS = smoothB; 


multipleS = multipleB; 




entryB = C + multipleB * ATR(smoothB);


entryS = C - multipleS * ATR(smoothS); 


priceB = Ref(entryB, -1);


priceS = Ref(entryS, -1);




CondBuy = IIf(H > priceB, 1, 0);   // priceB is previous bar price


CondShort = IIf(L < priceS, 1, 0);




// 
----------------------------------------------------------------------
----------------------------------


// Trading System Rules


// 
----------------------------------------------------------------------
----------------------------------


Buy   = CondBuy;         // CondBuy was created for debug only


Sell  = Ref(Buy, -wait); // supposedly a 20 day wait before SELL


Short = CondShort;


Cover = Ref(Short, -wait);


ExRemSpan(Buy, wait);      // I thought I don'e need this, because


ExRemSpan(Short, wait);    // equity(1) is used below




BuyPrice   = IIf(Open > priceB, Open, priceB);


ShortPrice = IIf(Open < priceS, Open, priceS);


SellPrice  = Open;


CoverPrice = Open;




// 
----------------------------------------------------------------------
----------------------------------


// Equity info


// 
----------------------------------------------------------------------
----------------------------------


Eq = Equity(1);




// 
----------------------------------------------------------------------
----------------------------------


// Exploration


// 
----------------------------------------------------------------------
----------------------------------


Filter = 1;




AddColumn(O, "Open");


AddColumn(H, "High");


AddColumn(L, "Low");


AddColumn(C, "Close");


AddColumn(V, "Volume", 1.0);




AddColumn(CondBuy, "CondBuy");


AddColumn(Buy, "Buy", 1.0);


AddColumn(Sell, "Sell", 1.0);


AddColumn(entryB, "entryB");




AddColumn(CondShort, "CondShort");


AddColumn(Short, "Short", 1.0);


AddColumn(Cover, "Cover", 1.0);


AddColumn(entryS, "entryS");





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/