Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

EA CloseAll - MetaTrader 4 Expert | MT4 EA Download - MetaTrader 4 Resources

author EAcpu | 2 reads | 0 comments |

EA CloseAll - expert for MetaTrader 4

EA CloseAll - expert for MetaTrader 4

MetaTrader 4's CloseAllOrdersEA closes all existing orders upon initialization. How it works is: OnInit: Call CloseAllOrders to close all market orders and pending orders. OnDeinit: Only logs deinitialization. OnTick: No action is required as the order is closed at the start. CloseAllOrders: Loops from the last order to the first, retrying up to 3 times to close/remove the order with error handling, using the current price of the market order, and removing the pending order. Error handling: Log detailed errors for unsuccessful operations. - Free download of the "EA CloseAll" Expert Advisor for MetaTrader 4 by "getbos" in the MQL5 code base, January 24, 2025


Attachment download

📎ea_closeall.mq4 (3.7 KB)

Source: MQL5 #55164

Verification code Refresh