The variable is:
//---- input parameters
extern int ADXPeriod=14;
Change the value from 14 to whatever period you want to.
I have tried altering that already
I have already experimented with changing the line: extern int ADXPeriod=14;...... As you probably already know, the ADX indicator is comprised of 3 lines; the main ADX line, as well as two other lines (DI+ and DI-). It turns out that changing 14 to another period only alters the period of the main ADX Line... I am trying to change the periods of the two other lines plotted on the ADX indicator (the DI+ and DI-)... It is not possible to do this in the indicators properties window in the trading terminal... where in the above MQL4 Code might I be able to change the periods of the DI+ and DI-?
Create another Variable like this just below the ADXPeriod
extern int DIPeriod = 5;
Now go to the following lines:
PlusDiBuffer=iMAOnArray(PlusSdiBuffer,Bars,ADXPeriod,0,MODE_EM A,i);
and
MinusDiBuffer=iMAOnArray(MinusSdiBuffer,Bars,ADXPeriod,0,MODE_E MA,i);
change ADXPeriod to DIPeriod.
Hope this helps.
Maji
Thanks!!!
Thank you very much! ... That worked very well!
I cannot help you with your programming. But I am attaching this indicator and maybe it will help you.
Create another Variable like this just below the ADXPeriod
extern int DIPeriod = 5;
Now go to the following lines:
PlusDiBuffer=iMAOnArray(PlusSdiBuffer,Bars,ADXPeriod,0,MODE_EM A,i);
and
MinusDiBuffer=iMAOnArray(MinusSdiBuffer,Bars,ADXPeriod,0,MODE_E MA,i);
change ADXPeriod to DIPeriod.
Hope this helps.
MajiCan someone post the compiled version of this? I need to be able to change the DI+ DI- levels but I get errors when I attempt to compile this.
Here you go, knock yourself out
ADX will even change color depending on it's direction
Happy Hunting
FX SniperI have the DMI indicator and was curious if you could modify the adx line to change colors like the one you have? I find the DMI more accurate than mt4 adx.
Thanks in advance!
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use