Voir comment télécharger gratuitement des robots de trading
Retrouvez-nous sur Telegram !
Rejoignez notre page de fans
Un script intéressant ?
Poster un lien vers celui-ci -
laisser les autres l'évaluer
Vous avez aimé le script ? Essayez-le dans le terminal MetaTrader 5
Experts

PropGuard - account risk manager for prop firm accounts - expert pour MetaTrader 5

Sergej Michajlik
Sergej Michajlik
I build and maintain MT5 Expert Advisors, mostly for people trading index CFDs on prop firm accounts. DAX and S&P 500 are the markets I know best, I trade them myself on an FTMO account, so I know the rules from the trader side, not only from the code side.
Vues:
177
Note:
(2)
Publié:
Mise à jour:
PropGuard.mq5 (15.48 KB) afficher
MQL5 Freelance Besoin d'un robot ou d'un indicateur basé sur ce code ? Commandez-le sur Freelance Aller sur Freelance

PropGuard watches the whole account, not one chart. Attach one copy to any chart and it checks every position on the account, whatever EA or magic number opened it, and closes everything when a prop firm style limit is reached.

What it enforces: a daily loss limit on equity including floating profit, with a reset at a server time you set; a maximum loss measured either from the initial balance or trailing from the equity peak; a lot cap per position; an optional trading window; an optional Friday close; and an optional blackout around high impact news from the MT5 economic calendar. After a breach it flattens the account, cancels pending orders and keeps closing anything new until the next daily reset, so another EA cannot trade you into a second breach on the same day.

Everything it does is written to the Experts log, to a CSV file in MQL5\Files named after the account login, and optionally sent as a push notification.

Symbol and timeframe do not matter, the guard works on the account. It runs on a timer as well as on ticks, so it keeps checking during quiet markets.

Inputs:
InpInitialBalance, the account size the firm's rules refer to.
InpDailyLossPct and InpMaxLossPct, the guard's own limits in percent. Set them a little below the firm's, for example 4 and 8 on an account with 5 and 10 percent rules, so you stop before the firm stops you.
InpMaxLossMode, static from the initial balance or trailing from the equity peak.
InpResetHour and InpResetMinute, the daily reset in server time.
InpMaxLotsPerPos, any position larger than this is closed.
InpCloseOnBreach and InpBlockAfterBreach, flatten on a breach and keep the account flat until the next reset.
InpUseWindow with start and end hour, InpFridayClose with its hour, both in server time.
InpUseNewsFilter, InpNewsCurrencies, InpNewsMinutesBefore and After, the calendar blackout.
InpPushAlerts, push notification on every action.
InpMagicToIgnore, positions with this magic number are left alone.

Tested on an FTMO trial account.

log properties


NeonDesk - Neon Manual Trading Panel with Multi-Timeframe Bias NeonDesk - Neon Manual Trading Panel with Multi-Timeframe Bias

Draggable on-chart manual trading panel with multi-timeframe bias, ATR SL/TP hints, a trailing stop and one-click BUY/SELL/CLOSE ALL.

Price Action Volumetric Order Blocks MT5 Price Action Volumetric Order Blocks MT5

Open-source MT5 indicator for confirmed market structure, volumetric order blocks and estimated buy/sell activity.

ImpulseCandle - impulse bar marker with ATR body filter and volume confirmation ImpulseCandle - impulse bar marker with ATR body filter and volume confirmation

Marks impulse candles: body at least ATR x multiplier, body at least a set share of the candle range, close near the extreme, optional tick volume confirmation. Green arrow below a bullish impulse, red above a bearish one. Closed bars only, no repainting. Signals are in the two buffers so an Expert Advisor can read them with iCustom.

Stormbreaker ADX - Supertrend and DMI Trend EA Stormbreaker ADX - Supertrend and DMI Trend EA

Trend-following Expert Advisor for MetaTrader 5 combining Supertrend direction with ADX and DI confirmation. Uses an ATR-based stop loss and risks up to 0.5% of equity per trade.