TradingView Pine Script to MT4 Indicator

MQL4 Convertir

Tâche terminée

Temps d'exécution 1 heure
Commentaires du client
I have been thoroughly impressed by your responsiveness and promptness in addressing my requirements
Commentaires de l'employé
Thank you

Spécifications

Please convert the Pine Script below into MQL4 Indicator, an indicator of ADX and DI, 2 day period max:


//@version=4

study("ADX and DI for v4")
len = input(20)

TrueRange = max(max(high-low, abs(high-nz(close[1]))), abs(low-nz(close[1])))
DirectionalMovementPlus = high-nz(high[1]) > nz(low[1])-low ? max(high-nz(high[1]), 0): 0
DirectionalMovementMinus = nz(low[1])-low > high-nz(high[1]) ? max(nz(low[1])-low, 0): 0

SmoothedTrueRange = 0.0
SmoothedTrueRange := nz(SmoothedTrueRange[1]) - (nz(SmoothedTrueRange[1])/len) + TrueRange

SmoothedDirectionalMovementPlus = 0.0
SmoothedDirectionalMovementPlus := nz(SmoothedDirectionalMovementPlus[1]) - (nz(SmoothedDirectionalMovementPlus[1])/len) + DirectionalMovementPlus

SmoothedDirectionalMovementMinus = 0.0
SmoothedDirectionalMovementMinus := nz(SmoothedDirectionalMovementMinus[1]) - (nz(SmoothedDirectionalMovementMinus[1])/len) + DirectionalMovementMinus

DIPlus = SmoothedDirectionalMovementPlus / SmoothedTrueRange * 100
DIMinus = SmoothedDirectionalMovementMinus / SmoothedTrueRange * 100
DX = abs(DIPlus-DIMinus) / (DIPlus+DIMinus)*100
ADX = sma(DX, len)

plot(DIPlus, color=color.green, title="DI+")
plot(DIMinus, color=color.red, title="DI-")
plot(ADX, color=color.yellow, title="ADX")


Répondu

1
Développeur 1
Évaluation
(35)
Projets
50
42%
Arbitrage
3
33% / 33%
En retard
4
8%
Gratuit
2
Développeur 2
Évaluation
(268)
Projets
603
34%
Arbitrage
65
22% / 57%
En retard
147
24%
Travail
Publié : 1 article, 22 codes
3
Développeur 3
Évaluation
(12)
Projets
14
43%
Arbitrage
3
33% / 33%
En retard
2
14%
Gratuit
4
Développeur 4
Évaluation
(171)
Projets
195
42%
Arbitrage
13
8% / 54%
En retard
9
5%
Gratuit
Publié : 3 codes
5
Développeur 5
Évaluation
(12)
Projets
12
25%
Arbitrage
0
En retard
1
8%
Gratuit
6
Développeur 6
Évaluation
(13)
Projets
18
44%
Arbitrage
2
50% / 50%
En retard
0
Gratuit
7
Développeur 7
Évaluation
(574)
Projets
945
47%
Arbitrage
309
58% / 27%
En retard
125
13%
Gratuit

Informations sur le projet

Budget
35+ USD
Délais
à 2 jour(s)