adx calculation

 
All is possible (almost). What have you tried ?
 

This is a section of my EA.  I developed a strategy on Forex Pro but wanted to automate my trading.  the adx calculation on MetaTrader 4 seems to have more peaks and valleys and not as smooth.  I know I can increase the number of periods to average it out but want to stay with 5 periods.  I am assuming the adx on Forex Pro uses some sort of smoothing indicator in its calculation but don't know what.  

 (iADX(NULL,PERIOD_D1,5,PRICE_CLOSE,MODE_MAIN,1)>=25)

 
msjs:

This is a section of my EA.  I developed a strategy on Forex Pro but wanted to automate my trading.  the adx calculation on MetaTrader 4 seems to have more peaks and valleys and not as smooth.  I know I can increase the number of periods to average it out but want to stay with 5 periods.  I am assuming the adx on Forex Pro uses some sort of smoothing indicator in its calculation but don't know what.  

 (iADX(NULL,PERIOD_D1,5,PRICE_CLOSE,MODE_MAIN,1)>=25)

 

So, what have you tried to smooth your adx ?
 
only increasing the number of days, but this isn't what I wanted
 
msjs:
only increasing the number of days, but this isn't what I wanted
Maybe you can try iMAOnArray ? In your first post you talk about ATR but I don't see how you would use this to smooth iADX.
 
thank. I'll give it a try
 

My strategy is based on adx signal line on the 15min 30min and 1hr all above 20 and moving in the same direction.  I don't see how this is possible with iMaOnarray over different time periods.

 
Then why do you think you need smoothing? Why did you bring up ATR? You must think about what you want or need. When, (and only when) you have something concrete, and can't code it, come back and ask. Your "Is it possible" question is vague, uncodable.
 
Sorry to offend as I said I am new to this.  As I understand the ATR, it is Wilder's attempt to smooth the adx indicator.  I did not know if it could simply be combined in the iadx code which my ea would read for each time period. If there are any other ways to smooth the adx I am open to suggestions.
 
  1. No offense taken.
  2. simply combined: ADX + ATR = BS!
  3. Answer my question. Why do you think you need smoothing when your "strategy is based on adx signal line on the 15min 30min and 1hr all above 20"
Reason: