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.