by MQL5
KS Auto Trade Close Manager Time Base is a MetaTrader 5 Expert Advisor (EA) that automatically closes open trades at a user-defined local computer time, with a simple on-chart control panel.
Main features
Scheduled auto-close (optional) Closes trades at a specific local time (HH:MM, e.g. 23:55). Uses the terminal/computer’s local time (TimeLocal()), not server time.
Three close modes (selectable from inputs or the panel)
ALL – close every matching position
PROFIT ONLY – close only positions currently in profit
LOSS ONLY – close only positions currently in loss
Filters
All symbols or current chart symbol only
Optional magic-number filter (0 = ignore)
On-chart dashboard
Show/Hide toggle
Live balance, equity, floating P/L, open trade count
Current schedule status and selected mode
Optional live local clock
Three buttons to switch close mode on the fly
Customizable colors, position, and corner
Notifications (per closed trade + summary)
Terminal Alert popup
Mobile push notification
Email
How it works
Enable scheduled close and set the desired local time.
Choose the default mode (ALL / PROFIT ONLY / LOSS ONLY).
The EA checks every second via a timer. When the local time matches the target minute and it hasn’t already fired for that date+time, it closes the filtered positions according to the active mode.
Each closed trade and a final summary can be sent via the selected notification channels.
The panel lets you change the mode or hide the UI without removing the EA.
Thanks for download it and we will wait for your review and suggestions for improvement.