Using ADX as a part of my first EA

Back to topics list To post a new topic, please log in or register
avatar
25
sdoppke 2015.08.25 00:27
 

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

avatar
Moderator
3416
GumRai 2015.08.25 00:48 #
 
if (iADX(NULL, 0, 8, PRICE_CLOSE, MODE_MAIN, 0) > 22)
  {
  //code
  }
something like that
avatar
25
sdoppke 2015.08.25 16:48 #
 
That was it, I really appreciate it! 
Back to topics list  

To add comments, please log in or register