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.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
//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" |
Share this
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.
ProRealTime ITF files and other attachments :PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
. 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 ..
Thank you but no sorry. Still have some trouble with the comments system. I will fix it soon.
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
period = 14
a posto di 14 scrivi np
poi crei una variabile con lo stesso nome