I think you need a global variable (global within the MetaTrader that can be read from all EAs) and then a button that switches the variable on and off.
void SwitchTradingOn() { GlobalVariableSet("TradingOn",1); } void SwitchTradingOff() { GlobalVariableSet("TradingOn",0); } bool IsTradingAllowed() { return GlobalVariableGet("TradingOn")==1; }
https://docs.mql4.com/globals/globalvariableset
GlobalVariableSet - Global Variables of the Terminal - MQL4 Reference
- docs.mql4.com
A global variable name should not exceed 63 characters. Characters not belonging to the current code page are not allowed (characters that cannot be converted from Unicode to ANSI are...
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
Dear sirs,
please look following and if can advice me :
I shall want to stop and enable trade from code: