DRAWTEXT(BARPOS=SYSPARAM(2),HIGH,'所属板块:'+BLKNAME),ALIGN4,colorBBFFFF;
A:="STSFunc@CALSTSL";
R1:="STSFunc@STS_RISK1";
R2:"STSFunc@STS_RISK2",LINETHICK0,color804000;
S1:="STSFunc@STS_STS1";
S2:="STSFunc@STS_STS2";
TBS:="STSFunc@STS_STSBS";
DN:="STSFunc@STS_STSDN";
UP:="STSFunc@STS_STSUP";
TY:=C;
A11:=REF(TY,10)=HHV(TY,2*10+1); B1:=FILTER(A11,10); C1:=BACKSET(B1,10+1); HD:=FILTER(C1,10);
A21:=REF(TY,10)=LLV(TY,2*10+1); B2:=FILTER(A21,10); C2:=BACKSET(B2,10+1); LD:=FILTER(C2,10);
前期高位:REF(C,BARSLAST(HD)),COLOR00FF00,POINTDOT;
STICKLINE(C,前期高位,前期高位,8,0),COLORffff00;
前期低位:REF(C,BARSLAST(LD)),COLOR0000FF,POINTDOT;
STICKLINE(C,前期低位,前期低位,8,0),COLOR0000ff;
DRAWICON(CROSS(C,前期低位),前期低位,1);
DRAWICON(CROSS(前期高位,c),h,2);
AA05:=MA(C,3);
五日乖离率:=(c-AA05)/AA05*100;
BB05:=atan((aa05/ref(aa05,1)-1)*100)*180/3.1416;
速度5:=sma(ema((AA05-ref(AA05,1))/ref(AA05,1),3)*100,3,1);
加速度5:=ema((速度5-ref(速度5,1)),3);
AA10:=MA(C,8);
AA20:=MA(c,18);
BB10:=atan((aa10/ref(aa10,1)-1)*100)*180/3.1416;
AA30:=MA(C,28);
三拾日乖离率:=(c-AA30)/AA30*100;
Var1:=(AA20-AA30)>ref((AA20-AA30),1) and AA20>ref(aa20,1) and AA30>ref(AA30,1);
Var2:=(AA30-AA20)<ref((AA30-AA20),1) and AA20<ref(aa20,1) and AA30<ref(AA30,1);
BB30:=atan((aa30/ref(aa30,1)-1)*100)*180/3.1416;
强势狙击:=filter(BB30>30 and BB10>45 and cross(BB05,60),10);
加仓:=filter(count(cross(BB05,30),5)>=1 and AA05>ref(aa05,1) and 三拾日乖离率>ref(三拾日乖离率,1) and AA10>ref(AA10,1)
and 加速度5>ref(加速度5,1) and 速度5>ref(速度5,1) ,10) ;
清仓:=filter(count(cross(30,BB05),5)>=1 and (c>AA30 or O>AA30) and AA05<ref(aa05,1) and 三拾日乖离率<ref(三拾日乖离率,1) and AA10<ref(AA10,1),10);
JC:=cross(0,五日乖离率) and 三拾日乖离率<ref(三拾日乖离率,1) and AA10>ref(AA10,1) ;
减仓:=filter(JC,10);
MR:=count(cross(五日乖离率,0),3)>=1 and 三拾日乖离率>ref(三拾日乖离率,1) and AA05>ref(AA05,1) and (c/ref(c,1)-1)*100>5 and ref(c,1)<AA30;
买入:=filter(MR,10);
Var21:=MAX(ABS(HIGH-AMOUNT/VOL/100),ABS(AMOUNT/VOL/100-LOW));
Var3:=ABS((OPEN+CLOSE)/2-AMOUNT/VOL/100);
MV:=(Var21+Var3)/AMOUNT*VOL*100*50;
aa:=if(c>=ref(c,3),1,0);
bb:=if(c>=ref(c,5),1,0);
cc:=if(c>=ref(c,7),1,0);
dd:=if(c>=ref(c,8),1,0);
ee:=if(c>=ref(c,13),1,0);
ff:=IF(C>=REF(C,21),1,0);
gz2:=aa+bb+cc+dd+ee;
DRAWTEXT(gz2=1,L,'1'),COLOR00FFFF;
DRAWTEXT(gz2=2,L,'2'),COLOR00FFFF;
DRAWTEXT(gz2=3,L,'3'),COLOR00FFFF;
DRAWTEXT(gz2=4,L,'4'),COLOR00FFFF;
DRAWTEXT(gz2=5,L,'5'),COLOR00FFFF;
DRAWTEXT(GZ2=6,L,'6'),COLOR00FFFF; |