Complete newbie looking for help.
Currently I color my bars using a simple code.
barclr = input(false, title='(Off) Color2 or (On) Color1')
barcolor(barclr ? barcolor2 : barcolor1)
I now want to color bars only if another toggle says "Yes" and so I created,
bar = input.string("Yes", title="Colored Bars", options=["Yes", "No"]) == "Yes"
So now what I want to happen is when the bar dropdown is set to "Yes" then color bars otherwise don't color bars at all.
Also while bar == "Yes" then use barclr to switch between two options.
(I don't have a preference if it's a toggle or dropdown but just for my limited sense of differentiation I tried using a dropdown.)
I don't know how to put this together. Please help.