// Downloaded From https://www.WiseStockTrader.com _SECTION_BEGIN("JK Fast"); /* 1. 5 EMA and 20 EMA( of closing price) 2. Then subtract 20 EMA from 5 EMA 3. %R by Larry Willams take 5 period, 10 period AND 15period of line created above */ DiffEMA = EMA(C,5)- EMA(C,20); function PercentR( RPeriod ) { return -100 * ( HHV( DiffEMA , RPeriod ) - DiffEMA )/( HHV( DiffEMA , RPeriod ) - LLV( DiffEMA , RPeriod) ); } Plot( PercentR(5), _DEFAULT_NAME(), colorLavender, styleThick ); Plot( PercentR(10), _DEFAULT_NAME(), colorViolet, styleThick ); Plot( PercentR(15), _DEFAULT_NAME(), colorPlum, styleThick ); _SECTION_END();