How to get previous value that no. of bars larging than MA20?

Hello,
How to get previous value that no. of bars larging than MA20 ?

noOfDaygtMA20 = BarsSince( C<=MA(Close,20) ); //calcuate close price is larger than MA20

AddColumn( C, "Close" );
AddColumn( noOfDaygtMA20, "calculate close >=MA20" );

2021-04-15_13-57-40

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.