Invalid Expiration
-
Whenever using pending orders I get this error when backtesting (MT5):
2018.05.09 17:13:16.364 Core 1 2018.05.07 17:54:00 OrderCheck() failed: Invalid expiration (10022)
I´ve found out that the symbol I´m using won´t accept "NO EXPIRATION" orders (brazilian futures - WINM18), but I´ve tried TODAY or SPECIFIED TIME, and it keeps showing the error.
Any help?
-
From experience on metatrader 4, if your expiration time is set at a time less than 11 minutes, the expiration will automatically set to the expire at 11 minutes. For trading systems with placing pending orders that are less than 11 minutes, you can include the "Delete pending orders" block with "Once per bar" block connected above it.
-
Are you sure about that? This is the first time I hear it. Isn't maybe a broker's limitation instead?
-
Yes. That's the experience I had with my broker. On the Experts button of metatrader 4, it wrote "...............Expiration time cannot be less than 11 minutes, so it was automatically modified to 11 minutes."
I'm not sure if the same is happening to other brokers as well.
So what I do is to create a "delete pending orders" block before adding a new "buy/sell" set of blocks (i.e. buy now, sell now, buy pending order, sell pending order etc). -
That's certainly weird, but I have to say brokers are getting crazier over time.