Scheduling Expert Advisor Trading Modes by Time and Weekday
Summary
This article explains a module for assigning an Expert Advisor different trading permissions according to time of day and weekday. Its six modes range from allowing both directions or only one direction, to stopping trading and closing positions, waiting while ignoring new signals, or blocking new entries while continuing to manage existing positions. Rules are configured with start and end times, a weekday or all weekdays, and a chosen mode.
Examples apply the module to exchange sessions, clearing periods, overnight closures, weekends, and Friday position management. The examples illustrate how a schedule can pause entries around volatile or unavailable periods and prevent new positions late in the week. The module only reports the active state; the EA must implement the corresponding actions, including any position closures. The article is an implementation guide, not evidence that the example schedule improves returns, and exchange calendars or session times may require adaptation.
Key ideas
- The module returns one of six trading states based on configured times and weekdays.
- States can permit one or both trade directions, pause activity, stop trading, or disallow new entries.
- Existing positions may continue to be managed in the no-new-entry state.
- The examples schedule pauses around exchange sessions, clearings, overnight closures, and weekends.
- The EA itself must carry out the actions associated with each returned state.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.