Convert Pine Script to MT5 EA and add some features

指定

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.




応答済み

1
開発者 1
評価
(1)
プロジェクト
0
0%
仲裁
2
0% / 100%
期限切れ
0
2
開発者 2
評価
プロジェクト
0
0%
仲裁
0
期限切れ
0
3
開発者 3
評価
プロジェクト
1
0%
仲裁
1
0% / 0%
期限切れ
0
4
開発者 4
評価
(206)
プロジェクト
333
35%
仲裁
66
12% / 58%
期限切れ
87
26%
5
開発者 5
評価
(2)
プロジェクト
3
0%
仲裁
1
0% / 100%
期限切れ
0
仕事中
6
開発者 6
評価
(1)
プロジェクト
2
0%
仲裁
1
0% / 100%
期限切れ
0
パブリッシュした人: 2 codes
7
開発者 7
評価
プロジェクト
1
0%
仲裁
0
期限切れ
0
仕事中
8
開発者 8
評価
(845)
プロジェクト
1447
72%
仲裁
119
29% / 47%
期限切れ
355
25%
仕事中
パブリッシュした人: 3 articles
9
開発者 9
評価
(27)
プロジェクト
38
24%
仲裁
14
0% / 93%
期限切れ
4
11%
仕事中
10
開発者 10
評価
プロジェクト
0
0%
仲裁
0
期限切れ
0
11
開発者 11
評価
プロジェクト
0
0%
仲裁
1
0% / 100%
期限切れ
0
12
開発者 12
評価
プロジェクト
0
0%
仲裁
0
期限切れ
0
13
開発者 13
評価
(337)
プロジェクト
624
38%
仲裁
40
23% / 65%
期限切れ
93
15%
パブリッシュした人: 4 articles, 19 codes
14
開発者 14
評価
(120)
プロジェクト
128
36%
仲裁
3
33% / 33%
期限切れ
2
2%
取り込み中
15
開発者 15
評価
(275)
プロジェクト
370
72%
仲裁
18
33% / 44%
期限切れ
14
4%
パブリッシュした人: 14 codes
16
開発者 16
評価
(15)
プロジェクト
21
38%
仲裁
6
33% / 50%
期限切れ
0
仕事中
17
開発者 17
評価
(10)
プロジェクト
10
10%
仲裁
0
期限切れ
2
20%
仕事中
18
開発者 18
評価
(1)
プロジェクト
2
0%
仲裁
2
0% / 0%
期限切れ
0
取り込み中
19
開発者 19
評価
(27)
プロジェクト
26
65%
仲裁
0
期限切れ
1
4%
取り込み中
パブリッシュした人: 5 codes
20
開発者 20
評価
(1)
プロジェクト
2
0%
仲裁
0
期限切れ
1
50%
21
開発者 21
評価
(14)
プロジェクト
14
21%
仲裁
0
期限切れ
0
22
開発者 22
評価
(294)
プロジェクト
470
39%
仲裁
102
40% / 24%
期限切れ
78
17%
多忙
パブリッシュした人: 2 codes

プロジェクト情報

予算
30+ USD