Developing a Generic Trading Robot (EA) for MT4

Specification

The idea of the trading system is as follows: market entries are performed when MACD's main and signal lines intersect in the current trend direction.

2. Trend is determined based on the Exponential Moving Average with the specified period (InpMATrendPeriod). If the current EMA value is greater than the previous one, the trend is seen as growing (ema_current > ema_previous). Alternatively, if current EMA is below the previous one, the trend is considered to be falling (ema_current< ema_previous).

3. Trading Signals:

  • Buy signal: the main MACD line crosses the signal line upwards (macd_current>signal_current && macd_previous<signal_previous).
  • Sell signal: the main MACD line crosses the signal line downwards (macd_current<signal_current && macd_previous>signal_previous). The below figure shows Buy and Sell cases.


4. Positions are closed at opposite signals: Buy positions are closed at Sell signals, and Sell positions are closed at Buy signals.

5. Positions are opened at the market price, when a new bar emerges. The Expert Advisor is to be tested using Open prices, so there is no need to add functions for disabling operations inside the bar.

6. Additional filters for opening a position:

The absolute value of MACD's main line will be used to filter out weak signals: the signal is only confirmed if this value is greater than open_level (in points). Signal confirmation conditions are as follows:

  • Confirmation of a buy signal: Abs(macd_current)>open_level
  • Confirmation of a sell signal: macd_current>open_level

7. Additional filters for closing a position:

The absolute value of MACD's main line will also be used to confirm position closure: the signal is confirmed if this value is greater than close_level (in points). Close signal confirmation conditions are as follows:

  • Confirmation to close Buy positions — macd_current>close_level
  • Confirmation to close Sell positions — Abs(macd_current)>close_level

8. Close by Take Profit — during position opening, a Take Profit level is set at a fixed distance from the open price, specified in points. The value is set in the InpTakeProfit input parameter.

9. Position management

TrailngStop is used to protect profit. Stop Loss is set if profit in points exceeds the value specified in the InpTrailingStop parameter. If the price continues to move in the profit direction, Stop Loss should be trailed at the given distance. Stop Loss cannot be moved towards the loss direction, i.e. the Stop Loss value cannot be increased. If none of protective orders (Take Profit or Stop Loss) triggers, the position should be closed by an opposite signal. No other position exit methods are available.


What is contained in the Requirements Specification?

Trading idea

Describe the general underlying idea in the first part of the Requirements Specification. Example: "If the price approaches the resistance level twice and rolls back from it, the next time it is likely to break resistance." Here you can add a chart with the resistance/support lines, indicators and explanatory notes. Exact numbers or calculation algorithms are not required in the idea description. So, in this example we do not need to explain how to determine:

  • resistance level,
  • level breakout,
  • the concept of "is likely to".

Some abstraction at the initial stage will help focus on the idea rather than on technical details. This way you can generate multiple modifications of your trading strategy by replacing or combining strategy blocks, indicators and filters. With the common general idea, you will use different input parameters for your trading robots.

Next, you need to describe all terms and concepts contained in the idea description. If trend is important for your strategy, clearly define what indicator should be used to determine the trend direction and strength. The numerical characteristics of these definitions form the basis of Expert Advisor's input parameters, and can be optimized in the Strategy Tester. So, the first section of the Requirements Specification is "The Trading Idea".

Responded

1
Developer 1
Rating
(34)
Projects
60
23%
Arbitration
11
73% / 9%
Overdue
3
5%
Free
2
Developer 2
Rating
(1)
Projects
1
0%
Arbitration
1
0% / 100%
Overdue
0
Free
3
Developer 3
Rating
(162)
Projects
288
35%
Arbitration
18
22% / 61%
Overdue
42
15%
Working
4
Developer 4
Rating
(87)
Projects
114
26%
Arbitration
7
29% / 57%
Overdue
5
4%
Free
5
Developer 5
Rating
(54)
Projects
53
17%
Arbitration
7
0% / 100%
Overdue
5
9%
Free
6
Developer 6
Rating
(69)
Projects
146
34%
Arbitration
13
8% / 62%
Overdue
26
18%
Free
Published: 6 codes
Similar orders
Hello, I have a Pine Script (TradingView) code for a professional sniper strategy and I want to convert it to MQL5 for MetaTrader 5. Full conversion of the Pine Script logic (EMA filters, ADX, and entry signals). Implement the Fair Value Gaps (FVG) boxes on the chart. Create a Dashboard (Multi-Symbol Scanner) that monitors multiple pairs (Gold, GBPUSD, EURUSD, etc.) and shows signal status for each. Important: Setup
I need a professional developer to help me create an EA using RSI and Moving averages.The strategies are well organised and everything is in order. I will send all the details in the inbox
MT5 Indicator SMC 30 - 100 USD
Hello, I would like to clarify something before we proceed. I already have a base code prepared for the indicator. However, the code is not the final version and it still requires professional refinement, debugging, and optimization. Because of this, I am specifically looking for a highly experienced developer who can understand the full logic and structure of the system and improve it properly. Before I send you the
Project Overview I need assistance coding a hedging Expert Advisor (EA) that operates in "closed cycles" with a strict limit of five simultaneous open positions . EA Logic & Mechanism Initial Entry: Open a Buy position of 0.01 lots (Position A) with a Take Profit (TP) target of $1.00. Scenario 1: Price Drops (Hedging Step 1): If the price moves against the first trade, open two positions simultaneously: a Sell 0.02
Hello, I would like to clarify something before we proceed. I already have a base code prepared for the indicator. However, the code is not the final version and it still requires professional refinement, debugging, and optimization. Because of this, I am specifically looking for a highly experienced developer who can understand the full logic and structure of the system and improve it properly. Before I send you the
Powerful 30 - 100 USD
I really want a powerful developed EA that can generate a minimum of 10% every month without martingale, greed or any dangerous strategy for sale. Developer must provide the mql5 file or the raw file for modification etc
I already have a fully developed MT5 Expert Advisor with all required prop firm features, including: Risk management Daily loss & max drawdown limits Spread & slippage filters News filter Trade management system The EA structure is complete. 👉 What I need is a professional developer to replace ONLY the entry logic with a high-quality, rule-based trading strategy. 🚨 STRICT REQUIREMENT (READ CAREFULLY): I am NOT
SMC Price Action Pro 30 - 100 USD
Hello, I have a source code for an MT5 indicator that is open-source and belongs to me. However, it still requires professional improvements and some corrections. At the moment the indicator does not work as expected and there are several issues in the logic and performance that need to be fixed. Because of this, I am looking for a highly experienced MT5 developer who is comfortable working with existing code
Hello, I’m reaching out regarding my TradingView project. I’d like to know if you’re familiar with the Chrome extension for Pine Script optimization. I’m looking for a developer with a premium account who can help optimize some Pine Script code. Please I actually need someone who has a premium account of the chrome extension TradeTuning to optimize Pinescripts (for some specific data they give in their reports). Do
Hello, I’m looking for an experienced developer who can help convert an existing cTrader indicator into a fully functional Quantower indicator . I already have the complete source code for the cTrader indicator (written in C#) , and I would like the same logic, behavior, and visual output to be accurately replicated in Quantower

Project information

Budget
30+ USD