glaz

EMA RSI Adaptive

346 0 42
MT4 indicator ported to pinescript the original code is here
http://www.forex-tsd.com/metatrader-4/578-moving-average-86.html#post449967
Remove from Favorite Scripts Add to Favorite Scripts
//By Glaz
study("EMA RSI Adaptive",overlay=true)
EmaPeriod = input(14)
RsiPeriod = input(14)
Price = close

docol = input(false,title="Color Change")
RSvoltl = abs(rsi(close,RsiPeriod)-50)+1.0
multi   = (5.0+100.0/RsiPeriod)/(0.06+0.92*RSvoltl+0.02*pow(RSvoltl,2))
pdsx    = multi*EmaPeriod
alpha   = 2.0 /(1.0+pdsx)
ema = nz(ema[1])+alpha*(sma(close,EmaPeriod)-nz(ema[1]))

col = docol ? ema > ema[1] ? #0094FF : #FF006E : #0094FF
plot(ema,color=col)
United States
United Kingdom
India
Deutschland
España
France
Italia
Polska
Brasil
Россия
Türkiye
Indonesia
Malaysia
日本
한국
简体
繁體
Home Stock Screener Forex Signal Finder Cryptocurrency Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators Website & Broker Solutions Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Profile Profile Settings Account and Billing Priority Support Ideas Published Followers Following Private Messages Chat Sign Out