EA that opens trade after X bars in same direction, and exits after Y bars in opposite direction

MQL5 Experts

Job finished

Execution time 4 days
Feedback from customer
Very clean and efficient code. Asks clear questions to clarify some issues. Fixes problems rapidly. Highly recommend!
Feedback from employee
Excellent client. Was agreeable when I made a big mistake at the start and waited for me to sort things out.

Specification

Hello all! I'm looking for a good MQL5 programmer to come up with a clear and straightforward code for this strategy. I can read code, and understand the flow of it. I just can't write it from scratch. Help! :P


The strategy of the EA is to check the direction of a bar at the end of each bar, on whatever time period it is set on. If X bars in a row are in the same direction, at trade is initiated at the beginning of the next bar. The trade is either in the same direction that the bars are going (good on short timeframes) or in the opposite direction (good on long timeframes). The trade exits on Y amount of consecutive bars in the same direction (high number on short timeframes, short number on long timeframes)

Here's an example of a position being opened in the opposite direction the bars are going. X=2, Y =1, meaning a trade is entered after 2 bars in a row close in the same direction. The trade is exited once a bar closes in the opposite direction. 

reverse example


I envisions bars in a row as being counted as a group. So if X (bras in a row) was 3, then 3 bars in a row would form a group, and the next bars would for a new group. A stop loss or take profit would reset these groups to 0. However, since a SL or TP would happen somewhere in a bar rather than at the absolute beginning or end, the rest of the bar would be counted as the first bar in a new series.


stop loss resets count


In shorter time frames, sometimes a streak of bars in the same direction will be broken by a lone bar in the opposite direction, making a potentially huge trade become a puny one. Hence the Y number of bars in the opposite direction to exit the trade.

Also, again mostly on smaller timeframes, many bars in a row will appear, more than usual, and could trigger a big trade if we were to enter multiple orders on it. All orders are closed once the exit signal is present though.

variable y exit and multiple lots

Finally, the EA needs to work on multiple timeframes and symbols at once. For example, EURUSD 1day opposite and GPBUSD 5 min same run at the same time, triggering different trades without cancelling one another


Inputs:

Direction of the entry (same, opposite)

Number of X for entry

Number of Y for exit

Stop loss

Take profit

Trailing stop

Lot: fixed amount or % of account balance (both options) 

Multiple orders




Feel free to ask questions and clarifications!

Responded

1
Developer 1
Rating
(119)
Projects
127
41%
Arbitration
3
33% / 67%
Overdue
0
Free
2
Developer 2
Rating
(229)
Projects
339
49%
Arbitration
21
5% / 33%
Overdue
24
7%
Free
3
Developer 3
Rating
(101)
Projects
136
36%
Arbitration
14
29% / 50%
Overdue
15
11%
Free
4
Developer 4
Rating
(2422)
Projects
3042
66%
Arbitration
77
48% / 14%
Overdue
340
11%
Working
5
Developer 5
Rating
(88)
Projects
143
39%
Arbitration
21
19% / 48%
Overdue
30
21%
Free
6
Developer 6
Rating
(490)
Projects
1016
58%
Arbitration
29
28% / 24%
Overdue
132
13%
Free
Similar orders
I would like an EA that follows exactly this steps to trade de daily candle. Watch the video and then see if you can do the task. https://www.youtube.com/watch?v=g3oDYq4P9ZE Document is one this link https://cdn.discordapp.com/attachments/1135977927469703230/1135978751461695598/Daily_Bias-TTrades_edu.pdf?ex=669a9a27&amp ;is=669948a7&hm=96de195f7e695a381c1261b065f67b94fae319d02a0c88641b146f8b2978320c& Should have
I have a custom EA that works fine in the live market trading, but when doing a back test in the strategy tester , it does not open sell orders. There are no errors or warnings; it just doesn't open sell orders. I've checked every possible reason that might be the reason why it does not open sell orders, but I can't find anything, especially since it works fine in the real market and it opens both buys and sells
The Expert Advisor would use two built-in indicators as entry/exit signals and our own risk management strategy with customizable inputs. The goal is to create a reliable and efficient trading tool that can automate our trading process on the MT5 platform
Hi, I have an indicator from my friend, I want to copy it to my own MT5 can you do that for me. Here is the link
I installed the E.A. into the Experts folder in MT4. When I double click on it nothing happens. When I right click and "attach to chart" nothing happens. The E.A. is not grayed out, it simply will not attach. Any help would be greatly Appreciated
I have an EA and want to add few new logic to fetch profit taking factors and other values from an external master data and use it in existing EA
Hello Every one, Good day, I want from someone professional to create an EA is working on Mt5, This EA is working by depend on some indicators, and all those indicators must be working on MACD window, not on the chart, for more details please read my attached pdf file carefully. Many Thanks
I'm looking for an expert MQL5 developer that can create an EA that's based on my price action trading strategy with no indicators. The EA must analyze trades based on my price action rules, enter trades based on my price action rules, manage trades based on my price action rules and exit trades based on my price action rules
hi hi there i have an strategy on tradingview and i want to automate it like metatrader EA so i want the strategy to open and close trade automaticlly on tradingview
We are looking for an experienced Expert Advisor Developer who can build a customized MT5 Expert Advisor for us. The Expert Advisor would use two built-in indicators as entry/exit signals and our own risk management strategy with customizable inputs. The goal is to create a reliable and efficient trading tool that can automate our trading process on the MT5 platform. Skills required: - Strong understanding of

Project information

Budget
30 - 60 USD
For the developer
27 - 54 USD