开拓者连续穿越10天移动平均线怎么写?

开拓者连续穿越10天移动平均线怎么写?或者说收盘价10天以上在移动平均线上方?

countif

对10天每天的close>ma10进行判断close>ma10 close[1]>ma10[1] close[2]>ma10[2] .......close[9]>ma10[9] 列举的话可能比较长,用个小循环,或者用函数写都可以