DRAWTEXTABS(10,145,'MACD数据运算:'+'DIFF:'+ NUMTOSTRN(DIFF,3)+' DEA:'+ NUMTOSTRN(DEA,3)+' MACD:'+ NUMTOSTRN(MACD,3)+''),colorffff66;
{多时分KDJ}
K:= KDJ.K
D:= KDJ.D
J:= KDJ.J
FZ120K:= KDJ.K#MIN120
FZ60K:= KDJ.K#MIN60
FZ30K:= KDJ.K#MIN30
FZ15K:= KDJ.K#MIN15
FZ120D:= KDJ.D#MIN120
FZ60D:= KDJ.D#MIN60
FZ30D:= KDJ.D#MIN30
FZ15D:= KDJ.D#MIN15
FZ60J:= KDJ.J#MIN60
FZ30J:= KDJ.J#MIN30
FZ15J:= KDJ.J#MIN15
DRAWTEXTABS(10,165,'KDJ-数据运算:'+'K:'+ NUMTOSTRN(K,2)+' D:'+ NUMTOSTRN(D,2)+' J:'+ NUMTOSTRN(J,2)+''),ColorCCCCCC;
DRAWTEXTABS(10,185,'KDJ-拾伍分钟:'+'K:'+ NUMTOSTRN(FZ15K,2)+' D:'+ NUMTOSTRN(FZ15D,2)+' J:'+ NUMTOSTRN(FZ15J,2)+''),Color99ff99;
DRAWTEXTABS(10,205,'KDJ-叁拾分钟:'+'K:'+ NUMTOSTRN(FZ30K,2)+' D:'+ NUMTOSTRN(FZ30D,2)+' J:'+ NUMTOSTRN(FZ30J,2)+''),Color99ff99;
DRAWTEXTABS(10,225,'KDJ-陆拾分钟:'+'K:'+ NUMTOSTRN(FZ60K,2)+' D:'+ NUMTOSTRN(FZ60D,2)+' J:'+ NUMTOSTRN(FZ60J,2)+''),Color99ff99;
{画柱图};
ZDZ:=300/(MAX(ZLDN,ZLDM,TDN,TDM,DDN,DDM,ZDN,ZDM,XDN,XDM,XJ,ZJ,DJ,TJ,ZLJ));
ZLNR:=680-(ZLDN*ZDZ);
ZLMC:=680-(ZLDM*ZDZ);
TNR:=680-(TDN*ZDZ);
TMC:=680-(TDM*ZDZ);
DNR:=680-(DDN*ZDZ);
DMC:=680-(DDM*ZDZ);
ZNR:=680-(ZDN*ZDZ);
ZMC:=680-(ZDM*ZDZ);
XNR:=680-(XDN*ZDZ);
XMC:=680-(XDM*ZDZ);
XJN:=680-(ABS(XJ)*ZDZ);
ZJN:=680-(ABS(ZJ)*ZDZ);
DJN:=680-(ABS(DJ)*ZDZ);
TJN:=680-(ABS(TJ)*ZDZ);
ZLJN:=680-(ABS(ZLJ)*ZDZ);
DRAWRECTREL(560,XNR,580,680,RGB(200,0,0)),COLOR000000,LAYER5;
DRAWRECTREL(580,XMC,600,680,RGB(0,200,0)),COLOR000000,LAYER5;
DRAWRECTREL(600,XJN,620,680,(IF((XJ = 0),RGB(200,0,255),RGB(255,255,0)))),COLOR000000,LAYER5;
DRAWRECTREL(650,ZNR,670,680,RGB(200,0,0)),COLOR000000,LAYER5;
DRAWRECTREL(670,ZMC,690,680,RGB(0,200,0)),COLOR000000,LAYER5;
DRAWRECTREL(690,ZJN,710,680,(IF((ZJ = 0),RGB(200,0,255),RGB(255,255,0)))),COLOR000000,LAYER5;
DRAWRECTREL(740,DNR,760,680,RGB(200,0,0)),COLOR000000,LAYER5;
DRAWRECTREL(760,DMC,780,680,RGB(0,200,0)),COLOR000000,LAYER5;
DRAWRECTREL(780,DJN,800,680,(IF((DJ = 0),RGB(200,0,255),RGB(255,255,0)))),COLOR000000,LAYER5;
DRAWRECTREL(830,TNR,850,680,RGB(200,0,0)),COLOR000000,LAYER5;
DRAWRECTREL(850,TMC,870,680,RGB(0,200,0)),COLOR000000,LAYER5;
DRAWRECTREL(870,TJN,890,680,(IF((TJ = 0),RGB(200,0,255),RGB(255,255,0)))),COLOR000000,LAYER5;
DRAWRECTREL(920,ZLNR,940,680,RGB(200,0,0)),COLOR000000,LAYER5;
DRAWRECTREL(940,ZLMC,960,680,RGB(0,200,0)),COLOR000000,LAYER5;
DRAWRECTREL(960,ZLJN,980,680,(IF((ZLJ = 0),RGB(200,0,255),RGB(255,255,0)))),COLOR000000,LAYER5;
DRAWTEXTREL(520,690,'买入'),COLOR6600FF;
DRAWTEXTREL(520,730,'卖出'),ColorABFF46;
DRAWTEXTREL(520,780,'净买'),COLORFFFFFF;
DRAWTEXTREL(540,580,'散'),COLOR00FF00;
DRAWTEXTREL(540,620,'户'),COLOR00FF00;
DRAWTEXTREL(560,690,NUMTOSTRN(XDN,2)),COLOR6600FF;
DRAWTEXTREL(560,730,NUMTOSTRN(XDM,2)),ColorABFF46;
DRAWTEXTREL(560,780,NUMTOSTRN(XJ,2)),COLOR00FF00;
DRAWTEXTREL(630,580,'中'),ColorFF0000;
DRAWTEXTREL(630,620,'户'),ColorFF0000;
DRAWTEXTREL(650,690,NUMTOSTRN(ZDN,2)),COLOR6600FF;
DRAWTEXTREL(650,730,NUMTOSTRN(ZDM,2)),ColorABFF46;
DRAWTEXTREL(650,780,NUMTOSTRN(ZJ,2)),ColorFF0000;
DRAWTEXTREL(720,580,'大'),COLORFFFF00;
DRAWTEXTREL(720,620,'户'),COLORFFFF00;
DRAWTEXTREL(740,690,NUMTOSTRN(DDN,2)),COLOR6600FF;
DRAWTEXTREL(740,730,NUMTOSTRN(DDM,2)),ColorABFF46;
DRAWTEXTREL(740,780,NUMTOSTRN(DJ,2)),colorCyan;
DRAWTEXTREL(810,580,'特'),COLOR0000FF;
DRAWTEXTREL(810,620,'大'),COLOR0000FF;
DRAWTEXTREL(830,690,NUMTOSTRN(TDN,2)),COLOR6600FF;
DRAWTEXTREL(830,730,NUMTOSTRN(TDM,2)),ColorABFF46;
DRAWTEXTREL(830,780,NUMTOSTRN(TJ,2)),COLORRED;
DRAWTEXTREL(900,580,'主'),color33FFFF;
DRAWTEXTREL(900,620,'力'),color33FFFF;
DRAWTEXTREL(920,690,NUMTOSTRN(ZLDN,2)),COLOR6600FF;
DRAWTEXTREL(920,730,NUMTOSTRN(ZLDM,2)),ColorABFF46;
DRAWTEXTREL(920,780,NUMTOSTRN(ZLJ,2)),coloryellow;
WP:=sum(if(DYNAINFO(23)*close,DYNAINFO(23),0),0)*0.003906;
NP:=sum(if(DYNAINFO(22)*close,DYNAINFO(22),0),0)*0.003906;
ZDL:=(WP-NP)/(NP+WP)*100;
TCL:=(ZLN-ZLM)*VOL/VOL*100;
DRAWTEXTABS(10,65,'主动率:'+ NUMTOSTRN(ZDL,2)+' 通吃率/主力差:'+ NUMTOSTRN(TCL,1)),Color33FF99;
DRAWTEXTABS(10,125,''+'DDX:'+ NUMTOSTRN(DDX,3)+' DDY:'+ NUMTOSTRN(DDY,3)+' DDZ:'+ NUMTOSTRN(DDZ,3)+''),colorccff99;
DRAWTEXTABS(230,125,''+'连红:'+ NUMTOSTRN(LH,0)+' 拾红:'+ NUMTOSTRN(SH,0)+' 廿红:'+ NUMTOSTRN(RSH,0)+' 陆拾红:'+ NUMTOSTRN(LSH,0)+''),color9966FF;
DRAWTEXTABS(345,25,'上涨家数:'+NUMTOSTRN(DYNAINFO(69),0)+' 下跌家数:'+NUMTOSTRN(DYNAINFO(70),0)+' 平盘家数:'+NUMTOSTRN(DYNAINFO(71),0)),colorCC33FF;
DRAWTEXTABS(10,5,'所属:板块/概念/行业/地域:' +BKNAME),Color9DFFFF;
DRAWTEXTABS(220,65,''+'特单差:'+ NUMTOSTRN(TC,1)+' 大单差:'+ NUMTOSTRN(DC,1)+' 中单差:'+ NUMTOSTRN(ZC,1)+' 小单差:'+ NUMTOSTRN(XC,1)+''),Color33FF99;
DRAWTEXTABS(10,45,''+'买入单数:'+ NUMTOSTRN(MRDS,0)+' 卖出单数:'+ NUMTOSTRN(MCDS,0)+' 单数差:'+ NUMTOSTRN(DSC,0)+' 单数比:'+ NUMTOSTRN(DSB,3)),color3399ff;
DRAWTEXTABS(480,45,''+'资金动能:'+ NUMTOSTRN(ZJDN,3)+''),colorCCFFff;
DRAWTEXTABS(10,25,''+'大盘指数:'+ NUMTOSTRN(DPZS,2)+' 大盘最高:'+ NUMTOSTRN(DPZG,2)+' 大盘最低:'+ NUMTOSTRN(DPZD,2)+''),colorffcc66;
DRAWTEXTABS(10,105,'帐号户数:'+NUMTOSTRN(ZHS,0)+'(户)'),color99cccc;
DRAWTEXTABS(140,105,'帐户增减:'+NUMTOSTRN(ZHZJ,0)+'(户)'),color99cccc;
DRAWTEXTABS(260,105,'均户持股:'+NUMTOSTRN(JHCG,0)+'(股)'),color99ccff;
DRAWTEXTABS(380,105,'均户增减:'+NUMTOSTRN(JHCGZJ,0)+'(股)'),color99ccff;
DRAWTEXTABS(370,45,'BBD:'+NUMTOSTRN(ZLJ,2)+'(万)'),ColorCCCCFF;
{五分钟资金趋势}
ZL5:=ZLJ-REF(ZLJ,5);
T5:=TJ-REF(TJ,5);
D5:=DJ-REF(DJ,5);
Z5:=ZJ-REF(ZJ,5);
X5:=XJ-REF(XJ,5);
DRAWTEXTABS(10,85,'五分钟各单净买(万):'+'主力:'+ NUMTOSTRN(ZL5,2)+' 特大:'+ NUMTOSTRN(T5,2)+' 大户:'+ NUMTOSTRN(D5,2)+' 中户:'+ NUMTOSTRN(Z5,2)+' 散户:'+ NUMTOSTRN(X5,2)),colorFFCCCC;
{各单增减比例显示}
DRAWTEXTREL(520,830,'增减'),colorFFFFFF;
DRAWTEXTREL(560,830,NUMTOSTRN(XZ,2)+'%'),COLOR00FF00;
DRAWTEXTREL(650,830,NUMTOSTRN(ZZ,2)+'%'),ColorFF0000;
DRAWTEXTREL(740,830,NUMTOSTRN(DZ,2)+'%'),colorCyan;
DRAWTEXTREL(830,830,NUMTOSTRN(TZ,2)+'%'),COLORRED;
DRAWTEXTREL(920,830,NUMTOSTRN(ZLZ,2)+'%'),coloryellow;
DRAWTEXTREL(520,880,'持仓'),colorFFFFFF;
DRAWTEXTREL(560,880,NUMTOSTRN(SS,2)+'%'),COLOR00FF00;
DRAWTEXTREL(650,880,NUMTOSTRN(ZS,2)+'%'),ColorFF0000;
DRAWTEXTREL(740,880,NUMTOSTRN(DS,2)+'%'),colorCyan;
DRAWTEXTREL(830,880,NUMTOSTRN(CS,2)+'%'),COLORRED;
DRAWTEXTREL(920,880,NUMTOSTRN(ZLS,2)+'%'),color33FFFF;
{分时线}
最新:C,COLORWHITE,LINETHICK1,PRECIS2,LAYER0;
AA:=SUM(AMOUNT,BARSCOUNT(C))/SUM(VOL*100,BARSCOUNT(C));
BB:=BETWEEN(C/AA,C+H,C-H);
均线:IF(BB=0,MA(C,BARSCOUNT(C)),AA),COLOR00FFFF,LINETHICK1,PRECIS2;