I also read this article, where people seem to have the same problems:
https://www.mql5.com/en/forum/4209
After reading it and especially the comment from Rosh, I probably don't understand the difference between "Market Order" and "instant Order" in the context of MQL5. I understand the difference between them in the context of the terminal (as explained here):
https://www.metatrader5.com/en/terminal/help/trading/general_concept
But i do not see a setting in the OrderSend function which would allow me to tell the server "Use Instant Order, not Market Order". There is only the value
TRADE_ACTION_DEAL
and I already am using it...
Thanks in advance for any help.. I am sure this is something really simple but I am not getting it for the moment... :(
![Trying to place a market order, but it fails because of [Invalid stops]. What should I do? Trying to place a market order, but it fails because of [Invalid stops]. What should I do?](/i/community/logo_mql5_small.png)
- www.mql5.com
Hello
I m using the MetaQuotes Demo server.
This code:
prints "EURUSD: Market orders are allowed (price specification is not required) "
However I am getting an error when trying to open an order with this code (in both terminal and tester):
This is the error in tester:
2013.05.08 18:36:16 2013.01.01 23:17:40 failed instant buy 0.10 EURUSD at 0.00000 [Invalid stops]
This is the error in terminal:
2013.05.08 18:42:28 Trades '1438491': failed instant buy 0.10 EURUSD at 0.00000 [Invalid stops]
I am probably doing something wrong but I can not understand what... Anybody can point me in the right direction please? I used to work with MQL4 but MQL5 is new for me and I obviously having difficulties even with the most basic things... :(
I also read this article, where people seem to have the same problems:
https://www.mql5.com/en/forum/4209
After reading it and especially the comment from Rosh, I probably don't understand the difference between "Market Order" and "instant Order" in the context of MQL5. I understand the difference between them in the context of the terminal (as explained here):
https://www.metatrader5.com/en/terminal/help/trading/general_concept
But i do not see a setting in the OrderSend function which would allow me to tell the server "Use Instant Order, not Market Order". There is only the value
and I already am using it...
Thanks in advance for any help.. I am sure this is something really simple but I am not getting it for the moment... :(
You can't set trade execution type, it's defined by broker, you have to check what is allowed.
For Instant execution you have to set a price.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello
I m using the MetaQuotes Demo server.
This code:
prints "EURUSD: Market orders are allowed (price specification is not required) "
However I am getting an error when trying to open an order with this code (in both terminal and tester):
This is the error in tester:
2013.05.08 18:36:16 2013.01.01 23:17:40 failed instant buy 0.10 EURUSD at 0.00000 [Invalid stops]
This is the error in terminal:
2013.05.08 18:42:28 Trades '1438491': failed instant buy 0.10 EURUSD at 0.00000 [Invalid stops]
I am probably doing something wrong but I can not understand what... Anybody can point me in the right direction please? I used to work with MQL4 but MQL5 is new for me and I obviously having difficulties even with the most basic things... :(