Discussion of article "Step-by-Step Guide to Writing an Expert Advisor in MQL5 for Beginners" - page 21

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi All,
Brand new to MQL5 (and FOREX for that matter) but, long time programmer. I opened the My_First_EA.mq5 file and compiled but, I'm not getting the Debug functions. If I open any of the example script files I do get the Debug option. Also received a warning return value of 'OrderSend' should be checked. What do I have to do to get Debug functionality?
Louis
Hi All,
Brand new to MQL5 (and FOREX for that matter) but, long time programmer. I opened the My_First_EA.mq5 file and compiled but, I'm not getting the Debug functions. If I open any of the example script files I do get the Debug option. Also received a warning return value of 'OrderSend' should be checked. What do I have to do to get Debug functionality?
Louis
Hi All,
Figured out my own issue. I created a new Project with the Expert Advisor Wizard and then just copied in the My_First_EA.mq5 file and I get debug functionality.
Louis
Hi All,
Figured out my own issue. I created a new Project with the Expert Advisor Wizard and then just copied in the My_First_EA.mq5 file and I get debug functionality.
Louis
I'v got 4756 error, I saw the solution in page 2, and I checked orginal code, there was ZeroMemory(mrequest); in line 218 itself. but I have still the error 4756.
I also still have this error having made both suggested corrections:
ZeroMemory(mrequest);
and also
if(Buy_opened || Sell_opened)
Please can someone help with the error 4756? It just seems unable to place a Buy Order.
Hi, I'm getting an error:
return value of 'OrderSend'should be checked lines 213 and 259.
have you solved it?
Good morning Tchuso,
The same thing happened to me. I fixed it by replacing those lines in both operations with this.
Tell me if you need help, I'm new too.
Best regards!
I like the example code quite a lot, I'm new to this too, I fixed the code as it appears in the comments and it doesn't give errors anymore.
The problem is that the robot does not open trades, it does not even open a trade.
Has anyone been able to solve this problem?
I'm using the "Unico" option of the strategy tester: is it my mistake?
Thanks for your time and supportI noticed that the Robot tries to open the orders but always gives an error:
Exit:
2020.05.06 20:35:16.141 Core 1 2020.04.20 20:25:00 failed market sell 0.10 EURUSD sl: 1.08965 tp: 1.07665 [Invalid request].
I have changed several things in the code but it doesn't work, I add the code I have:
Original: mrequest.type_filling = "I have put it in the 3 ways that are in the documentation".
I noticed that the Robot tries to open the orders but always gives an error:
Exit:
2020.05.06 20:35:16.141 Core 1 2020.04.20 20:25:00 failed market sell 0.10 EURUSD sl: 1.08965 tp: 1.07665 [Invalid request].
I have changed several things in the code but it doesn't work, I add the code I have:
Original: mrequest.type_filling = "I have put it in the 3 ways that are in the documentation".
Add this at the top of the code:
#include <Trade\Trade.mqh>
And then to open an operation just type this:
Hi,
Similarly, I have the error code 4756 when running testing and said " Sell order request could not be completed ".
Please inform how to solve this.
Thank