I tried lots of times and it always failed with error code 10009. When all breakpoints removed, it succeed. Is this normal case or some parameters need to be changed?
Thanks a lot~
Why did you decide that this is a mistake? I recommend to study the documentation: Trade Server Return Codes
![Documentation on MQL5: Constants, Enumerations and Structures / Codes of Errors and Warnings / Trade Server Return Codes Documentation on MQL5: Constants, Enumerations and Structures / Codes of Errors and Warnings / Trade Server Return Codes](https://c.mql5.com/36/55/documentation-on-mql5-constants__1.png)
- www.mql5.com
Hi Vladimir Karputov ,
Thanks for ur reply. Pls ignore 10009 code.
I added error handler as follows:
int state = OrderSend(request,result); if(!state) { PrintFormat("OrderSend error %d",GetLastError()); } }
Then Irepeated the process, and it prompted as follows:
2022.04.06 00:00:55.991 placeorder (EURUSD,H1) OrderSend error 4756.
Hi Vladimir Karputov ,
Thanks for ur reply. Pls ignore 10009 code.
I added error handler as follows:
Then Irepeated the process, and it prompted as follows:
2022.04.06 00:00:55.991 placeorder (EURUSD,H1) OrderSend error 4756.
See error description here: Runtime Errors
![Documentation on MQL5: Constants, Enumerations and Structures / Codes of Errors and Warnings / Runtime Errors Documentation on MQL5: Constants, Enumerations and Structures / Codes of Errors and Warnings / Runtime Errors](https://c.mql5.com/36/55/documentation-on-mql5-constants__2.png)
- www.mql5.com
Finally I get it out. MqlTradeRequest struct needs to be initialized :)
Thanks anyway!
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I tried lots of times and it always failed with error code 10009. When all breakpoints removed, it succeed. Is this normal case or some parameters need to be changed?
Thanks a lot~