Funded Account Guardian
- 实用工具
-
Augusto Martin D'anna
你好,欢迎访问我的个人资料。我是 Augusto Danna,拥有7年经验的交易员。我擅长结合市场经验与编程技能来实现交易策略的自动化。如有任何疑问,欢迎随时联系我!
自动交易系统: 开发 MT4 和 MT5 的智能交易系统 (Expert Advisors)。
自定义指标: 开发和修改技术指标。
高级风险管理: 实施移动止损 (Trailing Stop)、保本 (Breakeven) 和动态手数计算。
策略转换: 将 TradingView (Pine Script) 策略转换为 MQL4/MQL5。
策略优化: 策略回测与参数调整。 - 版本: 1.0
Funded Account Guardian protects prop firm challenge and funded accounts from breaking the daily loss and maximum loss rules. It does not open trades. Attach it to one chart and it watches the equity of the whole account on every tick and once per second.
What it does
- 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.
- Maximum loss: when equity reaches the maximum loss floor, it closes everything and blocks trading until you reset it. Static or trailing floor.
- Profit target (optional): when equity reaches the target, it closes everything and locks the account, so a passed challenge is not given back.
- Safety buffer: it acts a chosen percentage before the real limit (default 0.5%), to leave room for slippage and spread.
- While blocked, any new position (manual or from other EAs) is closed immediately. The terminal global variable PFG_BLOCKED is set to 1 (until the next day) or 2 (permanent), so your own EAs can check it before trading.
- Status on the chart: equity, daily floor, maximum floor, room left to each one, target and state.
Inputs
- Initial account balance
- Daily loss limit, % and how it is measured (initial balance or start-of-day balance)
- Max loss limit, % and mode (static or trailing)
- Profit target, % (0 = off)
- Safety buffer, %
- Day reset hour (server time)
- Also close manual trades (magic 0)
- Show status on the chart
Notes
- Positions are closed at market, so in fast markets the final equity can be slightly below the floor. Use the buffer to stay on the safe side.
- To remove a permanent block, delete the PFG_BLOCKED global variable (F3 in the terminal).
- Prop firms define their limits in different ways. Check the exact rules of your firm and set the inputs to match them.
