Nicolas

Williams Percent %R

Category: Indicators By: Nicolas Created: September 1, 2016, 4:25 PM
September 1, 2016, 4:25 PM
Indicators
4 Comments
Williams Percent %R

Williams’%R is an overbought / oversold indicator. Values -80 and -20 can be used as limits to detect overbought and oversold situations.

Nevertheless, it is better to wait for a change in the price direction, which can be detected for instance through MACD indicator analysis, before buying or selling.

Note that when %R makes a peak and reverses, a price decline often takes place.

This indicator is already available in the platform as a built-in instruction: http://www.prorealcode.com/documentation/williams/ , but the code isn’t available and it was requested in french forum, so here it is.

//PRC_WilliamsRpercent
//01.09.2016
//Nicolas @ www.prorealcode.com
//Sharing ProRealTime knowledge

period = 14

hh = highest[period](high)
ll = lowest[period](low)

Wp = ((hh-close)/(hh-ll))*-100

return Wp as "Williams R percent", -20 as "-20 level", -80 as "-80 level"

 

Download
Filename: PRC_WilliamsRpercent.itf
Downloads: 142
Nicolas
Nicolas Legend
I created ProRealCode because I believe in the power of shared knowledge. I spend my time coding new tools and helping members solve complex problems. If you are stuck on a code or need a fresh perspective on a strategy, I am always willing to help. Welcome to the community!
Author’s Profile

Comments

Geronima Ortiz
8 years ago
#

period = 14 a posto di 14 scrivi np poi crei una variabile con lo stesso nome

Manuel Cerbi
8 years ago
#

Come posso modificare il codice in modo da poter cambiare a piacimento il numero di periodi?? avrei bisogno di più indicatori con taratura diversa nella stessa finestra

Brisvegas
9 years ago
#

. Just thought i might add this dual version W%R , one is based high of bar and other low of bar unlike the generic based on close . I find it very handy and thought some others may also . CAN i add ITF file here ?? for some reason the dose seems to go missing when i add it ..

Nicolas
9 years ago
#

Thank you but no sorry. Still have some trouble with the comments system. I will fix it soon.

ProRealCode ProRealCode
Loading...