Debugging through Custom Backtesting

Hi guys,

I tried to debug my code relating to the custom backtesting. When it came to the line #120, the debugging session always ends. I guess the condition of Status("action") == actionPortfolio wasn't TRUE.

So would you please advise what to do in the case I have to debug the custom backtesting.

You cannot use the debugger for CBT code. See the bottom of this page: https://www.amibroker.com/guide/h_debugger.html

The easiest way to debug your CBT code is with _TRACE statements.

Matt

1 Like

As @mradtke wrote, you need to use _TRACE() but enabling debugging for various “actions” (not only actionBacktest as now) is something that is planned.

Thanks for your quick response T_T. Actually I have tried using _trace but still couldn’t find the error.