QWX1:=HHV(CLOSE,30);
QWX2:=LLV(CLOSE,30);
QWX3:=CONST((QWX1+QWX2)/2);
QWX4:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20);
QWX5:=CONST((1-7/100)*(DMA(CLOSE,QWX4)));
QWX6:=CONST((1+7/100)*(DMA(CLOSE,QWX4)));
{KDJ}
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
KX:=SMA(RSV,3,1);
DX:=SMA(KX,3,1);
JX:=3*KX-2*DX;
{MACD}
DIF:=(EMA(CLOSE,12)-EMA(CLOSE,26))*2+QWX3,COLORWHITE;
DEA:=EMA(DIF,9),COLORYELLOW;
MCD:=(DIF-DEA)*2+QWX3;
DRAWBAND(MCD,RGB(120,0,100),QWX3,RGB(60,100,50));
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
牛熊线:(EMA(CLOSE,30)+EMA(CLOSE,72))/2,LINETHICK2,COLORGREEN;
M5:MA(CLOSE,N),COLORWHITE;
M10:MA(CLOSE,M1),COLORYELLOW;
M20:MA(CLOSE,M2),COLORFF00FF;
VAR1:=IF(CLOSE>OPEN,CLOSE,OPEN);
VAR2:=MEMA(CLOSE,5);
VAR3:=ATAN((VAR2/REF(VAR2,1)-1)*100);
VAR4:=IF(VAR3>0,VAR3,VAR3);
VAR5:=(CLOSE/REF(CLOSE,1)-1)*100;
VAR6:=VAR5<1.5 AND VAR5>-1.5;
今日之升★:LAST(VAR6,4,1) AND VAR5>2 AND VOL>REF(VOL,1),NODRAW,COLORYELLOW;
DRAWTEXT(今日之升★,L/1.01,'★'),COLORYELLOW;
强势:IF(VAR4>=REF(VAR4,1) AND VAR4>=0,M10,DRAWNULL),COLORRED,LINETHICK2;
整理:IF(VAR4<REF(VAR4,1) AND VAR4>0,M10,DRAWNULL),COLORGREEN,LINETHICK2;
支撑:IF(BARSLAST(CURRBARSCOUNT=5),QWX5,DRAWNULL),COLORCYAN;
阻力:IF(BARSLAST(CURRBARSCOUNT=5),QWX6,DRAWNULL),COLORYELLOW;
{柱型显示}
STICKLINE(CLOSE>REF(CLOSE,1)*1.0985 AND CLOSE=HIGH,CLOSE,OPEN,4,-1),COLOR00FFFF;
STICKLINE(CLOSE<REF(CLOSE,1)*0.9015 AND CLOSE=LOW,CLOSE,OPEN,4,-1),COLORGREEN;
{蓝}
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,3,0),COLORFF7700;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,2.2,0),COLORFF9900;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,1.5,0),COLORFFBB00;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,0.5,0),COLORCYAN;
{红}
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3,0),COLOR000099;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2.2,0),COLOR0000CC;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1.5,0),COLOR0000FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0.5,0),COLORCC66FF;
{绿}
STICKLINE(CROSS(M5,EMA(C,3)),VAR1,(OPEN+CLOSE)/2,3,0),COLOR009900;
STICKLINE(CROSS(M5,EMA(C,3)),VAR1,(OPEN+CLOSE)/2,2.2,0),COLOR00BB00;
STICKLINE(CROSS(M5,EMA(C,3)),VAR1,(OPEN+CLOSE)/2,1.5,0),COLOR00DD00;
STICKLINE(CROSS(M5,EMA(C,3)),VAR1,(OPEN+CLOSE)/2,0.5,0),COLOR00FF00;
{灰}
STICKLINE(CROSS(EMA(C,3),M5),OPEN,(OPEN+CLOSE)/2,3,0),COLOR999999;
STICKLINE(CROSS(EMA(C,3),M5),OPEN,(OPEN+CLOSE)/2,2.2,0),COLORBBBBBB;
STICKLINE(CROSS(EMA(C,3),M5),OPEN,(OPEN+CLOSE)/2,1.5,0),COLORDDDDDD;
STICKLINE(CROSS(EMA(C,3),M5),OPEN,(OPEN+CLOSE)/2,0.5,0),COLORFFFFFF;
STICKLINE(CROSS(JX,DX),OPEN,CLOSE,0.5,0),COLORYELLOW;
STICKLINE(CROSS(DX,JX),OPEN,CLOSE,0.5,0),COLOR000099;
大单动向:="DDX.大单动向#DAY",NODRAW;
DRAWTEXT_FIX(1,0.537,0.99,0,'DDX:'),COLORWHITE;
DRAWNUMBER_FIX(1,0.577,0.99,0,CONST(大单动向)),COLORRED;
涨跌动因:="DDY.涨跌动因#DAY",NODRAW;
DRAWTEXT_FIX(1,0.637,0.99,0,'DDY:'),COLORWHITE;
DRAWNUMBER_FIX(1,0.677,0.99,0,CONST(涨跌动因)),COLORRED;
大单差分:="DDZ.大单差分#DAY",NODRAW;
DRAWTEXT_FIX(1,0.737,0.99,0,'DDZ:'),COLORWHITE;
DRAWNUMBER_FIX(1,0.777,0.99,0,CONST(大单差分)),COLORRED;
超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))-20,30,950,IF(CONST(大宗进>0),RGB(255,0,0),RGB(23,125,255)));
DRAWRECTREL(32,CONST(950-(ABS(大宗出)*250/DAZHIV))-20,62,950,IF(CONST(大宗出>0),RGB(23,125,255),RGB(255,0,0)));
DRAWRECTREL(92,CONST(950-(ABS(非大宗进)*250/DAZHIV))-20,122,950,IF(CONST(非大宗进>0),RGB(255,0,0),RGB(23,125,255)));
DRAWRECTREL(124,CONST(950-(ABS(非大宗出)*250/DAZHIV))-20,154,950,IF(CONST(非大宗出>0),RGB(23,125,255),RGB(255,0,0)));
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.015,1,0,'主力进出'),COLORMAGENTA;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.107,1,0,'散户进出'),COLORCYAN;
主买A:=ACTINVOL,COLORRED,NODRAW;
主卖A:=ACTOUTVOL,COLORGREEN,NODRAW;
主买:=主买A*100/(主买A+主卖A),NODRAW,COLORRED;
主卖:=主卖A*100/(主买A+主卖A),NODRAW,COLORGREEN;
SAT:=(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20));
【量能饱和】:=IF(SAT>1,1,SAT)*100,COLORYELLOW,NODRAW;
主力净买量:=(LARGEINTRDVOL-LARGEOUTTRDVOL),COLORYELLOW,NODRAW;
大宗净流入:=(超B+大B)-(超S+大S),COLORRED,NODRAW;
主动买卖差:=(ACTINVOL-ACTOUTVOL),COLORMAGENTA,NODRAW;
主力资金差:=((L2_AMO(0,0)+L2_AMO(1,0)-L2_AMO(0,1)-L2_AMO(1,1)))/10000,COLORCYAN,NODRAW;
DRAWRECTREL(100,0,90+CONST(主买*300/100),40,RGB(230,65,0));
DRAWRECTREL(100,60,90+CONST(主卖*300/100),100,RGB(0,104,0));
DRAWRECTREL(100,120,390,160,RGB(0,0,100));
DRAWRECTREL(100,120,90+CONST(【量能饱和】*300/100),160,RGB(250,104,0));
DRAWTEXT_FIX(1,0.005,0.01,0,STRCAT(STRCAT('【主买比】: ',CON2STR(主买,1)),' % ')),COLORYELLOW;
DRAWTEXT_FIX(1,0.005,0.07,0,STRCAT(STRCAT('【主卖比】: ',CON2STR(主卖,1)),' % ')),COLORGREEN;
DRAWTEXT_FIX(1,0.005,0.13,0,STRCAT(STRCAT('【量能饱和】: ',CON2STR(【量能饱和】,1)),' % ')),COLORYELLOW;
DRAWTEXT_FIX(1,0.005,0.19,0,STRCAT(STRCAT('【主力资金差】: ',CON2STR(主力资金差,1)),' 万元 ')),COLORYELLOW;
DRAWTEXT_FIX(1,0.2,0.19,0,STRCAT(STRCAT('【大宗净流入】: ',CON2STR(大宗净流入,1)),' 万元 ')),COLORYELLOW;
DRAWTEXT_FIX(1,0.005,0.25,0,STRCAT(STRCAT('【主力净买量】: ',CON2STR(主力净买量,1)),' 手')),COLORYELLOW;
DRAWTEXT_FIX(1,0.2,0.25,0,STRCAT(STRCAT('【主动买卖差】: ',CON2STR(主动买卖差,1)),' 手')),COLORYELLOW;
VAR31:=CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2);
VAR32:=REF(VAR31,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR33:=REF(VAR32,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR34:=REF(VAR33,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR35:=REF(VAR34,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR36:=REF(VAR35,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR37:=REF(VAR36,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR38:=REF(VAR37,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR39:=REF(VAR38,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VARA:=REF(VAR39,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);
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);
VAR110:=REF(VARF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR111:=REF(VAR110,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR112:=REF(VAR111,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR113:=REF(VAR112,1) AND CLOSE<=REF(C |