Custom price type in ADX

 

Hi everybody,

I was messing around the other day with MT4's default ADX indicator. It has a apply-to price choice (close, high, low, typical, etc). It works great in the charts.

However when I tried to extract the code for it using the ADX source code in MQL4 codebase. The choice is not available as variable.

Can anyone point out how to do the custom price-type in MQL4 coded ADX, please?

Thank you very much for your help.

 
if(iADX(NULL,0,14,PRICE_HIGH,MODE_MAIN,0)>iADX(NULL,0,14,PRICE_HIGH,MODE_PLUSDI,0)) return(0); // "PRICE_HIGH"

Price constants

Thank you.

 
Thanks for replying. I know how to call an indicator. I would prefer to have my own function in MQL4/C to call with and the codebase for default ADX does not facilitate the necessary feature.
Reason: