MA CROSSOVER FOREX WITH RISK MANAGEMENT

Specification

1. Purpose

The purpose of this Forex bot (Expert Advisor) is to automate trading based on a Moving Average crossover strategy. The bot will place trades, manage risk, and monitor positions without human intervention while allowing configuration of strategy parameters.


---

2. Scope

Automate trading on selected Forex pairs (EUR/USD, GBP/USD, etc.)

Support multiple timeframes (H1, H4, Daily)

Manage positions, including stop-loss, take-profit, trailing stops, and lot sizing

Provide logs, alerts, and notifications

Support backtesting in MetaTrader Strategy Tester



---

3. Functional Requirements

ID Feature Description Priority

FR1 MA Crossover Signal Generate BUY signal when Fast MA crosses above Slow MA; SELL when Fast MA crosses below Slow MA High
FR2 Trade Execution Automatically open/close trades based on signals High
FR3 Stop Loss Set configurable stop-loss in pips High
FR4 Take Profit Set configurable take-profit in pips High
FR5 Lot Sizing Lot can be fixed or calculated based on risk % of account High
FR6 Trailing Stop Optional trailing stop feature (configurable distance) Medium
FR7 Trade Logging Record trade details: entry/exit price, time, P&L High
FR8 Alerts & Notifications Notify user on trade execution via MT alerts or email Medium
FR9 Multi-Pair Support Ability to run on multiple currency pairs simultaneously Medium
FR10 Time Filter Optional session/time-based trading (e.g., London/New York hours) Medium
FR11 Backtesting Compatibility EA should run in MetaTrader Strategy Tester High



---

4. Non-Functional Requirements

ID Requirement Description

NFR1 Performance EA must process ticks without delays to avoid missed signals
NFR2 Reliability EA must handle errors gracefully (e.g., network failure, broker errors)
NFR3 Security EA will not access user data beyond trading account information
NFR4 Usability User should be able to configure parameters easily via MT input fields
NFR5 Maintainability Code should be modular, readable, and commented for future updates
NFR6 Compliance Must follow MetaTrader platform rules and broker constraints



---

5. Inputs / Parameters

Parameter Type Default Description

FastMA Integer 14 Period of fast moving average
SlowMA Integer 50 Period of slow moving average
LotSize Double 0.1 Fixed lot size for trades
RiskPercent Double 1.0 Percentage of account balance to risk per trade
StopLossPips Integer 30 Stop loss distance in pips
TakeProfitPips Integer 50 Take profit distance in pips
TrailingStopPips Integer 20 Optional trailing stop distance
TradingHours String "0-24" Time range for trading in server hours



---

6. Assumptions & Constraints

EA will run on MT4/MT5 with standard broker accounts

Broker allows trading of selected currency pairs

Execution may be affected by spreads and slippage

No guarantee of profit — performance depends on market conditions



---

7. Testing Requirements

Backtest on historical data (1 month, 6 months, 1 year)

Verify that trades are opened/closed according to signals

Validate stop-loss, take-profit, and trailing stop logic

Confirm lot sizing calculation based on account balance and risk

Ensure EA does not place duplicate trades on same signal



---

8. Deliverables

Fully functional MQL4 / MQL5 Expert Advisor (.mq4 / .mq5 file)

User manual with instructions for installation and parameter settings

Example backtest reports with screenshots

Source code with comments for maintainability



---

9. Future Enhancements

Incorporate additional indicators (RSI, MACD, Bollinger Bands)

Multi-timeframe analysis

News filter to avoid high-volatility events

Graphical interface for easier parameter contro

Responded

1
Developer 1
Rating
(4)
Projects
3
33%
Arbitration
2
0% / 100%
Overdue
0
Free
2
Developer 2
Rating
(19)
Projects
22
18%
Arbitration
9
33% / 44%
Overdue
3
14%
Working
Published: 1 code
3
Developer 3
Rating
(8)
Projects
8
0%
Arbitration
2
50% / 0%
Overdue
1
13%
Working
4
Developer 4
Rating
(274)
Projects
403
28%
Arbitration
40
40% / 50%
Overdue
1
0%
Free
5
Developer 5
Rating
(390)
Projects
416
30%
Arbitration
74
19% / 72%
Overdue
52
13%
Working
6
Developer 6
Rating
(62)
Projects
90
29%
Arbitration
24
13% / 58%
Overdue
7
8%
Working
7
Developer 7
Rating
(47)
Projects
67
37%
Arbitration
5
40% / 40%
Overdue
1
1%
Free
8
Developer 8
Rating
Projects
0
0%
Arbitration
1
0% / 100%
Overdue
0
Free
9
Developer 9
Rating
(319)
Projects
573
35%
Arbitration
83
31% / 45%
Overdue
207
36%
Working
10
Developer 10
Rating
Projects
2
0%
Arbitration
4
25% / 50%
Overdue
1
50%
Free
11
Developer 11
Rating
(144)
Projects
186
41%
Arbitration
24
58% / 21%
Overdue
13
7%
Free
12
Developer 12
Rating
(54)
Projects
67
42%
Arbitration
15
27% / 60%
Overdue
1
1%
Working
13
Developer 13
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
14
Developer 14
Rating
(1)
Projects
3
0%
Arbitration
0
Overdue
0
Free
15
Developer 15
Rating
(268)
Projects
603
34%
Arbitration
65
22% / 57%
Overdue
146
24%
Working
Published: 1 article, 22 codes
16
Developer 16
Rating
(511)
Projects
978
74%
Arbitration
27
19% / 67%
Overdue
100
10%
Free
Published: 1 article, 6 codes
17
Developer 17
Rating
(258)
Projects
269
29%
Arbitration
2
50% / 0%
Overdue
3
1%
Working
Published: 2 codes
18
Developer 18
Rating
(20)
Projects
26
38%
Arbitration
6
33% / 50%
Overdue
0
Free
19
Developer 19
Rating
(10)
Projects
14
43%
Arbitration
0
Overdue
3
21%
Free
20
Developer 20
Rating
(1)
Projects
0
0%
Arbitration
1
0% / 100%
Overdue
0
Free
21
Developer 21
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
22
Developer 22
Rating
(162)
Projects
289
35%
Arbitration
18
22% / 61%
Overdue
43
15%
Free
23
Developer 23
Rating
(271)
Projects
553
50%
Arbitration
57
40% / 37%
Overdue
227
41%
Working
24
Developer 24
Rating
(7)
Projects
6
0%
Arbitration
4
25% / 75%
Overdue
2
33%
Free
Similar orders
Hi, I’m looking for an experienced MQL5 developer to convert my TradingView Pine Script into an MT5 EA. Here are the main requirements: **MBS BREAKOUT** * Buy when price breaks the Green Line * Sell when price breaks the Red Line **TIMEFRAMES** * Strategy 1 = M1 * Strategy 2 = M5 * Strategy 3 = M15 * Strategy 4 = M30 * Strategy 5 = H1 * Strategy 6 = H4 * Strategy 7 = D1 * Strategy 8 = W1 * Strategy 9 = MN1 Each
SUPER SCALPING 30+ USD
I WISH TO BUILD A ROBOT THAT CAN FIND BREAKOUTS ON 15MIN CHARTS, STARTING WITH THE WAVE 3 ON ELLIO WAVE ANALYSIS, ONCE IS PROFITABLE ENOUGH WILL OPEN A SECOND TRADE AFTER THE FIRST PULL BACK AND SET THE TP OF THE FIRST TRADE WITH THE SL OF THE SECOND TRADE IN A WAY TO GAIN A MINIMUM PROFIT OF 10 DOLLARS OR MORE, IF THE THIRD PULL BACK HAPPENS ANOTHER TRADE WILL BE PLACED MOVING ALL TP AND SL IN SUCH A WAY THAT THE
I am looking for someone with strong experience using QuantAnalyzer, StrategyQuant Portfolio Master, or a similar portfolio-analysis tool to create an accurate backtest of several existing MT5 EAs running together as one portfolio. The individual EAs can be backtested separately in MT5. My main requirement is to combine those results into a portfolio backtest using different risk allocations for each EA. For example
i need someone to help me create 3 random tradingview strategy i need it for a test, i need it to have 5% to 20% win rate and 1:1 RR, the win rate is very important is the main thing i need those strategy for, i am planning on building a tradingview strategy and i need this 3 tradingview strategy first they are for test on my plans to build the main tradingview strategy, also for he 3 i have a fixed budget of $30 for
Looking for some one to build me a liquidity grab EA who has experience in this department must work specifically on XAUUSD. Must be able to figure out swing high and lows also
Description I am looking for a highly skilled MQL5 Developer & Trader with strong experience in EA optimization, stress testing, and forward validation. The EA is already coded and running. What I need now is: 1.Simple code editing, code adjustment/upgrading and code tamplates inserting, 2.Parameter Optimization & Re-Validation – Find the best stable settings for XAUUSD (not overfitted). 3.Robustness / Stress Testing
Hi, I’m looking for an experienced MQL5/MT5 developer to build a complex AI-powered adaptive Expert Advisor for XAUUSD+ on Ultima Markets. I have a detailed 28-section technical specification, and the requirements are fixed. I’m looking for the complete implementation , not a simplified EA or a conventional indicator-based system. The project includes: Genuine AI/ML integration AI-based market regime classification
Trading bot ea 30+ USD
yoo i want to make a trading bot i have my strategy in videos and also the rules to if anyone can work it out for me i will be glad welcome your bid and it urget let connect here on mgl5 And if you know you can not do the project without getting paid first please don't bid thanks
MT5 EA make work on zone break and candle confirm. Hi i need one expert person who can make exact what i want. My EA logic very simple.... few hrs market high and low make line then candle body close above or low then candle confirmation then pullback then entry RR1:2 no trail nothing,,,,, the line high low create after few hrs of the day i wll tell you later,,,,then 1hrs no trade if break then no trade for the
I’m looking for an experienced MT5/MQL5 freelancer to help install and configure several existing EAs on IC Markets MT5 accounts using a Windows VPS. The work will include setting up the EAs on separate demo accounts and later running several together on one account with different risk settings. I also need help with MT5 backtesting and strategy optimisation, including comparing different risk levels and reviewing

Project information

Budget
30+ USD