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

MQL5 Uzmanlar

İş tamamlandı

Tamamlanma süresi: 5 gün
Geliştirici tarafından geri bildirim
Outstanding client! Skyler provided a clear specification and communicated perfectly. Very professional, understanding, and a true pleasure to work with. Highly recommended! 5 stars.

Şartname

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

Yanıtlandı

1
Geliştirici 1
Derecelendirme
(28)
Projeler
39
23%
Arabuluculuk
14
0% / 93%
Süresi dolmuş
4
10%
Serbest
2
Geliştirici 2
Derecelendirme
(4)
Projeler
3
33%
Arabuluculuk
2
0% / 100%
Süresi dolmuş
0
Serbest
3
Geliştirici 3
Derecelendirme
(549)
Projeler
836
61%
Arabuluculuk
33
27% / 45%
Süresi dolmuş
24
3%
Çalışıyor
Yayınlandı: 1 kod
4
Geliştirici 4
Derecelendirme
(3)
Projeler
1
100%
Arabuluculuk
3
0% / 100%
Süresi dolmuş
0
Serbest
5
Geliştirici 5
Derecelendirme
(1)
Projeler
2
0%
Arabuluculuk
1
0% / 0%
Süresi dolmuş
0
Serbest
Yayınlandı: 1 makale
6
Geliştirici 6
Derecelendirme
(3)
Projeler
3
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
7
Geliştirici 7
Derecelendirme
(64)
Projeler
83
28%
Arabuluculuk
9
33% / 56%
Süresi dolmuş
9
11%
Serbest
Yayınlandı: 1 kod
8
Geliştirici 8
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
Yayınlandı: 1 makale
9
Geliştirici 9
Derecelendirme
(3)
Projeler
3
33%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
10
Geliştirici 10
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
11
Geliştirici 11
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
12
Geliştirici 12
Derecelendirme
(8)
Projeler
14
21%
Arabuluculuk
2
0% / 50%
Süresi dolmuş
3
21%
Yüklendi
13
Geliştirici 13
Derecelendirme
(1)
Projeler
0
0%
Arabuluculuk
2
0% / 100%
Süresi dolmuş
0
Serbest
14
Geliştirici 14
Derecelendirme
(5)
Projeler
5
60%
Arabuluculuk
1
0% / 0%
Süresi dolmuş
2
40%
Serbest
Yayınlandı: 1 kod
15
Geliştirici 15
Derecelendirme
(16)
Projeler
35
23%
Arabuluculuk
4
0% / 50%
Süresi dolmuş
2
6%
Çalışıyor
16
Geliştirici 16
Derecelendirme
(271)
Projeler
553
50%
Arabuluculuk
57
40% / 37%
Süresi dolmuş
227
41%
Çalışıyor
17
Geliştirici 17
Derecelendirme
(153)
Projeler
213
69%
Arabuluculuk
8
38% / 38%
Süresi dolmuş
22
10%
Serbest
18
Geliştirici 18
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
Benzer siparişler
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
I need a trading bot specially for XAU, high profit gain. Requirements bot analyzes the market places trades closes with 2 to 3 profit per trades daily profit should be 50 to 100 dollars
We are looking for an experienced MQL5 developer to provide a stable, consistently profitable Forex Expert Advisor (EA) capable of generating 10–15% average monthly returns while maintaining the lowest possible drawdown . Our Requirements The EA must have a proven track record of consistent performance. A long-term trading history (live or verified) will be considered a significant advantage. Before final selection
I am looking for a professional MQL5/MT5 Expert Advisor developer to build a fully automated trading bot based on my custom strategy. Requirements: Strong experience in MQL5 (MetaTrader 5) Previous experience developing Forex/Gold Expert Advisors Ability to convert a trading strategy into a fully automated EA Clean, well-structured, and optimized code Good communication and willingness to provide updates during

Proje bilgisi

Bütçe
30 - 60 USD
Son teslim tarihi
to 20 gün