I need help with translating 2 strategies from ProRealCode (ProRealTime) to MT5, it's very simple strategies.

MQL5 转化中 翻译

指定

I need two simple trading strategies translated into MQL5.
Both systems already work in ProRealTime; I only need them rebuilt exactly the same in MT5.


When accepted you will see the exact parameters.

Please follow these rules:

  • No discretionary logic

  • No optimization

  • Clean, readable MQL5 code

  • Both strategies must run on Daily timeframe

  • Position sizing should follow the formulas I provide 

  • Long-only

  • One position at a time

  • Market orders only

  • No trailing stop, take profit, or stop loss

  • Code must compile with zero warnings or errors


📌 Strategy 1 – Mean Reversion with MA Envelope (Daily, Long-Only)

Implement the following:

Indicators

  • A moving-average envelope with upper and lower bands

  • A 200-day trend filter

  • ATR-based position size calculation

Entry

  • Only take long trades

  • Price must be above the long-term trend filter

  • Price must close below the lower envelope band

Exit

  • Close the long position when price closes above the upper envelope band

Position Sizing

  • Dynamic ATR-based sizing:
    Uses portfolio equity, a risk percentage, and ATR.
    I will provide the formula (implement exactly, no parameter inputs).


📌 Strategy 2 – Donchian Breakout (Daily, Long-Only)

Indicators

  • Donchian breakout channel (Entry based on X-day high, Exit based on Y-day low)

  • ATR-based position size calculation following my formula

  • Uses previous bar values for breakout levels

Entry

  • Enter long when:
    Close > previous bar's Donchian high

Exit

  • Exit long when:
    Close < previous bar’s Donchian low

Position Sizing

  • ATR-based sizing using portfolio size × risk percentage

  • No external parameters shown to user


📌 General Requirements
  • Build both strategies as two separate EA files

  • Should run on Daily-chart symbol

  • One position at a time

  • Clean code

  • Must work live and in backtesting

  • I provide logic → you translate exactly, MQL5-standard code quality expected

  • Deliver full MQ5 source code



反馈

1
开发者 1
等级
(22)
项目
28
7%
仲裁
9
33% / 33%
逾期
1
4%
工作中
2
开发者 2
等级
(258)
项目
269
29%
仲裁
2
50% / 0%
逾期
3
1%
工作中
发布者: 2 代码
3
开发者 3
等级
(7)
项目
6
0%
仲裁
4
25% / 75%
逾期
2
33%
空闲
4
开发者 4
等级
(13)
项目
23
39%
仲裁
8
0% / 50%
逾期
4
17%
空闲
5
开发者 5
等级
(25)
项目
34
26%
仲裁
4
50% / 25%
逾期
4
12%
空闲
6
开发者 6
等级
(144)
项目
186
41%
仲裁
24
58% / 21%
逾期
13
7%
空闲
7
开发者 7
等级
(16)
项目
30
40%
仲裁
3
33% / 67%
逾期
7
23%
工作中
8
开发者 8
等级
(10)
项目
12
0%
仲裁
3
33% / 33%
逾期
0
空闲
9
开发者 9
等级
(4)
项目
4
25%
仲裁
1
0% / 100%
逾期
0
空闲
发布者: 2 文章
10
开发者 10
等级
(216)
项目
283
20%
仲裁
28
57% / 14%
逾期
0
工作中
11
开发者 11
等级
(2)
项目
3
0%
仲裁
0
逾期
0
空闲
12
开发者 12
等级
项目
0
0%
仲裁
0
逾期
0
空闲
13
开发者 13
等级
项目
0
0%
仲裁
0
逾期
0
空闲
14
开发者 14
等级
(511)
项目
978
74%
仲裁
27
19% / 67%
逾期
100
10%
空闲
发布者: 1 文章, 6 代码
15
开发者 15
等级
(4)
项目
8
0%
仲裁
3
33% / 67%
逾期
4
50%
空闲
16
开发者 16
等级
(55)
项目
68
43%
仲裁
16
25% / 56%
逾期
1
1%
工作中
17
开发者 17
等级
项目
0
0%
仲裁
1
0% / 100%
逾期
0
空闲
18
开发者 18
等级
项目
1
100%
仲裁
0
逾期
0
空闲
19
开发者 19
等级
(4)
项目
3
33%
仲裁
2
0% / 100%
逾期
0
空闲
20
开发者 20
等级
项目
0
0%
仲裁
0
逾期
0
空闲
21
开发者 21
等级
(162)
项目
289
35%
仲裁
18
22% / 61%
逾期
43
15%
空闲
22
开发者 22
等级
(1)
项目
1
0%
仲裁
0
逾期
0
空闲
23
开发者 23
等级
项目
2
0%
仲裁
4
25% / 50%
逾期
1
50%
空闲
24
开发者 24
等级
(298)
项目
478
40%
仲裁
105
40% / 24%
逾期
82
17%
已载入
发布者: 2 代码
25
开发者 25
等级
(3)
项目
1
100%
仲裁
3
0% / 100%
逾期
0
空闲

项目信息

预算
30+ USD