月金叉:=crOSS(kd.K#MONTH,KD.D#MONTH),COLORLIMAGENTA;
D值:=35;
月死叉:=CROSS(KD.D#MONTH,KD.K#MONTH),COLORGREEN;
STICKLINE(月金叉,50,80,1,0),COLORLIMAGENTA;
STICKLINE(月死叉,50,80,1,0),COLORGREEN;
DRAWTEXT(月金叉,75,' 月金'),COLORLIMAGENTA;
DRAWTEXT(月死叉,75,' 月死'),COLORGREEN;
周金叉:=CROSS(KD.K#WEEK,KD.D#WEEK),COLORLIMAGENTA;
周死叉:=CROSS(KD.D#WEEK,KD.K#WEEK),COLORGREEN;
STICKLINE(周金叉,20,50,1,0),COLORLIMAGENTA;
STICKLINE(周死叉,20,50,1,0),COLORGREEN;
DRAWTEXT(周金叉,25,' 周金'),COLORLIMAGENTA;
DRAWTEXT(周死叉,25,' 周死'),COLORGREEN;
NOTEXT高:80,COLORBLUE,LINETHICK3;
NOTEXT中:50,POINTDOT,COLORWHITE;
NOTEXT低:20,COLORBLUE,LINETHICK3;
NOTEXT周:-50,COLORBLUE,LINETHICK3;
{NOTEXT周1:-80,COLORWHITE,LINETHICK3;}
NOTEXT20:IF(KD.K#MONTH =KD.D#MONTH,NOTEXT低,DRAWNULL),COLORRED,LINETHICK3;
NOTEXT80:IF(KD.K#WEEK =KD.D#WEEK,NOTEXT高,DRAWNULL),COLORRED,LINETHICK3;
NOTEXT150:IF(macd.DIF#WEEK MacD.DEA#WEEK,NOTEXT周,DRAWNULL),COLORRED,LINETHICK3;
DRAWTEXT(DAYSTOTODAY=0,80,' 周K'),COLOR00FFFF;
DRAWTEXT(DAYSTOTODAY=0,20,' 月K'),COLOR00FFFF;
DRAWTEXT(DAYSTOTODAY=0,-50,' 周M'),COLOR00FFFF;
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:SMA(RSV,3,1),COLORWHITE,LINETHICK1;
D:SMA(K,3,1),COLORYELLOW,LINETHICK1;
LC := REF(CLOSE,1);
rsi1:=SMA(MAX(CLOSE-LC,0),3,1)/SMA(Abs(CLOSE-LC),3,1)*100;
RSI2:=SMA(MAX(CLOSE-LC,0),5,1)/SMA(ABS(CLOSE-LC),5,1)*100;
RSI3:=SMA(MAX(CLOSE-LC,0),8,1)/SMA(ABS(CLOSE-LC),8,1)*100;
相对强弱:=0.5*RSI1+0.31*RSI2+0.19*RSI3;
WAVE1:=SMA(100*(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8)),3,1);
WAVE2:=SMA(100*(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8)),5,1);
WAVE3:=SMA(100*(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8)),8,1);
短线波段:=0.5*WAVE1+0.31*WAVE2+0.19*WAVE3;
机会区:=20,POINTDOT,COLORRED;
风险区:=80,POINTDOT,COLORGREEN;
风险:=0.5*相对强弱+0.5*短线波段,COLORYELLOW,NODRAW;
CD1:=IF(风险 20 AND CLOSE OPEN ANDddx 0,1,0);
CD2:=IF(风险 20 AND LOW =REF(LOW,1) AND CLOSE LOW AND DDX 0,1,0);
CD3:=IF(REF(风险,1) 20 AND 风险 REF(风险,1),1,0);
LBUY:=(CD1=1 OR CD2=1 OR CD3=1);
X:=(LBUY AND COUNT(LBUY,3)=1);
{DRAWICON(X,50,25);}
{ST:=NOT(NAMELIKE('S') OR NAMELIKE('*S')) ANDvol
FJC1:=CROSS(MA(C,5),MA(C,10));
FJC2:=CROSS(MA(C,5),MA(C,20));
FJC3:=CROSS(MA(C,10),MA(C,20));
FJC4:=BArslAST(CROSS(MA(C,5),MA(C,20)));
FJC5:=ATAN((MA(C,60)/REF(MA(C,60),1)-1)*100)*57.3;
FL:=VOL REF(V,1)*1.5 OR V=HHV(V,8);
FJC6:=ATAN((MA(C,13)/REF(MA(C,13),1)-1)*100)*57.3;
FJC7:=ATAN((MA(C,21)/REF(MA(C,21),1)-1)*100)*57.3;
FJC8:=C REF(C,1)*1.07 AND FL;
FJC9:=BARSLAST(FJC8);
FJC10:=HHV(C,FJC9) =REF(H,FJC9) AND LLV(C,FJC9) REF(L,FJC9);
飞机场:(IF(EXIST(FJC2 AND EXIST(FJC1,3),5),FJC3,0) AND LLV(CLOSE,FJC4) REF(OPEN,FJC4+1) AND ST)*100,COLORFFFFFF;
超飞机场:(IF(BARSLAST(飞机场) =55 AND FJC5 0,FL AND FJC3 AND EXIST(CROSS(MACD.DIF,MACD.DEA) AND MACD.DIF 0,2),0) AND ST)*100,COLOR00FFFF;
登高望远:(IF(BARSLAST(飞机场) =55 AND FJC5 0 AND FJC4 5,CROSS(CLOSE,REF(HHV(H,FJC4),1)) AND VOL=HHV(V,FJC4),0) AND ST)*100,COLOR0000FF;}
{DRAWICON(D =KD买点AND CROSS(K,D),D,1);
DRAWICON(CROSS(D,K),K,2);}
DRAWICON(KD.K#MONTH KD.D#MONTH AND KD.K#WEEK KD.D#WEEK AND CROSS(D,K) AND K 50,95,12);
DRAWICON( K =70 AND CROSS(D,K),95,37);
DRAWICON(KD.K#WEEK KD.D#WEEK AND CROSS(D,K) AND K =60,95,36);
DRAWICON(CROSS(K,D) AND K 35,35,38);
DRAWICON(KD.K#WEEK KD.D#WEEK AND CROSS(K,D) AND D 35,35,24);
DRAWICON(KD.K#MONTH KD.D#MONTH AND KD.K#WEEK KD.D#WEEK AND CROSS(K,D) AND D 50,35,9);
KD共振1:=周金叉 AND EXIST(CROSS(K,D),3) AND D
KD共振2:=EXIST(周金叉,3) AND CROSS(K,D) AND D
KDXG:=KD共振1 OR KD共振2;
DRAWICON(KDXG ,60,5);
{MACD}
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MYY:=EMA(CLOSE,3)-EMA(CLOSE,3);
YMM:=EMA(MYY,3);
MACD:=(DIF-DEA)*2*IF(C 5,400,IF(C 10,200,IF(C 20,100,IF(C 30,60,IF(C 50,50,IF(C 100,30,IF(C 300,15,IF(C 900,5,2))))))))COLORSTICK;
DIFF1:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA1:=EMA(DIFF1,9);
{DIF上升为红色,下降为绿色}
IF(DIF REF(DIF,1),DIF,DRAWNULL),COLORRED,LINETHICK2,NODRAW;
IF(DIF REF(DIF,1),DIF,DRAWNULL),COLORGREEN,LINETHICK2,NODRAW;
{加了DEA的上升棕色,下降黄色}
IF(DEA REF(DEA,1),DEA,DRAWNULL),COLORBROWN,LINETHICK2,NODRAW;
IF(DEA REF(DEA,1),DEA,DRAWNULL),COLORYELLOW,LINETHICK2,NODRAW;
MACD2:=MACD;
获利比:WINNER(C),NODRAW;
涨家数:=INDEXADV,NODRAW,COLORRED;
跌家数:=INDEXDEC,NODRAW,COLORGREEN;
正量能:=涨家数/(涨家数+跌家数)*100,NODRAW,COLORMAGENTA;