Convert my tradingview indicator to xm mt4 (mq4)

MQL4 Conversión

Trabajo finalizado

Plazo de ejecución 5 días

Tarea técnica

I would like to convert my tradingview indicator to the xm metatrader 4 (remembering that there is this mt4 from xm that has some details).

I tried the conversion via AI but it was not possible, since the indicator is not similar and useful as it was in tradingview.


//@version=5

indicator(title="JR INDEX", shorttitle="JR INDEX", overlay=false)


// Input

fastLength = input.int(12, title="Fast Length", minval=1)

slowLength = input.int(26, title="Slow Length", minval=1)

src = input(close, title="Source")

cciLength = input.int(14, title="CCI Length", minval=1)

overSold = input.int(-100, title="Over Sold")

overBought = input.int(100, title="Over Bought")


// Calculation

fastMA = ta.ema(src, fastLength)

slowMA = ta.ema(src, slowLength)

macdLine = fastMA - slowMA

signalLine = ta.ema(macdLine, 9)

macdHistogram = macdLine - signalLine

cci = ta.cci(src, cciLength)


// Plotting

plot(macdHistogram, title="MACD", color=macdHistogram > 0 ? color.green : color.red, style=plot.style_columns, transp=0)

plot(cci, title="CCI", color=color.purple)

plot(overSold, title="Over Sold", color=color.green, transp=0)

plot(overBought, title="Over Bought", color=color.red, transp=0)


// Entry and Exit conditions

longCondition = ta.cross(macdHistogram, 0) and cci > overSold

shortCondition = ta.cross(0, macdHistogram) and cci < overBought

bgcolor(longCondition ? color.green : shortCondition ? color.red : na, transp=70)


Han respondido

1
Desarrollador 1
Evaluación
(337)
Proyectos
624
38%
Arbitraje
40
23% / 65%
Caducado
93
15%
Libre
Ha publicado: 4 artículos, 19 ejemplos
2
Desarrollador 2
Evaluación
(268)
Proyectos
603
34%
Arbitraje
65
22% / 57%
Caducado
147
24%
Trabaja
Ha publicado: 1 artículo, 22 ejemplos
3
Desarrollador 3
Evaluación
(132)
Proyectos
178
39%
Arbitraje
4
25% / 50%
Caducado
14
8%
Libre
4
Desarrollador 4
Evaluación
(574)
Proyectos
945
47%
Arbitraje
309
58% / 27%
Caducado
125
13%
Libre
5
Desarrollador 5
Evaluación
(171)
Proyectos
195
42%
Arbitraje
13
8% / 54%
Caducado
9
5%
Libre
Ha publicado: 3 ejemplos
6
Desarrollador 6
Evaluación
(2)
Proyectos
2
0%
Arbitraje
1
0% / 0%
Caducado
2
100%
Libre

Información sobre el proyecto

Presupuesto
50+ USD
Plazo límite de ejecución
a 2 día(s)