Funded Account Guardian Pro
- Utilità
-
Augusto Martin D'anna
Sviluppatore MQL5 e Pine Script | Trader dal 2019 | Validazione di strategie
Da trader so che un robot vale quanto la sua logica. Mi assicuro che il tuo EA faccia esattamente ciò che la tua strategia prevede. - Versione: 1.0
- Attivazioni: 5
Funded Account Guardian Pro protects prop firm challenge and funded accounts from breaking the firm's rules. It never opens trades. Attach it to one chart and it watches the whole account (manual trades and every EA) once per second.
It includes everything in the free Funded Account Guardian (daily loss, maximum loss, profit target lock) and adds the rules that usually end funded accounts: holding over the weekend, holding overnight, one oversized day, too many trades, and trades without a stop loss.
Loss limits
- Daily loss: when equity reaches the daily floor, it closes all positions and pending orders and blocks trading until the next day. The floor can be measured from the initial balance or from the balance at the start of the day. The day-start balance is rebuilt from the deal history, so it is correct even if the terminal was off at the reset time. Deposits and withdrawals are not counted as trading losses.
- Maximum loss: static or trailing floor. When equity reaches it, it closes everything and blocks trading until you reset it.
- Safety buffer: it acts a chosen percentage before the real limit, to leave room for slippage and spread.
Profit rules
- Profit target lock: closes everything and locks the account when the target is reached, so a passed challenge is not given back.
- Daily profit lock: when the day's result (closed + floating) reaches a % of the initial balance, it closes and stops trading for the rest of the day. Useful for consistency rules that limit how much of the total profit can come from one day.
Time rules (server time)
- Friday close: closes everything at a chosen Friday time and blocks trading until the market reopens. For accounts that may not hold positions over the weekend.
- Daily close: closes everything at a chosen time every day and blocks trading until the day reset. For accounts that may not hold positions overnight.
Trade rules
- Max new trades per day: trades opened after the limit is reached are closed at once.
- Max open positions: the newest positions above the limit are closed.
- Stop loss required: positions without a stop loss are closed after a grace period (default 30 seconds).
- Max risk per trade: positions whose loss at the stop would exceed a % of the initial balance are closed.
Information
- Warning (alert and optional push notification) when a chosen % of the daily loss room has been used, once per day.
- Trading days counter from a start date, with the minimum required by your firm.
- Panel on the chart: equity, day result, daily floor, maximum floor, room left to each, target, trades today, trading days and status.
- The terminal global variable PFG_BLOCKED is 1 (until the next day) or 2 (permanent) while trading is blocked, so your own EAs can check it before opening trades.
Inputs
- Initial balance, daily loss %, how the daily limit is measured, maximum loss % and mode, safety buffer, day reset hour
- Profit target %, daily profit lock %
- Friday close on/off and time, daily close on/off and time
- Max trades per day, max open positions, stop loss required, grace seconds, max risk per trade %
- Warning %, push notifications, trading days start date and minimum, manage manual trades, show panel
How it was tested
Every rule was checked in the Strategy Tester (EURUSD M1) with a test EA that opens trades at fixed times: trade without stop loss closed after the grace period, 5% risk trade closed with a 1% limit, fourth trade closed with a limit of 3, third position closed with a limit of 2, positions closed at the daily close and at the Friday close, trades opened after the Friday close closed at once, daily loss and daily profit lock blocks lifted the next day. It also ran on a demo account (screenshot).
Notes
- Positions are closed at market, so in fast markets the final equity can be slightly beyond the floor. Use the buffer to stay on the safe side.
- All times are broker server time. Check what time your broker's server shows before setting the Friday and daily close times.
- Prop firms define their rules in different ways and change them. Check the exact rules of your firm and set the inputs to match them. The guardian reduces the chance of a rule breach caused by a forgotten position or a runaway EA; it does not make a strategy profitable.
- To remove a permanent block, delete the PFG_BLOCKED global variable (F3 in the terminal).
- It does not use DLLs or external connections.
