Prop Firm Hard Equity and News Circuit Breaker
- Utilitários
- Versão: 1.0
- Ativações: 5
In proprietary trading evaluations and funded accounts, a single unmonitored equity excursion or a two-minute macro news slippage spike can permanently breach an account. Relying on per-position Stop Losses isn't enough when multiple correlated positions are open simultaneously, when midnight rollover widens the Ask line, or when an Expert Advisor keeps opening new grid or martingale entries after an intraday drawdown threshold has already been reached.
Prop Firm Hard Equity and News Circuit Breaker is a real-time account protection and execution enforcement utility for MetaTrader 5. Designed to run on a single dedicated chart alongside your manual trades or third-party Expert Advisors, it reconstructs your daily reset balance from deal history, tracks live floating equity against a configurable pre-breach safety cushion, monitors the native MT5 Economic Calendar for high-impact releases, and enforces an intraday terminal lockout once your safety floor is touched.
Core Protection Architecture
- Daily Reset Balance & 00:00 HWM Snapshot Gate: Reconstructs your daily reset balance from deal history (handling intraday deposits, payouts, commissions, and swap adjustments). When running across the daily reset hour (or attached within 5 minutes of reset, or paired with PropFirm_Live_Breach_Line at 00:00 server reset), it locks the true 00:00 HWM (Higher of Balance or Equity) snapshot in terminal GlobalVariables. If attached mid-day without a recorded 00:00 snapshot, it uses reconstructed 00:00 Balance ( [00:00 Bal Est] ); if you carried open floating profit across midnight before attaching the EA on day one, enter your dashboard's exact daily starting equity in InpManualStartBase so the HWM floor isn't underestimated.
- Pre-Breach Equity Safety Cushion: Set your evaluation model's hard daily limit (e.g., 5.0% ) and arm the Circuit Breaker above it (e.g., 4.2% or an additional dollar cushion; set 0.0 to disable). When floating equity touches the breaker level, pending orders are canceled and open positions are closed via dynamic filling mode detection (FOK/IOC/RETURN).
- True Static Overall Account Floor: Automatically reconstructs your initial account deposit from deal history (or uses a manual override) so the static overall drawdown trigger (e.g., 9.0% ahead of a 10.0% static floor; set 0.0 to disable) remains anchored to your starting account size rather than drifting with daily balance changes.
- High-Impact News Blackout Shield: Queries the native MQL5 Economic Calendar for High-Impact events affecting your active chart currencies, open position / pending order currencies, or all major USD releases. Automatically flattens positions and locks the news blackout window from N minutes before the release until M minutes after the event (maintaining the blackout lock until the post-news window expires even after positions are flattened).
- Persistent Intraday Lockout (Post-Fill Anti-Rogue EA Sweep): Once tripped for the day, the lockout state is persisted in terminal GlobalVariables. Because MQL5 does not permit one EA to block another chart's outbound trade request at the terminal kernel, this utility intercepts unauthorized new positions or pending orders via OnTradeTransaction and 100ms OnTimer sweeps, closing or canceling them immediately upon detection until the next daily reset. By default, manual mid-day unlocking is disabled ( InpAllowManualUnlock = false ); when enabled, it requires a non-blocking 2-step click confirmation within 3 seconds.
- One-Click Panic Flatten & Black-Box CSV Audit Log: Includes an interactive on-chart PANIC FLATTEN & LOCK TODAY button and writes timestamped enforcement events to MQL5/Files/PropFirm_CircuitBreaker_Audit.csv .
Input Parameters (All 23 Inputs)
| Parameter | Default | Description |
|---|---|---|
| InpBaseMode | 00:00 HWM | Selects Higher of Balance or Equity (HWM) vs Balance Only at daily reset. |
| InpCashflowMode | Re-Anchor | Shifts daily base on intraday deposits/payouts or strips external cashflows. |
| InpResetHourServer | 0 | Daily reset hour in broker server time (0-23). |
| InpFirmMaxDailyLossPct | 5.0 | Maximum daily loss limit percentage of the evaluation model. |
| InpBreakerDailyTrigPct | 4.2 | Pre-breach daily circuit breaker trigger percentage ( 0.0 = disabled). |
| InpMinSafetyCushionUsd | 0.0 | Optional extra dollar cushion added above the hard daily floor ( 0.0 = off). |
| InpManualStartBase | 0.0 | Manual daily starting reference override in account currency ( 0.0 = auto). |
| InpInitialAccountSize | 0.0 | Initial account size for static overall drawdown ( 0.0 = auto first deposit). |
| InpFirmMaxOverallPct | 10.0 | Maximum overall loss limit percentage. |
| InpBreakerOverallPct | 9.0 | Overall drawdown circuit breaker trigger percentage ( 0.0 = off). |
| InpNewsMode | Open Pos Currencies | High-impact economic calendar filter scope. |
| InpNewsPreFlattenMins | 2 | Minutes before a high-impact release to flatten positions and lock execution. |
| InpNewsPostUnlockMins | 2 | Minutes after a high-impact release to maintain the execution lock. |
| InpClosePosOnNews | true | Liquidates open positions when entering a high-impact news window. |
| InpDeletePendingOnNews | true | Deletes pending orders when entering a high-impact news window. |
| InpScopeMode | All Symbols | Applies liquidation and lockout across the entire account or active symbol only. |
| InpLockUntilDailyReset | true | Keeps the terminal locked against new trades until the next daily reset hour. |
| InpAllowManualUnlock | false | Allows manual lock override via HUD button (requires 2-step click within 3s). |
| InpMaxSlippagePoints | 50 | Maximum deviation in points allowed during market liquidation orders. |
| InpWriteAuditCsv | true | Appends timestamped trigger and enforcement events to CSV in MQL5/Files . |
| InpTesterDemoTrade | true | Executes a single validation self-test cycle when running in Strategy Tester. |
| InpPanelX | 20 | Top-right HUD horizontal pixel offset. |
| InpPanelY | 20 | Top-right HUD vertical pixel offset. |
Complementary Pre-Deployment Auditing
While this utility acts as your live intraday execution shield, we recommend auditing historical Strategy Tester HTML reports and scanning EA source code for bar-0 lookahead leaks prior to live deployment using Prop Firm Drawdown and Code Leak Auditor, pairing intraday chart visualization with Prop Firm Live Daily Drawdown and HWM Breach Line (CodeBase #79080), and reviewing our technical reference guide (MQL5 Official Blog Post #773992).
Disclaimer: Prop Firm Hard Equity and News Circuit Breaker is an independent risk management and execution enforcement utility. It is not affiliated with, endorsed by, or sponsored by any proprietary trading firm. All rule parameters represent generalized mathematical risk models configured by the user.
