Kabalistic 36/72 SMA
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Daimonik

//@version=5
indicator("Kabalistic 36/72 SMA", overlay=true)

averageData = input.source (close, title= "Average data source")

shortlength = input.int (36, title= "Short Average Length")
longlength= input.int (72, title= "Long Average Length")

shortAverage = ta.sma(averageData, shortlength)
longAverage = ta.sma(averageData, longlength)

plot(shortAverage, color= color.blue, title= "Short SMA")
plot(longAverage, color= color.yellow, title= "Long SMA" )

crossAbove = ta.crossover(shortAverage, longAverage)
crossUnder = ta.crossunder(shortAverage, longAverage)

crossColour = if crossUnder
    color.new(color.red, 70)
else if crossAbove
    color.new(color.green, 70)

    
bgcolor(crossColour, title= "Crosses Background")
