Translate Pine Script (Tradingview) Indicator into MQL4

MQL4 Conversión

Trabajo finalizado

Plazo de ejecución 14 minutos
Comentario del Cliente
great job really fast and he knows exactly what you want
Comentario del Ejecutor
A clear, understandable description of the assignment. Quick check. Thank you for the order.

Tarea técnica

 Hi, I need the indicator vortex trend tracker translated into mt4, it needs to be 100% the same, with histogram and colors being darker when there is a clear trend signal 

mql5 doesn't let me insert the link,  but it is vortex trend tracker of profitprogrammers on tradingview

//@version=4

study("Vortex Trend Tracker")

//          INPUT VARIABLES FOR VORTEX: 

vortexLen = input(30, title="Length for Vortex", minval=1)

emaLen = input(10, title="Length of Positive and Negative EMA's", type=input.integer, minval=1)

colorBars = input(true, title="Color Price Bars Based on Vortex?")

plotVLines = input(false, title="Plot VI+ and VI- Lines?")


//          VORTEX CALCULATION:

//Returns positive and negative trendlines. 

vortex(posSum, negSum, vLen)=>

    tRange = sum(atr(1), vLen)

    vmPlus = posSum / tRange

    vmNeg = negSum / tRange

    [vmPlus, vmNeg]


[vPlus, vNeg] = vortex(sum(abs(high - low[1]), vortexLen), sum(abs(low - high[1]), vortexLen), vortexLen)

plusEMA = ema(vPlus, emaLen)

negEMA = ema(vNeg, emaLen)

vDiff = abs(plusEMA - negEMA)


//          PLOTTING:

var color vColor = na

vColor := plusEMA > negEMA and plusEMA >= plusEMA[1] ? #1b5e20 : plusEMA > negEMA and plusEMA < plusEMA[1] ? #a5d6a7 : negEMA >= plusEMA and negEMA > negEMA[1] ? #b71c1c : negEMA > plusEMA and negEMA < negEMA[1] ? #c76a72 : nz(vColor[1])

plot(vDiff, style=plot.style_histogram, color=vColor, linewidth=3, transp=0)

plot(plotVLines ? plusEMA : na, title="VI +", color=color.green, linewidth=2)

plot(plotVLines ? negEMA : na, title="VI -", color=color.red, linewidth=2)

barcolor(colorBars ? vColor : na)


Archivos adjuntos:

Han respondido

1
Desarrollador 1
Evaluación
(132)
Proyectos
178
39%
Arbitraje
4
25% / 50%
Caducado
14
8%
Libre
2
Desarrollador 2
Evaluación
(68)
Proyectos
111
26%
Arbitraje
17
6% / 71%
Caducado
15
14%
Libre
Ha publicado: 9 ejemplos
3
Desarrollador 3
Evaluación
(118)
Proyectos
217
49%
Arbitraje
1
0% / 0%
Caducado
25
12%
Libre
Ha publicado: 1 ejemplo
4
Desarrollador 4
Evaluación
(564)
Proyectos
845
73%
Arbitraje
15
53% / 13%
Caducado
193
23%
Libre
5
Desarrollador 5
Evaluación
(298)
Proyectos
478
40%
Arbitraje
105
40% / 24%
Caducado
82
17%
Trabajando
Ha publicado: 2 ejemplos

Información sobre el proyecto

Presupuesto
40+ USD