通达信板块指数公式,副图显示板块指数,源码
{板块指数}
上证A:SUM((("999999$C")/REF(("999999$C"),1)-1)*1000,0),COLORRED,LINETHICK3;
深证A:SUM((("399001$C")/REF(("399001$C"),1)-1)*1000,0),COLORGREEN,LINETHICK2;
中小板A:SUM((("399005$C")/REF(("399005$C"),1)-1)*1000,0),COLORMAGENTA,LINETHICK2;
创业板A:SUM((("399006$C")/REF(("399006$C"),1)-1)*1000,0),COLORCYAN,LINETHICK2;
农林A:SUM((("399110$C")/REF(("399110$C"),1)-1)*1000,0),COLORLIBLUE;
采掘A:SUM((("399120$C")/REF(("399120$C"),1)-1)*1000,0),COLORBROWN;
制造A:SUM((("399130$C")/REF(("399130$C"),1)-1)*1000,0),COLORLIGREEN;
食品A:SUM((("399131$C")/REF(("399131$C"),1)-1)*1000,0),COLORLICYAN;
纺织A:SUM((("399132$C")/REF(("399132$C"),1)-1)*1000,0),COLORLIRED;
石化A:SUM((("399135$C")/REF(("399135$C"),1)-1)*1000,0),COLORBLUE;
Q1:=IF(BARSLAST(CURRBARSCOUNT=2),10,0);
DRAWTEXT((Q1>=10 AND REF(Q1,1)<=0),上证A,'上证'),COLORRED;
DRAWTEXT((Q1>=10 AND REF(Q1,1)<=0),深证A,'深证'),COLORGREEN;
DRAWTEXT((Q1>=10 AND REF(Q1,1)<=0),中小板A,'中小板'),COLORMAGENTA;
DRAWTEXT((Q1>=10 AND REF(Q1,1)<=0),创业板A,'创业板'),COLORCYAN;
DRAWTEXT((Q1>=10 AND REF(Q1,1)<=0),农林A,'农林'),COLORLIBLUE;
DRAWTEXT((Q1>=10 AND REF(Q1,1)<=0),采掘A,'采掘'),COLORBROWN;
DRAWTEXT((Q1>=10 AND REF(Q1,1)<=0),制造A,'制造'),COLORLIGREEN;
DRAWTEXT((Q1>=10 AND REF(Q1,1)<=0),食品A,'食品'),COLORLICYAN;
DRAWTEXT((Q1>=10 AND REF(Q1,1)<=0),纺织A,'纺织'),COLORLIRED;
DRAWTEXT((Q1>=10 AND REF(Q1,1)<=0),石化A,'石化'),COLORBLUE;