PropGuard 1.02 — account-level risk manager for prop-firm accounts
One copy on any chart watches every position on the account, whatever EA or manual trading opened it, and closes everything before the firm's daily or maximum loss limit is hit. Version 1.02 adds size caps in money, a stop-loss requirement and a per-position risk cap.
Why 1.02: numbers from my own account
I trade a 100k FTMO account by hand next to my own EAs. Four days of my journal (46 manual trades) showed two things the daily and maximum loss limits alone do not catch:
The screenshot replays both in the Strategy Tester (a tester-only build opens the two trades; the guard code is the one attached here), with InpRequireStopLoss true, InpMaxRiskPerPos 750 and the size caps off so only the stop rules act: the 18-lot stop is pulled in to the 750 cap at once, and the 8 lots without a stop are closed after 62 seconds.
What it does
Daily loss. At the reset time (default 01:00 server, which is 00:00 CE(S)T at FTMO) it records the equity. If equity drops by more than InpDailyLossPct of InpInitialBalance during the day, all positions are closed, pending orders deleted, and with InpBlockAfterBreach any new position is closed again until the next reset. Set the guard below the firm's rule: 4% for a 5% rule, 2.5% for a 3% rule, so there is room for slippage when it closes.
Maximum loss. Three ways to measure it (InpMaxLossMode):
The guard fires at InpMaxLossPct (default 8% for a 10% rule).
Size caps in money, not lots. A lot cap makes no sense across instruments: 15 lots of an index CFD at 25,000 is worth about 430,000, 15 lots of another index at 7,700 about 115,000, 15 lots of EURUSD about 1,750,000. PropGuard measures every position as lots x current price x value of one point per lot, in the account currency, and compares that:
Why money: a 1% move against 300,000 of exposure is 3,000, whatever the symbol. If the daily limit is 3,000, that is the number to set. The old InpMaxLotsPerPos is still there (0 = off) for anyone who wants a lot cap as well.
Stop-loss requirement. With InpRequireStopLoss, any position that still has no stop loss InpStopGraceSeconds after it was opened is closed. Sixty seconds is enough to type one in.
Risk cap per position. InpMaxRiskPerPos is the most money one position may risk between its open price and its stop loss. If a stop risks more, PropGuard moves it to the distance that risks exactly the cap. If the market has already gone past that distance when it looks, the position is closed instead. The cap is in account currency, so it also fits every instrument. Positions whose stop is already in profit are left alone.
Best-day information. With InpBestDayInfo the log shows, at every reset, the most profitable day as a share of the sum of all positive days. FTMO's 1-Step rule requires that share to be at most 50% when the challenge is passed. Information only, no action.
Also: a trading window and a Friday close (server hours), a high-impact news filter from the MT5 economic calendar, a magic number to exclude, push notifications on every action, and a CSV log per account in MQL5/Files. State (day start, breach flag, highest daily balance) is kept in terminal global variables, so a restart after a breach does not re-arm trading before the next reset.
Inputs
Example, FTMO 1-Step 100k (3% daily, 10% trailing, best day 50%): InpInitialBalance 100000, InpDailyLossPct 2.5, InpMaxLossPct 8, InpMaxLossMode trailing daily balance, InpResetHour 1, InpMaxNotionalPerPos 300000, InpMaxNotionalTotal 450000, InpRequireStopLoss true, InpMaxRiskPerPos 750, InpBestDayInfo true.
Example, 2-step 200k (5% daily, 10% static): InpInitialBalance 200000, InpDailyLossPct 4, InpMaxLossPct 8, InpMaxLossMode static, InpResetHour 1.
Notes. In the Strategy Tester the EA opens and closes one minimum-lot position at start so the closing logic can be seen working; on a live or demo account it never opens anything. The tester has no economic calendar, so the news filter is inactive there. The time rules use server time; check the reset hour after a daylight-saving change, because the firm's midnight and the server clock do not always move on the same date.

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
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
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
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.