Guarda come scaricare robot di trading gratuitamente
Ci trovi su Facebook!
Unisciti alla nostra fan page
Script interessante?
Pubblica il link!
lasciare che altri lo valutino
Ti è piaciuto lo script? Provalo nel Terminale MetaTrader 5
Sistemi Esperti

Equity Guard — Daily Loss Limit Guardian with Panic Panel - sistema esperto per MetaTrader 5

Francisco Javier Mesa Diez
Francisco Javier Mesa Diez
  • Trading Systems Developer al  Spain
  • Spagna
  • 197
Sviluppatore di sistemi di trading — MT5, TradingView, Python | EA, indicatori, dashboard, bot e integrazioni
Sviluppo strumenti su misura per trader: Expert Advisor (EA), indicatori, dashboard, strumenti di gestione del rischio, bot di alert e integrazioni tra piattaforme.
Visualizzazioni:
112
Valutazioni:
(1)
Pubblicato:
Freelance MQL5 Hai bisogno di un robot o indicatore basato su questo codice? Ordinalo su Freelance Vai a Freelance

Equity Guard is an account-level risk manager that enforces your daily loss limit. When the daily loss reaches a configurable trigger, it closes every position and pending order and keeps the account flat until the next daily reset. It was designed with prop-firm daily drawdown rules in mind, but it works on any broker and any account.


Equity Guard panel — ACTIVE state with live gauge and daily loss progress
Equity Guard panel

The EA works on any symbol and any timeframe, because it monitors the whole account rather than the chart it is attached to. Attach it to one chart per account only. The daily reset time is fully configurable and is interpreted in your broker's server time.

  • Daily loss limit as percent of the day-start balance/equity or as a fixed amount — adapts to any account size and currency
  • Lock trigger configurable as a percent of the limit, so the account locks before the hard limit is breached
  • Flat enforcement: while locked, any position opened by other EAs is closed immediately
  • Manual CLOSE ALL and LOCK/UNLOCK buttons with two-click confirmation against accidental clicks
  • Modern draggable panel with live gauge, minimizable to a compact pill — position is remembered across restarts
  • State persistence, hedging and netting accounts supported, automatic filling-mode detection, no DLLs required


Lock triggered: all positions closed, account kept flat until the next daily reset

equity_guard_locked_alert


At the configured reset time the EA captures a day-start reference (balance or equity, your choice). It then monitors account equity in real time using a one-second timer, incoming ticks and trade events. If the daily loss reaches the lock trigger, it flattens the account and locks. The lock releases automatically at the next daily reset, or manually via the UNLOCK button with a recovery hysteresis so it does not re-fire instantly.


Input parameters — all limits, reset time and alerts are configurable

equity_guard_inputs



Input Default Description
Daily loss limit mode Percent Limit as % of day-start value or as fixed money
Daily loss limit (% of day-start) 5.0 Used in percent mode
Daily loss limit (money) 500 Used in money mode, in account currency
Lock trigger (% of daily limit) 80 Loss level that fires the lock, as % of the limit
Day-start reference Balance Balance or equity captured at reset time
Keep account flat while locked true Closes anything opened by other EAs while locked
Reset hour / minute 0 / 0 Daily reset moment, in broker server time
Max deviation (points) 30 Slippage tolerance for closing orders
Pop-up / Push / Sound alerts true / false / true Notifications on lock and on daily reset
Initial X / Initial Y 16 / 16 Initial panel position — drag the header to move it
Base font size 11 Scales all the panel text



Minimized mode — compact pill with live status, draggable and clickable to restore

equity_guard_minimized



This is a risk-management utility: it opens no trades and makes no profit claims. You bring your own strategy or EAs — Equity Guard simply makes sure that one bad day cannot take the whole account down with it.
Result - type-safe error handling for MQL5 without exceptions Result - type-safe error handling for MQL5 without exceptions

A small, dependency-light library that brings a Rust-style Result type to MQL5. Functions return a single value-or-error object instead of relying on the global GetLastError() state, so failures are explicit and impossible to ignore. Includes ResultValue (value types) and Result (pointer-held objects), an Error struct, early-return macros (TRY, RETURN_ON_ERROR, ...) and optional Then/Match/MapError callbacks.

Pip Value Calculator Pip Value Calculator

Live pip value, risk-based lot sizing, custom volume risk analysis & open position P/L — all in one panel.

Accelerator Oscillator (AC) Accelerator Oscillator (AC)

The Acceleration/Deceleration Indicator (AC) measures acceleration and deceleration of the current driving force.

MACD Signals MACD Signals

Indicator edition for new platform.