General

To add comments, please log in or register
asdisd
9
asdisd  
(ADX is greater than its 10 SMA), How can I write this in mql4 language?
William Roeder
19628
William Roeder  
asdisd: (ADX is greater than its 10 SMA), How can I write this in mql4 language?

Why would you want to? ADX is a number [0 … 100], SMA is a price [0 … 1.5] ADX will usually be greater on non-JPY pairs and usually less on JPY pairs.

lippmaje
894
lippmaje  

If you mean how to build the 10-SMA of ADX, you can do this with iMAOnArray on an array of ADX values. Or compute it with a loop:

double sma10=0;
for(int i=0; i<10; i++) sma10+=iADX(...,i);
sma10/=10;
if(iADX(...,0)>sma10) DoIt();
To add comments, please log in or register