Record in Loop TSeq
A B C D E
1 =demo.query("select * from STOCKRECORDS where STOCKID='000062'")        
2 0 0 0  
3 for A1      
4   if A3.CLOSING>A2 >B2=B2+1  
5   else if B2>C2 >C2=B2
6     >B2=0  
7   >A2=A3.CLOSING    
8 if B2>C2 >C2=B2    

In C2, compute the days of continuous rise of stock. After executing, the result is as follows: