Spread Differential
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © arcapma

//@version=5
indicator("Spread Differential")
fma=input(title="Fast MA", defval=10)
sma=input(title="Slow MA", defval=21)
fMA = ta.sma(close, fma)
sMA = ta.sma(close, sma)
mma = (sMA+fMA)/2
fSpread = fMA-mma
sSpread = sMA-mma
realSpread = fSpread - sSpread
plot(realSpread, style=plot.style_histogram)
