Weekly High Watermark Equity Guardian – Prop Firm Risk Manager (MT5)

MQL5 Esperti

Lavoro terminato

Tempo di esecuzione 5 giorni
Feedback del dipendente
Outstanding client! Skyler provided a clear specification and communicated perfectly. Very professional, understanding, and a true pleasure to work with. Highly recommended! 5 stars.

Specifiche

I am looking for a professional developer to create a specialized Risk Management Expert Advisor (EA) for MetaTrader 5. This EA is designed to enforce Weekly High Watermark and Weekly Drawdown rules for a prop firm challenge.

CRITICAL REQUIREMENT: The EA must allow me to define the exact day and time the weekly cycle resets via input variables.
1. Core Logic: Weekly Cycle & Reset

The EA must monitor the broker server time and trigger a "New Week Reset" at a user-defined moment.

Input Variables:

    WeekStartDay: (Dropdown/Enum) Sunday through Saturday (0=Sunday, 1=Monday, etc.)
    WeekStartHour: (0–23) Broker server hour
    WeekStartMinute: (0–59) Broker server minute

Reset Actions: At the specified time each week, the EA must:

    Capture and store WeekStartEquity = AccountEquity()
    Initialize WeeklyHighWatermark = AccountEquity()
    Reset all drawdown counters and violation flags
    Unblock trading (if UnblockOnNewWeek is set to true)
    Log to Experts Journal: "Weekly cycle reset at [timestamp]"

Persistence: The EA must use GlobalVariables or a local file to store the WeeklyHighWatermark and WeekStartEquity so that the data is not lost if the terminal or VPS restarts.

Important: The reset must happen once per week only, not every time that day/hour occurs. Use a timestamp check to prevent duplicate resets.
2. High Watermark & Drawdown Tracking

On every tick, the EA must perform the following calculations:

    High Watermark Update: If AccountEquity() > WeeklyHighWatermark, update the watermark to the new peak.
    Drawdown from High (Floating):
    DD_FromHigh_% = (WeeklyHighWatermark - AccountEquity()) / WeeklyHighWatermark * 100
    Drawdown from Week Start:
    DD_FromStart_% = (WeekStartEquity - AccountEquity()) / WeekStartEquity * 100

3. Early Warning Alert

Input Variables:

    UseEarlyWarningAlert (bool): Enable/disable the early warning system
    EarlyWarningDD_Percent (double): e.g., 2.5%
    When drawdown from the weekly high watermark reaches this percentage, trigger an alert.

Behavior:

    When DD_FromHigh_% >= EarlyWarningDD_Percent:
        Send a Push Notification to mobile (if enabled)
        Write to Experts Journal: "WARNING: Drawdown from weekly high has reached [X]%. Current equity: [Y]"
        Do NOT stop trading or close any positions
        Alert should trigger only once per threshold breach (use a flag to prevent spam)
        Reset the alert flag when equity recovers above the threshold or when the weekly cycle resets

Example:

    WeeklyHighWatermark = \$10,000
    EarlyWarningDD_Percent = 2.5
    When equity drops to \$9,750 → Alert fires
    Trading continues normally
    If equity recovers to \$9,800, the alert is re-armed and can fire again if it drops back

4. Risk Rules & Protection (Hard Limits)

Parameters:

    UseMaxWeeklyDD_FromHigh (bool): Enable/disable this limit
    MaxWeeklyDD_FromHigh_Percent (double): e.g., 4.0%
    Trigger protection if equity drops this far from the weekly peak
    UseMaxWeeklyDD_FromStart (bool): Enable/disable this limit
    MaxWeeklyDD_FromStart_Percent (double): e.g., 5.0%
    Trigger protection if equity drops this far from the week's starting equity

Actions on Violation:

    ActionOnLimitHit (Dropdown/Enum):
        0 = None (log only)
        1 = Close All Trades & Block Trading
        2 = Block New Trades Only (leave existing trades open)

    If "Close All Trades & Block" is selected:
        Close all open positions across the entire account (all symbols)
        Delete all pending orders
        Set trading block flag

    Trading Block Behavior:
        Once a hard limit is hit, the EA must prevent any further trading until:
            The next weekly reset occurs (if UnblockOnNewWeek = true), OR
            A manual reset is triggered

5. CONTINUOUS FAILSAFE (CRITICAL REQUIREMENT)

On EVERY tick while the trading block is active, the EA must:

    Cancel ALL pending orders on the account (all symbols, all magic numbers)
    Close ALL open positions on the account (all symbols, all magic numbers)
    Log to Experts Journal: "FAILSAFE ACTIVE: All trades closed, all pending orders deleted"

Purpose:
This is a complete failsafe to ensure that if any other EA, script, or manual action attempts to open trades or place orders while the block is active, they are immediately closed/cancelled on the very next tick.

Implementation Notes:

    This failsafe loop should run only when the block flag is active
    Use a loop to iterate through all open positions and pending orders
    Handle both Market and Pending orders
    Must work across all symbols on the account, not just the chart symbol
    Should be efficient (don't spam the trade server unnecessarily, but ensure protection)

Input Variable:

    EnableContinuousFailsafe (bool): Default = true
    Allows the user to disable this behavior if needed (though it's highly recommended to keep it enabled)

6. Integration with Other EAs

The EA should set a Global Variable to communicate trading status to other EAs:

    GlobalVariableSet("RiskGuardian_BlockTrading", 1) when blocked
    GlobalVariableSet("RiskGuardian_BlockTrading", 0) when allowed

Input Variables:

    UseGlobalBlockFlag (bool): Enable/disable this feature
    GlobalBlockFlagName (string): Default = "RiskGuardian_BlockTrading"

Include a comment in the code explaining how other EAs can check this flag before opening trades.
7. Visual Dashboard (On-Chart Panel)

A clean, non-intrusive UI panel displaying:

    Current Balance / Equity
    Week Start Equity
    Weekly High Watermark
    Drawdown % from High (color-coded: green < warning threshold, yellow >= warning, red >= hard limit)
    Drawdown % from Start
    Status: [TRADING ALLOWED] or [BLOCKED - LIMIT HIT: reason]
    Failsafe Status: [FAILSAFE ACTIVE] when continuous failsafe is running
    Next Weekly Reset: Displays configured Day/Time (e.g., "Monday 00:00")
    Time Until Reset: Countdown (e.g., "2d 14h 23m")

Panel Settings:

    ShowInfoPanel (bool)
    PanelCorner (enum): Top-Left, Top-Right, Bottom-Left, Bottom-Right
    FontSize (int)
    PanelColor / TextColor (color inputs)

8. Manual Reset

Input Variable:

    ManualReset (bool): When set to true, the EA should:
        Immediately reset WeekStartEquity = AccountEquity()
        Reset WeeklyHighWatermark = AccountEquity()
        Clear all violation and alert flags
        Unblock trading (disable failsafe)
        Log: "Manual reset executed at [timestamp]"
        Automatically set ManualReset back to false to prevent repeated resets

9. Alerts & Notifications

Input Variables:

    EnablePopupAlert (bool): Show popup dialog on screen
    EnablePushNotification (bool): Send to mobile app
    EnableEmailAlert (bool): Send email
    EnableSoundAlert (bool): Play sound file
    AlertSoundFile (string): e.g., "alert.wav"

Trigger alerts for:

    Early warning threshold reached
    Hard limit violation (trading blocked)
    Weekly cycle reset
    Failsafe activation (first time only, not on every tick)

Complete Input Parameters Summary

mql5
Copy
//--- Weekly Cycle Timing  
input int      WeekStartDay              = 1;        // Week Start Day (0=Sun,1=Mon,...,6=Sat)  
input int      WeekStartHour             = 0;        // Week Start Hour (0-23, broker time)  
input int      WeekStartMinute           = 0;        // Week Start Minute (0-59)  
input bool     UnblockOnNewWeek          = true;     // Auto-unblock trading on new week  
  
//--- Early Warning Alert  
input bool     UseEarlyWarningAlert      = true;     // Enable early warning alert  
input double   EarlyWarningDD_Percent    = 2.5;      // Alert threshold % from high watermark  
  
//--- Hard Limits (Protection)  
input bool     UseMaxWeeklyDD_FromHigh   = true;     // Enable max DD from high limit  
input double   MaxWeeklyDD_FromHigh_Percent = 4.0;   // Max drawdown % from weekly high  
input bool     UseMaxWeeklyDD_FromStart  = true;     // Enable max DD from start limit  
input double   MaxWeeklyDD_FromStart_Percent = 5.0;  // Max drawdown % from week start  
  
//--- Actions  
input int      ActionOnLimitHit          = 1;        // 0=None, 1=CloseAll&Block, 2=BlockOnly  
input bool     EnableContinuousFailsafe  = true;     // Close all trades/orders on every tick while blocked  
  
//--- Global Variable Integration  
input bool     UseGlobalBlockFlag        = true;     // Use global variable for other EAs  
input string   GlobalBlockFlagName       = "RiskGuardian_BlockTrading"; // Global variable name  
  
//--- Manual Controls  
input bool     ManualReset               = false;    // Trigger manual reset  
  
//--- Alerts & Notifications  
input bool     EnablePopupAlert          = true;     // Show popup alerts  
input bool     EnablePushNotification    = true;     // Send push notifications  
input bool     EnableEmailAlert          = false;    // Send email alerts  
input bool     EnableSoundAlert          = true;     // Play sound on alert  
input string   AlertSoundFile            = "alert.wav"; // Sound file name  
  
//--- Visual Panel  
input bool     ShowInfoPanel             = true;     // Display on-chart panel  
input int      PanelCorner               = 1;        // 0=TL, 1=TR, 2=BL, 3=BR  
input int      FontSize                  = 10;       // Panel font size  
input color    PanelColor                = clrDarkSlateGray; // Panel background  
input color    TextColor                 = clrWhite; // Panel text color  
  
//--- General  
input string   CommentText               = "RiskGuardian"; // EA comment  
input int      MagicNumber               = 999999;   // Magic number (for future use)  

Technical Requirements

    Platform: MetaTrader 5 only
    Account Type: Must work with both Hedging and Netting accounts
    No external DLLs
    No indicators required – pure equity/account monitoring
    Must work on any symbol / any timeframe (logic is account-level, not chart-level)
    Must handle:
        Platform restarts
        VPS restarts
        Network disconnections
    Use GlobalVariables and/or file storage to persist critical data across restarts
    Failsafe must be efficient: Don't spam the trade server, but ensure all trades/orders are closed immediately when block is active

Deliverables

    Source code: .mq5 file (well-commented)
    Compiled file: .ex5
    Short documentation (text or PDF):
        Explanation of each input parameter
        How the weekly reset logic works
        How the continuous failsafe works
        How other EAs can read the global block flag
        Example configuration for common prop firm rules (FTMO, MyForexFunds, etc.)
    Testing instructions:
        How to test in Strategy Tester with custom dates
        How to verify weekly reset behavior
        How to simulate drawdown scenarios and verify failsafe activation

Budget & Timeline

    Please provide your price quote and estimated delivery time
    I am looking for a clean, robust implementation with no unnecessary complexity
    If you have built similar prop firm risk managers or equity protection tools, please share examples or screenshots

Notes

    This EA is specifically for prop firm challenges / funded accounts
    Accuracy of drawdown calculations is critical
    No trading strategy logic needed – this is purely a risk management / equity monitoring tool
    The EA should be lightweight and efficient (minimal CPU usage)
    The continuous failsafe is a critical safety feature – it must work reliably to protect the account

Con risposta

1
Sviluppatore 1
Valutazioni
(28)
Progetti
39
23%
Arbitraggio
14
0% / 93%
In ritardo
4
10%
Gratuito
2
Sviluppatore 2
Valutazioni
(4)
Progetti
3
33%
Arbitraggio
2
0% / 100%
In ritardo
0
Gratuito
3
Sviluppatore 3
Valutazioni
(549)
Progetti
837
61%
Arbitraggio
33
27% / 45%
In ritardo
24
3%
Gratuito
Pubblicati: 1 codice
4
Sviluppatore 4
Valutazioni
(3)
Progetti
1
100%
Arbitraggio
3
0% / 100%
In ritardo
0
Gratuito
5
Sviluppatore 5
Valutazioni
(1)
Progetti
2
0%
Arbitraggio
1
0% / 0%
In ritardo
0
Gratuito
Pubblicati: 1 articolo
6
Sviluppatore 6
Valutazioni
(3)
Progetti
3
0%
Arbitraggio
0
In ritardo
0
Gratuito
7
Sviluppatore 7
Valutazioni
(64)
Progetti
83
28%
Arbitraggio
9
33% / 56%
In ritardo
9
11%
Gratuito
Pubblicati: 1 codice
8
Sviluppatore 8
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
Pubblicati: 1 articolo
9
Sviluppatore 9
Valutazioni
(3)
Progetti
3
33%
Arbitraggio
0
In ritardo
0
Gratuito
10
Sviluppatore 10
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
11
Sviluppatore 11
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
12
Sviluppatore 12
Valutazioni
(8)
Progetti
14
21%
Arbitraggio
2
0% / 50%
In ritardo
3
21%
Caricato
13
Sviluppatore 13
Valutazioni
(1)
Progetti
0
0%
Arbitraggio
2
0% / 100%
In ritardo
0
Gratuito
14
Sviluppatore 14
Valutazioni
(5)
Progetti
5
60%
Arbitraggio
1
0% / 0%
In ritardo
2
40%
Gratuito
Pubblicati: 1 codice
15
Sviluppatore 15
Valutazioni
(16)
Progetti
35
23%
Arbitraggio
4
0% / 50%
In ritardo
2
6%
In elaborazione
16
Sviluppatore 16
Valutazioni
(271)
Progetti
553
50%
Arbitraggio
57
40% / 37%
In ritardo
227
41%
In elaborazione
17
Sviluppatore 17
Valutazioni
(153)
Progetti
213
69%
Arbitraggio
8
38% / 38%
In ritardo
22
10%
Gratuito
18
Sviluppatore 18
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
Ordini simili
Hi there developer, I need someone who can create an trading ea that place order in points using an. Vps with an stop loss in 2 point behind the order price automatically it close order in 1 point if the market reverse
I am looking for a highly experienced developer to build a professional, commercial-grade trading indicator for MT4/MT5. I am not looking for a basic indicator or a modified public script. I need a custom solution based on real market logic with high-quality coding standards. Requirements 100% Non-Repainting indicator. Accurate Entry signals. Automatic Stop Loss placement based on real market structure. Automatic
I need a custom MT5 Expert Advisor (MQL5) for XAUUSD. Strategy: 1. Trend Filter (H1) - EMA 20, EMA 50 and EMA 200. - Buy only when EMA20 > EMA50 > EMA200 and price is above EMA200. - Sell only when EMA20 < EMA50 < EMA200 and price is below EMA200. 2. Confirmation (M15) - M15 trend must confirm the H1 trend before taking any trade. 3. Entry (M5) - Wait for price to pull back to EMA20 only. - After touching EMA20, wait
Mac200 50+ USD
I need a Trend following Bot. Here we took entries by looking at two indicator which are 200 period ema and 12 26 9 MacD. Rules for entry exit are: Buy trade: When market is above 200 ema and MacD Line cross over the signal line and this cross over happened below the zero line of MacD indicator. We simply put Buy trade. Sell trade: When market is below 200 ema and MacD line crosses below the signal line and this
I I would like to create a trading robot based on 2 ema crossing. The robot is pretty simple, it should open buy position when fast ema cross slow ema and vise versa. Also it should use martingale after the loss position. It should has expiration period inside the code and alerts l
Iconic Boy 300 - 400 USD
Am looking for a bot to trade .so that I can be able to trade and become very successful and make some profit so that I cannot sleep on a empty stomach
MT5 Global Stop Loss & Take Profit Manager for Manual Trades I need an Expert Advisor (EA) for MetaTrader 5 that manages ONLY existing manual trades. GENERAL REQUIREMENTS - Works only on the current chart symbol (example: XAUUSD). - Supports Hedging accounts. - Detects all manually opened market positions. - Never opens trades automatically. - Never closes trades automatically. - Never places pending orders. - Never
Supply and Demand EA 50 - 250 USD
I need a SnD EA. Prefer coder who has previous experience coding SnD EA. PO are based on (CHoCH or BoS) and 3EMA, order block (from my TradingView indicator), area based on Fibonacci. SL options are based on fix pips or zone size; CL is based on candle closing. TP1 and TP2 options are based on fix pips or fix ratio. Canceling PO is based on market structure or Fibonacci. Money management are based on fix volume or
Hi MQL5 Community, With over 10 years of live market experience as a Quantitative & Trading System Developer, I specialize in building robust, highly scalable Expert Advisors (EAs), custom indicators, and automated architectures. I’ve recently put together a comprehensive showcase demonstrating my flagship Modular Multi-Engine Architecture , designed to bring institutional-grade logic and real-time telemetry into
I need a developer that can make my trading strategies into a working perfect EA Robot working on Mt5. Candlestick pattern confirmation through PDH, PDL, PWH, PWL, Liquidities, HTF OB

Informazioni sul progetto

Budget
30 - 60 USD
Scadenze
a 20 giorno(i)