Daveatt

nTrend MACD Zero LAG

Hello traders

This indicator is to color the candles based on a MACD Zero LAG
Just wanted to show that removing the noise from the candles natural coloring could be very helpful to determine a trend and stay focused

Enjoy
Dave
Remove from Favorite Scripts Add to Favorite Scripts

Comments

can I please have the lower indicator? That modified macd looks good :D
+2 Reply
Daveatt ZinhoSte
@ZinhoSte, Sure it's open source so you can already access it and add it to your chart
+1 Reply
ZinhoSte Daveatt
@Daveatt, i cant find that specific 0 lag macd
+1 Reply
Daveatt ZinhoSte
@ZinhoSte, Gotcha, try "MACD Zero Lag"
Zero in letters
+1 Reply
ZinhoSte Daveatt
@Daveatt, hmmm still cant find it, can you give me the code or script pls?
+1 Reply
Daveatt ZinhoSte
@ZinhoSte,
//@version=4

study(title="MACD 0 Lag", shorttitle="MACD 0 Lag")
source = close
fastLength = input(40, minval=1)
slowLength=input(100,minval=1)
signalLength=input(150,minval=1)

// FAST LINE
ema1= ema(source, fastLength)
ema2 = ema(ema1,fastLength)
differenceFast = ema1 - ema2
zerolagEMA = ema1 + differenceFast
demaFast = (2 * ema1) - ema2

// SLOW LINE
emas1= ema(source , slowLength)
emas2 = ema(emas1 , slowLength)
differenceSlow = emas1 - emas2
zerolagslowMA = emas1 + differenceSlow
demaSlow = (2 * emas1) - emas2

//MACD LINE
ZeroLagMACD = demaFast - demaSlow

//SIGNAL LINE
emasig1 = ema(ZeroLagMACD, signalLength)
emasig2 = ema(emasig1, signalLength)
signal = (2 * emasig1) - emasig2

hist = ZeroLagMACD -signal
cHist = hist > 0 ? color.lime : color.red
plot(hist, title="histogram", style=plot.style_histogram, color = cHist, linewidth = 10)
signalLine=plot(signal, title="signal", color=color.red ,linewidth = 1)
zlLine = plot(ZeroLagMACD, title="MACD 0 Lag", color=color.blue)
cDif = hist > 0 ? color.blue : color.red
//fill(zlLine, signalLine, color=cDif)
Reply
can i have the link for that oscillator
Reply
Daveatt greyghost7
@greyghost7, you have even better, you have the source code up there :)
Otherwise
Reply
greyghost7 Daveatt
@Daveatt, i appreciate it :D
Reply
Home Stock Screener Forex Screener Crypto Screener Economic Calendar How It Works Chart Features Pricing Refer a friend House Rules Help Center Website & Broker Solutions Widgets Charting Solutions Lightweight Charting Library Blog & News Twitter
Profile Profile Settings Account and Billing Referred friends Coins My Support Tickets Help Center Ideas Published Followers Following Private Messages Chat Sign Out