OPEN-SOURCE SCRIPT

Green Bars

5 016
A simple script to count the number of up days, or intraday bars, (Green Bars) for a given Look Back period.

Inputs are: Look Back Period and Increment.

Use 0 for the Increment to count only the up days, or bars.
Use -1 to include the down days, or bars, in the sum.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.