-
I am getting the following error:
OrderCheck() failed: Invalid Expiration (10022)
I found out that this happens because the market I am trying to trade (WINJ15) accepts only 'Today' for expiration, not 'GTC'.
How to fix this? Should I use MetaEditor to replace all GTC's by DAY's and then compile?
Or there is a way in fxDreema?
-
For pending orders you can change this.
For positions the expiration is always set to 0, because there is no expiration for positions anyway. There is another property for the request type_time, but according to the documentation this is only used for pending orders https://www.mql5.com/en/docs/constants/ ... aderequest
I'm not really convinced to change something in the code only because some weird market name with weird rules
-
I am using pending orders and "close positions".
Even setting expiration as "Today" in fxdreema I have GTC in the code.
I am not very skilled with the code, then I would ask the following:
Can I simply open the .mq5 file with MetaEditor and replace all "GTC" with "DAY" and then compile? I don't mind in doing that, if it works.
-
To be honest, I have no idea what will help. MT5 is full of problems by itself, so what happens when we add fancy market name. At least tell me what is this broker that you are using.
-
This is future IBOVESPA, Brazilian stock exchange index. You probably will find something if you google it.
I understand that fxDreema was designed for forex and I am trading something else.
I will do some research, learn more about MQL5, and find a way.
-
No easy way.
I found that I would need to go really deep on MQL5 or hire someone to help me, and if this is the case I don't need fxdreema.
Maybe for backtesting, not for real world.
-
What is your broker name?
-
-
I am preparing something else to try when the market opens.
Will try DEAL instead of PENDING orders, and replace all instances of _GTC for _DAY
-
XP, what a name
Some hint how to find this broker in "Open an Account" when I already have MT5 installed? -
XPMT5-PRD
-
I found it, but I stuck here: http://prntscr.com/6iltuk
Can you give me some demo login data
-
Look, in demo account all works well.
Doing backtest, at least.
Problem happens only when sending real orders.
-
When you backtest, there is no communication with the server, so the broker does not matter. Just give me some demo account

-
Sending by e-mail
-
Sent.
Market is open 09:00 to 18:00, Brasilia time
-
And you must always have some demo account to test on it. The first is to backtest, because it's fast, but backtesting is just a hint of what it could be. Then you must put the EA on demo to see how the communication between MT and the broker really happens.
-
It worked today, after that change in the web version.
Thank you very much! Really appreciate!