Prevent strategy from displaying message boxes on exception
Author: fernacolo77
Creation Date: 3/25/2019 1:58 AM
profile picture


In a multi-symbol strategy, sometimes I get this error in calls to SetContext:

Invalid Benchmark Buy and Hold Symbol: {name}

I can make my script ignore that error with this code:

Please log in to see this code.

But the script shows a message box with the error and pauses execution in every bad symbol, which means I cannot make the script deal with errors automatically, and it becomes very unsafe to let it running unattended.

Ideally, the API should show errors only after completion. It's ok to throw exceptions, but if my script handles them, please keep running without prompts.

Is there a way to get this behavior?
profile picture


I think yes there is: turn off "Benchmark Buy&Hold symbol" when running your strategies unattended. It's under Preferences > Backtest settings.
profile picture


There's even a more radical solution in the form of an AutoIT script to suppress all kind of popups:

Automatic acknowledgement of error
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).