Tarea técnica
Emergency Stop and Equity Trailing Stop EA with Trade Prevention
Budget: $300 USD
Timeline: 4-5 days
Testing: 7 days after delivery
WHAT I NEED:
A clean MT4 Expert Advisor that:
- Monitors account equity and closes all trades when stop loss or trailing stop triggers
- PREVENTS new trades after closing (critical - I run other EAs)
- Shows status on chart (visual display)
- Works alongside my trading EAs (real-world testing required)
DELIVERABLES (BOTH REQUIRED UPFRONT):
- Working .ex4 file
- Complete .mq4 source code
- Full ownership upon payment
CORE FUNCTIONALITY:
1. Four Input Parameters:
- ActivationProfitPercent (example: 5%, default=5)
- TrailingStopPercent (example: 2%, default=2)
- EmergencyStopLossPercent (example: 20%, default=20)
- Slippage (default=5), Do NOT hardcode excessive values (e.g., 500 points)
- These four parameters must be editable on the fly
Parameters Defined:
· Emergency Stop Loss: A percentage value below the Opening Balance. If the account equity falls to or below this level, the EA must close all trades and enter the protected/lockdown state.
· Trailing Stop Activation: A percentage value above the Opening Balance. Once the account equity reaches or exceeds this level, the EA begins monitoring for the trailing stop condition.
· Trailing Stop Distance: A percentage value that defines a fixed distance below the highest observed equity. After the Trailing Stop Activation condition is met, the EA will continuously track the highest equity. If the current equity falls from this peak by an amount equal to or greater than the Trailing Stop Distance, the EA must close all trades and enter the protected/lockdown state.
2. Logic:
- Emergency Stop: If equity drops by EmergencyStopLossPercent% → Close all trades+ pending orders → THEN PREVENT new trades
- Trailing Stop: When equity reaches ActivationProfitPercent% → Start trailing
- On Trigger: Close ALL trades + pending orders → THEN PREVENT new trades
3. Trade Prevention (MUST WORK WITH OTHER EAs):
After closing trades, no new trades can open for the session. This is the core requirement.
4. Visual Display (On Chart):
Display the following as on-chart text labels (top-left corner):
text
Highest Equity: [Value]
Current Equity: [Value]
Trailing Stop Level: [Value]
Emergency Stop Level: [Value]
Session Status: [RUNNING/STOPPED]
- Update: Real-time (every tick/second)
- Font: Arial, size 10, color white
- Background: Semi-transparent for readability
- Position: Top-left, non-intrusive
- "Session Status": Shows "STOPPED" when trades are prevented
5. SECURITY RESTRICTIONS:
The EA is FORBIDDEN from using:
- WinExec(), ShellExecute()
- FileOpen() for operations outside Terminal data folder
- Unapproved network functions (WebRequest, etc.)
Code must be unobfuscated and transparent
- Clean MQL4 code, no dead functions
- Proper reset logic between cycles
TESTING & PAYMENT:
- You deliver BOTH .ex4 and .mq4 files
- I test for 7 days (with my trading EAs)
- If it works as specified → $300 released immediately
- If issues → You fix within testing period
Please confirm you can:
- Deliver BOTH files upfront
- Implement trade prevention that works with other EAs
- Meet the 4-5 day timeline
Previous experience showed that a developer delivers an EA that works in isolation but fails in real-world usage alongside other EAs. I'm a reasonable client who pays promptly for working solutions. Quality work will be rewarded with prompt payment and positive feedback.