Coppock Indicator is one of the investing style indicators to check whether to stick to the trends or not in the short term. Hull smoothing is applied in the indicator which will eventually reduce the lag component in the trend.

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © marketcalls_in
//Coded by Rajandran R (Founder - Marketcalls/Co-Founder - Algomojo)
//@version=4
study(title = "Responsive Coppock Curve")
wmaLength = input(title="Length",defval=200,type=input.integer)
longRoCLength = input(title="Long ROC",defval=250,type=input.integer)
shortRoCLength = input(title="Short ROC",defval=200,type=input.integer)
source = input(title="Source",type=input.source,defval=hl2)
curve = roc(source, longRoCLength) + roc(source, shortRoCLength)
hullma = wma(2*wma(curve, wmaLength/2)-wma(curve, wmaLength), round(sqrt(wmaLength)))
bcolor = iff(hullma > 0, color.lime, color.red)
plot(hullma, title="Responsive Coppock", style=plot.style_histogram, linewidth=3,color = bcolor)