zdf:100*((c-ref(c,1))/ref(c,1));
cd1:zdf<=-0.2 and c<o;//百分百数值 请自行调整
cd2:zdf>=0.2 and c>o;
//下面2行绘制笑脸,哭脸图标仅供校验结果使用,实际使用时可以注释掉。
DRAWICON(cd1,h,1);
DRAWICON(cd2,l,2);
Len1:SUMBARS(cd1,1)-1;//距离当前K的位置1
Len2:SUMBARS(cd2,1)-1;//距离当前K的位置2
result1:ref(h,len1);//最终结果1
result2:ref(l,len2);//最终结果2