Download MetaTrader 5

Using ADX as a part of my first EA

To add comments, please log in or register
sdoppke
71
sdoppke  

Hi there I have searched and cannot find the exact answer on how to incorporate ADX into my trade logic.


I am trying to only allow my buy order be opened only if the current 8 period ADX value is > 22.  I thought it would look like so, but not luck.  Any help would be greatly appreciated.


if (iADX(NULL, 0, 8, PRICE_CLOSE, MODE_MAIN, 0) > 22;


SD

Keith Watford
Moderator
10376
Keith Watford  
if (iADX(NULL, 0, 8, PRICE_CLOSE, MODE_MAIN, 0) > 22)
  {
  //code
  }
something like that
sdoppke
71
sdoppke  
That was it, I really appreciate it! 
To add comments, please log in or register