MT5 Expert Advisor - Multi-Timeframe Price Action Strategy (CP/BOS/Engulfing)

Lavoro terminato

Tempo di esecuzione 14 giorni

Specifiche

# Project Specification — MT5 Expert Advisor "Prince Strategy"

## Project Goal

Develop an Expert Advisor (trading robot) for MetaTrader 5 that automates a price-action trading strategy based on candlestick patterns across multiple timeframes. The robot must work on the forex.com broker.

---

## 1. Traded Instruments

The robot must trade the following 4 forex pairs:
- GBPUSD
- EURUSD
- NZDUSD
- AUDUSD

**Important note:** For backtesting, MT5 tests one pair at a time. The robot should therefore be designed to work on the symbol of the chart it is attached to (recommended approach), or reliably handle all 4 pairs if technically feasible.

---

## 2. Strategy Architecture: Multi-Timeframe (Top-Down) Approach

The strategy uses a sequence of two timeframes:

| Step | Timeframe | Role |
|------|-----------|------|
| Bias analysis | H1 (or M30) | Determine market direction |
| Confirmation & entry | M15 (or M5) | Confirm and enter the trade |

Both the bias timeframe and the confirmation timeframe must be configurable as inputs (H1/M30 for bias, M15/M5 for confirmation).

---

## 3. Determining the BIAS (on H1/M30)

The bias (bullish or bearish direction) is determined by ONE of the following 3 patterns:

### 3.1 — Continuation Pattern (CP)

A bullish CP consists of **exactly 3 candles**:
- **B1** (oldest): bullish candle
- **B2** (middle): bearish candle, very small
- **B3** (most recent): bullish candle

**Validity conditions for the bullish CP:**
1. B3 must **fully engulf the body of B2** (B3's body must exceed B2's body, not just equal it)
2. B3 must **not be significantly smaller than B1** (B3 can be equal to or larger than B1 — this is accepted)
3. The **upper wick of B2 must not exceed the high of B3**
   - The upper wick of B2 MAY exceed the high of B1 (accepted)
   - The lower wick of B2 MAY exceed the low of B1 (accepted)
   - The lower wick of B2 MAY exceed the low of B3 (accepted)
   - ONLY the upper wick of B2 exceeding the high of B3 invalidates the CP

**The bearish CP is the exact mirror** (B1 bearish, B2 bullish very small, B3 bearish engulfing B2).

**Special cases:**
- A CP can break a zone (support/resistance) OR form "in open space" (no key level). Both cases are valid.
- On the bias timeframe (H1/M30), B3 can be long without issue.

### 3.2 — Engulfing

A bullish engulfing consists of **2 candles**:
- **B1**: bearish candle (size does not matter)
- **B2**: bullish candle that engulfs **B1's body AND B1's UPPER wick**
  - The high of B2 must exceed the high of B1 (body + upper wick)
  - The **lower wick does NOT matter** (B1's lower wick may extend below B2 — this is accepted)

**The bearish engulfing is the exact mirror:**
- **B1**: bullish candle (size does not matter)
- **B2**: bearish candle that engulfs **B1's body AND B1's LOWER wick**
  - The low of B2 must go below the low of B1 (body + lower wick)
  - The **upper wick does NOT matter** (B1's upper wick may extend above B2 — this is accepted)

**Clarification (important):** Engulfing does NOT require engulfing both wicks. Only the wick in the direction of the bias must be engulfed (lower wick for a bearish engulfing, upper wick for a bullish engulfing). The opposite wick is irrelevant.

### 3.3 — Break of Structure (BOS)

The BOS is the break of a nearby support/resistance level (not a distant one).

**Bearish BOS:**
- Identify the **close of the last bearish candle** that formed the support
- The market may consolidate near this level (several candles)
- A candle that **closes below this close** = confirmed BOS

**Invalidation condition:**
- If the breakout candle has a **wick that is too large** in the opposite direction, the BOS is invalid
- Precise rule: if the wick (lower wick for a bearish BOS, upper wick for a bullish BOS) is **larger than the body** of the breakout candle, the BOS is rejected
- A wick slightly larger than the body is tolerated, but an exaggerated wick invalidates it

**Bullish BOS = exact mirror.**

**Difference between CP and BOS:**
- CP = exactly 3 candles
- BOS = several candles (consolidation) then a breakout

**"Nearby" level:** The BOS is drawn on the most recent structure closest to the current price, not on a distant level.

---

## 4. CLEAN TRAFFIC (mandatory filter)

Clean traffic is the free space between the setup and the target. If the traffic is not clean, the setup is NOT taken, even if the bias is valid.

### 4.1 — Candle obstacles (base rule)

**Definition (bearish case):**
- In the space between the setup and the target, there must be NO **closes of bearish candles** that would form a support (obstacle)
- In other words: **no bearish candle in the traffic** (a bearish candle indicates a correction = creation of an obstacle)

**Bullish case = exact mirror**: no bullish candle (close forming resistance) in the traffic.

**Observation timeframe:** clean traffic is observed on the bias timeframe (H1/M30).

**Note:** The trader does not use pip-based measurement for distance — it is visual. The developer should propose a logic (for example: number of clean candles before the first obstacle).

### 4.2 — Old support/resistance levels as obstacles (additional rule)

Beyond candle obstacles, **old support/resistance levels** in the path are ALSO obstacles, **including FLIPPED levels** (a former support that becomes resistance, or a former resistance that becomes support). These levels can push price back and make the trade fail, even when the candle path itself is clean.

**Important — how an obstacle behaves:**
- An obstacle **BLOCKS** the trade as long as it is **NOT broken**.
- Once price **breaks** through an obstacle, that obstacle **no longer counts**.
- If another obstacle remains further ahead in the path, we must **WAIT** until price breaks it too before taking the trade.
- **This rule only applies WHEN there are obstacles in the path.** Very often there is NO obstacle at all (clean path, or levels far away) — in that case the trade is taken directly, nothing to wait for.

**Difficulty (to be solved with the developer):** The trader identifies these support/resistance levels **VISUALLY**, from experience. He cannot give an exact mathematical rule for them. The developer should **propose an automated method to approximate these levels** (for example: recent zones where price reacted or reversed multiple times). This will be tested on the DEMO version and refined together, stage by stage.

---

## 5. CONFIRMATION and ENTRY (on M15/M5)

Once the bias is validated on H1/M30 with clean traffic:

### 5.1 — Draw the reference line (confirmation line)

The confirmation line is drawn on the **wick of the LAST candle of the bias pattern**. The exact candle depends on which pattern produced the bias:
- if bias = **CP** → line on **B3's wick** (high of B3's wick for a bullish bias, low of B3's wick for a bearish bias)
- if bias = **Engulfing** → line on **B2's wick** (the engulfing candle)
- if bias = **BOS** → line on the **breakout candle's wick**

The confirmation process below works **the SAME WAY** regardless of which bias pattern was used — only the candle used to draw the line changes.

### 5.2 — Wait for the break of the intermediate resistance/support
- If price reaches the close of a candle (resistance in the bullish case), wait for it to break before taking the setup

### 5.3 — Drop to M15 (or M5) and look for confirmation

Confirmation is done **only via CP or BOS** (NOT via engulfing), according to 2 scenarios:

**Scenario 1:** Price breaks the reference line directly with a CP or BOS on M15.

**Scenario 2:** Price breaks the line WITHOUT showing a CP, then forms a CP or BOS **within a maximum of 2 candles after the break**.

**Important confirmation conditions:**
- The confirmation must NOT touch the obstacle. If the obstacle is touched, there is no more space → skip the trade. (Unless the M15 confirmation breaks that obstacle, then it is valid.)
- The **B3 of the confirmation CP must NOT be too long** on M15/M5 (unlike on H1/M30), because the Stop Loss would be too large.
- For BOS confirmation: the correction before the BOS must not be exaggerated, and price must not consolidate too long before breaking.

---

## 6. TRADE MANAGEMENT

| Parameter | Value |
|-----------|-------|
| **Entry** | At the close of B3 (of the confirmation) |
| **Stop Loss** | Slightly below the low of B3 (bullish case) / above the high of B3 (bearish case). Buffer configurable in pips (e.g. 3-5 pips) |
| **Take Profit** | Risk/Reward of 1:1 (TP at the same distance as SL) |

---

## 7. RISK MANAGEMENT

| Parameter | Value |
|-----------|-------|
| Risk per trade | 1% of capital |
| Simultaneous trades | Maximum 1 trade per pair (so max 4 simultaneous trades across the 4 pairs) |
| No 2 trades on the same pair at the same time | Yes |

---

## 8. PROGRESSIVE MONEY MANAGEMENT

The lot size must evolve progressively based on results ("symmetric progressive" method):
- Base lot calculated on 1% of capital
- After each **winning trade**: the lot increases by one step (e.g. +0.01)
- After each **losing trade**: the lot decreases by one step (e.g. -0.01)
- The lot never goes below the minimum base lot
- Safety: the lot must never exceed a configurable maximum risk (e.g. 5% of capital)

---

## 9. DESIRED CONFIGURABLE PARAMETERS

The developer should expose at least the following inputs:
- Bias timeframe (H1/M30) and confirmation timeframe (M15/M5)
- Risk per trade (%)
- Risk/Reward ratio
- Stop Loss buffer (pips)
- Lot increment/decrement (money management)
- Maximum risk (%)
- Pattern detection thresholds (candle size ratios for the CP, lookback bars for the BOS, etc.) to allow fine-tuning after backtesting

---

## 10. EXPECTED DELIVERABLES

1. The commented `.mq5` source file
2. The compiled `.ex5` file
3. A functional backtest on the 4 pairs showing a coherent number of trades (the trader estimates around 2-3 setups per day per pair on average)
4. Installation and usage documentation

---

## 11. NOTES FOR THE DEVELOPER

- The strategy relies on visual judgment (wick size, "clean traffic"). Some rules will need to be translated into adjustable numeric thresholds, to be fine-tuned together after the first backtests.
- The trader can provide annotated screenshots of each pattern to visually clarify each rule. Available annotated screenshots: valid bearish CP, invalid bearish CP, valid bearish BOS, bearish engulfing, clean traffic (open path), old support/resistance levels as obstacles (support became resistance), obstacles that must be broken before entry, and two full confirmation examples (H1 bias → M15 entry, both bullish and bearish).
- Priority: the robot should take trades faithful to the described logic, with selectivity to be refined afterwards.

---

*Specification document prepared for the development of an MT5 EA based on a multi-timeframe price-action strategy.*

Con risposta

1
Sviluppatore 1
Valutazioni
(111)
Progetti
183
25%
Arbitraggio
24
17% / 75%
In ritardo
16
9%
Gratuito
2
Sviluppatore 2
Valutazioni
(17)
Progetti
21
19%
Arbitraggio
5
40% / 40%
In ritardo
0
Gratuito
3
Sviluppatore 3
Valutazioni
(614)
Progetti
718
33%
Arbitraggio
46
48% / 41%
In ritardo
15
2%
Caricato
4
Sviluppatore 4
Valutazioni
(62)
Progetti
90
29%
Arbitraggio
24
13% / 58%
In ritardo
7
8%
In elaborazione
5
Sviluppatore 5
Valutazioni
(319)
Progetti
566
35%
Arbitraggio
83
30% / 45%
In ritardo
204
36%
In elaborazione
6
Sviluppatore 6
Valutazioni
(33)
Progetti
36
33%
Arbitraggio
5
0% / 80%
In ritardo
0
In elaborazione
Pubblicati: 2 codici
7
Sviluppatore 7
Valutazioni
(3)
Progetti
4
0%
Arbitraggio
0
In ritardo
0
Gratuito
8
Sviluppatore 8
Valutazioni
(9)
Progetti
16
19%
Arbitraggio
2
0% / 50%
In ritardo
3
19%
In elaborazione
9
Sviluppatore 9
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
10
Sviluppatore 10
Valutazioni
(551)
Progetti
839
61%
Arbitraggio
33
27% / 45%
In ritardo
24
3%
Gratuito
Pubblicati: 1 codice
11
Sviluppatore 11
Valutazioni
(3)
Progetti
3
33%
Arbitraggio
0
In ritardo
0
Caricato
12
Sviluppatore 12
Valutazioni
(3)
Progetti
1
0%
Arbitraggio
5
0% / 100%
In ritardo
0
Gratuito
13
Sviluppatore 13
Valutazioni
(18)
Progetti
24
33%
Arbitraggio
3
33% / 67%
In ritardo
3
13%
Gratuito
14
Sviluppatore 14
Valutazioni
(1)
Progetti
1
0%
Arbitraggio
1
0% / 100%
In ritardo
0
Gratuito
15
Sviluppatore 15
Valutazioni
(15)
Progetti
20
25%
Arbitraggio
2
50% / 0%
In ritardo
4
20%
In elaborazione
16
Sviluppatore 16
Valutazioni
(83)
Progetti
95
32%
Arbitraggio
9
22% / 56%
In ritardo
5
5%
In elaborazione
17
Sviluppatore 17
Valutazioni
(25)
Progetti
32
19%
Arbitraggio
6
33% / 33%
In ritardo
4
13%
In elaborazione
18
Sviluppatore 18
Valutazioni
(1)
Progetti
1
0%
Arbitraggio
0
In ritardo
0
Gratuito
19
Sviluppatore 19
Valutazioni
(55)
Progetti
92
24%
Arbitraggio
8
75% / 13%
In ritardo
44
48%
Gratuito
20
Sviluppatore 20
Valutazioni
(25)
Progetti
31
13%
Arbitraggio
13
0% / 77%
In ritardo
9
29%
In elaborazione
21
Sviluppatore 21
Valutazioni
(2674)
Progetti
3413
68%
Arbitraggio
77
48% / 14%
In ritardo
342
10%
Gratuito
Pubblicati: 1 codice
22
Sviluppatore 22
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
23
Sviluppatore 23
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
24
Sviluppatore 24
Valutazioni
(65)
Progetti
81
57%
Arbitraggio
6
67% / 17%
In ritardo
1
1%
Occupato
25
Sviluppatore 25
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
26
Sviluppatore 26
Valutazioni
(1)
Progetti
8
88%
Arbitraggio
0
In ritardo
0
Gratuito
27
Sviluppatore 27
Valutazioni
(184)
Progetti
317
24%
Arbitraggio
23
35% / 13%
In ritardo
23
7%
Gratuito
Pubblicati: 3 codici
28
Sviluppatore 28
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
29
Sviluppatore 29
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
30
Sviluppatore 30
Valutazioni
(21)
Progetti
27
7%
Arbitraggio
9
33% / 33%
In ritardo
1
4%
In elaborazione
31
Sviluppatore 31
Valutazioni
(13)
Progetti
22
41%
Arbitraggio
8
0% / 50%
In ritardo
3
14%
Gratuito
32
Sviluppatore 32
Valutazioni
(2343)
Progetti
2948
63%
Arbitraggio
124
44% / 26%
In ritardo
429
15%
In elaborazione
33
Sviluppatore 33
Valutazioni
(78)
Progetti
246
74%
Arbitraggio
7
100% / 0%
In ritardo
1
0%
Gratuito
Pubblicati: 1 articolo
34
Sviluppatore 34
Valutazioni
(10)
Progetti
12
58%
Arbitraggio
0
In ritardo
0
Gratuito
35
Sviluppatore 35
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
36
Sviluppatore 36
Valutazioni
(45)
Progetti
53
57%
Arbitraggio
2
100% / 0%
In ritardo
1
2%
Gratuito
Pubblicati: 5 codici
37
Sviluppatore 37
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
38
Sviluppatore 38
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
39
Sviluppatore 39
Valutazioni
(4)
Progetti
4
25%
Arbitraggio
0
In ritardo
0
Gratuito
40
Sviluppatore 40
Valutazioni
(50)
Progetti
51
8%
Arbitraggio
0
In ritardo
0
Gratuito
41
Sviluppatore 41
Valutazioni
(50)
Progetti
64
20%
Arbitraggio
11
27% / 55%
In ritardo
5
8%
Gratuito
42
Sviluppatore 42
Valutazioni
(16)
Progetti
35
23%
Arbitraggio
4
0% / 50%
In ritardo
2
6%
In elaborazione
43
Sviluppatore 43
Valutazioni
(366)
Progetti
449
55%
Arbitraggio
23
57% / 17%
In ritardo
30
7%
In elaborazione
44
Sviluppatore 44
Valutazioni
(59)
Progetti
92
42%
Arbitraggio
4
0% / 100%
In ritardo
3
3%
In elaborazione
45
Sviluppatore 45
Valutazioni
(258)
Progetti
269
29%
Arbitraggio
1
100% / 0%
In ritardo
3
1%
In elaborazione
Pubblicati: 2 codici
46
Sviluppatore 46
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
47
Sviluppatore 47
Valutazioni
(119)
Progetti
169
38%
Arbitraggio
9
78% / 22%
In ritardo
15
9%
Gratuito
48
Sviluppatore 48
Valutazioni
(10)
Progetti
14
43%
Arbitraggio
0
In ritardo
3
21%
Gratuito
49
Sviluppatore 49
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
50
Sviluppatore 50
Valutazioni
(259)
Progetti
304
76%
Arbitraggio
13
77% / 0%
In ritardo
5
2%
Caricato
51
Sviluppatore 51
Valutazioni
(52)
Progetti
63
40%
Arbitraggio
15
27% / 60%
In ritardo
1
2%
Gratuito
52
Sviluppatore 52
Valutazioni
(1)
Progetti
0
0%
Arbitraggio
1
0% / 100%
In ritardo
0
Gratuito
53
Sviluppatore 53
Valutazioni
(271)
Progetti
553
50%
Arbitraggio
57
40% / 37%
In ritardo
227
41%
In elaborazione
54
Sviluppatore 54
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
55
Sviluppatore 55
Valutazioni
Progetti
0
0%
Arbitraggio
1
0% / 100%
In ritardo
0
Gratuito
56
Sviluppatore 56
Valutazioni
(13)
Progetti
20
45%
Arbitraggio
6
33% / 17%
In ritardo
2
10%
Caricato
Pubblicati: 7 articoli, 35 codici
57
Sviluppatore 57
Valutazioni
Progetti
1
0%
Arbitraggio
0
In ritardo
0
Gratuito
58
Sviluppatore 58
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
59
Sviluppatore 59
Valutazioni
(298)
Progetti
478
40%
Arbitraggio
105
40% / 24%
In ritardo
82
17%
Caricato
Pubblicati: 2 codici
60
Sviluppatore 60
Valutazioni
(8)
Progetti
8
0%
Arbitraggio
2
50% / 0%
In ritardo
1
13%
In elaborazione
61
Sviluppatore 61
Valutazioni
(19)
Progetti
27
11%
Arbitraggio
11
9% / 55%
In ritardo
12
44%
Gratuito
62
Sviluppatore 62
Valutazioni
(13)
Progetti
20
40%
Arbitraggio
1
0% / 100%
In ritardo
1
5%
Gratuito
63
Sviluppatore 63
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
Ordini simili
I want to Build a EA Robot that combine from my trading style and any conditions we can discussion. My trading style information below. 1 Set Up , 1 Rule , 1 Trade , 1 Session , 1 Target
Ich möchte einen professionellen Expert Advisor (EA) für MetaTrader 5 entwickeln lassen, der sich funktional am ThunderGold Scalper orientiert. Instrument: XAUUSD / GOLD Zeitrahmen: M15 Plattform: MetaTrader 5 / MQL5 Der EA soll eine eigene, nachprogrammierte Strategie verwenden und keine geschützten Quellcodes oder proprietären Dateien des Originalprodukts kopieren. Gewünschte Funktionen: automatischer Handel auf
I need a fully automated Expert Advisor (EA) written in MQL5 for MetaTrader 5. The EA must work directly inside MT5 and must NOT require TradingView, PineConnector, webhooks, or another external connector to place trades. Trading Instrument Primary symbol: XAGUSD (Silver) My broker may display the symbol as XAGUSD-ECN, so the EA should work with the broker’s available XAGUSD symbol. Main entry timeframe: 5-minute
RECHERCHE DÉVELOPPEUR MQL5 — PARTENARIAT 50/50 Objectif : développer un EA de trading automatisé en 11 jours maximum pour participer à plusieurs concours de trading démo. Je recherche un développeur MQL5 expérimenté, capable de développer, tester et optimiser un EA proprement, avec une vraie maîtrise de la gestion du risque. CONCOURS VISÉS 🥇 XM — Weekly Demo Contest - Concours récurrent - Prize pool annoncé : 25 000
GoldTrade EA 89+ USD
//+------------------------------------------------------------------+ //| XAUUSD Wolfe + SMC Quick Profit EA | //| MT5 / MQL5 | //+------------------------------------------------------------------+ #property strict #include <Trade/Trade.mqh> CTrade trade; //================================================================== // INPUTS //================================================================== //--- General
can you help me with I have an indicator that I built and I work with PickMyTrade. The entries come through the alerts I get from Trading View . Trading View needs to send an alert and PickMyTrade executes a trade at that exact same second. Now, I have a problem in Trading View with the synchronization between the alert and the signal. I have a box that I built for a trade. It needs to output the box and get an
Looking for a developer in NinjaTrader For coding Inst - ES,NQ Chart type - Tick, range, volume & time Brief- Fib levels mapped on chart which act as entries, tgts and stops all based on candle close. (Maybe) use MACD for filtering direction. Daily manual input of the TWO fib Anchor levels is part of the strategy. I need a well experienced developer to bid and before biding check the attached file well. the PDF and
I Have an existing Mql5 Expert advisor (source code), I want a professional programmer to help me Modify the EA... so that it can stop taking new trades once it Gets to a Pacific Lots Size or Floating loss
I Have an existing Mql5 Expert advisor (source code), I want a professional programmer to help me Modify the EA... so that it can stop taking new trades once it Gets to a Pacific Lots Size or Floating loss
take your time better make it for days and have good bot than never benefits both of us. Make the bot have zero errors and backtest it for a 2 year period

Informazioni sul progetto

Budget
30 - 200 USD
Scadenze
a 10 giorno(i)