MQL4 - automated forex trading   /  

Documentation

MQL4 Reference  Technical indicators  iWPR

 
Use the opportunities of
MQL5 in MetaTrader 5
Study the new MQL5 language
Study the new MQL5 language.
Reference is already available
double iWPR( string symbol, int timeframe, int period, int shift)
Calculates the Larry William's percent range indicator and returns its value.
Parameters:
symbol   -   Symbol the data of which should be used to calculate indicator. NULL means the current symbol.
timeframe   -   Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.
period   -   Number of periods for calculation.
shift   -   Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).
Sample:
if(iWPR(NULL,0,14,0)>iWPR(NULL,0,14,1)) return(0);