CapnOscar

Re-MACD

371 0 48
Its MACD Indicator yes but I remacked ... lol .. shows trend and divergences more clearly
Remove from Favorite Scripts Add to Favorite Scripts
study(title="Re-MACD", shorttitle="Re-MACD")
source = close
fastLength = input(34, minval=1), slowLength=input(55,minval=1)
signalLength=input(5,minval=1)
fastMA = ema(source, fastLength)
slowMA = ema(source, slowLength)
macd = fastMA - slowMA
signal = sma(macd, signalLength)
hist = macd - 0

up = rma(max(change(macd), 0), slowLength)
down = rma(-min(change(macd), 0), slowLength)
newmacd = down == 0 ? 100 : up == 0 ? 0 : 100 - (100 / (1 + up / down))
macdsig = sma(newmacd, signalLength)
maczero = newmacd >=0 ?  50 : na

sigc = newmacd > macdsig and newmacd < maczero  ? green : newmacd > macdsig ? lime : newmacd < macdsig and newmacd < maczero  ? red : orange
plzero = plot(maczero, color=sigc, style=circles,linewidth=5)


plpmacd = plot(newmacd, color=silver)
plpmacdsig = plot(macdsig, linewidth=4, color =sigc, style=circles,linewidth=2)

fill(plpmacd, plzero, color=blue, transp=95)



//Define The Lines 
bandpeak = hline(60, linewidth =1, linestyle=dotted, color=navy)
bandbase = hline(40, linewidth = 1, linestyle=dotted, color=navy)

Ideas Scripts Chart
United States
United Kingdom
India
España
Italia
Brasil
Россия
Türkiye
日本
한국
Home Stock Screener Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Billing Sign Out