TY:=C;
A1:=REF(TY,10)=HHV(TY,2*10+1);
B1:=FILTER(A1,10);
C1:=BACKSET(B1,10+1);
HD:=FILTER(C1,10);
A2:=REF(TY,10)=LLV(TY,2*10+1);
B2:=FILTER(A2,10);
C2:=BACKSET(B2,10+1);
LD:=FILTER(C2,10);
前期高位:REF(C,BARSLAST(HD)),COLOR8000FF,POINTDOT;
STICKLINE(C,前期高位,前期高位,8,0),COLOR8000FF;
JRH:=HHV(C,2);
JRL:=LLV(C,2);
VAR01:=(CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2));
VAR02:=(REF(VAR01,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VAR03:=(REF(VAR02,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VAR04:=(REF(VAR03,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VAR05:=(REF(VAR04,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VAR06:=(REF(VAR05,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VAR07:=(REF(VAR06,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VAR08:=(REF(VAR07,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VAR09:=(REF(VAR08,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VARA:=(REF(VAR09,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VARB:=(REF(VARA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VARC:=(REF(VARB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VARD:=(CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2)); {www.gszb.comGUPIAOFF.COM}
VARE:=(REF(VARD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VARF:=(REF(VARE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VAR010:=(REF(VARF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VAR011:=(REF(VAR010,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VAR012:=(REF(VAR011,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VAR013:=(REF(VAR012,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VAR014:=(REF(VAR013,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VAR015:=(REF(VAR014,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VAR016:=(REF(VAR015,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VAR017:=(REF(VAR016,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VAR018:=(REF(VAR017,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VAR019:=((REF(VARD OR VARE OR VARF OR VAR010 OR VAR011 OR VAR012 OR VAR013 OR VAR014 OR VAR015 OR VAR016 OR VAR017 OR VAR018,1)) AND VAR01);
VAR1A:=((REF(VAR01 OR VAR02 OR VAR03 OR VAR04 OR VAR05 OR VAR06 OR VAR07 OR VAR08 OR VAR09 OR VARA OR VARB OR VARC,1)) AND VARD);
红色持股:=VAR01 OR VAR02 OR VAR03 OR VAR04 OR VAR05 OR VAR06 OR VAR07 OR VAR08 OR VAR09 OR VARA OR VARB OR VARC,COLOR0000FF,NODRAW;
离场:=IF(红色持股,JRL,DRAWNULL);
明离场价:=离场,COLORFF99FF,NODRAW;
青色观望:=VARD OR VARE OR VARF OR VAR010 OR VAR011 OR VAR012 OR VAR013 OR VAR014 OR VAR015 OR VAR016 OR VAR017 OR VAR018,COLORFFFF00,NODRAW;
进:=IF(青色观望,JRH,DRAWNULL);
今离场价:REF(离场,1),COLOR0000FF,NODRAW;
明进场价:=进,COLOR33AACC,NODRAW;
今进场价:REF(明进场价,1),COLORGREEN,NODRAW;
上涨家数:INDEXADV,COLOR0080FF,NODRAW;
下跌家数:INDEXDEC,COLORGREEN,NODRAW;
T1Z:=IF (DDZ>0 AND REF(DDZ,1)<0,1,0);
T2Z:=IF (DDZ>0 AND REF(DDZ,1)>0 AND REF(DDZ,2)<0,2,T1Z);
T3Z:=IF (DDZ>0 AND REF(DDZ,1)>0 AND REF(DDZ,2)>0 AND REF(DDZ,3)<0,3,T2Z);
T4Z:=IF (DDZ>0 AND REF(DDZ,1)>0 AND REF(DDZ,2)>0 AND REF(DDZ,3)>0 AND REF(DDZ,4)<0,4,T3Z);
T5Z:=IF (DDZ>0 AND REF(DDZ,1)>0 AND REF(DDZ,2)>0 AND REF(DDZ,3)>0 AND REF(DDZ,4)>0 AND REF(DDZ,5)<0,5,T4Z);
T6Z:=IF (DDZ>0 AND REF(DDZ,1)>0 AND REF(DDZ,2)>0 AND REF(DDZ,3)>0 AND REF(DDZ,4)>0 AND REF(DDZ,5)>0 AND REF(DDZ,6)<0,6,T5Z);
T7Z:=IF (DDZ>0 AND REF(DDZ,1)>0 AND REF(DDZ,2)>0 AND REF(DDZ,3)>0 AND REF(DDZ,4)>0 AND REF(DDZ,5)>0 AND REF(DDZ,6)>0 AND REF(DDZ,7)<0,7,T6Z);
T8Z:=IF (DDZ>0 AND REF(DDZ,1)>0 AND REF(DDZ,2)>0 AND REF(DDZ,3)>0 AND REF(DDZ,4)>0 AND REF(DDZ,5)>0 AND REF(DDZ,6)>0 AND REF(DDZ,7)>0 AND REF(DDZ,8)<0,8,T7Z);
T9Z:=IF (DDZ>0 AND REF(DDZ,1)>0 AND REF(DDZ,2)>0 AND REF(DDZ,3)>0 AND REF(DDZ,4)>0 AND REF(DDZ,5)>0 AND REF(DDZ,6)>0 AND REF(DDZ,7)>0 AND REF(DDZ,8)>0 AND REF(DDZ,9)<0,9,T8Z);
TZ:=IF (DDZ>0 AND REF(DDZ,1)>0 AND REF(DDZ,2)>0 AND REF(DDZ,3)>0 AND REF(DDZ,4)>0 AND REF(DDZ,5)>0 AND REF(DDZ,6)>0 AND REF(DDZ,7)>0 AND REF(DDZ,8)>0 AND REF(DDZ,9)>0,10,T9Z);
DRAWTEXT_FIX(1,0.064,0.455,0,STRCAT(STRCAT(' ',CON2STR(TZ,0)),' [天] ')),COLORWHITE;
T11:=IF (DDY>0 AND REF(DDY,1)<0,1,0);
T21:=IF (DDY>0 AND REF(DDY,1)>0 AND REF(DDY,2)<0,2,T11);
T31:=IF (DDY>0 AND REF(DDY,1)>0 AND REF(DDY,2)>0 AND REF(DDY,3)<0,3,T21);
T41:=IF (DDY>0 AND REF(DDY,1)>0 AND REF(DDY,2)>0 AND REF(DDY,3)>0 AND REF(DDY,4)<0,4,T31);
T51:=IF (DDY>0 AND REF(DDY,1)>0 AND REF(DDY,2)>0 AND REF(DDY,3)>0 AND REF(DDY,4)>0 AND REF(DDY,5)<0,5,T41);
T61:=IF (DDY>0 AND REF(DDY,1)>0 AND REF(DDY,2)>0 AND REF(DDY,3)>0 AND REF(DDY,4)>0 AND REF(DDY,5)>0 AND REF(DDY,6)<0,6,T51);
T71:=IF (DDY>0 AND REF(DDY,1)>0 AND REF(DDY,2)>0 AND REF(DDY,3)>0 AND REF(DDY,4)>0 AND REF(DDY,5)>0 AND REF(DDY,6)>0 AND REF(DDY,7)<0,7,T61);
T81:=IF (DDY>0 AND REF(DDY,1)>0 AND REF(DDY,2)>0 AND REF(DDY,3)>0 AND REF(DDY,4)>0 AND REF(DDY,5)>0 AND REF(DDY,6)>0 AND REF(DDY,7)>0 AND REF(DDY,8)<0,8,T71);
T91:=IF (DDY>0 AND REF(DDY,1)>0 AND REF(DDY,2)>0 AND REF(DDY,3)>0 AND REF(DDY,4)>0 AND REF(DDY,5)>0 AND REF(DDY,6)>0 AND REF(DDY,7)>0 AND REF(DDY,8)>0 AND REF(DDY,9)<0,9,T81);
TY1:=IF (DDY>0 AND REF(DDY,1)>0 AND REF(DDY,2)>0 AND REF(DDY,3)>0 AND REF(DDY,4)>0 AND REF(DDY,5)>0 AND REF(DDY,6)>0 AND REF(DDY,7)>0 AND REF(DDY,8)>0 AND REF(DDY,9)>0,10,T91);
DRAWTEXT_FIX(1,0.151,0.455,0,STRCAT(STRCAT(' ',CON2STR(TY1,0)),' [天] ')),COLORWHITE;
T1:=IF (DDX>0 AND REF(DDX,1)<0,1,0);
T2:=IF (DDX>0 AND REF(DDX,1)>0 AND REF(DDX,2)<0,2,T1);
T3:=IF (DDX>0 AND REF(DDX,1)>0 AND REF(DDX,2)>0 AND REF(DDX,3)<0,3,T2);
T4:=IF (DDX>0 AND REF(DDX,1)>0 AND REF(DDX,2)>0 AND REF(DDX,3)>0 AND REF(DDX,4)<0,4,T3);
T5:=IF (DDX>0 AND REF(DDX,1)>0 AND REF(DDX,2)>0 AND REF(DDX,3)>0 AND REF(DDX,4)>0 AND REF(DDX,5)<0,5,T4);
T6:=IF (DDX>0 AND REF(DDX,1)>0 AND REF(DDX,2)>0 AND REF(DDX,3)>0 AND REF(DDX,4)>0 AND REF(DDX,5)>0 AND REF(DDX,6)<0,6,T5);
T7:=IF (DDX>0 AND REF(DDX,1)>0 AND REF(DDX,2)>0 AND REF(DDX,3)>0 AND REF(DDX,4)>0 AND REF(DDX,5)>0 AND REF(DDX,6)>0 AND REF(DDX,7)<0,7,T6);
T8:=IF (DDX>0 AND REF(DDX,1)>0 AND REF(DDX,2)>0 AND REF(DDX,3)>0 AND REF(DDX,4)>0 AND REF(DDX,5)>0 AND REF(DDX,6)>0 AND REF(DDX,7)>0 AND REF(DDX,8)<0,8,T7);
T9:=IF (DDX>0 AND REF(DDX,1)>0 AND REF(DDX,2)>0 AND REF(DDX,3)>0 AND REF(DDX,4)>0 AND REF(DDX,5)>0 AND REF(DDX,6)>0 AND REF(DDX,7)>0 AND REF(DDX,8)>0 AND REF(DDX,9)<0,9,T8);
T:=IF (DDX>0 AND REF(DDX,1)>0 AND REF(DDX,2)>0 AND REF(DDX,3)>0 AND REF(DDX,4)>0 AND REF(DDX,5)>0 AND REF(DDX,6)>0 AND REF(DDX,7)>0 AND REF(DDX,8)>0 AND REF(DDX,9)>0,10,T9);
DRAWTEXT_FIX(1,0.238,0.455,0,STRCAT(STRCAT(' ',CON2STR(T,0)),' [天] ')),COLORWHITE;
通达信绝密资金监控主图指标 源码 贴图
{www.gszb.com资金监控-绝密}
{www.gszb.com主图}
年:=YEAR,NODRAW;
月:=MONTH,NODRAW;
星期:=WEEKDAY,NODRAW;
日1:=DATETODAY(DATE);
上市日:=REF(DATE,TOTALBARSCOUNT-CURRBARSCOUNT);
自然日:=日1-DATETODAY(上市日)+1;
ZB:=(自然日-REF(自然日,1))!=星期-REF(星期,1)
OR TOTALBARSCOUNT-CURRBARSCOUNT=0;
DRAWKLINE(H,O,L,C);
ZKP:=IF(C>REF(C,1),REF(C,1),DRAWNULL);
ZSP:=IF(C>REF(C,1),C,DRAWNULL);
DKP:=IF(C<=REF(C,1),REF(C,1),DRAWNULL);
DSP:=IF(C<=REF(C,1),C,DRAWNULL);
DRAWKLINE(H,DKP,L,DSP);
STICKLINE(C<=REF(C,1),DKP,DSP,3.05,0),COLORBLUE;
STICKLINE(C<=REF(C,1),DKP,DSP,2.2,0),COLORFF7700;
STICKLINE(C<=REF(C,1),DKP,DSP,1.5,0),COLORFF9900;
STICKLINE(C<=REF(C,1),DKP,DSP,0.5,0),COLORFFBB00;
DRAWKLINE(H,ZKP,L,ZSP);
STICKLINE(C>REF(C,1),ZKP,ZSP,3.05,0),COLOR000099;
STICKLINE(C>REF(C,1),ZKP,ZSP,2.2,0),COLOR0000CC;
STICKLINE(C>REF(C,1),ZKP,ZSP,1.5,0),COLOR0000FF;
STICKLINE(C>REF(C,1),ZKP,ZSP,0.5,0),COLORCC66FF;
STICKLINE(V/REF(V,1)>2 AND CLOSE>=OPEN,ZKP,ZSP,1,0),COLORYELLOW;
M5:MA(C,5),COLORWHITE;
M10:MA(C,10),COLORYELLOW;
M20:MA(C,20),COLORCYAN;
M60:MA(C,60),COLORGREEN,LINETHICK2;
M120:MA(C,120),COLORRED,LINETHICK2;
TY:=C;
A1:=REF(TY,10)=HHV(TY,2*10+1);
B1:=FILTER(A1,10);
C1:=BACKSET(B1,10+1);
HD:=FILTER(C1,10);
A2:=REF(TY,10)=LLV(TY,2*10+1);
B2:=FILTER(A2,10);
C2:=BACKSET(B2,10+1);
LD:=FILTER(C2,10);
前期高位:REF(C,BARSLAST(HD)),COLOR8000FF,POINTDOT;
STICKLINE(C,前期高位,前期高位,8,0),COLOR8000FF;
JRH:=HHV(C,2);
JRL:=LLV(C,2);
VAR01:=(CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2));
VAR02:=(REF(VAR01,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VAR03:=(REF(VAR02,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VAR04:=(REF(VAR03,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VAR05:=(REF(VAR04,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VAR06:=(REF(VAR05,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VAR07:=(REF(VAR06,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VAR08:=(REF(VAR07,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VAR09:=(REF(VAR08,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VARA:=(REF(VAR09,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VARB:=(REF(VARA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VARC:=(REF(VARB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VARD:=(CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2)); {www.gszb.comGUPIAOFF.COM}
VARE:=(REF(VARD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VARF:=(REF(VARE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VAR010:=(REF(VARF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VAR011:=(REF(VAR010,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VAR012:=(REF(VAR011,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VAR013:=(REF(VAR012,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VAR014:=(REF(VAR013,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VAR015:=(REF(VAR014,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VAR016:=(REF(VAR015,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VAR017:=(REF(VAR016,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VAR018:=(REF(VAR017,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VAR019:=((REF(VARD OR VARE OR VARF OR VAR010 OR VAR011 OR VAR012 OR VAR013 OR VAR014 OR VAR015 OR VAR016 OR VAR017 OR VAR018,1)) AND VAR01);
VAR1A:=((REF(VAR01 OR VAR02 OR VAR03 OR VAR04 OR VAR05 OR VAR06 OR VAR07 OR VAR08 OR VAR09 OR VARA OR VARB OR VARC,1)) AND VARD);
红色持股:=VAR01 OR VAR02 OR VAR03 OR VAR04 OR VAR05 OR VAR06 OR VAR07 OR VAR08 OR VAR09 OR VARA OR VARB OR VARC,COLOR0000FF,NODRAW;
离场:=IF(红色持股,JRL,DRAWNULL);
明离场价:=离场,COLORFF99FF,NODRAW;
青色观望:=VARD OR VARE OR VARF OR VAR010 OR VAR011 OR VAR012 OR VAR013 OR VAR014 OR VAR015 OR VAR016 OR VAR017 OR VAR018,COLORFFFF00,NODRAW;
进:=IF(青色观望,JRH,DRAWNULL);
今离场价:REF(离场,1),COLOR0000FF,NODRAW;
明进场价:=进,COLOR33AACC,NODRAW;
今进场价:REF(明进场价,1),COLORGREEN,NODRAW;
上涨家数:INDEXADV,COLOR0080FF,NODRAW;
下跌家数:INDEXDEC,COLORGREEN,NODRAW;
DRAWTEXT_FIX(C>0,0.0,0.0,0,STRCAT('所属行业:',HYBLOCK)),COLORYELLOW;
DRAWTEXT_FIX(C>0,0.10,0.0,0,STRCAT('所属地区:',DYBLOCK)),COLORYELLOW;
DRAWTEXT_FIX(C>0,0.20,0.0,0,STRCAT('主营业务:',EXTERNSTR(0,6))),COLORYELLOW;
DRAWTEXT_FIX(C>0,0.0,0.05,0,STRCAT('业绩预报:',EXTERNSTR(0,3))),COLORYELLOW;
DRAWTEXT_FIX(C>0,0.00,0.10,0,STRCAT('主题投资:',EXTERNSTR(0,7))),COLORYELLOW;
DRAWTEXT_FIX(C>0,0.0,0.15,0,STRCAT('解禁日期:',EXTERNSTR(0,8))),COLORYELLOW;
DRAWTEXT_FIX(C>0,0.00,0.20,0,STRCAT('千股千评:',EXTERNSTR(0,1))),COLOR00FFFF;
{www.gszb.comDRAWTEXT_FIX(C>0,0.00,0.25,0,STRCAT('智能诊股:',EXTERNSTR(0,2))),COLOR00FFFF;}
VAR111:=ZIG(3,13);
STICKLINE((REF(VAR111,2) < REF(VAR111,1)) AND (VAR111 < REF(VAR111,1)),CLOSE,OPEN,3,0),COLOR66FF00;
DRAWTEXT_FIX(STICKLINE((REF(VAR111,2) < REF(VAR111,1)) AND (VAR111 < REF(VAR111,1)),CLOSE,OPEN,5,0),0.00,0.11,0,''),COLOR00FF00,LINETHICK1;
VARK1:=(HIGH+LOW+CLOSE*2)/4;
VARK2:=EMA(VARK1,21);
VARK3:=STD(VARK1,21);
VARK4:=((VARK1-VARK2)/VARK3*100+200)/4;
VARK5:=(EMA(VARK4,89)-25)*1.56;
VARK6:=EMA(VARK5,5)*1.22;
VARK7:=EMA(VARK6,3);
VARK8:=3*VARK6-2*VARK7;
VARK1A:=IF(CROSS(VARK6,VARK8) AND CROSS(VARK7,VARK8) AND CROSS(VARK7,VARK6),1,0);
VARK1B:=EMA(CLOSE,3)-EMA(CLOSE,89);
VARK1C:=EMA(VARK1B,21);
VARK1D:=(VARK1B-VARK1C)*10;
VARK1F:=POW(VARK1D,3)*0.1+POW(VARK1D,2);
拉升资金:=IF(VARK1D>0.015,VARK1F,0)/45;
VARK9:=EMA(CLOSE,2)-EMA(CLOSE,55);
VARK10:=EMA(VARK9,13);
VARK11:=2*(VARK9-VARK10);
主力资金:=POW(VARK11,3)*0.1+POW(VARK11,1);
DRAWICON(CROSS(主力资金,0) AND CROSS(拉升资金,0.01)AND VOL/MA(REF(VOL,1),5)>2,L-0.25,23);
超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;
净流入:=(超B+大B+中B+小B)+(超S+大S+中S+小S);
中单:=中B+中S;
大宗净流入:=(超B+大B)+(超S+大S);
三日大宗:=SUM(大宗净流入,3);
十日大宗:=SUM(大宗净流入,10);
超大单:=(超B)+(超S);
大单:=(大B)+(大S);
小单:=(小B)+(小S);
大宗进:=(超B)+(大B);
大宗出:=(超S)+(大S);
非大宗进:=(中B)+(小B);
非大宗出:=(中S)+(小S);
近3日流向:=SUM(净流入,3);
近10日流向:=SUM(净流入,10);
主力买力度:=LARGEINTRDVOL*100/VOL;
主力卖力度:=LARGEOUTTRDVOL*100/VOL;
DRAWRECTREL(0,450,264,999.4,IF(120,RGB(10,0,0),0));
AAB:=CONST(MAX(ABS(超大单),MAX(ABS(大单),MAX(ABS(中单),ABS(小单)))))*1.5,NODRAW;
DRAWRECTREL(2,CONST(945-(ABS(超大单)*500/AAB)),37,945,IF(CONST(超大单)>0,RGB(255,0,255),RGB(0,50,0)));
DRAWRECTREL(39,CONST(945-(ABS(大单)*500/AAB)),74,945,IF(CONST(大单)>0,RGB(192,17,27),RGB(0,50,0)));
DRAWRECTREL(76,CONST(945-(ABS(中单)*500/AAB)),111,945,IF(CONST(中单)>0,RGB(192,17,27),RGB(0,50,0)));
DRAWRECTREL(113,CONST(945-(ABS(小单)*500/AAB)),148,945,IF(CONST(小单)>0,RGB(192,17,27),RGB(0,50,0)));
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.006,0.9,0,INTPART(超大单)),COLORWHITE;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.043,0.9,0,INTPART(大单)),COLORWHITE;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.080,0.9,0,INTPART(中单)),COLORWHITE;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.117,0.9,0,INTPART(小单)),COLORWHITE;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.008,1,0,'超大单'),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.048,1,0,'大单'),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.086,1,0,'中单'),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.120,1,0,'小单'),COLORYELLOW;
AAC:=CONST(MAX(ABS(净流入),MAX(ABS(近3日流向),ABS(近10日流向))))*1.5,NODRAW;
DRAWRECTREL(153,CONST(945-(ABS(净流入)*500/AAC)),188,945,IF(CONST(净流入)>0,RGB(192,17,27),RGB(0,50,0)));
DRAWRECTREL(190,CONST(945-(ABS(近3日流向)*500/AAC)),225,945,IF(CONST(近3日流向)>0,RGB(192,17,27),RGB(0,50,0)));
DRAWRECTREL(227,CONST(945-(ABS(近10日流向)*500/AAC)),262,945,IF(CONST(近10日流向)>0,RGB(192,17,27),RGB(0,50,0)));
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.155,0.9,0,INTPART(净流入)),COLORWHITE;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.192,0.9,0,INTPART(近3日流向)),COLORWHITE;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.229,0.9,0,INTPART(近10日流向)),COLORWHITE;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.157,1,0,'净 流 入'),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.192,1,0,'三日流向'),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.228,1,0,'十日流向'),COLORYELLOW;
DDZ:=IF(TRADENUM>0,(LARGETRDINNUM-LARGETRDOUTNUM)/TRADENUM*100,0);
DDY:=IF(TRADENUM>0,(TRADEOUTNUM-TRADEINNUM)*100/TRADENUM,0);
DDX:=(LARGEINTRDVOL-LARGEOUTTRDVOL)*100/CAPITAL;
DRAWRECTREL(2,455,88,515,IF(CONST(DDZ)>0,RGB(192,17,27),RGB(0,50,0)));
DRAWRECTREL(89,455,175,515,IF(CONST(DDY)>0,RGB(192,17,27),RGB(0,50,0)));
DRAWRECTREL(176,455,262,515,IF(CONST(DDX)>0,RGB(192,17,27),RGB(0,50,0)));
DRAWTEXT_FIX(1,0.005,0.455,0,STRCAT('大单差分:',CON2STR(DDZ,2))),COLORWHITE;
DRAWTEXT_FIX(1,0.094,0.455,0,STRCAT('涨跌动因:',CON2STR(DDY,2))),COLORWHITE;
DRAWTEXT_FIX(1,0.181,0.455,0,STRCAT('大单动向:',CON2STR(DDX,2))),COLORWHITE;
T1Z:=IF (DDZ>0 AND REF(DDZ,1)<0,1,0);
T2Z:=IF (DDZ>0 AND REF(DDZ,1)>0 AND REF(DDZ,2)<0,2,T1Z);
T3Z:=IF (DDZ>0 AND REF(DDZ,1)>0 AND REF(DDZ,2)>0 AND REF(DDZ,3)<0,3,T2Z);
T4Z:=IF (DDZ>0 AND REF(DDZ,1)>0 AND REF(DDZ,2)>0 AND REF(DDZ,3)>0 AND REF(DDZ,4)<0,4,T3Z);
T5Z:=IF (DDZ>0 AND REF(DDZ,1)>0 AND REF(DDZ,2)>0 AND REF(DDZ,3)>0 AND REF(DDZ,4)>0 AND REF(DDZ,5)<0,5,T4Z);
T6Z:=IF (DDZ>0 AND REF(DDZ,1)>0 AND REF(DDZ,2)>0 AND REF(DDZ,3)>0 AND REF(DDZ,4)>0 AND REF(DDZ,5)>0 AND REF(DDZ,6)<0,6,T5Z);
T7Z:=IF (DDZ>0 AND REF(DDZ,1)>0 AND REF(DDZ,2)>0 AND REF(DDZ,3)>0 AND REF(DDZ,4)>0 AND REF(DDZ,5)>0 AND REF(DDZ,6)>0 AND REF(DDZ,7)<0,7,T6Z);
T8Z:=IF (DDZ>0 AND REF(DDZ,1)>0 AND REF(DDZ,2)>0 AND REF(DDZ,3)>0 AND REF(DDZ,4)>0 AND REF(DDZ,5)>0 AND REF(DDZ,6)>0 AND REF(DDZ,7)>0 AND REF(DDZ,8)<0,8,T7Z);
T9Z:=IF (DDZ>0 AND REF(DDZ,1)>0 AND REF(DDZ,2)>0 AND REF(DDZ,3)>0 AND REF(DDZ,4)>0 AND REF(DDZ,5)>0 AND REF(DDZ,6)>0 AND REF(DDZ,7)>0 AND REF(DDZ,8)>0 AND REF(DDZ,9)<0,9,T8Z);
TZ:=IF (DDZ>0 AND REF(DDZ,1)>0 AND REF(DDZ,2)>0 AND REF(DDZ,3)>0 AND REF(DDZ,4)>0 AND REF(DDZ,5)>0 AND REF(DDZ,6)>0 AND REF(DDZ,7)>0 AND REF(DDZ,8)>0 AND REF(DDZ,9)>0,10,T9Z);
DRAWTEXT_FIX(1,0.064,0.455,0,STRCAT(STRCAT(' ',CON2STR(TZ,0)),' [天] ')),COLORWHITE;
T11:=IF (DDY>0 AND REF(DDY,1)<0,1,0);
T21:=IF (DDY>0 AND REF(DDY,1)>0 AND REF(DDY,2)<0,2,T11);
T31:=IF (DDY>0 AND REF(DDY,1)>0 AND REF(DDY,2)>0 AND REF(DDY,3)<0,3,T21);
T41:=IF (DDY>0 AND REF(DDY,1)>0 AND REF(DDY,2)>0 AND REF(DDY,3)>0 AND REF(DDY,4)<0,4,T31);
T51:=IF (DDY>0 AND REF(DDY,1)>0 AND REF(DDY,2)>0 AND REF(DDY,3)>0 AND REF(DDY,4)>0 AND REF(DDY,5)<0,5,T41);
T61:=IF (DDY>0 AND REF(DDY,1)>0 AND REF(DDY,2)>0 AND REF(DDY,3)>0 AND REF(DDY,4)>0 AND REF(DDY,5)>0 AND REF(DDY,6)<0,6,T51);
T71:=IF (DDY>0 AND REF(DDY,1)>0 AND REF(DDY,2)>0 AND REF(DDY,3)>0 AND REF(DDY,4)>0 AND REF(DDY,5)>0 AND REF(DDY,6)>0 AND REF(DDY,7)<0,7,T61);
T81:=IF (DDY>0 AND REF(DDY,1)>0 AND REF(DDY,2)>0 AND REF(DDY,3)>0 AND REF(DDY,4)>0 AND REF(DDY,5)>0 AND REF(DDY,6)>0 AND REF(DDY,7)>0 AND REF(DDY,8)<0,8,T71);
T91:=IF (DDY>0 AND REF(DDY,1)>0 AND REF(DDY,2)>0 AND REF(DDY,3)>0 AND REF(DDY,4)>0 AND REF(DDY,5)>0 AND REF(DDY,6)>0 AND REF(DDY,7)>0 AND REF(DDY,8)>0 AND REF(DDY,9)<0,9,T81);
TY1:=IF (DDY>0 AND REF(DDY,1)>0 AND REF(DDY,2)>0 AND REF(DDY,3)>0 AND REF(DDY,4)>0 AND REF(DDY,5)>0 AND REF(DDY,6)>0 AND REF(DDY,7)>0 AND REF(DDY,8)>0 AND REF(DDY,9)>0,10,T91);
DRAWTEXT_FIX(1,0.151,0.455,0,STRCAT(STRCAT(' ',CON2STR(TY1,0)),' [天] ')),COLORWHITE;
T1:=IF (DDX>0 AND REF(DDX,1)<0,1,0);
T2:=IF (DDX>0 AND REF(DDX,1)>0 AND REF(DDX,2)<0,2,T1);
T3:=IF (DDX>0 AND REF(DDX,1)>0 AND REF(DDX,2)>0 AND REF(DDX,3)<0,3,T2);
T4:=IF (DDX>0 AND REF(DDX,1)>0 AND REF(DDX,2)>0 AND REF(DDX,3)>0 AND REF(DDX,4)<0,4,T3);
T5:=IF (DDX>0 AND REF(DDX,1)>0 AND REF(DDX,2)>0 AND REF(DDX,3)>0 AND REF(DDX,4)>0 AND REF(DDX,5)<0,5,T4);
T6:=IF (DDX>0 AND REF(DDX,1)>0 AND REF(DDX,2)>0 AND REF(DDX,3)>0 AND REF(DDX,4)>0 AND REF(DDX,5)>0 AND REF(DDX,6)<0,6,T5);
T7:=IF (DDX>0 AND REF(DDX,1)>0 AND REF(DDX,2)>0 AND REF(DDX,3)>0 AND REF(DDX,4)>0 AND REF(DDX,5)>0 AND REF(DDX,6)>0 AND REF(DDX,7)<0,7,T6);
T8:=IF (DDX>0 AND REF(DDX,1)>0 AND REF(DDX,2)>0 AND REF(DDX,3)>0 AND REF(DDX,4)>0 AND REF(DDX,5)>0 AND REF(DDX,6)>0 AND REF(DDX,7)>0 AND REF(DDX,8)<0,8,T7);
T9:=IF (DDX>0 AND REF(DDX,1)>0 AND REF(DDX,2)>0 AND REF(DDX,3)>0 AND REF(DDX,4)>0 AND REF(DDX,5)>0 AND REF(DDX,6)>0 AND REF(DDX,7)>0 AND REF(DDX,8)>0 AND REF(DDX,9)<0,9,T8);
T:=IF (DDX>0 AND REF(DDX,1)>0 AND REF(DDX,2)>0 AND REF(DDX,3)>0 AND REF(DDX,4)>0 AND REF(DDX,5)>0 AND REF(DDX,6)>0 AND REF(DDX,7)>0 AND REF(DDX,8)>0 AND REF(DDX,9)>0,10,T9);
DRAWTEXT_FIX(1,0.238,0.455,0,STRCAT(STRCAT(' ',CON2STR(T,0)),' [天] ')),COLORWHITE;
主力净买量:=(LARGEINTRDVOL-LARGEOUTTRDVOL);
TMP:=LARGEINTRDVOL-LARGEOUTTRDVOL;
主力活跃度:=(LARGEINTRDVOL+LARGEOUTTRDVOL)*10000/(2*FINANCE(7));
主力资金线:=(L2_AMO(0,0)+L2_AMO(1,0)-L2_AMO(0,1)-L2_AMO(1,1))/10000.0;
DRAWRECTREL(2,520,88,580,IF(CONST(主力净买量)>0,RGB(192,17,27),RGB(0,50,0)));
DRAWRECTREL(89,520,175,580,IF(CONST(TMP)>0,RGB(192,17,27),RGB(0,50,0)));
DRAWRECTREL(176,520,262,580,IF(CONST(主力资金线)>0,RGB(192,17,27),RGB(0,50,0)));
DRAWTEXT_FIX(1,0.005,0.525,0,STRCAT('主力净买量:',CON2STR(主力净买量,2))),COLORWHITE;
DRAWTEXT_FIX(1,0.094,0.525,0,STRCAT('主力活跃度:',CON2STR(主力活跃度,2))),COLORWHITE;
DRAWTEXT_FIX(1,0.181,0.525,0,STRCAT('主力资金线:',CON2STR(主力资金线,2))),COLORWHITE;
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=(DIF-DEA)*2;
VAR113:=HHV(HIGH,60);
VAR114:=LLV(LOW,30);
VAR115:=(CLOSE-MA(CLOSE,32))/MA(CLOSE,32)*100;
VAR116:=(VAR113+VAR114+VAR115)/3;
VAR117:=EMA(VAR116,5);
K01:=EMA(VAR117,5)*2, COLORFF00FF;
D01:=EMA(K01,5), COLORWHITE;
J01:=K01*3-D01*2, COLORYELLOW;
ENTERLONG:=CROSS(K01,D01);
EXITLONG:=CROSS(D01,K01);
B01:=(DRAWICON((ZIG(3,5)>REF(ZIG(3,5),1)) AND (REF(ZIG(3,5),1)<=REF(ZIG(3,5),2))
AND (REF(ZIG(3,5),2)<=REF(ZIG(3,5),3)),L*0.98,1))*D01*2/3;
B02:=IF(TROUGHBARS(3,15,1)=1 AND HIGH>LOW+0.01,20,0);
必买:=(B01 AND B02) AND 净流入>0;
必卖:=IF(PEAKBARS(3,15,1)=1,80,100),COLORGREEN,LINETHICK1;
QQ:=必卖=80;
B03:=((ZIG(3,5)>REF(ZIG(3,5),1)) AND (REF(ZIG(3,5),1)<=REF(ZIG(3,5),2)) AND (REF(ZIG(3,5),2)<=REF(ZIG(3,5),3)));
V1:=EMA(CLOSE,60)-EMA(CLOSE,300);
V2:=EMA(V1,300);
V3:=(CLOSE-(LOW,8))/((HIGH,8)-LLV(LOW,8))*100;
V4:=SMA(V3,2,1),NODRAW;
V5:=SMA(V4,2,1),NODRAW;
V6:=CLOSE/REF(CLOSE,3)>=1.1;
V7:=BACKSET(V6,3);
大涨:=(V7 AND COUNT(V7,3)=1);
DRAWICON(必买,L-0.16,11);
DRAWICON(大涨 AND 必买,L-0.16,9);
DRAWICON(大涨,L-0.18,1);
DRAWICON(QQ,H+0.1,6);