//@version=4 study("MACD Platinum") src10 = close smooth = 5 Length = 21 normalize(series) => h = highest(series, Length) l = lowest(series, Length) res = (series - l)/(h - l) len = 5 ma3 = wma(src10*volume, len) / wma(volume, len) result1 = normalize(ma3) m1 = sma(result1, smooth) m2 = sma(result1*100, smooth) source = close fastLength = 12 slowLength = 26 signalLength = 9 MacdEmaLength = 9 // Fast line ma1= ema(source, fastLength) ma2 = ema(ma1,fastLength) zerolagEMA = ((2 * ma1) - ma2) // Slow line mas1= ema(source , slowLength) mas2 = ema(mas1 , slowLength) zerolagslowMA = ((2 * mas1) - mas2) // MACD line blueMACD = zerolagEMA - zerolagslowMA // Signal line emasig1 = ema(blueMACD, signalLength) emasig2 = ema(emasig1, signalLength) orgMACD = (2 * emasig1) - emasig2 hist = blueMACD - orgMACD plot(blueMACD, color=color.aqua, transp=0, linewidth=1, title='MACD line') plot(orgMACD, color=color.orange, transp=0, linewidth=1, title='Signal') hline(0.0, color=#777777) circleYPosition = orgMACD*1 dotColor = hist > 0 ? color.aqua : #ff0000 plot(crossover(blueMACD, orgMACD) and barstate.isconfirmed ? circleYPosition : na, style=plot.style_circles, linewidth=4, color=dotColor, transp=0, title='Dots') plot(crossunder(blueMACD, orgMACD) and barstate.isconfirmed ? circleYPosition : na, style=plot.style_circles, linewidth=4, color=dotColor, transp=0, title='Dots')