CapnOscar

Re-MACD

407 0 56
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)

English
English (UK)
English (IN)
Deutsch
Français
Español
Italiano
Polski
Türkçe
Русский
Português
Bahasa Indonesia
Bahasa Melayu
ภาษาไทย
Tiếng Việt
日本語
한국어
简体
台灣
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 Feature Request Blog & News FAQ Help & Wiki Twitter
Profile Profile Settings Account and Billing My Support Tickets Contact Support Ideas Published Followers Following Private Messages Chat Sign Out