Skip to main content
Cart Log in Sign up
Utility

AutoTrading Scheduler: a timetable for AutoTrading

Switches MetaTrader’s AutoTrading button on and off according to your weekly schedule and can close trades before switching it off.

Platform

License

Price

≈

Version

You own this product. Go to My products
Get the demo

  • Automatic, instant delivery once payment confirms
  • Free updates for every future version
  • 12 months of technical support
  • Refunds under a transparent policy
  • Pay with USDT, BTC, ETH and more
  • Free: no payment, download it right now

Risk warning: Trading financial markets carries a risk of losing capital, and past performance does not guarantee future results. Terms & conditions

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 0 or 00:00 means 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 WaitForNoPositions or WaitForNoOrders is on.
  • MagicNumbersFilter decides which trades are closed or left alone.

Schedule file

  • In the ScheduleFile text file one line holds the day name (such as Monday or Mon) 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.

Works with every broker

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

Input parameters
ParameterDefaultDescription
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

  1. Unzip the download. It contains an MQL4 or MQL5 folder.
  2. 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.
  3. Restart the terminal or right-click in Navigator and choose Refresh. MetaTrader compiles the source on its own.
  4. Drag AutoTrading Scheduler from Expert Advisors onto a chart. One chart is enough for the whole terminal.
  5. 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”.
  6. If you want it to close trades too, Algo Trading/AutoTrading and live trading for the expert must be on.
  7. Type each day’s periods into the panel and press Switch to turn the scheduler on.

Changelog

  1. v1.05 MT4 New November 30, 2026
    • Published on TradeKit
  2. 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 review

FAQ

Why does it need DLL access, and is that safe?
MetaTrader has no function for switching the AutoTrading button. The tool uses user32.dll, which is part of Windows, to send the terminal window the same command as a click on that button. No separate DLL file ships with it and the full source is available to you.
Does it stop only the robots on one chart?
No. The AutoTrading button is global, so once it is off no expert in that terminal can trade. Your manual trades are not affected.
What happens to open trades when AutoTrading goes off?
They stay open and their stops and targets remain active at the broker, but robots no longer manage them. Tick the close-trades option in the panel if you want them closed.
Local time or server time?
Choose Server if you plan around chart time and your broker’s sessions. Note that server time only advances when ticks arrive and stands still while the market is closed. Local follows the Windows clock.
Does it work on Mac or Linux?
It is written for Windows and depends on user32.dll. Running it under Wine or the Mac build of MetaTrader has not been checked and may not work.

Related products

More Utilities and tools from the same family

Compare Compare now