Indicators

Indicators

On Price RSI Indicator

// — settings rsiperiod=14 ATRperiod = 20 maPeriod = 20 maMethod = 0 overBought = 70 overSold = 30 // — end of settings maPrice = customclose dTR = 0 for i = 0 to ATRperiod–1 dTR=dTR+max(abs(Dhigh(i)–Dlow(i)),max(abs(Dhigh(i)–Dclose(i+1)),abs(Dlow(i)–Dclose(i+1)))) next avgRange = dTR/ATRperiod maValue = average[maPeriod,maMethod](maPrice) rsivalue = rsi[rsiperiod](maPrice) //—- Buffer1=maValue Buffer2=maValue+(avgRange*(overBought–50)/100) […]