Hello,
i tried to simulate the exact same system results running a very simple
strategy using low level CBT vs no CBT at all. The code bellow worked
well in a single symbol mode, meaning i got the same results no matter
if i used the low level CBT or not.
Running the same code in a portfolio mode (meaning having multiple
symbols) i do get a different result. The result differs specifically in
the number of trades where low level CBT version produces fewer trades.
Where does this distinct behavior come from? Your feedback is
appreciated - Thanks
Frank
---------------------------------------------------------------------
SetCustomBacktestProc("");
if ( Status( "action" ) == actionPortfolio){ bo =
GetBacktesterObject(); bo.PreProcess();
for (i=0; i<BarCount;i++) { for (sig=bo.getfirstsignal(i);
sig; sig=bo.getnextsignal(i)) { if (sig.IsEntry())
{ bo.EnterTrade(i, sig.Symbol, sig.islong(), sig.Price,
sig.possize); }
if (sig.isexit()) { bo.ExitTrade(i,
sig.symbol,sig.price); } } bo.handlestops(i);
bo.updatestats(i,1); bo.updatestats(i,2); } bo.postprocess;}