Risk & protection · MT5

Risk Guard EA

by Mind2Money

This risk management expert advisor for MetaTrader 5 functions as an account-wide watchdog.

GitHub stars1
Forks0
Last update2 months ago26 Jun 2026
LicenceNone stated

Overview

Risk Guard EA monitors equity fluctuations against user-defined thresholds for daily loss, total drawdown, and profit targets. When a limit is breached, the EA automatically closes all open positions and can optionally delete pending orders. It includes a kill switch feature that disables the terminal's global algorithmic trading button to prevent further automated activity. The tool is specifically designed for prop firm challenges, utilizing persistent global variables to track daily resets and threshold states across terminal restarts.

Details

Author

Mind2Money on GitHub

Type

Risk & protection

Platform

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.

Input parameters

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

NameTypeDefaultDescription
InpStartBalancedouble5000起始余额 (0=自动取当前余额并记忆)
InpDailyLossPctdouble4日损限制 % (占起始余额; 0=禁用)
InpTotalLossPctdouble10总损限制 % (占起始余额; 0=禁用)
InpProfitPctdouble5.5净值盈利目标 % (占起始余额; 0=禁用)
InpStopOnLossboolfalse回撤(日损/总损)触发后是否“停止所有EA交易”
InpStopOnProfitbooltrue盈利目标触发后是否“停止所有EA交易”
InpEnableKillSwitchbooltrue?
InpDeletePendingsbooltrue触发平仓时同时删除账户?
InpSlippageint20平仓滑点(点)
InpCloseRetriesint5平仓重试次数(单tick?
InpResetStateboolfalse重置记忆状态(用后请改回 false)
InpShowPanelbooltrue显示信息面板
Show all 18 inputs
NameTypeDefaultDescription
InpEnableServerChanboolfalse启用 Server?
InpServerChanModestringturboturbo = sctapi.ftqq.com; sc3 = <UID>.push.ft07.com
InpSendKeystringPUT_YOUR_SENDKEY_HEREServer?
InpServerChanUIDstring?
InpHttpTimeoutMsint5000WebRequest ?
InpNotifyOnStartboolfalse启动时发一条测试推送(验证?

How to install it

  1. 1Download the sourceUse "Download source (.zip)" above, or clone Mind2Money/RiskGuardEA from GitHub, and unzip it.
  2. 2Open the data folderIn MetaTrader choose File, then Open Data Folder, and go to MQL5/Experts.
  3. 3Copy the filesCopy the .mq5 file into Experts.
  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

AutoTrading Scheduler

by EarnForex
55 stars

This expert advisor provides automated schedule management for the MetaTrader 4 and MetaTrader 5 platforms. It 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 ord

MT4MT5 Risk & protection
Updated 6 months ago Apache-2.0 GitHub repository of AutoTrading Scheduler

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

Mask Protected Trading Panel

by meshalalsultan
2 stars

Mask Protected Trading Panel is a manual execution utility for MetaTrader 5 designed to enforce discipline and strict risk management. It acts as a protective layer, blocking manual orders that violate pre-set rules such as maximum daily trades, drawdown limits, or minimum reward-to-risk ratios. The tool includes a man

MT5 Risk & protection
Updated 3 months ago None stated GitHub repository of Mask Protected Trading Panel

Secure Risk Manager

by ItaloCoutinho
2 stars

Secure Risk Manager is a MetaTrader 5 utility designed to provide a framework for account protection and trade sizing. This expert advisor does not execute independent trade entries; rather, it functions as a risk control tool that calculates lot sizes based on a user-defined risk percentage and risk-to-reward ratios.

MT5 Risk & protection
Updated 5 months ago None stated GitHub repository of Secure Risk Manager

More risk tools

Need a broker for MT5?

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

Compare brokers