LC:=REF(CLOSE,1);
WRSI:=SMA(MAX(CLOSE-LC,0),5,1)/SMA(ABS(CLOSE-LC),5,1)*100;
WR10:=(HHV(HIGH,3)-CLOSE)/(HHV(HIGH,3)-LLV(LOW,3))*100;
活跃:=(WRSI-WR10);
活跃度比:=IF(活跃>=0,(活跃+100)/2,100-ABS((活跃-100)/2));
DRAWTEXT_FIX(1,0.20,0.25,1,STRCAT(STRCAT('活跃:',CON2STR(活跃度比,2)),'%')),COLORCYAN;
HSL:=IF((SETCODE==0||SETCODE==1),100*VOL,VOL)/(FINANCE(7)/100);
攻击量:=((HSL*0.50+REF(HSL,1)*0.33)+(REF(HSL,2)*0.17))*SUM(C,FROMOPEN)/FROMOPEN;
攻击量A:=SUM(IF(C>REF(C,1),攻击量*V,0),FROMOPEN),COLOR0000FF,LINETHICK0;
攻击量B:=-SUM(IF(C<REF(C,1),攻击量*V,0),FROMOPEN),COLOR00FF00,LINETHICK0;
攻击流量:=攻击量A+攻击量B,COLORSTICK;
攻击比:=攻击流量/SUM(V,FROMOPEN)*100,COLORRED,LINETHICK1;
资金攻击度:=IF(攻击比>=0,(攻击比+50),100-ABS((攻击比-50))) ,COLORYELLOW;
资金流入:=SUM(IF(C>REF(C,1),V,0),FROMOPEN),STICK,COLORRED;
资金流出:=-SUM(IF(C<REF(C,1),V,0),FROMOPEN),STICK,COLOR00FF00;
资金出入:=资金流入+资金流出,COLORSTICK;
资金比:=资金出入/SUM(V,FROMOPEN)*100,COLOR00FFFF,LINETHICK1;
资金流量比:=IF(资金比>=0,(资金比+100)/2,100-ABS((资金比-100)/2));
{DRAWTEXT_FIX(1,0.550,0.75,0,STRCAT(STRCAT('流量比',CON2STR(资金流量比,2)),'%买')),COLORCYAN;}
DRAWTEXT_FIX(1,0.10,0.10,0,STRCAT(STRCAT('资金攻击度 ',CON2STR(资金攻击度,2)),' ')),COLORYELLOW;
STICKLINE((资金攻击度>100)AND TIME<=0935,L,L*999999999,2,0),COLORYELLOW,LINETHICK2;
CJL:=IF(DYNAINFO(10)>99999999,STRCAT(CON2STR(DYNAINFO(10)/100000000,2)<10,'亿'),STRCAT(CON2STR(DYNAINFO(10)/10000,0),'万'));
DRAWTEXT_FIX(01,0.01,0.01.0,0,CJL),COLOR0099FF;
ZJJ:=REF(AMOUNT/V/100,1);
{STICKLINE(C>ZJJ,C,ZJJ,0.5,0),COLORYELLOW;}
K:=(REF(H,1)-REF(L,1))/2;
买1:=REF(C,1)-1.5*K AND TIME=0931 ,COLORWHITE;
STICKLINE((买1),L,L*999999999,2,0),COLORCYAN;
买2:=REF(C,1)-K,COLORWHITE;
买3:=REF(C,1)-K/2,COLORWHITE;
昨均价:=ZJJ,COLORRED,LINETHICK3;
昨收:=REF(C,1),COLORYELLOW,LINETHICK2;
KK:=REF(H,1)-REF(L,1);
卖1:=REF(C,1)+KK,COLORGREEN;
卖2:=IF((REF(C,1)+KK*2)<1.1*REF(C,1),REF(C,1)+KK*2,卖1),COLORGREEN;
卖3:=IF((REF(C,1)+KK*3)<1.1*REF(C,1),REF(C,1)+KK*3,卖2),COLORGREEN;
卖4:=IF((REF(C,1)+KK*4)<1.1*REF(C,1),REF(C,1)+KK*4,卖3),COLORGREEN;
十赢概率:=COUNT(C>ZJJ,10),NODRAW,COLORRED;
十叉概率:=COUNT(H>卖1,10),NODRAW,COLORRED;
{STICKLINE(C>=O,L,H,0,0),COLORRED;
STICKLINE(C<O,L,H,0,0),COLORCYAN;}
DRAWTEXT(ISLASTBAR,卖1,' 卖1'),COLORWHITE;
DRAWTEXT(ISLASTBAR,卖2,' 卖2'),COLORWHITE;
DRAWTEXT(ISLASTBAR,卖3,' 卖3'),COLORWHITE;
DRAWTEXT(ISLASTBAR,卖4,' 卖4'),COLORWHITE;
{DRAWTEXT(ISLASTBAR,昨均价*1.006,' 昨均价'),COLORRED;
DRAWTEXT(ISLASTBAR,昨收*1.006,' 昨收'),COLORYELLOW;}
DRAWTEXT(ISLASTBAR,买1,' 买1'),COLORWHITE;
DRAWTEXT(ISLASTBAR,买2,' 买2'),COLORWHITE;
DRAWTEXT(ISLASTBAR,买3,' 买3'),COLORWHITE;
DRAWNUMBER(ISLASTBAR,卖1,卖1),COLORWHITE;
DRAWNUMBER(ISLASTBAR,卖2,卖2),COLORWHITE;
DRAWNUMBER(ISLASTBAR,卖3,卖3),COLORWHITE;
DRAWNUMBER(ISLASTBAR,卖4,卖4),COLORWHITE;
{DRAWNUMBER(ISLASTBAR,昨均价*1.01,昨均价),COLORGREEN;
DRAWNUMBER(ISLASTBAR,昨收*1.01,昨收),COLORGREEN;}
DRAWNUMBER(ISLASTBAR,买1,买1),COLORWHITE;
DRAWNUMBER(ISLASTBAR,买2,买2),COLORWHITE;
DRAWNUMBER(ISLASTBAR,买3,买3),COLORWHITE;
A1:=C>REF(C,4);
A2:=BARSLASTCOUNT(A1);
A3:=REF(A2,1)=8 AND A2>REF(A2,1);
A4:=REF(BETWEEN(A2,5,8),1) AND A2<REF(A2,1);
A5:=ISLASTBAR AND BETWEEN(A2,6,8);
A6:=(BACKSET(A3>0,9) OR BACKSET(A4>0,A2+1)*0 OR BACKSET(A5>0,A2))*A2;
DRAWTEXT(A6>0,H+H*0.02,VAR2STR(A6,0)),COLORFF00FF{COLOR00FFFF};
DRAWTEXT(A2=9,H+H*0.02,'9'),COLOR00FF00;
B1:=C<REF(C,4);
B2:=BARSLASTCOUNT(B1);
B3:=REF(B2,1)=8 AND B2>REF(B2,1);
B4:=REF(BETWEEN(B2,5,8),1) AND B2<REF(B2,1);
B5:=ISLASTBAR AND BETWEEN(B2,6,8);
B6:=(BACKSET(B3>0,9) OR BACKSET(B4>0,B2+1)*0 OR BACKSET(B5>0,B2))*B2;
DRAWTEXT(B6>0,L-L*0.02,VAR2STR(B6,0)),COLOR00FF00{COLORFFFFFF};
DRAWTEXT(B2=9,L-L*0.02,'9'),COLORFF00FF;