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:
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?
Size:
Color:
I think yes there is: turn off "Benchmark Buy&Hold symbol" when running your strategies unattended. It's under Preferences > Backtest settings.
Size:
Color:
Size:
Color: