This is good and well written as usual for thos coder - however when choosing 'market orders' it does that with the stop too - waiting for a bar close even on a 5 minute chart can be a huge difference. I realise that it stops the 'spike' exit - but i think a hard stop placed with the order is needed so it means that you are forced to use the pending orders option. Shame really - an option on the stop method would be much better
Fails in 2020
Work in 2021
Here are some Sets for XAUUSD: