NO LINKS OR MQL SOURCE CODE REQUESTS. Please follow the rules.


Re: ADX DMI Indicators for MT4

#422
Hello Mr tools, id like to know if you can help me with a small problem, The problem that I have is that the ADX indicator that comes default in mt4 has completely different values than the default ADX indicator inside of TradingView although the period of both indicators is set to 14. One difference between the two indicators is that the default ADX indicator in MT4 only allows you to change one value in it's settings and inside of TradingView when you go inside the settings of the indicator it has two options which are ADX smoothing and DI length and they are both set to 14. I've attached several images that show the name and settings of the default adx indicator inside tradingview that id like the mt4 adx indicator values to follow. Hopefully it gives clarity to my questions/problem. My hope is that I can locate in ADX indicator for mt4 that plots the exact values as the default ADX indicator does within TradingView. I have literally gone through every single page in this specific thread, downloaded each adx indicator and installed it into mt4 and tried adjusting the settings to get it to match the values of the default ADX indicator within TradingView. I do not know why I cannot get the values to line up and be exactly the same is this something that you can help me with? Im sure u have alot more understanding to how these values are calculated than i do. thanks in advance
Screen Shot 2021-09-30 at 9.39.03 PM.png
Screen Shot 2021-09-30 at 9.23.23 PM.png

Re: ADX DMI Indicators for MT4

#423
kmck5147 wrote:
Fri Oct 01, 2021 2:45 pm
Hello Mr tools, id like to know if you can help me with a small problem, The problem that I have is that the ADX indicator that comes default in mt4 has completely different values than the default ADX indicator inside of TradingView although the period of both indicators is set to 14. One difference between the two indicators is that the default ADX indicator in MT4 only allows you to change one value in it's settings and inside of TradingView when you go inside the settings of the indicator it has two options which are ADX smoothing and DI length and they are both set to 14. I've attached several images that show the name and settings of the default adx indicator inside tradingview that id like the mt4 adx indicator values to follow. Hopefully it gives clarity to my questions/problem. My hope is that I can locate in ADX indicator for mt4 that plots the exact values as the default ADX indicator does within TradingView. I have literally gone through every single page in this specific thread, downloaded each adx indicator and installed it into mt4 and tried adjusting the settings to get it to match the values of the default ADX indicator within TradingView. I do not know why I cannot get the values to line up and be exactly the same is this something that you can help me with? Im sure u have alot more understanding to how these values are calculated than i do. thanks in advance
Image

Image
Could you post the code here?

Re: ADX DMI Indicators for MT4

#424
mrtools wrote:
Sat Oct 02, 2021 8:17 am
Could you post the code here?
Here is the code.

Code: Select all

//@version=3
study("Average Directional Index w/ DI", shorttitle="ADX+DI")
adxlen = input(14, title="ADX Smoothing")
dilen = input(14, title="DI Length")
th = input(title="threshold", type=integer, defval=20)
dirmov(len) =>
	up = change(high)
	down = -change(low)
	plusDM = na(up) ? na : (up > down and up > 0 ? up : 0)
    minusDM = na(down) ? na : (down > up and down > 0 ? down : 0)
	truerange = rma(tr, len)
	
	plus = fixnan(100 * rma(plusDM, len) / truerange)
	minus = fixnan(100 * rma(minusDM, len) / truerange)

	[plus, minus]

adx(dilen, adxlen) =>
	[plus, minus] = dirmov(dilen)
	sum = plus + minus
	adx = 100 * rma(abs(plus - minus) / (sum == 0 ? 1 : sum), adxlen)

	
[plus, minus] = dirmov(dilen)
sig = adx(dilen, adxlen)


plot(plus, color = green, title="plusDI")
plot(minus, color = red, title="minusDI")
plot(sig, color=white, title="ADX")
hline(th, color=white, linestyle=dashed)

Re: ADX DMI Indicators for MT4

#425
kmck5147 wrote:
Sat Oct 02, 2021 6:07 pm
Here is the code.
Fixed post - wrapped code with CODE function.

Please everyone, when posting any code on this site, can we all remember to use the "Code" function in your post so it can be read easily?

If you're unsure on how to, please see below.
Just highlight your code and press the CODE button :thumbup:
wrap-code-bbcode-phpbb-forums.gif
Trade with the broker that supports our work! FBS are offering $140 to get you started! Click, here to begin live trading, today.
No commissions are earned by Forex-station.


The brand new FBS Forex Calendar 🗓️
How to: Draw Fibonacci Extensions the easy way
How to: Identify major Support & Resistance using the line chart


Re: ADX DMI Indicators for MT4

#427
kmck5147 wrote:
Sat Oct 02, 2021 6:07 pm
Here is the code.

Code: Select all

//@version=3
study("Average Directional Index w/ DI", shorttitle="ADX+DI")
adxlen = input(14, title="ADX Smoothing")
dilen = input(14, title="DI Length")
th = input(title="threshold", type=integer, defval=20)
dirmov(len) =>
	up = change(high)
	down = -change(low)
	plusDM = na(up) ? na : (up > down and up > 0 ? up : 0)
    minusDM = na(down) ? na : (down > up and down > 0 ? down : 0)
	truerange = rma(tr, len)
	
	plus = fixnan(100 * rma(plusDM, len) / truerange)
	minus = fixnan(100 * rma(minusDM, len) / truerange)

	[plus, minus]

adx(dilen, adxlen) =>
	[plus, minus] = dirmov(dilen)
	sum = plus + minus
	adx = 100 * rma(abs(plus - minus) / (sum == 0 ? 1 : sum), adxlen)

	
[plus, minus] = dirmov(dilen)
sig = adx(dilen, adxlen)


plot(plus, color = green, title="plusDI")
plot(minus, color = red, title="minusDI")
plot(sig, color=white, title="ADX")
hline(th, color=white, linestyle=dashed)
Might check Wilders dmi pretty sure that's the same.

Re: ADX DMI Indicators for MT4

#429
太虚一毫 wrote:
Fri Oct 22, 2021 12:47 am
DSL DMI oscillator (vidya) 1.01, DSL DMI oscillator 2 Both oscillators are good. Expect teacher kvak to choose one at random and add a button. Boundless merit!
Hi, try it.
Update it with autohigher timeframe.
2021-10-21_234936.png
dsl - DMI oscillator (vidya) BT.ex4
(49.99 KiB) Downloaded 11 times
dsl - DMI oscillator (vidya) BT.mq4
(20.22 KiB) Downloaded 16 times
dsl - DMI oscillator 2 BT.ex4
(49.98 KiB) Downloaded 10 times
dsl - DMI oscillator 2 BT.mq4
(20.1 KiB) Downloaded 18 times


  1. Similar Topics

    1. EA for double PSAR, ADX, MACD, EMA

      8 Replies 1611 Views

      by schenkthetank42, Wed Jan 20, 2021 7:07 am in MT4 Indicators

      8 Replies
      1611 Views
    2. Adx breakout ea

      0 Replies 242 Views

      by forexeas, Thu Jun 24, 2021 11:23 pm in Commercial Services

      0 Replies
      242 Views
    3. Block MT4 Updates to protect indicators from future MT4 Updates

      11 Replies 435 Views

      by ffsss, Thu Oct 21, 2021 2:49 am in MT4 Indicators

      11 Replies
      435 Views

Return to “MT4 Indicators”

Users viewing this forum: Banzai, blonde, charli, CommonCrawl [Bot], jo1234ao, johncker, juantrader, KAESER444, kvak, Léon, mrtools, neufert, ramon, remcous, RodrigoRT7, rudiarius, Skyold and 42 guests