Saturday, February 19, 2011

Backtesting Tutorial

http://www.amibroker.org/userkb/category/amibroker-features/custom-backtester/

If this line is present
SetCustomBacktestProc(""); at the beginning you need to have the
if( Status("action") == actionPortfolio ) later to perform actual backtest. Just pressing the backtest button won't do.

for (i = 0; i < BarCount; i++)
{
. . . .
sig = bo.GetFirstSignal(i);
. . . .
}

Signal is for the current symbol only because backtest results are per symbol. Open position is a loop for individual bars for the time position is open. Signal is only one record for Entry and one for Exit.

No comments:

Post a Comment