A1:=MA(C,1);
A5:=MA(C,5);
A10:MA(C,10),colorred,LINETHICK2;
A15:=MA(C,15);
A20:MA(C,20),colorgreen,LINETHICK2;
DEA:=EMA(((SLOPE(CLOSE,21) * 20) + CLOSE),42);
FILLRGN(A15,A20,A1>DEA,rgb(255,0,255),A1<DEA ,rgb(0,0,0));
FILLRGN(A10,A15,A1>A5,rgb(255,188,18),A1<A5,rgb(0,0,0));
安全线: EMA(CLOSE,55), CIRCLEDOT;
PARTLINE(安全线,安全线>=REF(安全线,1),RGB(255,0,0),安全线<=REF(安全线,1),RGB(0,0,255)),LINETHICK4, POINTDOT;
A99:MA(C,99),POINTDOT,colorFF00FF,LINETHICK3;
HHV(EMA(C,2),2),COLORblue,LINETHICK2;
LLV(EMA(C,2),1),COLORyellow,LINETHICK2;
RSV:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
DX:=LLV(J,2)=LLV(J,8);
DH:=HHV(J,2)=HHV(J,8);
买:IF(CROSS(J,REF(J+0.01,1))AND DX AND J<20,1,0),LINETHICK0,COLORRED ;
卖:IF(CROSS(REF(J+0.01,1),j)AND Dh AND J>80,1,0),LINETHICK0,COLORBLUE ;
DRAWTEXT(买=1,LOW-0.02,'买'),COLORwhite;
DRAWICON(买=1,l*0.98,1);
DRAWTEXT(卖=1,h+0.02,'卖'),COLORyellow;
DRAWICON(卖=1,h*1.02,2);
{黄金分割}
x:=BARPOS-hhv(if(DISPSTATUS=1,BARPOS,0),0)+1;
hh:=hhv(h,x); ll:=llv(l,x); hl:=hh-ll;
a80:=.809*hl+ll;a61:=.618*hl+ll;a38:=.382*hl+ll;
a19:=.191*hl+ll; a5:=.5*hl+ll;
a0:=.001*hl+ll; a100:=1.00*hl+ll;
DRAWTEXTREL(0,0,'最高 ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄' ),COLORRED;
DRAWTEXTREL(0,900+76,'最低.................................................................................................................................'),color00ff00;
DRAWTEXTREL(0,0.50*(900+76),'0.5..................................................................................................................................'),color0099ff;
DRAWTEXTREL(0,0.191*(900+76),'0.809................................................................................................................................'),COLORYELLOW;
DRAWTEXTREL(0,0.382*(900+76),'0.618................................................................................................................................'),COLORYELLOW;
DRAWTEXTREL(0,0.618*(900+76),'0.382................................................................................................................................'),COLORYELLOW;
DRAWTEXTREL(0,0.809*(900+76),'0.191................................................................................................................................'),COLORYELLOW;
DRAWTEXTREL(999,0.809*(900+76),NUMTOSTR(a19)),VALIGN2,ALIGN2,colorwhite;
DRAWTEXTREL(999,0.618*(900+76),NUMTOSTR(a38)),VALIGN2,ALIGN2,colorwhite;
DRAWTEXTREL(999,0.5*(900+76),NUMTOSTR(a5)),VALIGN2,ALIGN2,color0099ff;
DRAWTEXTREL(999,0.382*(900+76),NUMTOSTR(a61)),VALIGN2,ALIGN2,colorwhite;
DRAWTEXTREL(999,0.191*(900+76),NUMTOSTR(a80)),VALIGN2,ALIGN2,colorwhite;
DRAWTEXTREL(999,1.00*(900+76),NUMTOSTR(a0)),VALIGN2,ALIGN2,colorwhite;
DRAWTEXTREL(999,0.001*(900+76),NUMTOSTR(a100)),VALIGN0,ALIGN2,colorwhite;