Find opening price of last green (close above the open) candle or last red candle (close below the open) from current
Posted: Mon Mar 21, 2022 11:07 pm
Hello
I am looking for Pinescript code to find the last (most recent) green ( close above open) or red (close below open) candle from the current candle. I want to return the opening price in either scenario.
Thank you for any help!
I am looking for Pinescript code to find the last (most recent) green ( close above open) or red (close below open) candle from the current candle. I want to return the opening price in either scenario.
Thank you for any help!