Termos de Referência
Project Overview
Develop an automated Expert Advisor (EA) for MetaTrader 5 based on EMA crossover signals combined with strict risk management and trade management principles.
The EA must be optimized for Forex pairs and indices and should operate automatically without manual intervention.
Entry Conditions
Buy Setup
-
Fast EMA crosses above Slow EMA.
-
Current candle closes above both EMAs.
-
Trend confirmation:
-
Price must be above the 200 EMA.
-
-
Spread must be below user-defined maximum spread.
-
No existing buy position on the same symbol.
Execute Buy Order at market price after candle close.
Sell Setup
-
Fast EMA crosses below Slow EMA.
-
Current candle closes below both EMAs.
-
Trend confirmation:
-
Price must be below the 200 EMA.
-
-
Spread must be below user-defined maximum spread.
-
No existing sell position on the same symbol.
Execute Sell Order at market price after candle close.
EMA Settings
User Inputs:
-
Fast EMA (Default: 20)
-
Slow EMA (Default: 50)
-
Trend EMA (Default: 200)
All EMA values must be adjustable from inputs.
Risk Management
Lot Size Options
Select one of:
-
Fixed Lot Size
-
Risk Percentage per Trade
Inputs:
-
Fixed Lot = 0.10
-
Risk % = 1%
Risk-based lot calculation should use stop-loss distance.
Stop Loss
User can choose:
-
ATR Based Stop Loss
-
Fixed Pip Stop Loss
Default:
-
ATR Period = 14
-
ATR Multiplier = 2.0
Alternative:
-
Fixed Stop Loss = 30 Pips
Take Profit
User can choose:
-
Fixed Risk Reward
-
Dynamic Exit
Default:
-
Risk Reward Ratio = 1:2
Example:
-
30 Pip SL
-
60 Pip TP
Trade Management
Break-Even Function
When trade reaches:
-
+1R Profit
Move stop loss to entry price.
Trailing Stop
Optional Enable/Disable
Inputs:
-
Trailing Start = 1.5R
-
Trailing Distance = 1R
Trading Filters
Trading Session Filter
Enable/Disable
Available Sessions:
-
London
-
New York
-
London/New York Overlap
News Filter
Disable trading:
-
30 minutes before high-impact news
-
30 minutes after high-impact news
Currencies:
-
USD
-
EUR
-
GBP
-
JPY
-
CAD
-
AUD
-
NZD
-
CHF
Daily Risk Controls
Maximum Daily Loss
Default:
-
3% Account Equity
If reached:
-
Stop trading for the day.
Maximum Trades Per Day
Default:
-
3 Trades
If reached:
-
No further trades.
Additional Features
Magic Number
User-defined magic number.
Multi-Symbol Support
EA should work on:
-
EURUSD
-
GBPUSD
-
USDJPY
-
AUDUSD
-
XAUUSD
-
NAS100
-
US30
Dashboard Display
Display:
-
Account Balance
-
Account Equity
-
Daily Profit/Loss
-
Current Spread
-
Open Trades
-
Risk per Trade
Alerts
Send alerts through:
-
MT5 Notification
-
Email
-
On-screen Alert
Events:
-
New Trade Opened
-
Trade Closed
-
Daily Loss Limit Reached
Optimization Requirements
EA must be:
-
Fully compatible with MT5
-
Backtestable in Strategy Tester
-
Optimized for speed and low CPU usage
-
Written in clean, documented MQL5 code
-
Free from duplicate trade entries
Deliverables
-
Source Code (.mq5)
-
Compiled File (.ex5)
-
User Manual
-
Input Settings Guide
-
Backtest Report Example