收集:中国股票市场经济分析网
1.主图
CG:MA(C,13),COLORFFFF00,LINETHICK1;
CG1:hhv(MA(H,13),13),coloree8fff,linethick1;
FL:=HHV(CG,2);
bs:HHV(CG,2),COLOR00FF00,LINETHICK1;
FS:CG-(FL-CG),COLORFF55FF,LINETHICK2 ;
cgx1: MA(C,13);
cgx2:ma(cgx1,3);
V3:=100-(100-3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))
*100,20,1)+2*SMA(SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))
*100,20,1),15,1));
V4:=100-(100-3*SMA((O-LLV(L,55))/(HHV(H,55)-LLV(L,55))
*100,20,1)+2*SMA(SMA((O-LLV(L,55))/(HHV(H,55)-LLV(L,55))
*100,20,1),15,1));
STICKLINE(V3<=REF(V4,1),cgx1,cgx2,4,0),COLOR00FF00;
STICKLINE(V3>REF(V4,1),cgx1,cgx2,4,0),COLORFF00FF;
ma(c,5) ,COLORWHITE;
STICKLINE(c,HIGH,LOW,0.8,0),color00ff00;
STICKLINE(c,CLOSE,OPEN,4,0),color00ff00;
STICKLINE(cg=bS and c>o,CLOSE,OPEN,4,0),COLORWHITE;
STICKLINE(cg=bS and c>o,HIGH,LOW,0.8,0),COLORWHITE;
STICKLINE(cg=bS and c<o,CLOSE,OPEN,4,1),COLORRED;
STICKLINE(cg=bS and c<o,HIGH,LOW,0.8,1),COLORRED;
2kdj
RSV:=(CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13))*100;
K:SMA(RSV,3,1),colorwhite;
D:SMA(K,3,1),coloryellow;
J:1*(3*d-2*k),colorff00ff,linethick1;
3*SMA((CLOSE-LLV(LOW,26))/(HHV(HIGH,26)-LLV(LOW,26))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,26))/(HHV(HIGH,26)-LLV(LOW,26))*100,5,1),3,1),COLOREEDD00;
70 ,POINTDOT,linethick2,COLOR00FF00;
50 ,COLOREEDD00,POINTDOT,linethick1;
20 ,colorwhite,POINTDOT;
3macd
DIFF:EMA(CLOSE,21)-EMA(CLOSE,34);
DEA:EMA(DIFF,7),COLORFFFF00;
MACD:2*(DIFF-DEA),COLORSTICK;
低位金叉:=CROSS(DIFF,DEA) AND DIFF<-0.1;
DRAWTEXT(低位金叉,DEA,'低位金叉'),COLORFF00FF;
JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));
二次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;
DRAWTEXT(二次金叉,DEA,'二次金叉'),COLORFF00FF;
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);
DRAWTEXT(底背离,DEA,'底背离'),COLORRED;
A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));
顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);
DRAWTEXT(顶背离,DEA,'顶背离'),COLORRED;
if(diff<0,diff,0),colorred,linethick1;
if(diff<0,0,diff),coloryellow,linethick1;
if(diff<dea,diff,dea),COLOR00ff00,linethick1;
if(diff>dea,dea,dea),COLORwhite,linethick1;