Can I code in MQL to turn on and off an already running EA? - page 3 123 New comment William Roeder 2011.09.16 15:44 #21 SendMessage((GetParent(GetParent(GetParent(WindowHandle(Symbol(), 0))))), 273, 33020, 0);This will send the control-E to the terminal and disable ALL EA's on ALL charts. As opposed to removing the EA from one chart alternative, self documenting code: #include <WinUser32.mqh> #import "user32.dll" int GetAncestor(int, int); #import #define MT4_WMCMD_EXPERTS 33020 // Toggle Expert Advisor button int main = GetAncestor(WindowHandle(Symbol(), Period()), 2/*GA_ROOT*/); SendMessage(main, WM_COMMAND, MT4_WMCMD_EXPERTS, 0); sahli hakim 2011.09.19 16:15 #22 WHRoeder: This will send the control-E to the terminal and disable ALL EA's on ALL charts. As opposed to removing the EA from one chart alternative, self documenting code: thank you very much sahli hakim 2011.09.19 16:18 #23 qjol: u mean the no. 33020 ? if the answer is yes, this is not a calculation microsoft spyxx giving u this no. u can download it from here hi you are the first programer in world thank you very much i use Winspector for find the code 33020 if you can,explain us how do we find code 33020 by spyxx ? if you want thank you my professor Professional MM function Send hotkey from EA Working with Excel (tools, William Roeder 2011.09.19 16:24 #24 sahlih2000: Ctrl + E for which equal 33,020 pls how to calculate it or how to get this value See #define's for known commands that can be used for PostMessageA() - MQL4 forum qjol 2011.09.19 20:35 #25 sahlih2000: hi you are the first programer in world thank you very much i use Winspector for find the code 33020 if you can,explain us how do we find code 33020 by spyxx ? if you want thank you my professor i sent u a PM with a video attached sahli hakim 2011.09.27 13:22 #26 WHRoeder: See #define's for known commands that can be used for PostMessageA() - MQL4 forum thank you very ery much my friend WHRoerder sahli hakim 2011.09.27 13:24 #27 qjol: i sent u a PM with a video attached you are very great programmer in the world thank you my professor NabiKAZ 2020.12.29 01:46 #28 William Roeder: This will send the control-E to the terminal and disable ALL EA's on ALL charts. As opposed to removing the EA from one chart alternative, self documenting code: I changed a little your code with change SendMessage to SendMessageA and define it. #include <WinUser32.mqh> #import "user32.dll" int GetAncestor(int, int); int SendMessageA(int, int, int, int); #import #define MT4_WMCMD_EXPERTS 33020 //Toggle Expert Advisor button void AllowAutoTrading() { if(!IsTradeAllowed()) { int main = GetAncestor(WindowHandle(Symbol(), Period()), 2/*GA_ROOT*/); SendMessageA(main, WM_COMMAND, MT4_WMCMD_EXPERTS, 0); } } void OnStart() { AllowAutoTrading(); } 123 New comment
This will send the control-E to the terminal and disable ALL EA's on ALL charts. As opposed to removing the EA from one chart
alternative, self documenting code:
This will send the control-E to the terminal and disable ALL EA's on ALL charts. As opposed to removing the EA from one chart
alternative, self documenting code:
thank you very much
qjol:
u mean the no. 33020 ? if the answer is yes, this is not a calculation
microsoft spyxx giving u this no.
u can download it from here
hi
you are the first programer in world
thank you very much
i use Winspector for find the code 33020
if you can,explain us how do we find code 33020 by spyxx ?
if you want
thank you my professor
Ctrl + E for which equal 33,020
pls how to calculate it or how to get this value
hi
you are the first programer in world
thank you very much
i use Winspector for find the code 33020
if you can,explain us how do we find code 33020 by spyxx ?
if you want
thank you my professor
See #define's for known commands that can be used for PostMessageA() - MQL4 forum
thank you very ery much my friend WHRoerder
i sent u a PM with a video attached
you are very great programmer in the world
thank you my professor
This will send the control-E to the terminal and disable ALL EA's on ALL charts. As opposed to removing the EA from one chart
alternative, self documenting code:
I changed a little your code with change SendMessage to SendMessageA and define it.