MID:=(2*CLOSE+HIGH+LOW+OPEN)/5;
A1: (EMA(MID,3)+EMA(MID,6)+EMA(MID,12)+EMA(MID,24))/4,COLORFF9900;
A2: EMA(A1,2),COLORFF9900;
A3: EMA(A2,2),COLORFF9900;
A4: EMA(A3,2),COLORFF9900;
A5: EMA(A4,2),COLORFF9900;
A6: EMA(A5,2),COLORFF9900;
A7: EMA(A6,2),COLORFF9900;
IF(A1>REF(A1,1),A1,DRAWNULL),COLOR0FFFF0;
IF(A2>REF(A2,1),A2,DRAWNULL),COLOR0FFFF0;
IF(A3>REF(A3,1),A3,DRAWNULL),COLOR0FFFF0;
IF(A4>REF(A4,1),A4,DRAWNULL),COLOR0FFFF0;
IF(A5>REF(A5,1),A5,DRAWNULL),COLOR0FFFF0;
IF(A6>REF(A6,1),A6,DRAWNULL),COLOR0FFFF0;
IF(A7>REF(A7,1),A7,DRAWNULL),COLOR0FFFF0;
{PARTLINE(A1,A1>REF(A1,1)),COLOR0FFFF0;
PARTLINE(A2,A2>REF(A2,1)),COLOR0FFFF0;
PARTLINE(A3,A3>REF(A3,1)),COLOR0FFFF0;
PARTLINE(A4,A1>REF(A4,1)),COLOR0FFFF0;
PARTLINE(A5,A1>REF(A5,1)),COLOR0FFFF0;
PARTLINE(A6,A6>REF(A6,1)),COLOR0FFFF0;
PARTLINE(A7,A7>REF(A7,1)),COLOR0FFFF0;}
安全线: EMA(CLOSE,55), CIRCLEDOT;
{买卖指标}
AA05:=MA(C,5);
MM5:=(C-AA05)/AA05*100;
BB05:=ATAN((AA05/REF(AA05,1)-1)*100)*180/3.1416;
NN5:=SMA(EMA((AA05-REF(AA05,1))/REF(AA05,1),3)*100,3,1);
NNNN5:=EMA((NN5-REF(NN5,1)),3);
AA10:=MA(C,10);
AA20:=MA(C,20);
BB10:=ATAN((AA10/REF(AA10,1)-1)*100)*180/3.1416;
AA30:=MA(C,30),;
MM30:=(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 MM30>REF(MM30,1) AND AA10>REF(AA10,1)
AND NNNN5>REF(NN5,1) AND NN5>REF(NN5,1) ,10) ;
清仓:=FILTER(COUNT(CROSS(30,BB05),5)>=1 AND (C>AA30 OR O>AA30) AND AA05<REF(AA05,1) AND MM30<REF(MM30,1) AND AA10<REF(AA10,1),10);
JC:=CROSS(0,MM5) AND MM30<REF(MM30,1) AND AA10>REF(AA10,1) ;
减仓:=FILTER(JC,10);
MR:=COUNT(CROSS(MM30,0),3)>=1 AND MM30>REF(MM30,1) AND AA05>REF(AA05,1) AND (C/REF(C,1)-1)*100>5 AND REF(C,1)<AA30;
买入:=FILTER(MR,10);
DRAWTEXT((买入),LOW*0.945,'⊙'),LINETHICK2,,COLORYELLOW;
DRAWTEXT((买入),LOW*0.965,'⊙'),LINETHICK2,,COLORYELLOW;
DRAWTEXT((买入),LOW*0.985,'⊙'),LINETHICK2,,COLORYELLOW;
DRAWTEXT(减仓,HIGH*1.06,'◇'),LINETHICK3,COLORCYAN;
DRAWTEXT(减仓,HIGH*1.05,'◇'),LINETHICK3,COLORCYAN;
DRAWTEXT(减仓,HIGH*1.059,'◇'),LINETHICK3,COLORCYAN;
DRAWTEXT((加仓),LOW*0.985,'⊙'),LINETHICK2,,COLORWHITE;
DRAWTEXT((加仓),LOW*0.965,'⊙'),LINETHICK2,,COLORWHITE;
DRAWTEXT((加仓),LOW*0.945,'⊙'),LINETHICK2,,COLORWHITE;
DRAWTEXT((强势),LOW*0.985,'⊙'),LINETHICK2,,COLORRED;
DRAWTEXT((强势),LOW*0.965,'⊙'),LINETHICK2,,COLORRED;
|