使用新浪通達(dá)信公式管理其他類型(2020.4.11)
SHORT:=6;
LONG:=13;
MID:=4;
VAR1:=EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
VAR2:=EMA(VAR1,MID);
VAR3:=2*(VAR1-VAR2);
VAR4:=IF(VAR3>0,1,(-1));
VAR5:=REF(VAR4,1);
VAR6:=VAR4*VAR5;
VAR7:=BARSLAST(VAR6<0);
VAR8:=VAR7+1;
VAR9:=(SUM(VAR3,0)-REF(SUM(VAR3,0),VAR8))/10;
VAR10:=IF(VAR3>0 AND VAR3>=REF(VAR3,1),VAR3,0);
VAR11:=IF(VAR3>0 AND VAR3<=REF(VAR3,1),VAR3,0);
VAR12:=IF(VAR3<0 AND VAR3<REF(VAR3,1),VAR3,0);
VAR13:=IF(VAR3<0 AND VAR3>REF(VAR3,1),VAR3,0);
STICKLINE(VAR10>0,0,VAR3,2,0),COLOR0000BB;
STICKLINE(VAR11>0,0,VAR3,2,1),COLOR0000BB;
STICKLINE(VAR12<0,VAR3,0,2,0),colorgreen;
STICKLINE(VAR13<0,VAR3,0,2,1),colorgreen;
快線:VAR1,colorwhite;
慢線:VAR2,coloryellow;
乖離:VAR3*100,NODRAW;
面積:=VAR9,NODRAW;
VAR14:=CROSS(VAR1,VAR2) AND VAR1<(-0.01);
DRAWICON(VAR14,VAR2*1.02,36);
VAR15:=COUNT(CROSS(VAR1,VAR2),BARSLAST(VAR2>=0));
VAR16:=CROSS(VAR1,VAR2) AND VAR2<0 AND COUNT(VAR15=2,21)=1;
DRAWICON(VAR16,VAR2*1.12,1);
VAR17:=BARSLAST(REF(CROSS(VAR1,VAR2),1));
VAR18:=REF(CLOSE,VAR17+1)>CLOSE AND VAR1>REF(VAR1,VAR17+1) AND CROSS(VAR1,VAR2);
底背:DRAWLINE(VAR17=0,VAR2,VAR18,VAR2,0),colormagenta,LINETHICK2;
DRAWICON(VAR18,VAR2*1.22,38);
VAR19:=BARSLAST(REF(CROSS(VAR2,VAR1),1));
VAR20:=REF(CLOSE,VAR19+1)<CLOSE AND REF(VAR1,VAR19+1)>VAR1 AND CROSS(VAR2,VAR1);
頂背:DRAWLINE(VAR19=0,VAR2,VAR20,VAR2,0),colorgreen,LINETHICK2;
DRAWICON(VAR20,VAR2*1.02,2);
DRAWICON(VAR14 AND VAR16 AND VAR18,VAR2*1.32,9);
VAR21:=ATAN((VAR1/REF(VAR1,1)-1)*100)*180/3.141159;
VAR22:=ATAN((VAR2/REF(VAR2,1)-1)*100)*180/3.141159;
VAR23:=VAR1>REF(VAR1,1) AND REF(VAR1,1)>REF(VAR1,2) AND REF(VAR1,3)<REF(VAR1,2);
VAR24:=VAR2>REF(VAR2,1) AND REF(VAR2,1)>REF(VAR2,2) AND REF(VAR2,3)<REF(VAR2,2);
夾角:VAR21-VAR22>=30 AND VAR23 AND VAR24,NODRAW,colorgreen;
聯(lián)系客服