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

[amibroker] Custom backtester ignores my include file



PureBytes Links

Trading Reference Links

I have an include file which contains some variables for use in my 
backtest, eg:

<INCLUDE FILE>
myvar = 1;
</INCLUDE FILE>

My backtest AFL is as follows:

#include <INCLUDE FILE.afl>;
(rest of file....)

This works fine and the backtest AFL uses myvar correctly when NOT 
using the custom backtester.

However, if I add the Custom Backtester code - below - I get the 
following error:

"Variable 'myvar' used without being initialized"

It seems the Custom Backtester ignores include files.

What can I do here as I am stuck?

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

SetCustomBacktestProc("");
if( Status("action") == actionPortfolio )
{
        bo = GetBacktesterObject();

        bo.PreProcess();

        for( trade = bo.GetFirstTrade(); trade; trade = 
bo.GetNextTrade() ) 
        { 
                if (trade.Shares > 10)
                { trade.Shares = 20; } 
        }
}



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/