I'd like a quick way to determine if the current bar is bullish or bearish. I can only find the barColor() function which sets the bar color; I'd like to read it.
I'd like a quick way to determine if the current bar is bullish or bearish. I can only find the barColor() function which sets the bar color; I'd like to read it.
Your script has no visibility on the actual color of the bars, but it knows price information, so the candle's state can be derived using a boolean expression like:
upBar = close > open