- Product type
- Utility
- Platforms
- MT4 · MT5
- Market / symbol
- Gold, FX majors, FX minors, Indices, Crypto, Oil
- Experience level
- Intermediate
- Delivery
- File download from your dashboard
- Last update
- November 30, 2026
- Broker
- Any broker
- Product type
- Utility
- Platforms
- MT4 · MT5
- Market / symbol
- Gold, FX majors, FX minors, Indices, Crypto, Oil
- Experience level
- Intermediate
- Delivery
- File download from your dashboard
- Last update
- November 30, 2026
- Broker
- Any broker
Overview
AutoTrading Scheduler is for when you want your robots to trade only at certain hours: the London session only, say, or all day except news times and the weekend. You write time periods for each weekday and the tool switches AutoTrading off for the rest.
It works on the global AutoTrading button (Algo Trading in MT5), so it affects every expert advisor in that terminal, not just one chart. It needs permission to use DLL imports, because MetaTrader gives experts no official way to change that button.
- A separate schedule for each weekday, several periods a day, down to the second
- Choice of your computer’s clock or the broker’s server time
- Allow mode (permitted hours) or Deny mode (blocked hours)
- Can close positions and pending orders before switching off, with a magic-number filter
- Can load the schedule from a text file, including schedules for specific dates
- Terminal alerts, email and push notifications
AutoTrading Scheduler is a utility with no trading strategy of its own. Its own description states there is no guarantee it will work as intended. Test your schedule and the close-trades option on a demo account before using it live.
Source and licence
This tool is the open-source project AutoTrading Scheduler by EarnForex.com, released under the Apache 2.0 licence. The source code is included in the download unchanged, with the licence text next to it. TradeKit provides the description, install guide and support. Original repository: github.com/EarnForex/AutoTrading-Scheduler
Strategy logic
Writing a schedule
- Each day has one line. Periods are separated by commas, start and end by a dash, for example
12-13, 14:00-16:45:22, 19h55 - 21h. - Times are 24-hour. An end of
0or00:00means the end of that day. - A period whose end is earlier than its start is ignored.
- The “Set to all empty” button copies Monday’s schedule into every empty day.
Deciding on or off
- The tool compares the clock with the schedule every 200 milliseconds.
- In Allow mode AutoTrading is off outside the periods and on inside them. Deny mode is the reverse.
- With “Always enforce schedule” on, a manual change of the button is reverted to what the schedule says. With it off, the tool toggles only once per period.
- A day with an empty schedule means, in Allow mode with enforcement, AutoTrading off all day.
Closing trades before switching off
- If the close option is ticked, positions and pending orders are closed first according to
WhatToClose, then the button is switched off. - If some trades fail to close this is logged and AutoTrading is switched off anyway, unless
WaitForNoPositionsorWaitForNoOrdersis on. MagicNumbersFilterdecides which trades are closed or left alone.
Schedule file
- In the
ScheduleFiletext file one line holds the day name (such asMondayorMon) and the next line holds its periods. - Instead of a day name you can write a date as
YYYY-MM-DD; that date’s schedule then replaces the weekly one. - Days loaded from the file are locked in the panel.
Specifications
Requirements
- MetaTrader 4 or 5 on Windows
- “Allow DLL imports” enabled for this expert (it uses Windows’ user32.dll)
- The terminal must be running at the scheduled times; use a VPS for round-the-clock use
- No cTrader version
- Platforms
- MT4MT5
- Delivery
- Use case
- Prop challenge، News trading
- Market
- Gold، FX majors، FX minors، Indices، Crypto، Oil
- Experience level
- Intermediate
Compatible brokers
Which brokers this product works with, and which it works best with.
No broker restriction: it works with any broker that offers the product's platform.
The broker choice is yours; TradeKit is not a broker. Check account terms before depositing. All brokers
Input parameters
| Parameter | Default | Description |
|---|---|---|
DefaultTurnedOnStart with the scheduler on; by default it is off and you switch it on from the panel |
false |
Start with the scheduler on; by default it is off and you switch it on from the panel |
DefaultTimeClock used for the schedule: your computer (Local) or the broker server (Server) |
Local |
Clock used for the schedule: your computer (Local) or the broker server (Server) |
DefaultMondayMonday periods, e.g. 12-13, 14:00-16:45; there is a matching input for each weekday |
|
Monday periods, e.g. 12-13, 14:00-16:45; there is a matching input for each weekday |
DefaultAllowDenyWhether the listed periods are allowed hours (Allow) or blocked hours (Deny) |
ALLOWDENY_ALLOW |
Whether the listed periods are allowed hours (Allow) or blocked hours (Deny) |
DefaultEnforceAlways enforce the schedule; when off it toggles only once per period and leaves your manual change alone |
true |
Always enforce the schedule; when off it toggles only once per period and leaves your manual change alone |
DefaultClosePosTry to close trades before switching AutoTrading off |
false |
Try to close trades before switching AutoTrading off |
WhatToCloseWhen closing: positions only, pending orders only, or both |
WTC_ALL |
When closing: positions only, pending orders only, or both |
WaitForNoPositionsDo not switch AutoTrading off while any position is open |
false |
Do not switch AutoTrading off while any position is open |
MagicNumbersFilterMagic numbers used when closing trades (separated by commas, spaces or semicolons) |
|
Magic numbers used when closing trades (separated by commas, spaces or semicolons) |
IgnoreMagicNumbersWhen on, trades with the listed magic numbers are left alone; when off, only those are closed |
false |
When on, trades with the listed magic numbers are left alone; when off, only those are closed |
ScheduleFileOptional text file to load a weekly schedule or schedules for specific dates |
|
Optional text file to load a weekly schedule or schedules for specific dates |
EnableNativeAlertsTerminal alert when AutoTrading is switched; email and push have their own inputs |
false |
Terminal alert when AutoTrading is switched; email and push have their own inputs |
Install guide
- Unzip the download. It contains an
MQL4orMQL5folder. - In MetaTrader choose File › Open Data Folder and copy the folder’s contents into the folder of the same name. The AutoTrading Scheduler folder must be copied whole, with its companion files and the Images folder.
- Restart the terminal or right-click in Navigator and choose Refresh. MetaTrader compiles the source on its own.
- Drag AutoTrading Scheduler from Expert Advisors onto a chart. One chart is enough for the whole terminal.
- In the expert’s settings tick “Allow DLL imports” (Common tab in MT4, Dependencies tab in MT5). Without it the tool cannot change the button and the panel shows “DLLs disabled”.
- If you want it to close trades too, Algo Trading/AutoTrading and live trading for the expert must be on.
- Type each day’s periods into the panel and press Switch to turn the scheduler on.
Changelog
-
v1.05 MT4 New November 30, 2026
- Published on TradeKit
-
v1.05 MT5 November 30, 2026
- Published on TradeKit
Buyer reviews
No reviews yet.
Only verified buyers can review. Reviews are moderated before publishing.
Only verified buyers can review. Reviews are moderated before publishing.
Sign in to write a reviewFAQ
Why does it need DLL access, and is that safe?
Does it stop only the robots on one chart?
What happens to open trades when AutoTrading goes off?
Local time or server time?
Does it work on Mac or Linux?
Related products
More Utilities and tools from the same family
Risk warning