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

Re: [amibroker] IS THIS A BUG: Strange things with Backtester



PureBytes Links

Trading Reference Links

No it is NOT a bug. I am always fascinated how quick are people say things like that and
find such quick judgements extremely annoying.

There are two phases of backtest. First runs with current symbol (or multiple symbols
in case of portfolio). First phase collects signals.

Second run is actual backtesting run with PORTFOLIO EQUITY as "current symbol".

So when CUSTOM BACKTESTER code is entered, current symbol is NOT GBP.USD.
Read more here:
http://www.amibroker.com/docs/Houston2.pdf

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message ----- 
From: "dralexchambers" <dralexchambers@xxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Wednesday, May 30, 2007 2:15 PM
Subject: [amibroker] IS THIS A BUG: Strange things with Backtester


>I am getting REALLY strange things happening with this code.
> 
> - Brokercom = 20 for my current symbol (Name = "GBP.USD")
> 
> When I drag and drop the indicator onto a blank chart, "brokercom" 
> variable plots in violet as being 20 - which is correct for the 
> symbol name.
> 
> However, when I press BackTest, "brokercom" is shown in the custom 
> backtest report as being 5 - when it should be 20!!!
> 
> Can anyone advise as this is strange!
> 
> 
> PS: I have removed my trading rules for simplicity and made 
> Buy,Sell,Cover,Short = 1. This makes the code short to see if you can 
> replicate the error.
> 
> The symbol selected is correct (GBP.USD) and "Apply to: current 
> symbol" is selected on the backtester window.
> 
> 
> Thanks,
> Alex
> 
> ===================================================
> 
> brokercom = IIf(StrFind(Name(),"GBP.USD"),20,5);
> Plot(brokercom,"brokercom",colorViolet);
> 
> 
> SetCustomBacktestProc(""); 
> if( Status("action") == actionPortfolio ) 
> { 
>   bo = GetBacktesterObject(); 
> 
>   bo.Backtest();
> 
>  bo.AddCustomMetric("commission", brokercom); 
> }
> 
> Buy=1;
> Sell=1;
> Short =1;
> Cover=1;
> 
> 
> 
> 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/