Replace user32.dll information . Help for Mql Market

 

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 

#import "user32.dll"
int GetAncestor(int hWnd,int gaFlags);
int PostMessageA(int hWnd,int msg,int wParam,string IpWindow);
#import
int windowHdlFound;
bool expertsDisabeled=false;



For people that are curious what  "windowHdlFound" does that code section is below

 if(IsExpertEnabled()==true)
     {
      if(windowHdlFound>0) PostMessageA(windowHdlFound,WM_COMMAND,33020,0);

      Sleep(3000);
      if(IsExpertEnabled()==false && expertsDisabeled==false)
        {

         Alert("EquitySL/TP"+": All EAs were disabled at "+TimeToStr(TimeLocal()));
         expertsDisabeled=true;
         CloseCount=0;
        }
      if(IsExpertEnabled()==true)
        {

         Alert("EquitySL/TP"+" was unable to disable all EAs at "+TimeToStr(TimeLocal()));
         expertsDisabeled=false;
        }
     }


my other ea   i am building is for Equity and im having the same issue 

include <WinUser32.mqh>
#import "user32.dll"
  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. 

 
Richard Louis Pastor: 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. For people that are curious what  "windowHdlFound" does that code section is below. my other ea   i am building is for Equity and im having the same issue. 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.

 
Fernando Carreiro #:

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.  

Reason: