Daytime Auto Close MT5
- Utilities
- Version: 1.0
- Activations: 7
Daytime Auto Close is a time-based position management Expert Advisor that automatically sends requests to close open positions at or after your chosen cutoff time. Choose daily closure or Friday-only closure to support your end-of-day or end-of-week trading routine.
Unlike traditional trading robots, this utility never opens new trades. It manages existing BUY and SELL positions across the entire account, including manual trades and positions opened by other Expert Advisors. The schedule follows your broker’s server time.
Key Features
-
Daily closing mode: Automatically attempts to close all open positions at or after the configured time each day.
-
Friday closing mode: Applies the closing schedule on Fridays only.
-
Custom closing time: Set your preferred hour and minute, with a default cutoff of 23:55.
-
Broker server time: Uses the trading server’s clock rather than your computer’s local time.
-
Account-wide management: Covers all symbols and both BUY and SELL positions—not just the chart where the EA is attached.
-
Manual and EA positions: Processes existing positions regardless of their magic number.
-
No new trades: Only sends position-closing requests; it does not open replacement or reversal trades.
-
Continued closing attempts: On subsequent chart ticks after the cutoff, attempts to close positions that remain open, including partially closed positions.
-
Execution logging: Records successful closures, partial closures, and failed requests in the terminal logs.
Parameters
-
Time Close Mode: Select daily closing or Friday-only closing. Default: daily.
-
Close Hour: Closing hour in broker server time, from 0 to 23. Default: 23.
-
Close Minute: Closing minute, from 0 to 59. Default: 55.
Important Usage Notes
This utility affects all open positions in the account. It does not limit closure to manual trades, a particular symbol, or a specific Expert Advisor.
The closing condition remains active from the cutoff until midnight on applicable days. Positions opened during that interval are also eligible for closure on subsequent chart ticks.
Pending orders are not deleted. The EA checks the schedule on incoming ticks, so it does not guarantee execution at the exact configured second. Successful closure depends on the trading server accepting and executing the request; automatic closure does not guarantee a profitable exit.
