I am trying to run an EA from a tutorial, but I keep getting errorcode 4753
I tried with a demo account from a broker and also a standard mt5 demo account...
Please help
thanks
Files:
Anna_v1.02_Complete.mq5
12 kb
- Error 4753: The Buy order request could not be completed
- [WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you.
- Frank EA and 10p3 EAs
badjano:
You mean 4753 I suppose ?
I am trying to run an EA from a tutorial, but I keep getting errorcode 4573
I tried with a demo account from a broker and also a standard mt5 demo account...
Please help
thanks
Alain Verleyen:
You mean 4753 I suppose ?
You mean 4753 I suppose ?
Sorry, yes, the code in the title is the correct one, I am editing to fix the other one
badjano:
Sorry, yes, the code in the title is the correct one, I am editing to fix the other one
Sorry, yes, the code in the title is the correct one, I am editing to fix the other one
Ok.
Is the position open or not ?
The code is not correct. It should be something like :
if(myTradingControlPanel.PositionOpen(_Symbol, ORDER_TYPE_BUY, lot, currentAsk, stopLossLevel, takeProfitLevel, ...) && (myTradingControlPanel.ResultRetcode()==10008 || myTradingControlPanel.ResultRetcode()==10009) ) { Print("Entry rules: A Buy order has been successfully placed with Ticket#: ", myTradingControlPanel.ResultOrder()); } else { Print("Entry rules: The Buy order request could not be completed. Error: ", GetLastError(), myTradingControlPanel.ResultRetcode()); ResetLastError(); return; }
Alain Verleyen:
Ok.
Is the position open or not ?
The code is not correct. It should be something like :
I'm not experienced with MQL, but that part of the code is inside this if(PositionSelect(_Symbol) == false) so no, I guess it is not opened.
Alain Verleyen:
Ok.
Is the position open or not ?
The code is not correct. It should be something like :
I will make those changes to my code when I get home, and I'll let you know if anything new happens
Alain Verleyen:
Ok.
Is the position open or not ?
The code is not correct. It should be something like :
I just changed as you suggested, it still keeps saying error 4753
Alain Verleyen:
Ok.
Is the position open or not ?
The code is not correct. It should be something like :
I noticed that ResultRetcode returned errorcode 10030, so I found out that I needed to put this inside OnInit
myTradingControlPanel.SetTypeFilling(ORDER_FILLING_IOC);
now my EA is trading! thanks
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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