Drowdown based ea to monitor and prevent from drowdowning

Specification

Development of Guardian Trading Bot for MT4/MT5


What I need:

A simple protective trading bot (EA) that monitors the entire trading account and automatically closes all positions when specific profit/loss or drawdown conditions are met.


Required Features:

 Monitor all open positions:

  • The bot must track all active positions, regardless of whether they were opened manually or by another Expert Advisor (EA).

Automatic closing of all positions (Option 1):

  • When total profit reaches a specified value (e.g. +€30), the bot must close all active trades.
    → I need a trailing profit feature where I can define a trailing step (e.g. +€5).
  • When total loss reaches a specified value (e.g. -€50), the bot must also close all trades.
    → I also want a trailing stop loss option, where I can define a trailing step (e.g. -€10).

Block new trades after closure:

  • Once the bot closes all trades, it must block any new trades from being opened — especially from other EAs — to prevent immediate re-entry.

Option 2: Daily Drawdown Reset (should be optional and configurable)

Daily account protection with two safety levels:

  • Every day at midnight (or at a custom-defined time), the bot records the current account balance.
  • From that point, it calculates two drawdown thresholds:
    1. First warning level (e.g. -€200)
    2. Second critical level (e.g. -€500)

 Example of how it works:

  • If the balance at 00:00 is €10,000:
    • First level = €9,800
    • Second level = €9,500
  • If the next day at 00:00 the balance is €10,200:
    • New first level = €10,000
    • New second level = €9,700
  • The bot will always protect the highest daily balance, minus the configured drawdown values.

💡Additional logic when limits are triggered:

  • If the first level (e.g. -€200) is reached:
    • The bot closes all currently open positions (both positive and negative).
    • It allows previously set manual orders (pending orders) to remain.
    • It disables all EAs to prevent any further auto-trading.
  • If the second level (e.g. -€500) is reached:
    • The bot closes all positions and all pending orders.
    • It completely shuts down all further activity, both manual and automated.

Bot Settings Required:

  • Take Profit value (in EUR/USD)
  • Daily Stop Loss / Drawdown (in EUR/USD)
  • Daily reset time (with UTC offset configuration)
  • Trailing profit/loss step (in EUR/USD)

 


Responded

1
Developer 1
Rating
(2)
Projects
3
0%
Arbitration
8
13% / 88%
Overdue
1
33%
Free
2
Developer 2
Rating
(16)
Projects
35
23%
Arbitration
4
0% / 50%
Overdue
2
6%
Working
3
Developer 3
Rating
(328)
Projects
513
19%
Arbitration
35
43% / 31%
Overdue
34
7%
Loaded
4
Developer 4
Rating
(24)
Projects
26
73%
Arbitration
1
0% / 100%
Overdue
0
Free
5
Developer 5
Rating
(279)
Projects
377
72%
Arbitration
19
32% / 47%
Overdue
15
4%
Working
Published: 15 codes
6
Developer 6
Rating
(22)
Projects
29
3%
Arbitration
4
25% / 0%
Overdue
3
10%
Working
7
Developer 7
Rating
(33)
Projects
36
33%
Arbitration
5
0% / 80%
Overdue
0
Working
Published: 2 codes
8
Developer 8
Rating
(1)
Projects
4
0%
Arbitration
5
20% / 40%
Overdue
2
50%
Free
9
Developer 9
Rating
(8)
Projects
8
38%
Arbitration
0
Overdue
0
Working
10
Developer 10
Rating
(162)
Projects
289
35%
Arbitration
18
22% / 61%
Overdue
43
15%
Free
11
Developer 11
Rating
(1)
Projects
1
0%
Arbitration
0
Overdue
0
Free
12
Developer 12
Rating
(4)
Projects
3
33%
Arbitration
2
0% / 100%
Overdue
0
Free
13
Developer 13
Rating
(51)
Projects
71
37%
Arbitration
4
25% / 75%
Overdue
1
1%
Free
Published: 1 code
14
Developer 14
Rating
(12)
Projects
21
43%
Arbitration
8
0% / 50%
Overdue
3
14%
Free
15
Developer 15
Rating
(510)
Projects
977
74%
Arbitration
27
19% / 67%
Overdue
100
10%
Free
Published: 1 article, 6 codes
16
Developer 16
Rating
(39)
Projects
58
19%
Arbitration
6
33% / 17%
Overdue
1
2%
Working
Published: 2 codes
17
Developer 17
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
18
Developer 18
Rating
(4)
Projects
4
0%
Arbitration
1
0% / 100%
Overdue
0
Free
19
Developer 19
Rating
(252)
Projects
462
26%
Arbitration
139
20% / 60%
Overdue
100
22%
Free
20
Developer 20
Rating
(45)
Projects
46
24%
Arbitration
34
9% / 85%
Overdue
10
22%
Free
21
Developer 21
Rating
(1)
Projects
1
0%
Arbitration
1
0% / 100%
Overdue
0
Free
22
Developer 22
Rating
(7)
Projects
6
0%
Arbitration
4
25% / 75%
Overdue
2
33%
Free
23
Developer 23
Rating
(21)
Projects
28
32%
Arbitration
4
50% / 25%
Overdue
4
14%
Working
24
Developer 24
Rating
(298)
Projects
478
40%
Arbitration
105
40% / 24%
Overdue
82
17%
Loaded
Published: 2 codes
25
Developer 25
Rating
(202)
Projects
262
21%
Arbitration
23
52% / 17%
Overdue
0
Working
26
Developer 26
Rating
(7)
Projects
7
0%
Arbitration
0
Overdue
2
29%
Free
27
Developer 27
Rating
(258)
Projects
266
29%
Arbitration
0
Overdue
3
1%
Working
Published: 2 codes
28
Developer 28
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
29
Developer 29
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
Similar orders
EA Crafter 500+ USD
Act as a professional Quantitative Developer and Risk Manager. I want to build a systematic trading strategy rulebook that prioritizes capital preservation and statistical edge over raw performance. Please generate a structured trading strategy using the following framework: 1. ASSET CLASS & TIMEFRAME: - Asset: [e.g., Apple (AAPL), Bitcoin (BTC), or EUR/USD] - Timeframe: [e.g., 5-minute, 1-hour, Daily] 2. CORE
JOB TITLE: XAUUSD ONLY MQL5 Strategy Developer Needed To Improve Existing MT5 EA Winrate JOB DESCRIPTION: I already have a working MetaTrader 5 Expert Advisor with a fixed set file and existing trading logic. The strategy is based on Volume Profile / Delta bias, ATR-based TP/SL, ATR deviation filtering, ATR trade spacing, break-even after TP1, and TP lock management. I am looking for an experienced MQL5 / trading
Can you Build a custom NinjaTrader 8 ChartStyle or BarsType called Optimized Footprint Bars. This project is urgent and i need someone that's wiiling to do his project with me kinldy bid for this. Thanks
Hello, I am reopening this project with a fully updated and clarified specification. I am looking for a high‑level MQL5 developer who can deliver a clean, stable, and professional Phase 1 version of my: Institutional‑Grade Multi‑Currency MT5 EA (A2SR + SMC + Smart Recovery + Smart Grid + Liquidity + Volatility + Safety Filters) This EA is not a simple indicator conversion or a basic strategy. It is a structured
Hello, I'm interested in a quote to convert my manual trading strategy into an automated strategy for NinjaTrader. Please note, I would like the quote based on the work and not my available budget; therefore, I entered $5 for the budget. Additionally, I would appreciate knowing how long it would take to build/test. I would prefer to have it sooner rather than later but selected 7 days not knowing how long it takes to
Pine Script Integration Request (Experienced Coders Only) I am looking for a highly experienced Pine Script developer to integrate a Demand & Supply Zone module into my existing indicator. Requirements Keep my current indicator (Rudy) exactly as it is. Do NOT modify, remove, or alter any existing logic, calculations, signals, alerts, or visual elements. Add only the Demand & Supply Zone boxes from a second Pine
Title Professional AI Automation Trading Bot for Forex & Crypto Solution Language Python (preferred) or MQL5 depending on integration requirements. Categories Expert Advisor (EA) for MetaTrader 5 Automated trading strategies AI/ML-based signal generation Risk management automation Required Skills Strong knowledge of MQL5/Python Experience with MetaTrader API integration Machine learning model deployment
Project goal: To code several items for Ninja Trader, ranging from simple to more complex tasks, with potential for ongoing collaboration. Scope of work: - Develop code for specific items in Ninja Trader. - Implement minor functionalities like a line at a time level. - Address more complex coding needs as they arise

Project information

Budget
30+ USD