i am trying to figure out how i can replace these call functions in my EA so that i can submit them for mql5 market. i am new to coding so i know the easy way of doing it by using user32.dll then it allows me to A) close trades or B) turn off EA trading in total
The ea i am building is for Trade Management
int GetAncestor(int hWnd,int gaFlags);
int PostMessageA(int hWnd,int msg,int wParam,string IpWindow);
For people that are curious what "windowHdlFound" does that code section is below
if(IsExpertEnabled()==false && expertsDisabeled==false)
Alert("EquitySL/TP"+": All EAs were disabled at "+TimeToStr(TimeLocal()));
Alert("EquitySL/TP"+" was unable to disable all EAs at "+TimeToStr(TimeLocal()));
my other ea i am building is for Equity and im having the same issue
int GetAncestor(int hWnd, int gaFlags);
#define MT4_WMCMD_REMOVE_EXPERT 33050
my question is there a way to call these same functions without the need of external .dll so that i can submit the ea into the market.
There are no replacements! You simply cannot use DLLs or WinAPI calls in Market Products at all. Nor are you allowed to intervene in enabling or disabling Algo/Auto Trading button or auto trading permissions. That must remain in the complete control of the user. It would be a security risk if the EA were allowed to do that.
thanks for the response... ok, it makes total sense. and i understand why.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.