

一个目前实用的好公式
此公式思路由lywangsd提供,我编写和优化。
源码如下:
MID :=MA(CLOSE,20),colorwhite;
UPPER:=MID + 2*STDDEV(CLOSE,20),coloryellow;
LOWER:=MID - 2*STDDEV(CLOSE,20),colorff00ff;
ma5:ma(c,5);
aa:=(mid -LOWER)<c*0.05;
bb:=count(aa,6)>=5;
aa1:=(UPPER-mid )<c*0.05;
bb1:=count(aa1,6)>=5;
xg1:bb1>0 and cross(c,UPPER) or bb>0 and cross(c,mid) and ma5>ref(ma5,1);
DRAWTEXT(bb1>0 and cross(c,UPPER) or bb>0 and cross(c,mid) and ma5>ref(ma5,1),(l * 0.98),'买'),linethick3,colorRed;
DRAWTEXT(bb1>0 and cross(c,UPPER) or bb>0 and cross(c,mid) and ma5>ref(ma5,1),(l * 0.96),'●'),linethick3,colorRed;
附件: 您所在的用户组无法下载或查看附件