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

MQL5 专家

指定

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

反馈

1
开发者 1
等级
(28)
项目
39
23%
仲裁
14
0% / 93%
逾期
4
10%
工作中
2
开发者 2
等级
(4)
项目
3
33%
仲裁
2
0% / 100%
逾期
0
空闲
3
开发者 3
等级
(523)
项目
792
63%
仲裁
33
27% / 45%
逾期
23
3%
空闲
发布者: 1 代码
4
开发者 4
等级
(3)
项目
1
100%
仲裁
3
0% / 100%
逾期
0
空闲
5
开发者 5
等级
项目
1
0%
仲裁
1
0% / 0%
逾期
0
空闲
6
开发者 6
等级
(2)
项目
2
0%
仲裁
0
逾期
0
空闲
7
开发者 7
等级
(64)
项目
83
28%
仲裁
9
33% / 56%
逾期
9
11%
空闲
发布者: 1 代码
8
开发者 8
等级
项目
0
0%
仲裁
0
逾期
0
空闲
发布者: 1 文章
9
开发者 9
等级
(1)
项目
1
0%
仲裁
0
逾期
0
空闲
10
开发者 10
等级
项目
0
0%
仲裁
0
逾期
0
空闲
11
开发者 11
等级
项目
0
0%
仲裁
0
逾期
0
空闲
12
开发者 12
等级
(1)
项目
2
50%
仲裁
0
逾期
1
50%
工作中
13
开发者 13
等级
(1)
项目
0
0%
仲裁
2
0% / 100%
逾期
0
空闲
14
开发者 14
等级
(5)
项目
5
60%
仲裁
1
0% / 0%
逾期
2
40%
空闲
发布者: 1 代码
15
开发者 15
等级
(16)
项目
35
23%
仲裁
4
0% / 50%
逾期
2
6%
工作中
16
开发者 16
等级
(270)
项目
552
49%
仲裁
57
40% / 37%
逾期
228
41%
工作中
17
开发者 17
等级
(151)
项目
210
69%
仲裁
8
38% / 38%
逾期
22
10%
工作中
18
开发者 18
等级
项目
0
0%
仲裁
0
逾期
0
空闲
相似订单
1- Parts to Be Updated in Universal EA: 1- For Mode 2 (No Indicator Mode), a candle count parameter will be added for pivot breakout. The EA will determine how many candles after the pivot breakout it will add a position based on this parameter. 2- In Mode 1 (MA Mode), we will fix the error in one of the "Select Take Profit" modes called "Kill Position + Clean One by One." 3- We will fix the errors in Recovery Mode
I would manually draw one or more trendline or horizontal line in MT5. I would manually add description to each trendline or horizontal line for the desired action: Buy, Sell, Close buy orders, Close sell orders or Close all orders. When a candle touches the trendline or horizontal line, EA should execute the desired action. The desired action must be only once for a trendline or horizontal line. There should be some
Data Integrity 500 - 1000 USD
The trading bot is an automated software system designed to monitor financial markets, execute trades, and manage risk based on predefined strategies. The bot aims to maximize profits while minimizing human intervention and emotional decision-making. Scope: Supports automated trading on selected exchanges (e.g., Binance, Bitget, Coinbase). Executes trades based on technical indicators, signals, or AI models. Provides
1. General Objective Development of an Expert Advisor in MQL5 intended for Futures markets , based on an existing trading strategy that I will provide (described logic or precise rules). The main objectives are: Faithful implementation of the strategy , Full debugging of the EA, Validation of correct behavior through backtesting. 2. Markets and Instruments Markets: Futures Symbols: to be defined (e.g. indices
Subject: Major Upgrade Request: Auto Confluence of Signal/Trend/Momentum Scores with Multi-Timeframe SMC Hello, Your bot is excellent analytically, but I'm facing daily manual intervention due to the multiple indicators and timeframes. --- 📊 Current Situation: The bot uses: · Signal Score · Trend Score · Momentum Score · SMC Analysis · 3 Timeframes (Fast 5M, Medium 15M, Main 1H) · 4 Additional Indicators Currently
SMC Trading Bot 30 - 60 USD
1. The Core Idea: The "Liquidity-to-Liquidity" Engine Instead of just looking for a "Supply Zone," the bot must ask: "Whose money was just taken, and whose money are we targeting next?" The "Valid Move" Checklist A structure break or a zone is only "Real" if it meets the SMC Trinity: Inducement/Sweep: Price must take out a previous minor high/low (Retail Stop Loss) before the move. Displacement: The move must be
Multi-Slave Inverse Hedging EA with Martingale Grid — MT5 Category: Experts Description: I am looking for an experienced MQL5 developer to build a professional-grade Expert Advisor system called Hedging EA Trader . This is a well-documented project — I have a full 30+ page Software Requirements Specification (SRS) ready to share with the selected developer. System Overview: The EA uses a Master/Slave architecture: 1
I'm looking for an experienced programmer that can build a good EA/Robot for Price Action and Ichimoku strategy.The strategy Involved only two indicators; Ichimoku Kinko Hyo and Price Action. Buy when Price Action crossess above Kumo Cloud (either Up or Down Kumo Cloud)with 1Pips and Sell when Price Action crosses below Kumo cloud (either Up or Down Kumo Cloud) with 1Pips and exit Buy and Sell Order when its crossed
my tick based EA works on demo account but it fails on real account, issues i can see / guess is order execution in demo account is less choppy and relaxed. is there anyone who can help me to fix it
Hello, I need some expert who can hlep me fix the errors of this bot that will work normally ba check the bot file, error messages, and any specific issues you are currently facing so you can get started

项目信息

预算
30 - 60 USD
截止日期
 20 天