Is it possible to retrieve the current bar's color?

Viewed 456

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.

1 Answers

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
Related