G:=10;
D:=5;
分时线1:=C;
分时跟踪1:=EMA(分时线1,20);
顶界:DRAWTEXT_FIX(1,0,0.13,0,'~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'),COLORFFCC00;
中界:DRAWTEXT_FIX(1,0,0.48,0,'~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'),COLOR99EEEE;
地界:DRAWTEXT_FIX(1,0,0.85,0,'~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'),COLORGREEN;
MB1:=EMA(顶界,1),COLORGREEN;
MB2:=EMA(地界,1),COLORBLUE;
STICKLINE(分时线1>分时跟踪1,分时线1,分时跟踪1,1,0),COLOR0022FF;
STICKLINE(分时线1<分时跟踪1,分时线1,分时跟踪1,1,0),COLORBLUE;
HHJSJDA:=(3*CLOSE+OPEN+LOW+HIGH)/6;
HHJSJDB:=(20*HHJSJDA+19*REF(HHJSJDA,1)+18*REF(HHJSJDA,2)+17*REF(HHJSJDA,3)+16*REF(HHJSJDA,4)+15*REF(HHJSJDA,5)+14*REF(HHJSJDA,6)
+13*REF(HHJSJDA,7)+12*REF(HHJSJDA,8)+11*REF(HHJSJDA,9)+10*REF(HHJSJDA,10)+9*REF(HHJSJDA,11)+8*REF(HHJSJDA,12)
+7*REF(HHJSJDA,13)+6*REF(HHJSJDA,14)+5*REF(HHJSJDA,15)+4*REF(HHJSJDA,16)+3*REF(HHJSJDA,17)+2*REF(HHJSJDA,18)+
REF(HHJSJDA,20))/210;
HHJSJDC:=MA(HHJSJDB,5);
STICKLINE(HHJSJDB>REF(HHJSJDB,1),LOW,HIGH,0,0),COLOR0099FF;
STICKLINE(HHJSJDB>REF(HHJSJDB,1),CLOSE,OPEN,1,0),COLOR0099FF;
STICKLINE(HHJSJDB<REF(HHJSJDB,1),LOW,HIGH,0,0),COLOR009000;
STICKLINE(HHJSJDB<REF(HHJSJDB,1),CLOSE,OPEN,2,0),COLOR009000;
涨停:=IF(REF(C,1)*1.1-C<0.01 ,1,0);
STICKLINE(涨停,OPEN,CLOSE,3,1),COLORWHITE;
STICKLINE(涨停,OPEN,CLOSE,2,0),COLOR0022FF;
分时线:分时线1,COLORWHITE;
分时跟踪:分时跟踪1,COLORFF00FF,LINETHICK2;
均价:ZSTJJ;
IF(分时线1<均价 AND 分时跟踪1<均价,均价,DRAWNULL),COLORGREEN;
DRAWTEXT_FIX(1,0.00,0.0,0,'自定:')COLOR00FFFF;
DRAWTEXT_FIX(1,0.03,0.0,0,ZDBLOCK)COLOR00FFFF;
DRAWTEXT_FIX(1,0.00,0.06,0,'行业:')COLORRED;
DRAWTEXT_FIX(1,0.03,0.06,0,HYBLOCK)COLORRED;
DRAWTEXT_FIX(1,0.00,0.12,0,'概念:')COLOR80FF00;
DRAWTEXT_FIX(1,0.03,0.12,0,GNBLOCK)COLOR80FF00;
J1:CLOSE,COLORWHITE,NODRAW;
X_111:=ZSTJJ;
X_21:=SUM(CLOSE*VOL,0)/SUM(VOL,0);
J4:=SUM(CLOSE*VOL,240)/SUM(VOL,240),COLORYELLOW;
X_31:=SUM(CLOSE*VOL,240)/SUM(VOL,240);
X_41:=CLOSE>REF(CLOSE,1) AND CLOSE/X_21>1+G/1000;
X_5:=CLOSE<REF(CLOSE,1) AND CLOSE/X_21<1-D/1000;
X_6:=CROSS(SUM(X_41,0),0.5);
X_7:=CROSS(SUM(X_5,0),0.5);
X_8:=SUM(X_6,0)*CROSS(COUNT(CLOSE<REF(CLOSE,1),BARSLAST(X_6)),0.5);
X_9:=SUM(X_7,0)*CROSS(COUNT(CLOSE>REF(CLOSE,1),BARSLAST(X_7)),0.5);
F1:=CONST(SUM(IF(X_8,REF(CLOSE,1),DRAWNULL),0)),DOTLINE,COLORYELLOW;
F2:=CONST(SUM(IF(X_9,REF(CLOSE,1),DRAWNULL),0)),DOTLINE,COLORGREEN;
X_10:=CROSS(SUM(X_41 AND CLOSE>F1*1.005,0),0.5);
X_11:=CROSS(SUM(X_5 AND CLOSE<F2*0.985,0),0.5);
X_12:=SUM(X_10,0)*CROSS(COUNT(CLOSE<REF(CLOSE,1),BARSLAST(X_10)),0.5);
X_13:=SUM(X_11,0)*CROSS(COUNT(CLOSE>REF(CLOSE,1),BARSLAST(X_11)),0.5);
F3:=CONST(SUM(IF(X_12,REF(CLOSE,1),DRAWNULL),0)),COLORWHITE;
F4:=CONST(SUM(IF(X_13,REF(CLOSE,1),DRAWNULL),0)),COLORGREEN;
DRAWICON(X_8,REF(HIGH*1.002,1),35);
DRAWICON(X_12,REF(HIGH*1.002,1),35);
DRAWICON(X_9,REF(CLOSE*0.998,1),34);
DRAWICON(X_13,REF(CLOSE*0.998,1),34);
H1:=MAX(DYNAINFO(3),DYNAINFO(5));
L1:=MIN(DYNAINFO(3),DYNAINFO(6));
P1:=H1-L1;
阻力:L1+P1*8/9,COLORRED,DOTLINE;
支撑:L1+P1*0.5/9,COLORGREEN,DOTLINE;
XX:=SUM(AMOUNT,BARSCOUNT(CLOSE))/SUM(V*100,BARSCOUNT(CLOSE));
主力:=EXPMA(CLOSE/XX,20);大户:=EXPMA(CLOSE/XX,60);散户:=EXPMA(CLOSE/XX,120);
底:=1;1.022,NODRAW;高:=1.033;
DRAWTEXT(CROSS(主力,1.02),C*0.999,' 拉'),COLORMAGENTA;
DRAWICON(CROSS(主力,1.04),C,45);
DRAWTEXT(CROSS(主力,1.04),C*0.999,' 冲'),COLORRED;
A1:=(VOL/CLOSE)/3;
A2:=SUM((IF(((A1>40) AND (CLOSE>(REF(CLOSE,1)))),A1,0)),0);
A3:=SUM((IF(((A1>40) AND (CLOSE<(REF(CLOSE,1)))),A1,0)),0);
A4:=SUM((IF(((A1<40) AND (CLOSE>(REF(CLOSE,1)))),A1,0)),0);
A5:=SUM((IF(((A1<40) AND (CLOSE<(REF(CLOSE,1)))),A1,0)),0);
A6:=((A2+A3)+A4)+A5;
A7:=IF((BARSTATUS=2),((100*A2)/A6),0);
A8:=((IF((BARSTATUS=2),((100*A3)/A6),0)));
A9:=((IF((BARSTATUS=2),((100*A4)/A6),0)));
A10:=((IF((BARSTATUS=2),((100*A5)/A6),0)));
DRAWTEXT(LONGCROSS(支撑,C,2),C-0.01,' 买入'),COLOR0000FF;
DRAWICON(LONGCROSS(支撑,C,2),C-0.01,1);
{STICKLINE(LONGCROSS(支撑,C,2),C,阻力,0,-1),COLORCYAN;}
DRAWTEXT(LONGCROSS(C,阻力,2),C+0.01,' 卖出'),COLORGREEN;
DRAWICON(LONGCROSS(C,阻力,2),C+0.01,45);
{STICKLINE(LONGCROSS(C,阻力,2),C,支撑,0,-1),COLORRED;}
量价:=(VOL/CLOSE)/3;
B21:=SUM((IF(((量价>0.20) AND (CLOSE>(REF(CLOSE,1)))),量价,0)),0);
B31:=SUM((IF(((量价>0.20) AND (CLOSE<(REF(CLOSE,1)))),量价,0)),0);
B6:=B21+B31;DD1:=1;比:=B21/B31;
WA1:=V*C/100;
WA2:=SUM((IF(((WA1/8>20) AND (CLOSE>(REF(CLOSE,1)))),WA1,0)),0);
WA3:=SUM((IF(((WA1/8>20) AND (CLOSE<(REF(CLOSE,1)))),WA1,0)),0);
WA4:=SUM((IF(((WA1/8<20) AND (CLOSE>(REF(CLOSE,1)))),WA1,0)),0);
WA5:=SUM((IF(((WA1/8<20) AND (CLOSE<(REF(CLOSE,1)))),WA1,0)),0);
WA6:=((A2+A3)+A4)+A5;
WA7:=IF((ISLASTBAR),((100*WA2)/WA6),0);
WA8:=IF((ISLASTBAR),((100*WA3)/WA6),0);
WA9:=IF((ISLASTBAR),((100*WA4)/WA6),0);
WA10:=IF((ISLASTBAR),((100*WA5)/WA6),0);
机构买盘:=(WA2);
机构卖盘:=(WA3);
机构买卖差:=机构买盘-机构卖盘;
散户买盘:=(WA4);
散户卖盘:=(WA5);
散户买卖差:=散户买盘-散户卖盘;
DRAWTEXT_FIX(1,0.602,0,0,STRCAT(STRCAT('【机构差额】',CON2STR(机构买卖差,2)),' 万')),COLORRED;
DRAWTEXT_FIX(1,0.823,0,0,STRCAT(STRCAT('【散户差额】',CON2STR(散户买卖差,2)),' 万')),COLORMAGENTA;