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

MQL5 Experts

Trabalho concluído

Tempo de execução 4 dias
Comentário do cliente
Very clean and efficient code. Asks clear questions to clarify some issues. Fixes problems rapidly. Highly recommend!
Comentário do desenvolvedor
Excellent client. Was agreeable when I made a big mistake at the start and waited for me to sort things out.

Termos de Referência

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!

Respondido

1
Desenvolvedor 1
Classificação
(119)
Projetos
127
41%
Arbitragem
3
33% / 67%
Expirado
0
Livre
2
Desenvolvedor 2
Classificação
(229)
Projetos
339
49%
Arbitragem
21
5% / 33%
Expirado
24
7%
Livre
3
Desenvolvedor 3
Classificação
(101)
Projetos
136
36%
Arbitragem
14
29% / 50%
Expirado
15
11%
Livre
4
Desenvolvedor 4
Classificação
(2458)
Projetos
3095
66%
Arbitragem
77
48% / 14%
Expirado
340
11%
Livre
5
Desenvolvedor 5
Classificação
(88)
Projetos
143
39%
Arbitragem
21
19% / 48%
Expirado
30
21%
Livre
6
Desenvolvedor 6
Classificação
(491)
Projetos
1017
58%
Arbitragem
29
28% / 24%
Expirado
132
13%
Livre
Pedidos semelhantes
Dear Freelancer, My name is startingfrom4 and am a member of mt5 community and i have purchased many indicator and EA here in mt5 community. However, right now i want to develop a simple EA but i do not have fund to do it. Please i beg a developer to please help me write the simple program for free and that is why i filled this freelancer form. Please help. Specification: I need a protection program that will
Necesito replicar en Metatrader las operaciones de un grupo de Telegram , operaciones sencillas con un solo TP, no hay cierre de parciales, únicamente dos órdenes breakeven y cerrar operaciones
Buenas , necesito una copiadora que replique mis operaciones en metatrader 4 o 5 a la plataforma MATCHTRADER , copiadora simple sin ningún extra más , necesito que se entregue está semana
Hello, I am looking for an Expert Advisor (EA) that can generate approximately 25% to 30% monthly returns on a capital of $1,000 with minimal risk. If you're interested in this project, please apply immediately with the following: An .ex5 file of the EA. A clear expiration date of 2 days. Suggested input parameters that you believe are optimal. Recommended trading pairs for the EA. I will conduct back testing and
I’m looking for a skilled developer to create an automated trading bot based on a strategy using Heikin Ashi candles and Two Supertrend lines . Preferred: Candidates with prior experience in developing bots using Heikin Ashi and code Supertrend lines. Here are the key requirements: 1. Supertrend Indicator Customization: - The Supertrend should be based on Heikin Ashi prices in stead of standard candlestick prices. -
Hello, I’m looking for a TradingView indicator that fits my forex trading needs. If you can create or customize one for me, please reach out. I'd appreciate your help! Thanks
Hello, I’m looking for a TradingView indicator that fits my forex trading needs. If you can create or customize one for me, please reach out. I'd appreciate your help! Best regards
Need top Professional programmer to code algorithm trading bot based on the ideas trading strategies I made for myself, you must be well experienced and can delivered the best quality solutions, you must be ready to pay quick reply and ensuring that you are capable to code exactly
Need top Professional programmer to code algorithm trading bot based on the ideas trading strategies I made for myself, you must be well experienced and can delivered the best quality solutions, you must be ready to pay quick reply and ensuring that you are capable to code exactly
I want someone who knows about grid martingale strategy very. I will send strategy when prove that you can do it well. The grid martingale strategy is a trading approach that combines elements of grid trading and the martingale strategy. It involves setting up a series of buy and sell orders at fixed price intervals, forming a "grid." When the price moves against your initial position, additional orders are placed

Informações sobre o projeto

Orçamento
30 - 60 USD
Desenvolvedor
27 - 54 USD