源码
{P1:1,250,5;P2:1,250,20;P3:1,250,30;N:1,10,3;}
MA5:=MA(C,5),COLORWHITE;
MA1:=MA(C,P1),COLORFF00FF;
MA2:=MA(C,P2),COLOR00FF00;
MA3:=MA(C,P3),COLORYELLOW;
ZH12:=ABS(MA1-MA2)/MA2*100<=N;
ZH13:=ABS(MA1-MA3)/MA3*100<=N;
QSXS1:=MA1>=REF(MA1,1);
QSXS2:=MA2>=REF(MA2,1);
QSXS3:=MA3>=REF(MA3,1);
GJHS:=C>MA1 AND QSXS1 AND NOT(REF(QSXS1,1));
买1:GJHS AND ZH12 AND QSXS2,COLORMAGENTA,linethick2;
买2:(GJHS AND ZH13 AND QSXS3)*2,COLORYELLOW,linethick2;
优选:(买1 AND COUNT((MA1>MA2),5)=5) OR (买2 AND COUNT((MA1>MA3),5)
=5),COLORWHITE,POINTDOT;
DRAWICON(优选>0,0.3,1);
{以下设置逃顶指标}
varC:=SMA(MAX(C-REF(C,1),0),6,1)/SMA(ABS(C-REF(C,1)),6,1)*100;
DRAWICON(CROSS(82,varC),0.3,2);
var6:=REF(C,1);
var7:=SMA(MAX(C-var6,0),6,1)/SMA(ABS(C-var6),6,1)*100;
DRAWTEXT(CROSS(84,var7),1.8,'逃顶'),COLORYELLOW ;