首先建立一个“涨幅引用”的引用公式后再建立“版块涨幅”
-----------------------------------------------------
{涨幅引用}
A:动态行情(14);
AA:(收盘价/向前引用(收盘价,1)-1)*100;
-----------------------------------------------------
{★版块涨幅★}
DRAWTEXTEX(STKINDI('1A0001','涨幅引用.A',0,-1)>0,1,0,0,'上证涨幅:'+NUMTOSTR(STKINDI('1A0001','涨幅引用.A',0,-1)*100,2)+'%'),Colorred;
DRAWTEXTEX(STKINDI('1A0001','涨幅引用.A',0,-1)<0,1,0,0,'上证涨幅:'+NUMTOSTR(STKINDI('1A0001','涨幅引用.A',0,-1)*100,2)+'%'),COLORGRAY;
DRAWTEXTEX(STKINDI('AA01','涨幅引用.A',0,-1)>=0,1,0,150,'工程建筑:'+NUMTOSTR(STKINDI('AA01','涨幅引用.A',0,-1)*100,2)+'%'),Colorred;
DRAWTEXTEX(STKINDI('AA01','涨幅引用.A',0,-1)<0,1,0,150,'工程建筑:'+NUMTOSTR(STKINDI('AA01','涨幅引用.A',0,-1)*100,2)+'%'),COLORGRAY;
DRAWTEXTEX(STKINDI('AA02','涨幅引用.A',0,-1)>=0,1,0,300,'电力指数:'+NUMTOSTR(STKINDI('AA02','涨幅引用.A',0,-1)*100,2)+'%'),Colorred;
DRAWTEXTEX(STKINDI('AA02','涨幅引用.A',0,-1)<0,1,0,300,'电力指数:'+NUMTOSTR(STKINDI('AA02','涨幅引用.A',0,-1)*100,2)+'%'),COLORGRAY;
DRAWTEXTEX(STKINDI('AA03','涨幅引用.A',0,-1)>=0,1,0,450,'计算机类:'+NUMTOSTR(STKINDI('AA03','涨幅引用.A',0,-1)*100,2)+'%'),Colorred;
DRAWTEXTEX(STKINDI('AA03','涨幅引用.A',0,-1)<0,1,0,450,'计算机类:'+NUMTOSTR(STKINDI('AA03','涨幅引用.A',0,-1)*100,2)+'%'),COLORGRAY;
DRAWTEXTEX(STKINDI('AA04','涨幅引用.A',0,-1)>=0,1,0,600,'电子信息:'+NUMTOSTR(STKINDI('AA04','涨幅引用.A',0,-1)*100,2)+'%'),Colorred;
DRAWTEXTEX(STKINDI('AA04','涨幅引用.A',0,-1)<0,1,0,600,'电子信息:'+NUMTOSTR(STKINDI('AA04','涨幅引用.A',0,-1)*100,2)+'%'),COLORGRAY;
DRAWTEXTEX(STKINDI('AA05','涨幅引用.A',0,-1)>=0,1,0,750,'地产指数:'+NUMTOSTR(STKINDI('AA05','涨幅引用.A',0,-1)*100,2)+'%'),Colorred;
DRAWTEXTEX(STKINDI('AA05','涨幅引用.A',0,-1)<0,1,0,750,'地产指数:'+NUMTOSTR(STKINDI('AA05','涨幅引用.A',0,-1)*100,2)+'%'),COLORGRAY;
DRAWTEXTEX(STKINDI('AA06','涨幅引用.A',0,-1)>=0,1,0,900,'纺织服装:'+NUMTOSTR(STKINDI('AA06','涨幅引用.A',0,-1)*100,2)+'%'),Colorred;
DRAWTEXTEX(STKINDI('AA06','涨幅引用.A',0,-1)<0,1,0,900,'纺织服装:'+NUMTOSTR(STKINDI('AA06','涨幅引用.A',0,-1)*100,2)+'%'),COLORGRAY;
DRAWTEXTEX(STKINDI('AA07','涨幅引用.A',0,-1)>=0,1,200,0,'钢铁指数:'+NUMTOSTR(STKINDI('AA07','涨幅引用.A',0,-1)*100,2)+'%'),Colorred;
DRAWTEXTEX(STKINDI('AA07','涨幅引用.A',0,-1)<0,1,200,0,'钢铁指数:'+NUMTOSTR(STKINDI('AA07','涨幅引用.A',0,-1)*100,2)+'%'),COLORGRAY;
DRAWTEXTEX(STKINDI('AA08','涨幅引用.A',0,-1)>=0,1,200,150,'供水供气:'+NUMTOSTR(STKINDI('AA08','涨幅引用.A',0,-1)*100,2)+'%'),Colorred;
DRAWTEXTEX(STKINDI('AA08','涨幅引用.A',0,-1)<0,1,200,150,'供水供气:'+NUMTOSTR(STKINDI('AA08','涨幅引用.A',0,-1)*100,2)+'%'),COLORGRAY;
DRAWTEXTEX(STKINDI('AA09','涨幅引用.A',0,-1)>=0,1,200,300,'化工化纤:'+NUMTOSTR(STKINDI('AA09','涨幅引用.A',0,-1)*100,2)+'%'),Colorred;
DRAWTEXTEX(STKINDI('AA09','涨幅引用.A',0,-1)<0,1,200,300,'化工化纤:'+NUMTOSTR(STKINDI('AA09','涨幅引用.A',0,-1)*100,2)+'%'),COLORGRAY;
DRAWTEXTEX(STKINDI('AA10','涨幅引用.A',0,-1)>=0,1,200,450,'电器指数:'+NUMTOSTR(STKINDI('AA10','涨幅引用.A',0,-1)*100,2)+'%'),Colorred;
DRAWTEXTEX(STKINDI('AA10','涨幅引用.A',0,-1)<0,1,200,450,'电器指数:'+NUMTOSTR(STKINDI('AA10','涨幅引用.A',0,-1)*100,2)+'%'),COLORGRAY;
DRAWTEXTEX(STKINDI('AA11','涨幅引用.A',0,-1)>=0,1,200,600,'银hang金融:'+NUMTOSTR(STKINDI('AA11','涨幅引用.A',0,-1)*100,2)+'%'),Colorred;
DRAWTEXTEX(STKINDI('AA11','涨幅引用.A',0,-1)<0,1,200,600,'银hang金融:'+NUMTOSTR(STKINDI('AA11','涨幅引用.A',0,-1)*100,2)+'%'),COLORGRAY;
DRAWTEXTEX(STKINDI('AA12','涨幅引用.A',0,-1)>=0,1,200,750,'煤炭石油:'+NUMTOSTR(STKINDI('AA12','涨幅引用.A',0,-1)*100,2)+'%'),Colorred;
DRAWTEXTEX(STKINDI('AA12','涨幅引用.A',0,-1)<0,1,200,750,'煤炭石油:'+NUMTOSTR(STKINDI('AA12','涨幅引用.A',0,-1)*100,2)+'%'),COLORGRAY;
DRAWTEXTEX(STKINDI('AA13','涨幅引用.A',0,-1)>=0,1,200,900,'酿酒食品:'+NUMTOSTR(STKINDI('AA13','涨幅引用.A',0,-1)*100,2)+'%'),Colorred;
DRAWTEXTEX(STKINDI('AA13','涨幅引用.A',0,-1)<0,1,200,900,'酿酒食品:'+NUMTOSTR(STKINDI('AA13','涨幅引用.A',0,-1)*100,2)+'%'),COLORGRAY;
DRAWTEXTEX(STKINDI('AA14','涨幅引用.A',0,-1)>=0,1,400,0,'农林牧渔:'+NUMTOSTR(STKINDI('AA14','涨幅引用.A',0,-1)*100,2)+'%'),Colorred;
DRAWTEXTEX(STKINDI('AA14','涨幅引用.A',0,-1)<0,1,400,0,'农林牧渔:'+NUMTOSTR(STKINDI('AA14','涨幅引用.A',0,-1)*100,2)+'%'),COLORGRAY;
DRAWTEXTEX(STKINDI('AA15','涨幅引用.A',0,-1)>=0,1,400,150,'商业连锁:'+NUMTOSTR(STKINDI('AA15','涨幅引用.A',0,-1)*100,2)+'%'),Colorred;
DRAWTEXTEX(STKINDI('AA15','涨幅引用.A',0,-1)<0,1,400,150,'商业连锁:'+NUMTOSTR(STKINDI('AA15','涨幅引用.A',0,-1)*100,2)+'%'),COLORGRAY;
DRAWTEXTEX(STKINDI('AA16','涨幅引用.A',0,-1)>=0,1,400,300,'建筑材料:'+NUMTOSTR(STKINDI('AA16','涨幅引用.A',0,-1)*100,2)+'%'),Colorred;
DRAWTEXTEX(STKINDI('AA16','涨幅引用.A',0,-1)<0,1,400,300,'建筑材料:'+NUMTOSTR(STKINDI('AA16','涨幅引用.A',0,-1)*100,2)+'%'),COLORGRAY;
DRAWTEXTEX(STKINDI('AA17','涨幅引用.A',0,-1)>=0,1,400,450,'其它行业:'+NUMTOSTR(STKINDI('AA17','涨幅引用.A',0,-1)*100,2)+'%'),Colorred;
DRAWTEXTEX(STKINDI('AA17','涨幅引用.A',0,-1)<0,1,400,450,'其它行业:'+NUMTOSTR(STKINDI('AA17','涨幅引用.A',0,-1)*100,2)+'%'),COLORGRAY;
DRAWTEXTEX(STKINDI('AA18','涨幅引用.A',0,-1)>=0,1,400,600,'汽车配件:'+NUMTOSTR(STKINDI('AA18','涨幅引用.A',0,-1)*100,2)+'%'),Colorred;
DRAWTEXTEX(STKINDI('AA18','涨幅引用.A',0,-1)<0,1,400,600,'汽车配件:'+NUMTOSTR(STKINDI('AA18','涨幅引用.A',0,-1)*100,2)+'%'),COLORGRAY;
DRAWTEXTEX(STKINDI('AA19','涨幅引用.A',0,-1)>=0,1,400,750,'机械指数:'+NUMTOSTR(STKINDI('AA19','涨幅引用.A',0,-1)*100,2)+'%'),Colorred;
DRAWTEXTEX(STKINDI('AA19','涨幅引用.A',0,-1)<0,1,400,750,'机械指数:'+NUMTOSTR(STKINDI('AA19','涨幅引用.A',0,-1)*100,2)+'%'),COLORGRAY;
DRAWTEXTEX(STKINDI('AA20','涨幅引用.A',0,-1)>=0,1,400,900,'医药指数:'+NUMTOSTR(STKINDI('AA20','涨幅引用.A',0,-1)*100,2)+'%'),Colorred;
DRAWTEXTEX(STKINDI('AA20','涨幅引用.A',0,-1)<0,1,400,900,'医药指数:'+NUMTOSTR(STKINDI('AA20','涨幅引用.A',0,-1)*100,2)+'%'),COLORGRAY;
DRAWTEXTEX(STKINDI('AA21','涨幅引用.A',0,-1)>=0,1,600,0,'外贸指数:'+NUMTOSTR(STKINDI('AA21','涨幅引用.A',0,-1)*100,2)+'%'),Colorred;
DRAWTEXTEX(STKINDI('AA21','涨幅引用.A',0,-1)<0,1,600,0,'外贸指数:'+NUMTOSTR(STKINDI('AA21','涨幅引用.A',0,-1)*100,2)+'%'),COLORGRAY;
DRAWTEXTEX(STKINDI('AA22','涨幅引用.A',0,-1)>=0,1,600,150,'教育传媒:'+NUMTOSTR(STKINDI('AA22','涨幅引用.A',0,-1)*100,2)+'%'),Colorred;
DRAWTEXTEX(STKINDI('AA22','涨幅引用.A',0,-1)<0,1,600,150,'教育传媒:'+NUMTOSTR(STKINDI('AA22','涨幅引用.A',0,-1)*100,2)+'%'),COLORGRAY;
DRAWTEXTEX(STKINDI('AA23','涨幅引用.A',0,-1)>=0,1,600,300,'仪电仪表:'+NUMTOSTR(STKINDI('AA23','涨幅引用.A',0,-1)*100,2)+'%'),Colorred;
DRAWTEXTEX(STKINDI('AA23','涨幅引用.A',0,-1)<0,1,600,300,'仪电仪表:'+NUMTOSTR(STKINDI('AA23','涨幅引用.A',0,-1)*100,2)+'%'),COLORGRAY;
DRAWTEXTEX(STKINDI('AA24','涨幅引用.A',0,-1)>=0,1,600,450,'有色金属:'+NUMTOSTR(STKINDI('AA24','涨幅引用.A',0,-1)*100,2)+'%'),Colorred;
DRAWTEXTEX(STKINDI('AA24','涨幅引用.A',0,-1)<0,1,600,450,'有色金属:'+NUMTOSTR(STKINDI('AA24','涨幅引用.A',0,-1)*100,2)+'%'),COLORGRAY;
DRAWTEXTEX(STKINDI('AA25','涨幅引用.A',0,-1)>=0,1,600,600,'造纸印刷:'+NUMTOSTR(STKINDI('AA25','涨幅引用.A',0,-1)*100,2)+'%'),Colorred;
DRAWTEXTEX(STKINDI('AA25','涨幅引用.A',0,-1)<0,1,600,600,'造纸印刷:'+NUMTOSTR(STKINDI('AA25','涨幅引用.A',0,-1)*100,2)+'%'),COLORGRAY;
DRAWTEXTEX(STKINDI('AA26','涨幅引用.A',0,-1)>=0,1,600, |