MACD with bollinger bands (MQL5)

Spécifications

1. 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".

Terms and definitions

It is recommended to create a separate section in the Requirements Specification for explaining related terms and definitions. Explain terms in separate paragraphs. Use bold font to highlight the key concepts of your trading strategy. Where applicable, you may add an image. Input parameters of the desired EA can be written in italics.

Trading signals

This is the most important section of Requirements Specification. It provides the description of conditions, market states and indicator values, under which a Buy deal should be performed. To describe each condition required for generating a Buy signal, choose the numeric parameter affecting the emergence of a signal. For example, this may be the smoothing type and period for a Moving Average. These important parameters will be used as your Expert Advisor's input parameters.

Provide a separate description of sell conditions, even if they are opposite to buying. This may have specific features, which the programmer may misinterpret. For example, your Buy condition may be set to "Value > 0". Make sure to indicate an exact condition for selling, such as "Value < 0" or "Value <= 0".

Additional conditions and filters are often used for confirming or canceling trading signals. Use screenshots for various market situations with the visual explanation of indicators and setups. In future, such visualization may help you to analyze situations, when your EA ignores a seemingly obvious signal or performs a deal at an unfavorable moment.

Screenshots and flow charts

You may use any of free programs for creating screenshots and flow charts. Tips on what programs to choose and how to use them are provided in the article How to create Requirements Specification for ordering an indicator. Also, the article provides recommendations on ordering an arrow indicator generating buy and sell signals. Such an indicator running separately from the Expert Advisor, makes it easier to check and monitor your trading robot both during real-time operation and in visual testing.

The lifetime of signals/orders/positions

The second important part of a trading strategy is exiting an open position and deleting pending orders. Trading signals can also be canceled after some time or under certain events. Therefore, you need to describe conditions to close a buy/sell position, remove a pending order or cancel a signal.

Management of open positions and pending orders

If your trading strategy implies closing by Stop Loss and Take Profit, describe the calculation algorithm. Optionally, you can request a trailing mechanism for a flexible modification of these levels. In this case, you need to describe Trailing Stop conditions and algorithms. SL/TP modification can be performed at a bar opening or on every tick. Specify the desired option in the Requirements Specification. Also, the on-tick and on-bar options influence strategy testing. Make sure to read the article Testing trading strategies on real ticks.


Répondu

1
Développeur 1
Évaluation
(42)
Projets
62
8%
Arbitrage
12
58% / 42%
En retard
1
2%
Gratuit
2
Développeur 2
Évaluation
(95)
Projets
117
38%
Arbitrage
9
89% / 0%
En retard
0
Gratuit
3
Développeur 3
Évaluation
(97)
Projets
135
52%
Arbitrage
4
50% / 50%
En retard
0
Travail
4
Développeur 4
Évaluation
(151)
Projets
240
60%
Arbitrage
3
67% / 0%
En retard
6
3%
Travail
5
Développeur 5
Évaluation
(17)
Projets
19
26%
Arbitrage
3
67% / 33%
En retard
2
11%
Travail
6
Développeur 6
Évaluation
(266)
Projets
540
50%
Arbitrage
55
40% / 36%
En retard
224
41%
Gratuit
7
Développeur 7
Évaluation
(37)
Projets
59
27%
Arbitrage
25
20% / 52%
En retard
10
17%
Travail
8
Développeur 8
Évaluation
(27)
Projets
27
26%
Arbitrage
2
0% / 50%
En retard
1
4%
Gratuit
9
Développeur 9
Évaluation
(11)
Projets
16
25%
Arbitrage
0
En retard
1
6%
Gratuit
10
Développeur 10
Évaluation
(563)
Projets
932
47%
Arbitrage
302
59% / 25%
En retard
124
13%
Occupé
Commandes similaires
Bling Ultimate Sniper Robot Rules the robot should have - 1. Automatic stop loss, take profit and the stop loss should trail with an approach to Tp. 2. Always risk 10% of my account on every trade, with a 1:5 risk reward ratio. 3. The bot should have Mobile, IOS and Mac and Laptop versions. 4. The bot should trade indexes such XAU/USD, GBP/USD, US TECH (Nasdaq), EUR/USD, US30, BTC/USD and GBP/USD. 5. This is robot
I have an algo that is running on ProRealTime, they have their own language. It is a simple strategy with 5 conditions + SL/TP settings, very basic. I need someone that can convert or just create a functional MT5 algo (EA) from these conditions for me, if you do a good job I have around 10+ more algos that need to be transferred to MT5
Dear Developers, I would have a very simple request. I have a ML model developed in Python for EURUSD daily trading. I would like to backtest it in Meta Trader 5 using the Strategy Tester tool. For that I would need an Expert Advisor program. The input would be a csv file that contains two columns: - dates (going back for a few years on a daily basis) - trading signal (it can have only 2 values, either 1: Buy, or -1
Hi I have the code in pinescript for an indicator that I need done in Ninja Trader 1. The Trading View indicator code needs to be converted into and adapted for Ninja Trader 8 2. An indicator and Automated Trading Strategy needs to be developed. 3. Any parts of the Trading View Indicator that can't be replicated needs to be discussed with me and agreed before excluding. (there should not be any) 4. Trailing stop and
1. The Trading View indicator code needs to be converted into and adapted for Ninja Trader 8 2. An indicator and Automated Trading Strategy needs to be developed. 3. Any parts of the Trading View Indicator that can't be replicated needs to be discussed with me and agreed before excluding. (there should not be any) 4. Trailing stop and Trailing Draw Down options need to be implemented 5. Risk needs to be in % of
Create mt4 ea 50+ USD
To convert the provided MT4 indicator script into an Expert Advisor (EA) and implement prompt functionality for user input, we need to modify the code to handle external parameters and provide a user-friendly interface. Below is the EA code that incorporates prompts for user inputs
I WRITE a code i want to conect this for automatic trading through vps .and als advanced features for this code .i attached afile please watch .and give me perfect ea
Hi Developer, I would like to create the Scalping EA based for Mt4 on the investing.com data https://www.investing.com/currencies/eur-usd-technical EA have timing to adjust time to trade. follow the broker time. From starting time to end time EA have a adjustable Lot size (0.01 incremental to 0.01) EA have a adjustable TP (1pip to 100pip incremental 1pip) EA have a adjustable SL (1pip to 100pip incremental 1pip) EA
Hi I have the code in pinescript for an indicator that I need done in Ninja Trader, I wanted this indicator in NT bcs I chart in NT, and if the indicator could also have been an automated strategy even better. Please confirm that it will be an indicator and Automated Trading Strategy
Hello I need a very simple indicator This indicator should show the highest floating or history drawdown of the account It means that it can display the highest number that the account drawdown to be displayed on the chart in this format max drawdown account(xxxx$$) ...date(00/00/00)time:(00:00) max drawdown currency ..( currency name with max drwadown) . (xxxx$$) date(00/00/00)time:(00:00) thanks

Informations sur le projet

Budget
30+ USD
Pour le développeur
27 USD
Délais
de 1 à 360 jour(s)