I'm not sure why, but here's the code:
Anyone got any ideas? I'm old, so if it's something simple; give me break! :)
It could be a number of things - e.g. 1.07 being an invalid lot size because the broker has a minimum increment of 0.10 - but it is most likely to be the expiration.
The rules in MT4 are strange and, as far as I am aware, not formally documented. But the minimum expiry is about 10 minutes, rather than the 5 you are trying to use.
Thanks everyone. Found out it was the expiry. Nothing under 11 minutes allowed. So, going to do that manually.