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

Re: [amibroker] Re: Idiosyncrasy of AmiBroker and Holy Grail



PureBytes Links

Trading Reference Links

Hello,

You can always do that using low-level custom backtester. Using it you can have
hundreds of position reversals on single bar.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message ----- 
From: "buandbe" <buandbe@xxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Tuesday, May 13, 2008 6:44 PM
Subject: [amibroker] Re: Idiosyncrasy of AmiBroker and Holy Grail


> 
> Thank you for your reply.
> 
> As always, your answer is very clear and precise and I happen to like
> your style.
> 
> There is no EASY way to test this strategy on EOD data.
> It's just so depressing to think "nothing is impossible" almighty
> AmiBroker cannot do what you can easily do with lowly Excel...
> 
> TS
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko" <groups@xxx> wrote:
>>
>> First of all - if you use todays CLOSE price in ANY of calculations
>> you must set trading delays to ONE.
>> 
>> SetTradeDelays( 1, 1, 1, 1 );
>> 
>> Second rule: one trade (either short or long, not both) per single
> bar per symbol.
>> Third rule: If you want to simulate day trading use intraday data. 
>> 
>> Best regards,
>> Tomasz Janeczko
>> amibroker.com
>> ----- Original Message ----- 
>> From: "buandbe" <buandbe@xxx>
>> To: <amibroker@xxxxxxxxxxxxxxx>
>> Sent: Monday, May 12, 2008 10:51 PM
>> Subject: [amibroker] Idiosyncrasy of AmiBroker and Holy Grail
>> 
>> 
>> > 
>> > I found a Holy Grail... till I found the error, that is.
>> > 
>> > ------------------------------------------------------
>> > 
>> > Buy_Open = Ref( Open, -1 ) > Ref( Close, -1 ); // Previous Bar is Down
>> > Short_Open = Ref( Open, -1 ) < Ref( Close, -1 ); // Previous Bar is Up
>> > Buy_Close = Open < Close; // This Bar is Up
>> > Short_Close = Open > Close; // This Bar is Down
>> > 
>> > Buy = Buy_Open OR Buy_Close;
>> > Short = Short_Open OR Short_Close;
>> > Sell = Short;
>> > Cover = Buy;
>> > 
>> > BuyPrice = IIf( Buy_Open, Open, IIf( Buy_Close, Close, 999999 ) );
>> > ShortPrice = IIf( Short_Open, Open, IIf( Short_Close, Close,
> -999999 ) );
>> > SellPrice = ShortPrice;
>> > CoverPrice = BuyPrice;
>> > 
>> > // "ALLOW SAME BAR EXIT (SINGLE BAR TRADE)" is on
>> > 
>> > ------------------------------------------------------
>> > 
>> > AmiBroker does not show some losers and significantly overstates
> profits.
>> > 
>> > ex.
>> > 
>> > Open Close 
>> > Day 0 Down 
>> > Day1 Up Long Still Long
>> > Day2 Up reverse to Short reverse to Long
>> > 
>> > The Short trade on Day2 from Open to Close is not accounted for.
>> > 
>> > Could anyone correct the code so that it shows more realistic
> results ?
>> > 
>> > TS
>> > 
>> > 
>> > 
>> > ------------------------------------
>> > 
>> > Please note that this group is for discussion between users only.
>> > 
>> > To get support from AmiBroker please send an e-mail directly to 
>> > SUPPORT {at} amibroker.com
>> > 
>> > For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
>> > http://www.amibroker.com/devlog/
>> > 
>> > For other support material please check also:
>> > http://www.amibroker.com/support.html
>> > Yahoo! Groups Links
>> > 
>> > 
>> >
>>
> 
> 
> 
> ------------------------------------
> 
> Please note that this group is for discussion between users only.
> 
> To get support from AmiBroker please send an e-mail directly to 
> SUPPORT {at} amibroker.com
> 
> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> http://www.amibroker.com/devlog/
> 
> For other support material please check also:
> http://www.amibroker.com/support.html
> Yahoo! Groups Links
> 
> 
> 

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

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

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