Exp_CloseAllPositionsByTime
This EA automatically closes all open positions at a specified time of day, serving as a scheduled risk management utility rather than a trading strategy. It iterates through all open positions and closes them when the current server time matches or exceeds the user-defined closing time. The tool is commonly used to avoid holding positions over high-risk events such as news releases or market open/close periods.
Open the interactive view (equity curve, symbol switch)Key facts
Backtest results (H1, about 1 year)
Not backtested yet — this EA could not be converted automatically.
Strategy analysis
The core strategy concept of this EA is time-based forced position closing, with no entry signals or technical indicator analysis involved. Regarding entry conditions, the EA itself does not open any positions; it solely executes closing operations at a designated time. The exit condition triggers when server time reaches the user-specified CloseHour and CloseMinute, at which point it iterates through all open positions and closes them one by one. In terms of position sizing, the EA does not involve any lot calculation or position adjustment logic; it only performs full closure of existing positions. For money management, there is no independent money management module, and the capital released after closing depends on the profit or loss status of the original positions. Overall, this EA is a purely time-triggered risk management utility with simple and straightforward strategy logic, lacking complex conditional checks or filtering mechanisms.
Strengths
- Simple and clear logic with a single dedicated function, no unexpected trading behavior
- Effectively avoids overnight risk or position risk during specific high-risk periods
- Can be used as a supplementary risk management tool alongside other trading strategies
Weaknesses
- Lacks fine-grained control; cannot selectively close positions by symbol or direction
- No retry mechanism or error handling feedback for failed close operations
- Time trigger logic may result in delayed closing due to server time offset or latency
Possible improvements
- Add closing options filtered by symbol, direction, or magic number to improve flexibility
- Add a retry mechanism and logging for failed close operations to enhance reliability and traceability
Risk assessment
Overall risk: Safe
- Time trigger may result in imprecise closing due to server latency
- Slippage during batch closing may cause actual close prices to deviate from expected
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
CloseHour | 0 | Hour for closing positions (0-23) |
CloseMinute | 0 | Minute to close positions (0-59) |
CloseAllDay | false | Close positions every day (true/false) |
MagicNumber | 0 | EA magic number to close (0 for all positions) |
Similar Utility EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.