Price Convergence Divergence
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © tomahawk3999

//@version=5
indicator("change")

l1 = input(10)
hist = ta.change(close,1)
ma = ta.sma(hist,l1)
col = close > open ? color.green : color.red
plot(hist,style=plot.style_columns,color=col)
plot(ma,color=color.orange)