MT5 Expert Advisor: Buy/Sell Based on Previous Candle Color (MQL5)

MQL5 Experts

Termos de Referência

Write an MQL5 Expert Advisor (EA) for MetaTrader 5.

Trading logic:
- On each new bar, check the last closed candle.
- If the candle is bearish (close below open), open a SELL.
- If the candle is bullish (close above open), open a BUY.
- If open equals close (doji), do nothing.

Inputs (adjustable by the user):
- Lot size
- Stop Loss in points
- Take Profit in points
- Maximum number of open positions allowed
- Magic number

Rules:
- Do not open a new trade if the maximum number of positions is already reached.
- Include only these features. No extra indicators, filters, or unnecessary options.
- Keep the code short, clean, and easy to read, with brief comments.
- Use the standard CTrade class.

Output:
- Provide the full .mq5 source code, ready to compile in MetaEditor and to publish on mql5.com.

Respondido

1
Desenvolvedor 1
Classificação
(642)
Projetos
750
35%
Arbitragem
50
52% / 38%
Expirado
14
2%
Trabalhando
2
Desenvolvedor 2
Classificação
(295)
Projetos
368
30%
Arbitragem
37
27% / 65%
Expirado
10
3%
Trabalhando
Publicou: 10 códigos
3
Desenvolvedor 3
Classificação
(64)
Projetos
145
46%
Arbitragem
21
38% / 24%
Expirado
32
22%
Livre
4
Desenvolvedor 4
Classificação
(469)
Projetos
823
49%
Arbitragem
76
21% / 51%
Expirado
143
17%
Trabalhando
5
Desenvolvedor 5
Classificação
(637)
Projetos
1009
47%
Arbitragem
33
36% / 36%
Expirado
99
10%
Trabalhando
Publicou: 6 códigos
6
Desenvolvedor 6
Classificação
(62)
Projetos
90
29%
Arbitragem
24
13% / 58%
Expirado
7
8%
Trabalhando
7
Desenvolvedor 7
Classificação
(111)
Projetos
184
25%
Arbitragem
25
16% / 76%
Expirado
16
9%
Livre
8
Desenvolvedor 8
Classificação
(24)
Projetos
32
38%
Arbitragem
4
50% / 25%
Expirado
5
16%
Trabalhando
9
Desenvolvedor 9
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
10
Desenvolvedor 10
Classificação
(5)
Projetos
7
86%
Arbitragem
0
Expirado
0
Livre
Publicou: 4 códigos
11
Desenvolvedor 11
Classificação
(1)
Projetos
1
100%
Arbitragem
0
Expirado
0
Trabalhando
Publicou: 7 códigos
12
Desenvolvedor 12
Classificação
(11)
Projetos
19
21%
Arbitragem
3
0% / 67%
Expirado
3
16%
Carregado
13
Desenvolvedor 13
Classificação
(191)
Projetos
205
47%
Arbitragem
4
50% / 25%
Expirado
1
0%
Carregado
14
Desenvolvedor 14
Classificação
(61)
Projetos
61
51%
Arbitragem
1
0% / 100%
Expirado
1
2%
Livre
15
Desenvolvedor 15
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
16
Desenvolvedor 16
Classificação
(9)
Projetos
11
73%
Arbitragem
0
Expirado
0
Trabalhando
Publicou: 1 artigo, 2 códigos
17
Desenvolvedor 17
Classificação
(1)
Projetos
1
0%
Arbitragem
0
Expirado
0
Livre
Publicou: 4 códigos
18
Desenvolvedor 18
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
19
Desenvolvedor 19
Classificação
(1)
Projetos
1
100%
Arbitragem
0
Expirado
0
Livre
20
Desenvolvedor 20
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
Publicou: 2 códigos
21
Desenvolvedor 21
Classificação
(1)
Projetos
4
50%
Arbitragem
3
0% / 100%
Expirado
2
50%
Livre
Publicou: 4 códigos
22
Desenvolvedor 22
Classificação
(4)
Projetos
5
60%
Arbitragem
0
Expirado
1
20%
Livre
23
Desenvolvedor 23
Classificação
(568)
Projetos
866
61%
Arbitragem
33
27% / 45%
Expirado
24
3%
Livre
Publicou: 1 código
24
Desenvolvedor 24
Classificação
(2)
Projetos
3
33%
Arbitragem
0
Expirado
2
67%
Trabalhando
25
Desenvolvedor 25
Classificação
(25)
Projetos
35
40%
Arbitragem
9
22% / 33%
Expirado
5
14%
Carregado
Publicou: 9 artigos, 35 códigos
26
Desenvolvedor 26
Classificação
(4)
Projetos
11
55%
Arbitragem
1
100% / 0%
Expirado
0
Livre
27
Desenvolvedor 27
Classificação
(2)
Projetos
3
33%
Arbitragem
0
Expirado
2
67%
Livre
28
Desenvolvedor 28
Classificação
(45)
Projetos
63
52%
Arbitragem
5
0% / 40%
Expirado
1
2%
Livre
29
Desenvolvedor 29
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
30
Desenvolvedor 30
Classificação
(1)
Projetos
1
0%
Arbitragem
0
Expirado
0
Livre
31
Desenvolvedor 31
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
Publicou: 7 códigos
32
Desenvolvedor 32
Classificação
(268)
Projetos
319
74%
Arbitragem
16
75% / 0%
Expirado
6
2%
Carregado
33
Desenvolvedor 33
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
Publicou: 1 código
34
Desenvolvedor 34
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
Publicou: 2 códigos
35
Desenvolvedor 35
Classificação
(3)
Projetos
4
0%
Arbitragem
1
0% / 100%
Expirado
0
Livre
36
Desenvolvedor 36
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
37
Desenvolvedor 37
Classificação
(60)
Projetos
96
43%
Arbitragem
4
0% / 100%
Expirado
4
4%
Livre
38
Desenvolvedor 38
Classificação
(1)
Projetos
1
0%
Arbitragem
1
0% / 100%
Expirado
0
Livre
39
Desenvolvedor 39
Classificação
(2)
Projetos
2
50%
Arbitragem
0
Expirado
1
50%
Livre
40
Desenvolvedor 40
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
Publicou: 5 códigos
41
Desenvolvedor 41
Classificação
(2354)
Projetos
2960
63%
Arbitragem
125
44% / 26%
Expirado
429
14%
Trabalhando
42
Desenvolvedor 42
Classificação
(30)
Projetos
37
38%
Arbitragem
0
Expirado
2
5%
Trabalhando
Publicou: 1 código
43
Desenvolvedor 43
Classificação
(1)
Projetos
1
0%
Arbitragem
1
0% / 100%
Expirado
0
Livre
44
Desenvolvedor 44
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
Publicou: 2 códigos
45
Desenvolvedor 45
Classificação
(1)
Projetos
1
0%
Arbitragem
1
0% / 100%
Expirado
0
Trabalhando
46
Desenvolvedor 46
Classificação
(2682)
Projetos
3434
68%
Arbitragem
78
49% / 14%
Expirado
344
10%
Trabalhando
Publicou: 1 código
47
Desenvolvedor 47
Classificação
(105)
Projetos
136
43%
Arbitragem
1
100% / 0%
Expirado
3
2%
Livre
48
Desenvolvedor 48
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
49
Desenvolvedor 49
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
50
Desenvolvedor 50
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
51
Desenvolvedor 51
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
52
Desenvolvedor 52
Classificação
(8)
Projetos
9
33%
Arbitragem
1
100% / 0%
Expirado
0
Livre
53
Desenvolvedor 53
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
54
Desenvolvedor 54
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
Publicou: 1 código
55
Desenvolvedor 55
Classificação
(319)
Projetos
574
35%
Arbitragem
84
31% / 44%
Expirado
207
36%
Trabalhando
56
Desenvolvedor 56
Classificação
(217)
Projetos
285
20%
Arbitragem
28
61% / 14%
Expirado
0
Livre
57
Desenvolvedor 57
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
58
Desenvolvedor 58
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
59
Desenvolvedor 59
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
60
Desenvolvedor 60
Classificação
(271)
Projetos
553
50%
Arbitragem
57
40% / 37%
Expirado
227
41%
Trabalhando
61
Desenvolvedor 61
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
62
Desenvolvedor 62
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
63
Desenvolvedor 63
Classificação
(45)
Projetos
58
33%
Arbitragem
12
42% / 42%
Expirado
7
12%
Livre
64
Desenvolvedor 64
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
Publicou: 10 códigos
Pedidos semelhantes
--- I need an MT5 Expert Advisor (EA) for Forex trading. Strategy: - Trade when fast Moving Average (9) crosses above slow Moving Average (21) = BUY - Trade when fast Moving Average (9) crosses below slow Moving Average (21) = SELL - Only 1 trade at a time Settings I want to change: - Lot size - Stop Loss in pips - Take Profit in pips - Trailing Stop - Trading hours (Start and End time) Risk: - Close all trades at
ICC SMART STRUCTURE EA 50 - 100 USD
DEVELOPMENT REQUIREMENTS Project Title: ICC Smart Structure EA – MT5 Automated Trading System 1. Project Objective I want a fully automated Expert Advisor (EA) for MetaTrader 5 (MT5), based on my Indication–Correction–Continuation (ICC) trading strategy. The EA must identify market structure, Break of Structure (BOS), swing highs and lows, supply and demand zones, corrections and continuation entries across multiple
The EA is already developed and functional, but there are some issues with its current behaviour that need to be investigated and corrected. **Requirements:** - Review the existing EA source code and identify the root cause of the issues. - Fix the existing problems without affecting other working functionalities. - Ensure the EA operates correctly under different market conditions. - Maintain the existing trading
Project Description I am looking for an experienced MQL5 developer with strong knowledge of FIX Protocol (Financial Information Exchange) to integrate FIX API connectivity into an existing MetaTrader 5 Expert Advisor. The main objective is to improve order execution speed, reduce execution latency, and minimize slippage, especially for high-frequency scalping strategies. Required Features 1. Integrate FIX Protocol
I want reading tradingviwer signal and want open mt5 account trades. Want reading stop loss size and take a profit size and when signalClosing ! This ea want cancel open trades
a { text-decoration: none; color: #464feb; } tr th, tr td { border: 1px solid #e6e6e6; } tr th { background-color: #f5f5f5; } I’m looking for a developer to create a fully automated trading bot (Expert Advisor) for MT5. I am not an expert trader, so the bot should have its own trading strategy, scan the market automatically, identify trading opportunities, and place buy/sell trades without manual input. It should
برمجة روبوت تداول MQL5 بهدف 50 نقطة مع إدارة مخاطر.مطلوب برمجة خبير تداول آلي يعمل على منصة MQL5، يركز على تحقيق هدف 50 نقطة مع إدارة صارمة للمخاطر وتحديد وقف الخسارة
I want full experience devloper need , I want devlope 4 Type Bot , Grd strategy 2 , and other bias strategy 2 scaning on market condition choose one order buy or sell and take profit and target fully automatic management, I am explain full details on private chat only experience developer contact me
Hello everyone, I am a final-year AI & Data Science student interested in building a career in algorithmic trading and EA development. I have good technical knowledge of MQL5, MT5 Expert Advisors, risk management, technical indicators, and automated trading strategies. I have also worked on building trading systems using Machine Learning and Neural Networks. I know how to develop EAs and trading strategies, but I am
Hello! I don't have time, but I bought some challanges and honestly I don't feel 100% confident yet for trading, I am eager to share prop firm account with good, profitable trader. 50% of profits are your, but first I need to make selection, I need to trust you somehow that you will not blow up account within few days. Only serious persons please, please don't waste me time and yours

Informações sobre o projeto

Orçamento
70 - 100 USD
Prazo
para 10 dias

Cliente

Pedidos postados1
Número de arbitragens0