OPEN-SOURCE SCRIPT

Green Bars

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.
countOscillatorsup

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer