Thanks for that, I have made the change and now no more 147 errors. However I suspect that I do not get the same results as you as the orders no longer expire.
I should really run this with a broker that allows order expiration.
You mentioned that you optimized the for eurusd, which...