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

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



PureBytes Links

Trading Reference Links

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

<*> 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/