I have two different conditions that colors bars accordingly. If these two conditions aren't met, bar colors stay as default colors (or na). I am having a chart with bars as blue, blue, na, blue, na, yellow, na, yellow etc.
What I would like to do is to paint all bars with same color until second condition happens. Meaning that all bars will be blue until yellow bar appears and all bars will be yellow after blue bar appears.
As in below image, I want all gray bars between and around blue bars until first yellow bar appears, and vice versa
question from:https://stackoverflow.com/questions/65861355/keeping-bar-colors-same-until-another-condition-occurs-in-pinescript