Convert Pine Script to MT5 EA and add some features

İş Gereklilikleri

Convert the below code to an MT5 EA: 


//@version=4

strategy("Volty Expan Close Strategy", overlay=true)

length = input(11)

numATRs = input(0.55)


atrs = sma(tr, length)*numATRs


if (not na(close[length]))

    strategy.entry("VltClsLE", strategy.long, stop=close+atrs, comment = "VltClsLE")

    strategy.entry("VltClsSE", strategy.short, stop=close-atrs, comment = "VltClsSE")


//plot(strategy.equity, title="equity", color=color.red, linewidth=2, style=plot.style_areabr)


And add some additional features:

  • Stop Loss,
  • Trailing Stop (with trailing start, trailing distance, and trailing step)
  • option to close on opposite signal, true or false
  • If the strategy is in a buy signal, once the initial buy trade closes, place a buy stop order X points (the Offset) above the current price. The Offset amount should be an input parameter
    • The buy stop order should follow the market price. So let's say the first buy trade closes at 5500.00. If the Offset is set to 200 points, a new buy stop order is placed at 5502.00. but if the price falls to 5499.00, the buy stop order should move down to 5501.00. but it should never move back up. Apply the same logic to the sell side.
  • There should only be one trade open per direction at any time. but a buy and sell trade can exist simultaneously (if close on opposite signal is set to false), if a sell signal is triggered while a buy trade is still open, and vice versa.
  • Essentially, i am asking you to recreate an already existing EA (.ex4 file only, no source file) which i will send to you in a private discussion, but have it only enter buy trades when the above Pine Script strategy is in a buy signal, and only enter sell trades when it is in a sell signal. It basically just needs to be modified so that it determines buy/sells according to the above strategy, instead of its existing strategy, which tends to always be trading against the trend.




Yanıtlandı

1
Geliştirici 1
Derecelendirme
(1)
Projeler
0
0%
Arabuluculuk
2
0% / 100%
Süresi dolmuş
0
Serbest
2
Geliştirici 2
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
3
Geliştirici 3
Derecelendirme
Projeler
1
0%
Arabuluculuk
1
0% / 0%
Süresi dolmuş
0
Serbest
4
Geliştirici 4
Derecelendirme
(206)
Projeler
333
35%
Arabuluculuk
66
12% / 58%
Süresi dolmuş
87
26%
Serbest
5
Geliştirici 5
Derecelendirme
(2)
Projeler
3
0%
Arabuluculuk
1
0% / 100%
Süresi dolmuş
0
Çalışıyor
6
Geliştirici 6
Derecelendirme
(1)
Projeler
2
0%
Arabuluculuk
1
0% / 100%
Süresi dolmuş
0
Serbest
Yayınlandı: 2 kod
7
Geliştirici 7
Derecelendirme
Projeler
1
0%
Arabuluculuk
0
Süresi dolmuş
0
Çalışıyor
8
Geliştirici 8
Derecelendirme
(845)
Projeler
1447
72%
Arabuluculuk
119
29% / 47%
Süresi dolmuş
355
25%
Çalışıyor
Yayınlandı: 3 makale
9
Geliştirici 9
Derecelendirme
(27)
Projeler
38
24%
Arabuluculuk
14
0% / 93%
Süresi dolmuş
4
11%
Çalışıyor
10
Geliştirici 10
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
11
Geliştirici 11
Derecelendirme
Projeler
0
0%
Arabuluculuk
1
0% / 100%
Süresi dolmuş
0
Serbest
12
Geliştirici 12
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
13
Geliştirici 13
Derecelendirme
(337)
Projeler
624
38%
Arabuluculuk
40
23% / 65%
Süresi dolmuş
93
15%
Serbest
Yayınlandı: 4 makale, 19 kod
14
Geliştirici 14
Derecelendirme
(120)
Projeler
128
36%
Arabuluculuk
3
33% / 33%
Süresi dolmuş
2
2%
Yüklendi
15
Geliştirici 15
Derecelendirme
(275)
Projeler
370
72%
Arabuluculuk
18
33% / 44%
Süresi dolmuş
14
4%
Serbest
Yayınlandı: 14 kod
16
Geliştirici 16
Derecelendirme
(15)
Projeler
21
38%
Arabuluculuk
6
33% / 50%
Süresi dolmuş
0
Çalışıyor
17
Geliştirici 17
Derecelendirme
(10)
Projeler
10
10%
Arabuluculuk
0
Süresi dolmuş
2
20%
Çalışıyor
18
Geliştirici 18
Derecelendirme
(1)
Projeler
2
0%
Arabuluculuk
2
0% / 0%
Süresi dolmuş
0
Yüklendi
19
Geliştirici 19
Derecelendirme
(27)
Projeler
26
65%
Arabuluculuk
0
Süresi dolmuş
1
4%
Yüklendi
Yayınlandı: 5 kod
20
Geliştirici 20
Derecelendirme
(1)
Projeler
2
0%
Arabuluculuk
0
Süresi dolmuş
1
50%
Serbest
21
Geliştirici 21
Derecelendirme
(14)
Projeler
14
21%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
22
Geliştirici 22
Derecelendirme
(294)
Projeler
470
39%
Arabuluculuk
102
40% / 24%
Süresi dolmuş
78
17%
Meşgul
Yayınlandı: 2 kod

Proje bilgisi

Bütçe
30+ USD