forked from animatedread/Warrior_EA
Audit turned up a real gap for a prop-firm-portfolio-manager use case: nothing in this codebase watched for account-level daily-loss or max-drawdown breaches - the single most common way a prop-firm evaluation actually gets failed. New Signals/SignalRiskGuard.mqh (CSignalRiskGuard), wired into the exact same filter-composition chain as SignalNewsFilter/ SignalSessionFilter (CreateSignalWithRetry/AddFilterToSignal, no new architecture). Vetoes new entries only (never closes existing positions - a materially bigger behavior change, left to the trader/EA's own SL/TP handling) once either MaxDailyLossPct or MaxDrawdownPct (new RISK_LIMIT_PCT_PRESET inputs, both default disabled) is breached. Peak equity and the current broker day's starting balance persist to a small local per-symbol-per-magic state file - peak equity in particular must survive a restart to mean anything, otherwise a restart would silently reset drawdown tracking. New RISK_LIMIT_PCT_PRESET enum (2/3/4/5/8/10/15/20%) rather than reusing PERCENTAGE_PRESETS, which steps by 10 starting at 10 - too coarse for prop-firm-style limits (commonly single-digit daily loss, ~8-10% max drawdown). Compiled clean (MetaEditor, 0 errors/0 warnings). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
16 lines
No EOL
681 B
MQL5
16 lines
No EOL
681 B
MQL5
//+------------------------------------------------------------------+
|
|
//| Signals.mqh |
|
|
//| AnimateDread |
|
|
//| https://www.mql5.com |
|
|
//+------------------------------------------------------------------+
|
|
#property copyright "AnimateDread"
|
|
#property link "https://www.mql5.com"
|
|
|
|
#include "SignalPAI.mqh"
|
|
#include "SignalsessionFilter.mqh"
|
|
#include "SignalNewsFilter.mqh"
|
|
#include "SignalITF.mqh"
|
|
#include "SignalCONV.mqh"
|
|
#include "SignalLSTM.mqh"
|
|
#include "SignalMarketDepth.mqh"
|
|
#include "SignalRiskGuard.mqh" |