PureBytes Links
Trading Reference Links
|
In general, you are close to real conditions when you
buy/sell/short/cover at Open with delay=+1.
As you understand, you can not trade with delay=0.
Dimitris Tsokakis
--- In amibroker@xxxxxxxxxxxxxxx, "Ara Kaloustian" <ara1@xxxx> wrote:
> It would be hard to comment without having specific described
fully. Generally seeing the ppart of the code is needed to decipher
what is going on.
>
> Getting outrageous results usually stems from using forward looking
statements... like bying at the opening price when your decision is
based on the closing price... etc
>
> Take a close look at your code for suck items. if you can not find
any problems, post your code with desciption of problems as well as
your explorer results and someone could probably help you
>
> Ara
> ----- Original Message -----
> From: tchan95014 <tchan95014@xxxx>
> To: amibroker@xxxxxxxxxxxxxxx
> Sent: Sunday, February 09, 2003 10:44 PM
> Subject: [amibroker] Holy Grail? NOT!
>
>
> 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");
>
>
>
>
>
> Yahoo! Groups Sponsor
> ADVERTISEMENT
>
>
>
>
> 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.
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/
|