NYRS:='1'+STRRIGHT(NUMTOSTR(开始年,0),2)+(IF(开始月>9,NUMTOSTR(开始月,0),'0'+NUMTOSTR(开始月,0)))+(IF(开始日>9,NUMTOSTR(开始日,0),'0'+NUMTOSTR(开始日,0)));
NYRE:='1'+STRRIGHT(NUMTOSTR(结束年,0),2)+(IF(结束月>9,NUMTOSTR(结束月,0),'0'+NUMTOSTR(结束月,0)))+(IF(结束日>9,NUMTOSTR(结束日,0),'0'+NUMTOSTR(结束日,0)));
S1K:=SELFDATA('1K');
S1W:=SELFDATA('1W');
S5W:=SELFDATA('5W');
S10W:=SELFDATA('10W');
S50W:=SELFDATA('50W');
S100W:=SELFDATA('100W');
S500W:=SELFDATA('500W');
S1000W:=SELFDATA('1000W');
S1000WPLUG:=SELFDATA('1000+W');
LTPBD:=SELFDATA('LSTQ');
JG:=SELFDATA('机构持仓');
FR:=SELFDATA('法人持仓');
KPXS:=SELFDATA('控盘系数');
STEP1:=BARSSINCE(DATE>STRTONUM(NYRS));
STEP2:=IF(STRCMP(NUMTOSTR(DATE,0),NYRE)=0,0,BARSSINCE(DATE>STRTONUM(NYRE)));
BLBH_S1K:=REF(S1K,STEP2)-REF(S1K,STEP1);
BLBH_S1W:=REF(S1W,STEP2)-REF(S1W,STEP1);
BLBH_S5W:=REF(S5W,STEP2)-REF(S5W,STEP1);
BLBH_S10W:=REF(S10W,STEP2)-REF(S10W,STEP1);
BLBH_S50W:=REF(S50W,STEP2)-REF(S50W,STEP1);
BLBH_S100W:=REF(S100W,STEP2)-REF(S100W,STEP1);
BLBH_S500W:=REF(S500W,STEP2)-REF(S500W,STEP1);
BLBH_S1000W:=REF(S1000W,STEP2)-REF(S1000W,STEP1);
BLBH_S1000WPLUG:=REF(S1000WPLUG,STEP2)-REF(S1000WPLUG,STEP1);
BLBH_JG:=REF(JG,STEP2)-REF(JG,STEP1);
BLBH_FR:=REF(FR,STEP2)-REF(FR,STEP1);
BLBH_GR:=REF(100-JG-FR,STEP2)-(REF(100-JG-FR,STEP1));
KPXSZD:=REF(KPXS,STEP2)-REF(KPXS,STEP1);
KPJ:=REF(OPEN,STEP1);
SPJ:=REF(CLOSE,STEP2+1);
ZDF:=(SPJ-KPJ)/KPJ*100;
DPKPJ:=REF(INDEXO,STEP1);
DPSPJ:=REF(INDEXC,STEP2+1);
DPZDF:=(DPSPJ-DPKPJ)/DPKPJ*100;
IF STRCMP(NUMTOSTR(DATE,0),NYRE)=0 THEN BEGIN
CJL:=SUM(VOL,STEP1)/1000000;
CJE:=SUM(AMOUNT,STEP1)/100000000;
LJHSL:=SUM(VOL/CAPITAL*100,STEP1);
JJ:=SUM(CLOSE,STEP1)/STEP1;
END;ELSE BEGIN
CJL:=(SUM(VOL,STEP1)-SUM(VOL,STEP2))/1000000;
CJE:=(SUM(AMOUNT,STEP1)-SUM(AMOUNT,STEP2))/100000000;
LJHSL:=SUM(VOL/CAPITAL*100,STEP1)-SUM(VOL/CAPITAL*100,STEP2);
JJ:=(SUM(CLOSE,STEP1)-SUM(CLOSE,STEP2))/(STEP1-STEP2);
END;
ZGJ:=REF(HHV(HIGH,STEP1-STEP2),STEP2);
ZDJ:=REF(LLV(LOW,STEP1-STEP2),STEP2);
ZF:=(ZGJ-ZDJ)/REF(CLOSE,STEP1+1)*100;
DRAWTEXTEX(1,1,2,10,STKLABEL),colorFF;
DRAWTEXTEX(1,1,2,87,'从'),colorFFFF;
DRAWTEXTEX(1,1,2,164,'共'),colorFFFF;
DRAWTEXTEX(1,1,2,241,'开盘价'),colorFFFF;
DRAWTEXTEX(1,1,2,318,'收盘价'),colorFFFF;
DRAWTEXTEX(1,1,2,395,'最高价'),colorFFFF;
DRAWTEXTEX(1,1,2,472,'最低价'),colorFFFF;
DRAWTEXTEX(1,1,2,549,'成交量'),colorFFFF;
DRAWTEXTEX(1,1,2,626,'成交额'),colorFFFF;
DRAWTEXTEX(1,1,2,703,'控盘系数涨跌'),colorFFFF;
DRAWTEXTEX(1,1,2,780,''),colorFFFF;
DRAWTEXTEX(1,1,2,857,''),colorFFFF;
DRAWTEXTEX(1,1,2,934,''),colorFFFF;
DRAWTEXTEX(1,1,150,10,STKNAME),ALIGN2,colorFF;
DRAWTEXTEX(1,1,150,87,NUMTOSTR(开始年,0)+'-'+NUMTOSTR(开始月,0)+'-'+NUMTOSTR(开始日,0)),ALIGN2,colorFFFFFF;
DRAWTEXTEX(1,1,150,164,NUMTOSTR(STEP1-STEP2,0)),ALIGN2,colorFFFFFF;
DRAWTEXTEX(1,1,150,241,NUMTOSTR(KPJ,2)),ALIGN2,colorFFFFFF;
DRAWTEXTEX(1,1,150,318,NUMTOSTR(SPJ,2)),ALIGN2,colorFFFFFF;
DRAWTEXTEX(1,1,150,395,NUMTOSTR(ZGJ,2)),ALIGN2,colorFFFFFF;
DRAWTEXTEX(1,1,150,472,NUMTOSTR(ZDJ,2)),ALIGN2,colorFFFFFF;
DRAWTEXTEX(1,1,150,549,NUMTOSTR(CJL,1)+'亿股'),ALIGN2,colorFFFFFF;
DRAWTEXTEX(1,1,150,626,NUMTOSTR(CJE,1)+'亿元'),ALIGN2,colorFFFFFF;
DRAWTEXTEX(1,1,150,703,NUMTOSTR(KPXSZD,2)+'%'),ALIGN2,colorFFFFFF;
DRAWTEXTEX(1,1,150,780,''),ALIGN2,colorFFFFFF;
DRAWTEXTEX(1,1,150,857,''),ALIGN2,colorFFFFFF;
DRAWTEXTEX(1,1,150,934,''),ALIGN2,colorFFFFFF;
DRAWTEXTEX(1,1,200,10,''),colorFFFF;
DRAWTEXTEX(1,1,200,87,'至'),colorFFFF;
DRAWTEXTEX(1,1,200,164,'个交易日'),colorFFFF;
DRAWTEXTEX(1,1,200,241,'累计换手率'),colorFFFF;
DRAWTEXTEX(1,1,200,318,'流通盘'),colorFFFF;
DRAWTEXTEX(1,1,200,395,'均价'),colorFFFF;
DRAWTEXTEX(1,1,200,472,'振幅'),colorFFFF;
DRAWTEXTEX(1,1,200,549,'涨跌幅'),colorFFFF;
DRAWTEXTEX(1,1,200,626,'同期大盘涨跌'),colorFFFF;
DRAWTEXTEX(1,1,200,703,''),colorFFFF;
DRAWTEXTEX(1,1,200,780,''),colorFFFF;
DRAWTEXTEX(1,1,200,857,''),colorFFFF;
DRAWTEXTEX(1,1,200,934,''),colorFFFF;
DRAWTEXTEX(1,1,400,10,''),colorFFFFFF;
DRAWTEXTEX(1,1,400,87,NUMTOSTR(结束年,0)+'-'+NUMTOSTR(结束月,0)+'-'+NUMTOSTR(结束日,0)),ALIGN2,colorFFFFFF;
DRAWTEXTEX(1,1,400,164,''),ALIGN2,colorFFFFFF;
DRAWTEXTEX(1,1,400,241,NUMTOSTR(LJHSL,2)+'%'),ALIGN2,colorFFFFFF;
DRAWTEXTEX(1,1,400,318,NUMTOSTR(FINANCE(7)/10000,1)+'亿股'),ALIGN2,colorFFFFFF;
DRAWTEXTEX(1,1,400,395,NUMTOSTR(JJ,2)),ALIGN2,colorFFFFFF;
DRAWTEXTEX(1,1,400,472,NUMTOSTR(ZF,2)+'%'),ALIGN2,colorFFFFFF;
DRAWTEXTEX(1,1,400,549,NUMTOSTR(ZDF,2)+'%'),ALIGN2,colorFFFFFF;
DRAWTEXTEX(1,1,400,626,NUMTOSTR(DPZDF,2)+'%'),ALIGN2,colorFFFFFF;
DRAWTEXTEX(1,1,400,703,''),ALIGN2,colorFFFFFF;
DRAWTEXTEX(1,1,400,780,''),ALIGN2,colorFFFFFF;
DRAWTEXTEX(1,1,400,857,''),ALIGN2,colorFFFFFF;
DRAWTEXTEX(1,1,400,934,''),ALIGN2,colorFFFFFF;
DRAWTEXTEX(1,1,560,10,'序号'),colorFFFF;
DRAWTEXTEX(1,1,560,87,'1'),colorFFFF;
DRAWTEXTEX(1,1,560,164,'2'),colorFFFF;
DRAWTEXTEX(1,1,560,241,'3'),colorFFFF;
DRAWTEXTEX(1,1,560,318,'4'),colorFFFF;
DRAWTEXTEX(1,1,560,395,'5'),colorFFFF;
DRAWTEXTEX(1,1,560,472,'6'),colorFFFF;
DRAWTEXTEX(1,1,560,549,'7'),colorFFFF;
DRAWTEXTEX(1,1,560,626,'8'),colorFFFF;
DRAWTEXTEX(1,1,560,703,'9'),colorFFFF;
DRAWTEXTEX(1,1,560,780,'10'),colorFFFF;
DRAWTEXTEX(1,1,560,857,'11'),colorFFFF;
DRAWTEXTEX(1,1,560,934,'12'),colorFFFF;
DRAWTEXTEX(1,1,650,10,'名称'),ALIGN2,colorFFFF;
DRAWTEXTEX(1,1,650,87,'>1000'),ALIGN2,colorFFFF;
DRAWTEXTEX(1,1,650,164,'500'),ALIGN2,colorFFFF;
DRAWTEXTEX(1,1,650,241,'100'),ALIGN2,colorFFFF;
DRAWTEXTEX(1,1,650,318,'50'),ALIGN2,colorFFFF;
DRAWTEXTEX(1,1,650,395,'10'),ALIGN2,colorFFFF;
DRAWTEXTEX(1,1,650,472,'5'),ALIGN2,colorFFFF;
DRAWTEXTEX(1,1,650,549,'1'),ALIGN2,colorFFFF;
DRAWTEXTEX(1,1,650,626,'0.1'),ALIGN2,colorFFFF;
DRAWTEXTEX(1,1,650,703,'0.01'),ALIGN2,colorFFFF;
DRAWTEXTEX(1,1,650,780,'券商基金'),ALIGN2,colorFFFF;
DRAWTEXTEX(1,1,650,857,'法人帐户'),ALIGN2,colorFFFF;
DRAWTEXTEX(1,1,650,934,'个人帐户'),ALIGN2,colorFFFF;
DRAWTEXTEX(1,1,700,10,'人数变化'),colorFFFFFF;
DRAWTEXTEX(1,1,750,87,''),colorFFFFFF;
DRAWTEXTEX(1,1,750,164,''),colorFFFFFF;
DRAWTEXTEX(1,1,750,241,''),colorFFFFFF;
DRAWTEXTEX(1,1,750,318,''),colorFFFFFF;
DRAWTEXTEX(1,1,750,395,''),colorFFFFFF;
DRAWTEXTEX(1,1,750,472,''),colorFFFFFF;
DRAWTEXTEX(1,1,750,549,''),colorFFFFFF;
DRAWTEXTEX(1,1,750,626,''),colorFFFFFF;
DRAWTEXTEX(1,1,750,703,''),colorFFFFFF;
DRAWTEXTEX(1,1,750,780,''),colorFFFFFF;
DRAWTEXTEX(1,1,750,857,''),colorFFFFFF;
DRAWTEXTEX(1,1,750,934,''),colorFFFFFF;
DRAWTEXTEX(1,1,800,10,'数量变化'),colorFFFFFF;
DRAWTEXTEX(1,1,850,87,''),colorFFFFFF;
DRAWTEXTEX(1,1,850,164,''),colorFFFFFF;
DRAWTEXTEX(1,1,850,241,''),colorFFFFFF;
DRAWTEXTEX(1,1,850,318,''),colorFFFFFF;
DRAWTEXTEX(1,1,850,395,''),colorFFFFFF;
DRAWTEXTEX(1,1,850,472,''),colorFFFFFF;
DRAWTEXTEX(1,1,850,549,''),colorFFFFFF;
DRAWTEXTEX(1,1,850,626,''),colorFFFFFF;
DRAWTEXTEX(1,1,850,703,''),colorFFFFFF;
DRAWTEXTEX(1,1,850,780,''),colorFFFFFF;
DRAWTEXTEX(1,1,850,857,''),colorFFFFFF;
DRAWTEXTEX(1,1,850,934,''),colorFFFFFF;
DRAWTEXTEX(1,1,950,10,'比例 |