AZ Column Color
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Settaphat_Assarakulsith

//@version=4
study("AZ Column Color")
fast_ema = input(title = "Input Fast EMA",type = input.integer,defval = 12)
slow_ema = input(title = "Input Slow EMA",type = input.integer,defval = 26)
bull = false
bear = false
fast = ema(close,fast_ema)
slow = ema(close,slow_ema)
if fast > slow
    bull := true

if slow > fast
    bear := true
    
plot(bull ? 1:0,color=color.green,title="Bull",style=plot.style_columns)
plot(bear ? 1:0,color=color.red,title="Bear",style=plot.style_columns)
