AS Q Prop Firm Shield
This software component for MetaTrader 5 is built to enhance the capabilities of your trading environment. This library provides a collection of modular, reusable code. It is utilized by developers to organize common functions, allowing for the integration of complex logic across multiple Expert Advisors, indicators, or scripts without the need for code duplication.
How to Setup and Use AS Q Prop Firm Shield
1. Storage: Place library files in the MQL/Libraries directory to ensure they are accessible to your projects.
2. Implementation: Include the library in your code using the #import directive, ensuring you match the exact function names and parameters.
3. Compilation: Ensure the library is present in the directory before you compile your main EA or script, as the compiler links them during this phase.
4. Management: Keep libraries organized in sub-folders if you manage many custom functions to maintain a clean project structure.
Frequently Asked Questions
Q: What is a library file used for? A: Libraries store reusable code modules, allowing you to centralize common logic used by multiple EAs or indicators.
Q: Is a library executable? A: No, libraries are non-executable files containing functions; they must be imported into an EA, indicator, or script to function.
Q: Can I update a library while the platform is running? A: You should compile your EA or script after updating a library to ensure the latest code changes are integrated.
Description & Settings
ASQ PropFirm Shield v1.2 — Free, Open-Source
One blown drawdown limit and your $100K challenge is gone. ASQ PropFirm Shield monitors every tick against your firm's exact rules — daily loss limits, maximum drawdown (standard or trailing), profit targets, consistency scores, and minimum trading days. It calculates exactly how much you can risk on the next trade without breaching anything. Built-in presets for 7 prop firms mean you drop it in and it just works. FEATURES: - 7 built-in prop firm presets — FTMO, MyForexFunds, Funded Next, The Funded Trader, E8 Funding, Bulenox, TopStep - Daily loss limit enforcement — auto-blocks trading when daily limit is hit - Maximum drawdown protection — standard or trailing, with floor lock for funded accounts - 5-level shield state — Safe, Caution (>50% used), Danger (>80%), Breached (daily hit), Failed (max DD) - Emergency close-all flag — triggers at 90% of any limit, recommends immediate position closure - Risk-per-trade guardrail — WouldExceedRiskPerTrade() prevents oversized entries - Safe risk amount calculator — returns the max $ you can risk on the next trade without breaching anything - Profit target tracking with progress percentage - Win rate & profit factor — live tracking from OnTradeClose() calls - Consistency score calculation for firms that require it (MFF, FundedNext, Bulenox) - Minimum trading day requirements with completion tracking - Weekend holding prevention with Friday evening cutoff - Challenge phase detection — Challenge, Verification, Funded with auto-target adjustment - Daily PnL history (last 10 days) DEMO EA INCLUDED: Attach to any chart to see the full dashboard: — Firm name, phase, and shield state with color coding — Profit target progress bar (green) — Daily loss limit progress bar (green→yellow→red as limit approaches) — Max drawdown progress bar with trailing DD indicator — Win rate, profit factor, trading days, and safe risk amount — Emergency warning panel with close-all alert — Status message and remaining limits in $ and % USAGE: #include "ASQ_PropFirmShield.mqh" CASQPropFirmShield prop; prop.Initialize(AccountBalance(), ASQ_PROP_FTMO); prop.Update(equity, balance); // Call every tick double safe = prop.GetSafeRiskAmount(); // Max safe $ to risk Place both files in the same folder — compiles instantly, no subfolder setup needed. FILES: - ASQ_PropFirmShield.mqh — Library (756 lines) - ASQ_PropFirmShield_Demo.mq5 — Demo EA (317 lines) MetaTrader 5, all brokers, all instruments, all timeframes. Free and open-source. 1,073 lines of production MQL5. AlgoSphere Quant — Precision before profit.