DRAWGBK(CLOSE,COLORRGB(10,60,10),COLORRGB(10,60,10),1);
短线:WMA(WINNER(CLOSE)*VOL,13),LINETHICK0,PRECISION2,colorF6B2F5;
中线:WMA(WINNER(CLOSE)*VOL,55),LINETHICK0,PRECISION2,colorFF00;
GDT2:=FINANCE(0);
XXX:=STRTONUM(STRRIGHT(NUMTOSTR(FINANCE(0),0),2));
NN:=IF(XXX>11 OR XXX<3,1,IF(BETWEEN(XXX,2.9,6),4,IF(BETWEEN(XXX,5.9,9),2,4/3)));
ZJ1:=DMA((HIGH+LOW+CLOSE*2)/4,0.9);
ZJ2:=VOL/((HIGH-LOW)*2-(ABS(CLOSE-OPEN)));
ZJ3:=(IF(CLOSE>OPEN,ZJ2*(HIGH-LOW),IF(CLOSE<OPEN,ZJ2*(HIGH-OPEN+CLOSE-LOW),VOL/2)))+(IF(CLOSE>OPEN,-ZJ2*(HIGH-CLOSE+OPEN-LOW),IF(CLOSE<OPEN,-ZJ2*(HIGH-LOW),-VOL/2)));
ZJ4:=ZJ3/20/1.15;
ZJ5:=ZJ4*0.55+REF(ZJ4,1)*0.33+REF(ZJ4,2)*0.22;
ZJ6:=EMA(ZJ5,3);
日流量:ZJ6/10,LINETHICK0,PRECISION2,colorFFFF;
X_L1:=REVERSE((3*CLOSE+2*OPEN+LOW+HIGH)/7)+2*(WMA(WMA((3*CLOSE+2*OPEN+LOW+HIGH)/7,1),5));
激进线:=3*X_L1-2*SMA(X_L1,2,1);
市赢率:CLOSE/(FINANCE(33)*NN),LINETHICK0,PRECISION2,color93B2;
市净率:CLOSE/FINANCE(34),LINETHICK0,PRECISION2,colorFFFFFF;
换手率:IF(CAPITAL=0,VOL/SUM(VOL,100)*100,VOL/FINANCE(7)),LINETHICK0,PRECISION2,colorFF00FF;
涨跌幅:(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100,LINETHICK0,PRECISION2,colorFF;
SJ:=DATACOUNT-SYSPARAM(1);
FC:=VOL;
FOR I=SJ TO DATACOUNT DO BEGIN
XL:=0;
FOR J=0 TO SJ DO BEGIN
XL:=XL+FC[I-J];
END;
MAN:=XL;
END;
HS:=100*XL/CAPITAL;
NN:=SYSPARAM(3)-SYSPARAM(2)+1;
HH:=HHV(VOL,NN);
LL:=LLV(VOL,NN);
最高:=HH[SYSPARAM(3)];
最低:=LL[SYSPARAM(3)];
中:=最低+(最高-最低)*0.3;
B:=DATACOUNT-BARPOS+1;
WB:=(BARSLAST(SYSPARAM(1)=BARPOS))+1;
SVO:=SUMBARS(VOL,CAPITAL);
SVOL:=INTPART(SUM(VOL,0)/CAPITAL);
TJ0:=SVOL>REF(SVOL,1) OR BARSSINCE(CLOSE)=0;
S1:=BARSLAST(TJ0)+1;
TJ2:=S1<REF(S1,1);
S2:=IF(TJ2,REF(S1,1)+1,S1);
S3:=SUM(TJ2,0);
JDJ_1:=INTPART(SUM(VOL,0)/CAPITAL);
JDJ_2:=JDJ_1>REF(JDJ_1,1) OR BARSSINCE(CLOSE)=0;
JDJ_3:=BARSLAST(JDJ_2)+1;
JDJ_4:=JDJ_3<REF(JDJ_3,1);
JDJ_5:=IF(JDJ_4,REF(JDJ_3,1)+1,JDJ_3);
JDJ_6:=SUM(AMOUNT/10000,JDJ_5)*100;
JDJ_7:=SUM(VOL,JDJ_5)*100;
JDJ_8:=JDJ_6/(JDJ_7/100);
平均成本:=COST(50);
STICKLINE(ZJ6>=0,0,VOL,7,1),colorFF;
STICKLINE(ZJ6<=0,0,VOL,7,1),colorFA9800;
STICKLINE(CLOSE>=激进线,0,VOL,7,1),colorFF;
STICKLINE(CLOSE<=激进线,0,VOL,7,1),colorFA9800;
铁底:=MA(LOW,30)*0.85;
STICKLINE(CLOSE<铁底,0,VOL/2,7,0),colorFFFFFF;
PARTLINE(CLOSE,中线),colorFF00;
PARTLINE(CLOSE,短线),colorF6B2F5;
DRAWTEXT(BARPOS=SYSPARAM(1),-中/3,' 倒数: '+NUMTOSTR(B[SYSPARAM(1)],0)+'(天)'+' 倒数换手: '+NUMTOSTR(HS,2)+'(%)'),ALIGN2,colorFFFFFF;
VERTLINE(TJ2),LINEDOT,colorFF00;
DRAWNUMBER(TJ2,0,S3,0),ALIGN5,PXUP20,colorFFFF;
DRAWTEXT(BARPOS=SYSPARAM(2),HIGH,'阶段平均成本:'+NUMTOSTR(JDJ_8[SYSPARAM(1)],2)+' 元'),ALIGN4,colorFFFFFF;
DRAWTEXT(BARPOS=SYSPARAM(2),HIGH,' 市场平均成本:'+NUMTOSTR(平均成本[SYSPARAM(1)],2)+'元'),ALIGN4,colorFFFF00;
DRAWTEXT(BARPOS=SYSPARAM(2),HIGH,' \n第:'+NUMTOSTR(S3[SYSPARAM(1)],0)+'次全换手 '+'第:'+NUMTOSTR(S2[SYSPARAM(1)],0)+'天'),ALIGN4,PXDN8,colorFFFF;
ZW1:=EMA(WINNER(CLOSE)*70,3);
ZW2:=EMA((WINNER(CLOSE*1.1)-WINNER(CLOSE*0.9))*80,3);
ZZLKP:=ZW1/(ZW1+ZW2)*100;
ZSHTL:=ZW2/(ZW1+ZW2)*100;
大盘指数:=FINANCE(7)=0 AND REF(ZSHTL,1)>82 AND ZSHTL<82;
个股:=REF(ZSHTL,1)>90 AND ZSHTL<90;
HD_1:=IF(FINANCE(7)=0,大盘指数,个股);
黑洞距今天数:BARSLAST(HD_1),LINETHICK0,colorFFFF;
VERTLINE(HD_1),LINEDASHDOT,colorFFFF;