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

MQL5 Esperti

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%
In elaborazione
2
Sviluppatore 2
Valutazioni
(4)
Progetti
3
33%
Arbitraggio
2
0% / 100%
In ritardo
0
Gratuito
3
Sviluppatore 3
Valutazioni
(522)
Progetti
791
63%
Arbitraggio
33
27% / 45%
In ritardo
23
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
Progetti
1
0%
Arbitraggio
1
0% / 0%
In ritardo
0
Gratuito
6
Sviluppatore 6
Valutazioni
(2)
Progetti
2
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
(1)
Progetti
1
0%
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
(1)
Progetti
2
50%
Arbitraggio
0
In ritardo
1
50%
Gratuito
Ordini simili
Bhalzdeep 30+ USD
Anything is possible no job too big no job too small. Equal opportunity entity if we don't have it then we can get it. Completely satisfied customers is our top priority
1. Objective Create an MT5 automation script (or set of scripts) that fully automates my strategy optimization workflow, including: • Batch optimization runs • Automatic filtering of results • Automatic forward testing • Exporting and organizing results into structured files/folders The goal is to reduce manual work and allow one‑click execution of the entire pipeline. 2. Platform & Environment • MetaTrader 5 •
I'd like to optimize in Strategy Tester by Custom Optimization of strategies ran by Win Rate %. I can't find a way to view each scenario's win rate without running them individually and looking at Backtest
Would it be possible to connect Futures prop firm with Rithmic or Tradeovate platform to Ninjatrader automated trading ? If anyone can do this for me I will be happy to get started with the person right away
hello great developer I want to modify my NT8 indicator to change its arrow printing logic so that arrows appear on the first candled dot, not after the series. no repaint and no back painting. all in real time. This will help me get timely signals. Scope of work - Modify NT8 indicator logic to print arrows on the first candled dot. - Ensure arrow print matches 90%+ accuracy compared to the current functionality. -
Saya ingin dibuatkan Expert Advisor untuk MetaTrader 5 berbasis strategi EMA 50/200 + Breakout 20 candle dengan sistem risk percentage otomatis. EA harus memiliki fitur ATR stop loss, trailing stop, break even, max spread filter, dan daily loss limit. Dilarang menggunakan martingale, grid, atau averaging. Target RR minimal 1:2 dan drawdown di bawah 20%
I am building a professional-grade survival EA for USDJPY designed to: Repeatedly pass FTMO-style challenges Sustain long-term funded accounts Deploy safely across multiple prop accounts This is not a retail scalper. This is a controlled EMA pullback engine with strict risk governance and anti-correlation logic . All parameters must be configurable. Defaults must match exactly as listed. Core Strategy – EMA Pullback
I’m after someone to make me a forex ex for meta trader 5 it will be trading GBPUSD only but having to align with EURUSD and rules and entry’s based off weekly and daily vwap with 20 EMA
Key Requirements: ​ Zone Detection: The EA must read "Weak Support/Resistance" zones generated by my indicator (I will provide the .mq4/ex4 file). ​ Execution Logic: - Identify the candle with the longest wick within the detected liquidity zone. ​Place a Pending Order (Buy Stop/Sell Stop) 20 points (2 pips) before the breakout level of that wick. ​ Trade Management: ​Fixed SL: 40 points (4 pips). ​Fixed TP: 40 points
I have a open source Tradingview indicator that I want it to be converted to Ninja Trader8. I have attached it. Please let me know, if you can do it and for how muc

Informazioni sul progetto

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

Cliente

Ordini effettuati2
Numero di arbitraggi0