BUILDING AN EA

To add comments, please log in or register
Nieco Pama
103
Nieco Pama  

Good day to everyone. I want to make an EA based on ADX. I want to ask if how to code using ADX indicator? thank you. I mean what are the necessary parameters? it's like if the ADX 14 is above level 25, it will execute position based on another trend following indicator. 

Thank you and God Bless you all.

NIECO P. PAMA

Biantoro Kunarto
20048
Biantoro Kunarto  
You can use this code
int ADXPeriod = 14; 
double ADXMain = iADX(NULL,0,ADXPeriod,PRICE_CLOSE,MODE_MAIN,0);

if( ADXMain > 25 )
   {
      // do something
   
   
   }
Biantoro Kunarto
20048
Biantoro Kunarto  
I assume you use MT4, if you use MT5, the code will be different
Nieco Pama
103
Nieco Pama  
Biantoro Kunarto:
I assume you use MT4, if you use MT5, the code will be different
Thank you very much sir for being generous. God Bless you...
To add comments, please log in or register