%>
很多人习惯用c>=1.1*ref(c,1)来表示涨停,其实这样很不准确。真正的涨停表达如下:
zt:=c>1.1*ref(c,1)-0.01 and c<1.1*ref(c,1)+0.01 and h=c;
这是非ST的涨停,ST涨停就要加入ST的条件以及1.05的倍数关系。同样,跌停公式如下:
dt:=c>0.9*ref(c,1)-0.01 and c<0.9*ref(c,1)+0.01 and l=c;
我们可以在主图上以特殊颜色标记涨、跌停,比如:
zt:=c>1.1*ref(c,1)-0.01 and c<1.1*ref(c,1)+0.01 and h=c;
dt:=c>0.9*ref(c,1)-0.01 and c<0.9*ref(c,1)+0.01 and l=c;
STICKLINE(zt,high,low,0.1,1),colorred;
STICKLINE(zt,open,close,8,0),colorred;
STICKLINE(dt,high,low,0.1,1),colorgreen;
STICKLINE(dt,open,close,8,0),colorgreen;