I have a drop down menu via inputs that should control the backgroundcolor when changed.
As a simple example, when I select the 200/200 from the drop down list, I want the background color to use the conditions from 200/200.
Right now, I am not getting any errors, but the background color doesn t change when i change the input setting. Any help or suggestions on how to fix this would be greatly appreciated.
BackGroundColor = input.string(title="Background Color", defval="45/45", options=["4SMA/45EMA", "8EMA/45EMA", "20EMA/45EMA", "45EMA/200EMA", "45/45", "200/200", "OFF"])
if BackGroundColor() == "200/200" {
var GreenAreaCond200 = FSR > LeadingFullVib and close > EMA200
var BlueAreaCond200 = FSR < LeadingFullVib and close > EMA200
var RedAreaCond200 = FSR < LeadingFullVib and close < EMA200
var OrangeAreaCond200 = FSR > LeadingFullVib and close < EMA45
}
bgcolor(GreenAreaCond45 ? color.new(color.green,80) : BlueAreaCond45 ? color.new(color.blue,80) : RedAreaCond45 ? color.new(color.red,80) : OrangeAreaCond45 ? color.new(color.orange,80) : GreenAreaCond200 ? color.new(color.green,80) : BlueAreaCond200 ? color.new(color.blue,80) : RedAreaCond200 ? color.new(color.red,80) : OrangeAreaCond200 ? color.new(color.orange,80): GreenAreaCond4S45E ? color.new(color.green,80) : BlueAreaCond4S45E ? color.new(color.blue,80) : RedAreaCond4S45E ? color.new(color.red,80) : OrangeAreaCond4S45E ? color.new(color.orange,80): GreenAreaCond8E45E ? color.new(color.green,80) : BlueAreaCond8E45E ? color.new(color.blue,80) : RedAreaCond8E45E ? color.new(color.red,80) : OrangeAreaCond8E45E ? color.new(color.orange,80): GreenAreaCond20E45E ? color.new(color.green,80) : BlueAreaCond20E45E ? color.new(color.blue,80) : RedAreaCond20E45E ? color.new(color.red,80) : OrangeAreaCond20E45E ? color.new(color.orange,80): GreenAreaCond45E200E ? color.new(color.green,80) : BlueAreaCond45E200E ? color.new(color.blue,80) : RedAreaCond45E200E ? color.new(color.red,80) : OrangeAreaCond45E200E ? color.new(color.orange,80): na)