Good Morning,
I try to count the number of green candles after the open time. This study calculates lots of things and displays labels. After updating the study with the following codes, non of the labels are displayed. Please help!!
input OpenTime = 0930;
def secondsPassed = SecondsFromTime(OpenTime);
def Minutes = RoundDown(secondsPassed / 60,0);
def GreenCandle = fold i = 0 to Minutes with internalSum = 0 do if getvalue(close,i) > getvalue(open,i) then internalSum + 1 else internalSum;
def RedCandle = fold i1 = 0 to Minutes with internalSum1 = 0 do if getvalue(close,i1) > getvalue(open,i1) then internalSum1 + 1 else internalSum1;
Addlabel(buyflag == 1," GreenCandle RedCandle % " + round((((greencandle - redCandle) / Minutes)-1)*100,2), color.White);
Thank you!!