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

MQL5 Esperti

Specifiche

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.

Con risposta

1
Sviluppatore 1
Valutazioni
(642)
Progetti
750
35%
Arbitraggio
50
52% / 38%
In ritardo
14
2%
In elaborazione
2
Sviluppatore 2
Valutazioni
(295)
Progetti
368
30%
Arbitraggio
37
27% / 65%
In ritardo
10
3%
In elaborazione
Pubblicati: 10 codici
3
Sviluppatore 3
Valutazioni
(64)
Progetti
145
46%
Arbitraggio
21
38% / 24%
In ritardo
32
22%
Gratuito
4
Sviluppatore 4
Valutazioni
(469)
Progetti
823
49%
Arbitraggio
76
21% / 51%
In ritardo
143
17%
In elaborazione
5
Sviluppatore 5
Valutazioni
(637)
Progetti
1009
47%
Arbitraggio
33
36% / 36%
In ritardo
99
10%
In elaborazione
Pubblicati: 6 codici
6
Sviluppatore 6
Valutazioni
(62)
Progetti
90
29%
Arbitraggio
24
13% / 58%
In ritardo
7
8%
In elaborazione
7
Sviluppatore 7
Valutazioni
(111)
Progetti
184
25%
Arbitraggio
25
16% / 76%
In ritardo
16
9%
Gratuito
8
Sviluppatore 8
Valutazioni
(24)
Progetti
32
38%
Arbitraggio
4
50% / 25%
In ritardo
5
16%
In elaborazione
9
Sviluppatore 9
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
10
Sviluppatore 10
Valutazioni
(5)
Progetti
7
86%
Arbitraggio
0
In ritardo
0
Gratuito
Pubblicati: 4 codici
11
Sviluppatore 11
Valutazioni
(1)
Progetti
1
100%
Arbitraggio
0
In ritardo
0
In elaborazione
Pubblicati: 7 codici
12
Sviluppatore 12
Valutazioni
(11)
Progetti
19
21%
Arbitraggio
3
0% / 67%
In ritardo
3
16%
Caricato
13
Sviluppatore 13
Valutazioni
(191)
Progetti
205
47%
Arbitraggio
4
50% / 25%
In ritardo
1
0%
Caricato
14
Sviluppatore 14
Valutazioni
(61)
Progetti
61
51%
Arbitraggio
1
0% / 100%
In ritardo
1
2%
Gratuito
15
Sviluppatore 15
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
16
Sviluppatore 16
Valutazioni
(9)
Progetti
11
73%
Arbitraggio
0
In ritardo
0
In elaborazione
Pubblicati: 1 articolo, 2 codici
17
Sviluppatore 17
Valutazioni
(1)
Progetti
1
0%
Arbitraggio
0
In ritardo
0
Gratuito
Pubblicati: 4 codici
18
Sviluppatore 18
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
19
Sviluppatore 19
Valutazioni
(1)
Progetti
1
100%
Arbitraggio
0
In ritardo
0
Gratuito
20
Sviluppatore 20
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
Pubblicati: 2 codici
21
Sviluppatore 21
Valutazioni
(1)
Progetti
4
50%
Arbitraggio
3
0% / 100%
In ritardo
2
50%
Gratuito
Pubblicati: 4 codici
22
Sviluppatore 22
Valutazioni
(4)
Progetti
5
60%
Arbitraggio
0
In ritardo
1
20%
Gratuito
23
Sviluppatore 23
Valutazioni
(568)
Progetti
866
61%
Arbitraggio
33
27% / 45%
In ritardo
24
3%
Gratuito
Pubblicati: 1 codice
24
Sviluppatore 24
Valutazioni
(2)
Progetti
3
33%
Arbitraggio
0
In ritardo
2
67%
In elaborazione
25
Sviluppatore 25
Valutazioni
(25)
Progetti
35
40%
Arbitraggio
9
22% / 33%
In ritardo
5
14%
Caricato
Pubblicati: 9 articoli, 35 codici
26
Sviluppatore 26
Valutazioni
(4)
Progetti
11
55%
Arbitraggio
1
100% / 0%
In ritardo
0
Gratuito
27
Sviluppatore 27
Valutazioni
(2)
Progetti
3
33%
Arbitraggio
0
In ritardo
2
67%
Gratuito
28
Sviluppatore 28
Valutazioni
(45)
Progetti
63
52%
Arbitraggio
5
0% / 40%
In ritardo
1
2%
Gratuito
29
Sviluppatore 29
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
30
Sviluppatore 30
Valutazioni
(1)
Progetti
1
0%
Arbitraggio
0
In ritardo
0
Gratuito
31
Sviluppatore 31
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
Pubblicati: 7 codici
32
Sviluppatore 32
Valutazioni
(268)
Progetti
319
74%
Arbitraggio
16
75% / 0%
In ritardo
6
2%
Caricato
33
Sviluppatore 33
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
Pubblicati: 1 codice
34
Sviluppatore 34
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
Pubblicati: 2 codici
35
Sviluppatore 35
Valutazioni
(3)
Progetti
4
0%
Arbitraggio
1
0% / 100%
In ritardo
0
Gratuito
36
Sviluppatore 36
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
37
Sviluppatore 37
Valutazioni
(60)
Progetti
96
43%
Arbitraggio
4
0% / 100%
In ritardo
4
4%
Gratuito
38
Sviluppatore 38
Valutazioni
(1)
Progetti
1
0%
Arbitraggio
1
0% / 100%
In ritardo
0
Gratuito
39
Sviluppatore 39
Valutazioni
(2)
Progetti
2
50%
Arbitraggio
0
In ritardo
1
50%
Gratuito
40
Sviluppatore 40
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
Pubblicati: 5 codici
41
Sviluppatore 41
Valutazioni
(2354)
Progetti
2960
63%
Arbitraggio
125
44% / 26%
In ritardo
429
14%
In elaborazione
42
Sviluppatore 42
Valutazioni
(30)
Progetti
37
38%
Arbitraggio
0
In ritardo
2
5%
In elaborazione
Pubblicati: 1 codice
43
Sviluppatore 43
Valutazioni
(1)
Progetti
1
0%
Arbitraggio
1
0% / 100%
In ritardo
0
Gratuito
44
Sviluppatore 44
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
Pubblicati: 2 codici
45
Sviluppatore 45
Valutazioni
(1)
Progetti
1
0%
Arbitraggio
1
0% / 100%
In ritardo
0
In elaborazione
46
Sviluppatore 46
Valutazioni
(2682)
Progetti
3434
68%
Arbitraggio
78
49% / 14%
In ritardo
344
10%
In elaborazione
Pubblicati: 1 codice
47
Sviluppatore 47
Valutazioni
(105)
Progetti
136
43%
Arbitraggio
1
100% / 0%
In ritardo
3
2%
Gratuito
48
Sviluppatore 48
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
49
Sviluppatore 49
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
50
Sviluppatore 50
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
51
Sviluppatore 51
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
52
Sviluppatore 52
Valutazioni
(8)
Progetti
9
33%
Arbitraggio
1
100% / 0%
In ritardo
0
Gratuito
53
Sviluppatore 53
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
54
Sviluppatore 54
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
Pubblicati: 1 codice
55
Sviluppatore 55
Valutazioni
(319)
Progetti
574
35%
Arbitraggio
84
31% / 44%
In ritardo
207
36%
In elaborazione
56
Sviluppatore 56
Valutazioni
(217)
Progetti
285
20%
Arbitraggio
28
61% / 14%
In ritardo
0
Gratuito
57
Sviluppatore 57
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
58
Sviluppatore 58
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
59
Sviluppatore 59
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
60
Sviluppatore 60
Valutazioni
(271)
Progetti
553
50%
Arbitraggio
57
40% / 37%
In ritardo
227
41%
In elaborazione
61
Sviluppatore 61
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
62
Sviluppatore 62
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
63
Sviluppatore 63
Valutazioni
(45)
Progetti
58
33%
Arbitraggio
12
42% / 42%
In ritardo
7
12%
Gratuito
64
Sviluppatore 64
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
Pubblicati: 10 codici
Ordini simili
--- 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

Informazioni sul progetto

Budget
70 - 100 USD
Scadenze
a 10 giorno(i)

Cliente

Ordini effettuati1
Numero di arbitraggi0