RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
DIF:=(EMA(CLOSE,12)-EMA(CLOSE,26))*1;
DEA:=EMA(DIF,9);
MACD:=(DIF-DEA)*2,COLORSTICK;
买1:=(CROSS(J,0) OR CROSS(J,10) OR CROSS(J,15) OR CROSS(J,20) OR (CROSS(J,D) AND CROSS(J,K)))*10;
卖1:=(CROSS(200,J) OR CROSS(195,J) OR CROSS(190,J) OR CROSS(185,J) OR CROSS(180,J))*-10 ;
STICKLINE(REF(MACD,1)- MACD>0,0,-60+MACD*200,2,1),COLORYELLOW;
STICKLINE(REF(MACD,1)- MACD<0,0,60+MACD*200,2,1),COLORRED;
买点:IF(买1 AND DIF-REF(DIF,1)>0 AND J-REF(J,1)>0 OR (J<O AND C>O),80,0),COLORLIMAGENTA,LINETHICK3;
MACD买点:STICKLINE(CROSS(DIF,DEA),0,150,1,0),COLORRED;
MACD卖点:STICKLINE(CROSS(DEA,DIF),0,150,1,1),COLORLIGREEN;
趋势线:J*2,COLORYELLOW,LINETHICK3;
VAR3:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA(SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1),3,1);
趋势:=EMA(VAR3,3)-10;
{FILLRGN(趋势,80,趋势>80);}
DRAWICON(CROSS(趋势,0),0,1);
趋势线1: 趋势*5,COLORGREEN,LINETHICK3;
趋势线2: 趋势线1 /2,COLORBLUE,LINETHICK2;
底部:EMA(IF(J<0,20,0),1),COLORBROWN,LINETHICK2;
顶部:EMA(IF(J>200,160,200),1),COLORWHITE,LINETHICK2;
DRAWICON((CROSS(趋势线,DIF) OR CROSS(趋势线,DEA)) AND 底部,225,5);
DRAWICON((C-REF(C,1))/REF(C,1)>0.09,0,5);
趋势线5:D*2,COLORWHITE,LINETHICK2;
趋势线6:300,POINTDOT;
趋势线7:100,POINTDOT;
HH:=IF (H=HHV(H,50),1,0);
DD:=HHV(趋势线1,20);
DRAWICON(HH AND DD>REF(趋势线1,1) ,趋势线1,6);
DRAWICON(HH AND MACD-REF(MACD,1)<0,趋势线1,9);
LL:=LLV(L,30);
DRAWICON(L=LL AND MACD-REF(MACD,1)>0,趋势线1,5);
BL:((HH AND DD>REF(趋势线1,1)) OR (HH AND (MACD-REF(MACD,1))));
出货:IF( BL AND
趋势线-REF(趋势线,1)<0 AND MACD<REF(MACD,1),-80,0),COLORGREEN,LINETHICK4;
DRAWICON(C>MA(C,5),-100,1);
DRAWICON(C<MA(C,5),-100,2);
DRAWICON(C>MA(C,24),-130,1);
DRAWICON(C<MA(C,24),-130,2);