Rejoignez notre page de fans
- Vues:
- 112
- Note:
- Publié:
-
Besoin d'un robot ou d'un indicateur basé sur ce code ? Commandez-le sur Freelance Aller sur 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

- 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

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

| 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

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
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
Live pip value, risk-based lot sizing, custom volume risk analysis & open position P/L — all in one panel.
Accelerator Oscillator (AC)
The Acceleration/Deceleration Indicator (AC) measures acceleration and deceleration of the current driving force.
MACD Signals
Indicator edition for new platform.