How to Disable/Enable Auto/Algo-Trading in both MT5 and MT4. – script MetaTrader 4
MT4: //— importing required dll files #include <WinUser32.mqh> #import “user32.dll” int GetAncestor(int, int); #define MT4_WMCMD_EXPERTS 33020 #import //+——————————————————————+ //| | //+——————————————————————+ void SetAlgoTradingTo(bool trueFalse) { //— getting the current status bool currentStatus = IsTradeAllowed(); //— if the current status is equal to input trueFalse then, no need to toggle auto-trading if(currentStatus != trueFalse) { //— Toggle Auto-Trading … Read more