M60:=MA(C,60);
M120:=MA(C,120);
DRAWBAND(M60,RGB(90,0,0),M120,RGB(0,90,0));
{牛熊变线}
变线:=EMA(MA(CLOSE,30),5),LINETHICK0;{20 或 30 或 35}
STICKLINE(C =变线 AND C =O,H,L,0,0),COLORRED;
STICKLINE(C =变线 AND C =O,C,O,2.7,1),COLORRED;
STICKLINE(C 变线 AND C =O,H,L,0,1),COLORCYAN;
STICKLINE(C 变线 AND C =O,C,O,3,0),COLORCYAN;
STICKLINE(C 变线 AND C =O,H,L,0,1),COLORCYAN;
STICKLINE(C 变线 AND C =O,C,O,3,0),COLORCYAN;
STICKLINE(C 变线 AND C =O,H,L,0,1),COLORGRAY;
STICKLINE(C 变线 AND C O,H,L,0,1),COLORGRAY;
STICKLINE(C 变线 AND C O,C,O,3,1),COLORGRAY;
STICKLINE(C 变线 AND C =O,C,O,3,1),COLORGRAY;
{分水岭操作线}
PM:MA(C,5),COLORGRAY,LINETHICK1;{可用13}
IF(PM REF(PM,1),PM,DRAWNULL),COLORGRAY,LINETHICK0;
IF(PM =REF(PM,1),PM,DRAWNULL),COLORRED,LINETHICK2;
IF(PM=REF(PM,1),PM,DRAWNULL),COLORRED,LINETHICK2;
A:=MA(CLOSE,12)+ABS(MA(CLOSE,12)-REF(MA(CLOSE,12),1));{原公式为17,最终确定为12}
B:=MA(CLOSE,12)+MA(CLOSE,12)-REF(MA(CLOSE,12),1);
分水岭:=IF(MA(CLOSE,12) B,B,MA(CLOSE,12));
操作线:=分水岭-(EMA(C,3)-分水岭);
AA:=CROSS(分水岭,操作线);
STICKLINE(AA,C,O,3,0),COLOR0000AA;
STICKLINE(AA,C,O,2,0),COLOR0033CC;
STICKLINE(AA,C,O,1,0),COLOR0055EE;
STICKLINE(AA,C,O,0.3,0),COLOR0099FF;
STICKLINE(AA,H,L,0,1),COLOR0099FF;
RR:=CROSS((MA(VOL,5)),(MA(VOL,10))) AND MA(C,2) =MA(C,4); {AND VOL =REF(VOL,1)}
STICKLINE(RR,C,O,3,0),COLOR0000AA;
STICKLINE(RR,C,O,2,0),COLOR0033CC;
STICKLINE(RR,C,O,1,0),COLOR0055EE;
STICKLINE(RR,C,O,0.3,0),COLOR0099EE;
STICKLINE(RR,H,L,0,1),COLOR0099FF;
MAA5:MA(CLOSE,5),NODRAW;
{MAA10:MA(CLOSE,10),COLORCC66FF;
MAA20:MA(CLOSE,20),COLORFFCC66;}
MA60:MA(CLOSE,60),COLOR00FF99,LINETHICK2;
MA120:MA(C,120),COLORGRAY;
DRAWTEXT(CROSS(MA60,MA120),MA60,'牛'),COLORYELLOW,LINETHICK4;
DRAWTEXT(CROSS(MA120,MA60),MA60,'熊'),COLORWHITE,LINETHICK2;
N1:=3;
N2:=6;
N3:=12;
N4:=24;
BBI:(MA(CLOSE,N1)+MA(CLOSE,N2)+MA(CLOSE,N3)+MA(CLOSE,N4))/4,COLORMAGENTA,LINETHICK2;
BB:=BBI REF(BBI,1);
IF(BB,BBI,DRAWNULL)COLORGREEN,LINETHICK2;
DRAWTEXT( KDJ.J -REF( KDJ.J ,1) 30 AND C/REF(C,1) 1.043
AND EXPMA(C,12) EXPMA(C,50),L*0.95,'起爆'),COLORRED;
星板:=ABS(REF(OPEN,1)-REF(CLOSE,1))/REF(CLOSE,1) 0.03
CLOSE/OPEN 1.03 CLOSE REF(CLOSE,2) AND C/REF(C,1) 1.071;
DRAWTEXT(星板,L*0.950,'主升'),COLORMAGENTA;
DRAWICON(星板,L*0.97,1);
A3:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;
A4:=SMA(A3,3,1);
A5:=SMA(A4,3,1);
A6:=3*A4-2*A5;
A7:=C-REF(C,1);
A8:=100*EMA(EMA(A7,6),6)/EMA(EMA(ABS(A7),6),6);
买K:=LLV(A8,2)=LLV(A8,7) AND COUNT(A8 0,2) AND CROSS(A8,MA(A8,2));
DRAWTEXT(FILTER(买K=1,5),LOW-0.05,'↖买进'),COLORYELLOW;
STICKLINE(买K,OPEN,CLOSE,2,0),COLORYELLOW;
流通市值:C*FINANCE(7)/100000000,COLORYELLOW,NODRAW;
DRAWTEXT_FIX(ISLASTBAR,0.005,0.005,0,FGBLOCK),COLORWHITE;
DRAWTEXT_FIX(ISLASTBAR,0.005,0.1,0,HYBLOCK),COLORYELLOW;
DRAWTEXT_FIX(ISLASTBAR,0.005,0.2,0,DYBLOCK),COLORWHITE;
DRAWTEXT_FIX(ISLASTBAR,0.005,0.3,0,GNBLOCK),COLORWHITE;
DIF:=EMA(CLOSE,8)-EMA(CLOSE,13);
DEA:=EMA(DIF,6);
MACD:=2*(DIF-DEA);
金叉:=CROSS(DIF,DEA); 死叉:=CROSS(DEA,DIF);
DIF下拐:=REF(DIF,3) REF(DIF,2)AND REF(DIF,2) REF(DIF,1)AND REF(DIF,1) DIF=REF(DIF,1);
MACD下拐:=REF(DIF,3) REF(DIF,2)AND REF(MACD,2) REF(MACD,1)AND REF(MACD,1) MACD=REF(MACD,1);
下拐:=MAX(DIF下拐,MACD下拐);
GD1:=EVERY(DIF REF(DIF,1),BARSLASTCOUNT(DIF DEA))AND DIF
GD2:=EVERY(MACD REF(MACD,1),BARSLASTCOUNT(DIF DEA))AND DIF
GD:=MAX(GD1,GD2);
高点1:=REF(MAX(C,O),BARSLAST(GD1)+1);
高点2:=REF(MAX(C,O),BARSLAST(GD2)+1);
高点:=IF(高点2 =高点1,高点2,高点1);
AA1:=HHV(IF(C O,C,MAX(C,O)),BARSLASTCOUNT(高点)+1)=HHV(IF(C O,C,MAX(C,O)),BARSLASTCOUNT(BBI REF(BBI,1)AND C BBI));
压力:DRAWLINE(BARSLAST(AA1)=0,IF(C O,C,MAX(C,O)),BARSNEXT(AA1),REF(IF(C O,C,MAX(C,O)),BARSLAST(AA1)),1),DOTLINE,COLORYELLOW;