//@version=4
study("Volume bar Count")
var g_count = 0
var r_count = 0
isGreen = close >= open
if isGreen
g_count := g_count + 1
else
r_count := r_count + 1
I can get the count of a green and red bar but not able to get it from a specific date.
Version 1
You can set the date through the script's Inputs with this:
Version 2
[2021.01.12 21:09 — LucF]
This is a more elegant way of doing the same thing: