指定
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, 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
等级
项目
0
0%
仲裁
2
0%
/
100%
逾期
0
空闲
2
等级
项目
0
0%
仲裁
0
逾期
0
空闲
3
等级
项目
1
0%
仲裁
1
0%
/
0%
逾期
0
空闲
4
等级
项目
333
35%
仲裁
66
12%
/
58%
逾期
87
26%
空闲
5
等级
项目
3
0%
仲裁
1
0%
/
100%
逾期
0
工作中
6
等级
项目
2
0%
仲裁
1
0%
/
100%
逾期
0
空闲
发布者: 2 代码
7
等级
项目
1
0%
仲裁
0
逾期
0
工作中
8
等级
项目
1447
72%
仲裁
119
29%
/
47%
逾期
355
25%
工作中
发布者: 3 文章
9
等级
项目
38
24%
仲裁
14
0%
/
93%
逾期
4
11%
空闲
10
等级
项目
0
0%
仲裁
0
逾期
0
空闲
11
等级
项目
0
0%
仲裁
1
0%
/
100%
逾期
0
空闲
12
等级
项目
0
0%
仲裁
0
逾期
0
空闲
13
等级
项目
624
38%
仲裁
40
23%
/
65%
逾期
93
15%
空闲
发布者: 4 文章, 19 代码
14
等级
项目
128
36%
仲裁
3
33%
/
33%
逾期
2
2%
已载入
15
等级
项目
370
72%
仲裁
18
33%
/
44%
逾期
14
4%
空闲
发布者: 14 代码
16
等级
项目
21
38%
仲裁
6
33%
/
50%
逾期
0
工作中
项目信息
预算
30+ USD
客户
所下订单9
仲裁计数0