MT4: How to add the drop menu to allow choice of open price, high price, low price to my indicator?

 

I composed my indicator using Close[i]. 

But I saw the official indicators allow traders to choose which price to apply to in the parameter settings.  How to code that? 


Thanks

 
input ENUM_APPLIED_PRICE price; // Applied price
or use the OnCalculate with price.
 
William Roeder #:
or use the OnCalculate with price.

In MT4, this applied price is used in the build-in functions like iMA(), iRSI().  But it will not change the Close[i] in my indicator. 

How can I set the parameter to change the Close[i]  to High[i] or Low[i] in MT4 ? 


BTW, I tried MT5, it automatically has a parameter tag which allows to change the applied price while I only code the Close[i] in the script. 

 
Phoebe Hj #: How can I set the parameter to change the Close[i]  to High[i] or Low[i] in MT4 ?
Create your input variable and replace Close[i] with whatever is indicated. You code it.
Reason: