MA5:MA(C,5),COLORWHITE,LINETHICK2;
MA20:MA(C,20)COLORYELLOW,LINETHICK3;
MA48:MA(C,48)LINETHICK2;
MA60:MA(C,60),COLORBLUE,LINETHICK4;
MA1:MA(CLOSE,10),COLORRED,LINETHICK3;
MA2:MA(CLOSE,120),COLORGRAY ,LINETHICK6;
DRAWBAND(MA(C,4),RGB(185,0,0),MA(C,7),RGB(0,70,0));
DRAWKLINE(H,O,L,C);
AA:=CROSS(MA5,MA20);
DRAWTEXT(FILTER(AA,5),L*1.008,'△金叉'), COLORYELLOW;
DRAWTEXT(CROSS(MA(CLOSE,4),MA(CLOSE,9)),L*0.99,'△小金叉'),COLORRED;
DRAWTEXT(CROSS(MA(CLOSE,20),MA(CLOSE,60)),L*1.01,'△大金叉'),COLORRED;
STICKLINE(C>REF(C,1)*1.099,C,O,2.7,0)COLORRED,LINETHICK2;
ZT:=C/REF(C,1)>1.097;
BH:=BARSLAST(ZT);
CZ:=REF(H,BH)-REF(L,BH);
STICKLINE(C AND BH<100,(REF(L,BH)+CZ*0.5),(REF(L,BH)+CZ*0.5),3,0),COLORRED;
STICKLINE(C AND BH<100,REF(L,BH),REF(L,BH),3,0),COLORWHITE,CIRCLEDOT;
STICKLINE(C AND BH<100,REF(H,BH),REF(H,BH),3,0),COLORWHITE;
涨停:=C>REF(C,1)*1.099;
开盘价:REF(O,BARSLAST(涨停)),COLORWHITE,CIRCLEDOT;
DRAWNUMBER(涨停,L,O),COLOR5F9F9F;
C3:=REF(C,1);
跌停:=IF((C3-C)*100/C3>=(10-0.01*100/C3),1,0);
STICKLINE(跌停,OPEN,CLOSE,4,0),COLORGREEN;
STICKLINE(跌停,OPEN,CLOSE,3,0),COLORGREEN;
DRAWTEXT(跌停,H+0.3,'跌停'),COLORGREEN;
净资产:FINANCE(34),NODRAW,COLORFF00FF;
每股收益:FINANCE(33),NODRAW,COLORFF7F50;
市盈率:DYNAINFO(39),NODRAW,COLORFF00FF;
流通市值:(FINANCE(40)/100000000),NODRAW,COLORRED;
STICKLINE(C AND BH<100,REF(H,BH),REF(H,BH),3,0),COLORWHITE,CIRCLEDOT;
半分位:=(O+C)/2;
昨半分位:=REF(半分位,1);
STICKLINE(ISLASTBAR,昨半分位,昨半分位,10,0);
DRAWNUMBER(ISLASTBAR,昨半分位,昨半分位);
DRAWTEXT(ISLASTBAR,昨半分位,' 昨半分位');
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);
买:=LLV(A8,2)=LLV(A8,7) AND COUNT(A8<0,2) AND CROSS(A8,MA(A8,2));
{DRAWTEXT(FILTER(买=1,5),LOW*0.99,'进'),COLORYELLOW;}
STICKLINE(买,OPEN,CLOSE,2,0),COLORYELLOW;
K11:=EMA(C,60);
DD1:=C>K11;
VAR37:=EMA(EMA(EMA(CLOSE,2),2),2);
VAR47:=(MA(VAR37,47))*(0.99);
分水岭:=(MA(VAR37,13))*(0.99),LINETHICK2,COLORFF00FF;
DRAW:=(MA(CLOSE,13) > MA(CLOSE,18)) AND CROSS(CLOSE,MA(CLOSE,4)) AND (MA(CLOSE,4) < MA(CLOSE,13));
AA1:=DD1 AND DRAW;
DRAWTEXT(AA1,LOW*0.98,'买'),COLORWHITE;
{MACD底背离}
DIFF:=EMA(DCLOSE,12)-EMA(DCLOSE,26);
DEA:=EMA(DIFF,9),COLORFFFF00;
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);
MACD底背离:=IF(底背离,57,0),LINETHICK2,COLORFF00FF;
DRAWTEXT(底背离,LOW*0.96,'入'),COLORYELLOW;
超B:=L2_AMO(0,2)/10000.0;
大B:=L2_AMO(1,2)/10000.0;
中B:=L2_AMO(2,2)/10000.0;
小B:=L2_AMO(3,2)/10000.0;
超S:=L2_AMO(0,3)/10000.0;
大S:=L2_AMO(1,3)/10000.0;
中S:=L2_AMO(2,3)/10000.0;
小S:=L2_AMO(3,3)/10000.0;
TESTSKIP(NOT(超B OR 大B OR 中B OR 小B OR 超S OR 大S OR 中S OR 小S)!=0);
大宗进:=(超B)+(大B),NODRAW;
大宗出:=(超S)+(大S),NODRAW;
非大宗进:=(中B)+(小B),NODRAW;
非大宗出:=(中S)+(小S),NODRAW;
DAZHIV:=CONST(MAX(ABS(大宗进),MAX(ABS(大宗出),MAX(ABS(非大宗进),ABS(非大宗出))))),NODRAW;
DRAWRECTREL(0,CONST(950-(ABS(大宗进)*250/DAZHIV)),30,970,IF(CONST(大宗进>0),RGB(255,0,0),RGB(23,125,255)));
DRAWRECTREL(32,CONST(950-(ABS(大宗出)*250/DAZHIV)),62,970,IF(CONST(大宗出>0),RGB(23,125,255),RGB(255,0,0)));
DRAWRECTREL(92,CONST(950-(ABS(非大宗进)*250/DAZHIV)),122,970,IF(CONST(非大宗进>0),RGB(255,0,0),RGB(23,125,255)));
DRAWRECTREL(124,CONST(950-(ABS(非大宗出)*250/DAZHIV)),154,970,IF(CONST(非大宗出>0),RGB(23,125,255),RGB(255,0,0)));
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.015,1,0,'主力进出'),COLORRED;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.107,1,0,'散户进出'),COLORGREEN;
VAR3:=PEAKBARS(3,10,1)<10;
VAR5:=IF(VAR3=1,2,0);
顶:= IF(VAR5=2,2,0);
DRAWICON(顶>REF(顶,1),H*1.005,2);
DRAWICON(CROSS(ZIG(3,10) ,REF(ZIG(3 ,10),1)),L,1);
DRAWICON(CROSS(REF(ZIG(3,10),1),ZIG(3,10)),H,12);
STICKLINE(V>=REF(V,1)*2,O,C,3,0)COLORBLUE;
STICKLINE(V>=REF(V,1)*2,H,L,0,0)COLORBLUE;
STICKLINE(C/REF(C,1)>=1.098,O,C,3,0)COLORRED;
STICKLINE(C/REF(C,1)>=1.098,H,L,0,0)COLORRED;
STICKLINE(C/REF(C,1)<=0.901,O,C,3,0)COLORBLUE;
STICKLINE(C/REF(C,1)<=0.901,H,L,0,0)COLORBLUE;
VA1:=TROUGHBARS(3,10,1);
VR1:=PEAKBARS(3,10,1);
VA2:=IF(VA1=0,1,0);
VR2:=IF(VR1=0,1,0);
DRAWLINE(BARSLAST(VA1),L,VA2,L,1),POINTDOT,COLOR00FFFF,LINETHICK4;
DRAWLINE(BARSLAST(VR1),H,VR2,H,1),POINTDOT,COLORGREEN,LINETHICK4;