Risk & protection · MT4 · MT5

AutoTrading Scheduler

by EarnForex

This expert advisor provides automated schedule management for the MetaTrader 4 and MetaTrader 5 platforms.

GitHub stars55
Forks24
Last update6 months ago2 Mar 2026
LicenceApache-2.0
Latest release1.056 months ago

Overview

AutoTrading Scheduler allows users to define specific time windows for each day of the week to toggle the platform's global AutoTrading status. Beyond simple scheduling, the utility can close active positions and delete pending orders before disabling automated trading. It includes configuration options for magic number filtering, support for local or server time, and notification alerts via terminal, email, or push messages. The tool serves to restrict trading activity to specific sessions or events.

Details

Author

EarnForex on GitHub

Type

Risk & protection

Platform

MetaTrader 4 (MQL4) and MetaTrader 5 (MQL5)

Markets

Any symbol

Timeframes

Any timeframe

Risk profile

No grid, martingale or hedging logic was found in its code or README. That says nothing about how it performs: backtest it first.

Topics

mt5expert-advisormql5mql4mt4tradingmetatradermetatrader-4metatrader-5forex-market

Input parameters

Read from AutoTrading Scheduler.mq5. Defaults are the author's; change them in the EA's Inputs tab.

NameTypeDefaultDescription
EnableNativeAlertsboolfalse
EnableEmailAlertsboolfalse
EnablePushAlertsboolfalse
DefaultTurnedOnboolfalseDefault state of the scheduler: ON or OFF
DefaultTimeENUM_TIME_TYPELocalDefault time type
DefaultMondaystringDefault enabled Monday periods
DefaultTuesdaystringDefault enabled Tuesday periods
DefaultWednesdaystringDefault enabled Wednesday periods
DefaultThursdaystringDefault enabled Thursday periods
DefaultFridaystringDefault enabled Friday periods
DefaultSaturdaystringDefault enabled Saturday periods
DefaultSundaystringDefault enabled Sunday periods
Show all 25 inputs
NameTypeDefaultDescription
DefaultClosePosboolfalseClose all trades before turning AutoTrading OFF?
DefaultEnforcebooltrueAlways enforce schedule?
DefaultAllowDenyENUM_ALLOWDENYALLOWDENY_ALLOWSchedule for allowing or denying AutoTrading?
Slippageint2Slippage
ScheduleFilestringScheduleFile (optional)
WaitForNoPositionsboolfalseSwitch A/T off only when there are no open positions?
WaitForNoOrdersboolfalseSwitch A/T off only when there are no pending orders?
MagicNumbersFilterstringMagic numbers filter
IgnoreMagicNumbersboolfalseIgnore trades with above-listed magic numbers
AsyncModeboolfalseAsyncMode: If true, trades are closed in async mode
WhatToCloseENUM_WHAT_TO_CLOSEWTC_ALLIf attempting to close trades, what to close?
DarkModeboolfalseDarkMode: Enable dark mode for a less bright panel.
AutoDetectDarkModebooltrueAutoDetectDarkMode: Dark/light mode will be autodetected.

How to install it

  1. 1Download the sourceUse "Download source (.zip)" above, or clone EarnForex/AutoTrading-Scheduler from GitHub, and unzip it.
  2. 2Open the data folderIn MetaTrader choose File, then Open Data Folder, and go to MQL4/Experts or MQL5/Experts.
  3. 3Copy the filesCopy the .mq4 / .mq5 file into Experts, and any .mqh files into the Include folder the code expects.
  4. 4Compile in MetaEditorOpen the file in MetaEditor and press Compile. Fix any missing includes the compiler reports.
  5. 5Test before you tradeRun it in the Strategy Tester, then attach it to a demo chart and allow algorithmic trading.
Third-party code. ForexR did not write, test or endorse this EA, and the summary above was generated automatically from its README and code. ForexR lists only repositories with readable source code and never hosts files. Read the code, backtest it and use a demo account first; automated trading can lose money quickly.

Similar expert advisors

Account Protector

by EarnForex
124 stars

Account Protector is a risk management expert advisor for MetaTrader 4 and 5 designed to monitor account health and prevent excessive drawdowns. It allows users to set specific triggers based on floating profit or loss, equity levels, free margin, spread, or daily performance. When these conditions are met, the EA auto

MT4MT5 Risk & protection
Updated 7 months ago Apache-2.0 GitHub repository of Account Protector
8 stars

JT Prop Firm Trade Manager is a risk management utility for MetaTrader 4 designed to protect accounts from violating equity and drawdown rules. It monitors daily loss limits and maximum drawdown, allowing users to configure thresholds in either currency or percentage. The tool features time-based filters to restrict ov

MT4 Risk & protection

Prop Firm Manager

by pepshirley
5 stars

Prop Firm Manager is a risk management utility for MetaTrader 4 designed to help traders comply with prop firm rules and protect account equity. The tool monitors maximum loss per trade and daily drawdown limits using either fixed dollar amounts or percentages. It manages trading sessions by restricting overnight and w

MT4 Risk & protection

FX Risk Management Collection

by vishnugovind10
4 stars

This MetaTrader 4 collection provides a set of utilities focused on risk management and order execution. It includes scripts and expert advisors designed to automate the closing of open positions and the removal of pending orders. The logic specifically targets closing trades that have reached a specific gain threshold

MT4 Risk & protection

ICCapitals Secure

by ICCapitals
3 stars

ICCapitals Secure is a risk management utility for MetaTrader 5. It acts as a supervisor to monitor and enforce trading parameters across an account. The expert advisor calculates position sizing based on a user-defined risk percentage per trade and manages risk-to-reward ratios. It features a timer-driven function to

MT5 Risk & protection
Updated 4 years ago None stated GitHub repository of ICCapitals Secure

Equity Protector

by sacrosK11
3 stars

Equity Protector is an account management utility for MetaTrader 5 designed to safeguard capital against significant drawdowns. It operates by monitoring account equity and balance at a user-defined frequency, such as every second. When the floating loss reaches a specified percentage or limit, the utility automaticall

MT5 Risk & protection
Updated 2 years ago None stated GitHub repository of Equity Protector

More risk tools

Need a broker for MT4/MT5?

Compare regulated brokers that support MetaTrader, with spreads, minimum deposits and leverage side by side.

Compare brokers