if count(cross(ma(c,20),c),20)=5 and cross(ma(c,20),c) then buyshort(holding=0,1,market);
如果我要指定日期呢,比如从2017年10月至今,第5次跌破20日线做空
s:BARSLAST(YEAR=2017 and MONTH=10 and day=1);
if count(cross(ma(c,20),c),s)=5 and cross(ma(c,20),c) then buyshort(holding=0,1,market);
如果把日期改成最近30日的最高点开始计算,第5次跌破开空,这个怎么弄
HHVBARS 函数来获取位置即可。操作方式是一样的。