Tarea técnica
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.
Han respondido
1
Evaluación
Proyectos
0
0%
Arbitraje
2
0%
/
100%
Caducado
0
Libre
2
Evaluación
Proyectos
0
0%
Arbitraje
0
Caducado
0
Libre
3
Evaluación
Proyectos
1
0%
Arbitraje
1
0%
/
0%
Caducado
0
Libre
4
Evaluación
Proyectos
333
35%
Arbitraje
66
12%
/
58%
Caducado
87
26%
Libre
5
Evaluación
Proyectos
3
0%
Arbitraje
1
0%
/
100%
Caducado
0
Trabaja
6
Evaluación
Proyectos
2
0%
Arbitraje
1
0%
/
100%
Caducado
0
Libre
Ha publicado: 2 ejemplos
7
Evaluación
Proyectos
1
0%
Arbitraje
0
Caducado
0
Trabaja
8
Evaluación
Proyectos
1447
72%
Arbitraje
119
29%
/
47%
Caducado
355
25%
Trabaja
Ha publicado: 3 artículos
9
Evaluación
Proyectos
38
24%
Arbitraje
14
0%
/
93%
Caducado
4
11%
Trabaja
10
Evaluación
Proyectos
0
0%
Arbitraje
0
Caducado
0
Libre
11
Evaluación
Proyectos
0
0%
Arbitraje
1
0%
/
100%
Caducado
0
Libre
12
Evaluación
Proyectos
0
0%
Arbitraje
0
Caducado
0
Libre
13
Evaluación
Proyectos
624
38%
Arbitraje
40
23%
/
65%
Caducado
93
15%
Libre
Ha publicado: 4 artículos, 19 ejemplos
14
Evaluación
Proyectos
128
36%
Arbitraje
3
33%
/
33%
Caducado
2
2%
Trabajando
15
Evaluación
Proyectos
370
72%
Arbitraje
18
33%
/
44%
Caducado
14
4%
Libre
Ha publicado: 14 ejemplos
16
Evaluación
Proyectos
21
38%
Arbitraje
6
33%
/
50%
Caducado
0
Trabaja
17
Evaluación
Proyectos
10
10%
Arbitraje
0
Caducado
2
20%
Trabaja
18
Evaluación
Proyectos
2
0%
Arbitraje
2
0%
/
0%
Caducado
0
Trabajando
19
Evaluación
Proyectos
26
65%
Arbitraje
0
Caducado
1
4%
Trabajando
Ha publicado: 5 ejemplos
20
Evaluación
Proyectos
2
0%
Arbitraje
0
Caducado
1
50%
Libre
21
Evaluación
Proyectos
14
21%
Arbitraje
0
Caducado
0
Libre
22
Evaluación
Proyectos
470
39%
Arbitraje
102
40%
/
24%
Caducado
78
17%
Ocupado
Ha publicado: 2 ejemplos
Información sobre el proyecto
Presupuesto
30+ USD