Batch file action backtest is stuck as "in progress"

Dear all,

I hope you are well. I appreciate any suggestions for the below:

I am using AB version 6.38 and running a batch process through scheduler. The only action I have in the batch is a) to load project and b) to run backtest action.

Problem statement:
As you could see from the screenshot, the batch file is running the backtest action. When it is completed, backtest status is saying "in progress" instead of saying it is completed. Because the progress is stuck as "in progress" future batch runs do not execute further backtest action.

Any advice would be helpful. Please let me know, if anyone has any suggestions to avoid backtest status getting stuck as "in progress".

Many thanks,


Please read this thread. There are many things that you should check and they are all listed in responses to this thread:

TJ, I will proceed as advised. Many thanks.

Some more details regarding this issue, which occurs on a project that @alp.dogu and I are collaborating on:

  1. The AFL being executed includes a low-level CBT. TRACE statements indicate that execution reached the bottom of the CBT code.

  2. There are a few custom Report Charts in the system as well. TRACE statements indicate that all of the report chart AFL files were executed.

  3. In the APX window, the backtest appears complete, including a normal trade list.

  4. The Backtest Report is present and normal, so it appears that this part of AB's "behind the scenes" processing took place correctly.

  5. As originally posted by @alp.dogu, the only visual clue that there is a problem is that the Status in the ABB window shows as "in progress", which prevents the scheduler from executing the batch again.

The AFL is quite extensive, so creating a scaled down version that easily recreates the problem will be time consuming. Before undertaking that task, I would greatly appreciate any guidance regarding what AmiBroker is doing after executing the AFL and generating the backtest report and all report charts, but before completing the Backtest step of a batch file. That information would help us focus our troubleshooting on specific areas of the code.

@Tomasz - I too would be interested in your guidance with this please.

1 Like

One hint that you may check: go to File->Database Settings, "Intraday Settings" and make sure that "Request data on save" is turned OFF.

I can confirm that that setting is indeed turned OFF for our eSignal database.

1 Like

If you see

( Timings: data: .....)

row in the Info tab and progress bar has disappeared, it means that backtest is completed . There is not any more processing after that and batch window at this point receives completion status.

In this screenshot we can see that the progress bar has disappeared, and the Info Bar has been updated:


In this screenshot, we can see that the same data from the Info Bar is displayed in the Info Window. We know that this is the latest run, because we're running against live data and therefore the Profit value changes after each run during market hours.


We can also confirm completion of the backtest via this TRACE output. The "Backtest Complete" message is sent at the very end of the CBT, while the three PlotFreqDist messages are sent from AFL in the Report Charts folder.


Finally, this screenshot shows the batch file window still stuck "in progress".


We are working on creating a small test app that you could potentially use to recreate the issue, but first we need to identify which part of the existing AFL is required to be part of the test app. We have seen that if we remove/disable too much functionality then the scheduled batch runs proceed indefinitely as expected.

As I wrote, when progress bar disappears and you get (Timings data:...) row your AFL is already done with everything. At this point the Windows Message is sent to batch window. If you get stuck at "in progress..." it means that this message never arrives but it would be indeed very very very strange, practically impossible (unless you have some 3rd party addon software in the system that installs hooks to all windows and that hooks eat messages).

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.