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

MQL5 전문가

작업 종료됨

실행 시간 4 일
고객의 피드백
Very clean and efficient code. Asks clear questions to clarify some issues. Fixes problems rapidly. Highly recommend!
피고용인의 피드백
Excellent client. Was agreeable when I made a big mistake at the start and waited for me to sort things out.

명시

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!

응답함

1
개발자 1
등급
(119)
프로젝트
127
41%
중재
3
33% / 67%
기한 초과
0
무료
2
개발자 2
등급
(229)
프로젝트
339
49%
중재
21
5% / 33%
기한 초과
24
7%
무료
3
개발자 3
등급
(101)
프로젝트
136
36%
중재
14
29% / 50%
기한 초과
15
11%
무료
4
개발자 4
등급
(2422)
프로젝트
3042
66%
중재
77
48% / 14%
기한 초과
340
11%
작업중
5
개발자 5
등급
(88)
프로젝트
143
39%
중재
21
19% / 48%
기한 초과
30
21%
무료
6
개발자 6
등급
(490)
프로젝트
1016
58%
중재
29
28% / 24%
기한 초과
132
13%
무료
비슷한 주문
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px 'Helvetica Neue'} Hello Looking for someone to help me improve my current strategy on my own algorithm and to also add hedging mode
I want the script in mql5 language for my martingale strategy. The script should open trades in both directions buy and sell and if any trade closes in loss then open new trade in that direction by using the next volume and when trade closes in profit then reset the volume to first from volume list and also maximum consecutive losses limit will apply. If trades closes consecutively in losses and hits the limit then
Long Position 1. Trend Line: When a Lower High (LH) is formed, draw a trend line from the previous Higher High (HH) to the new LH. 2. Trend Line Adjustment: If a new Lower High (LH) is formed without breaking the trend line, redraw the trend line to the new LH. Draw a trend line between the Higher High (HH) and the Higher Low (HL). If a new Higher High (HH) is formed, remove the previous trend line and draw a new one
Please watch the video on this youtube channel and download the Indicator from there. https://www.youtube.com/watch?v=ldTomLu8DxE&amp ;t=32s Rules are explained on the video and the download of the indicator is on the same video
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
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

프로젝트 정보

예산
30 - 60 USD
개발자에게
27 - 54 USD