同花顺大盘行业强弱副图指标 源码
源码:无未来
VAR1:=EMA(INDEXDATA("399190",&CLOSE),3);
VAR2:=EMA(INDEXDATA("399200",&CLOSE),3);
VAR3:=EMA(INDEXDATA("399137",&CLOSE),3);
VAR4:=EMA(INDEXDATA("399139",&CLOSE),3);
VAR5:=EMA(INDEXDATA("399136",&CLOSE),3);
VAR6:=EMA(INDEXDATA("399110",&CLOSE),3);
VAR7:=EMA(INDEXDATA("399135",&CLOSE),3);
金融:SUM((VAR1/REF(VAR1,1)-1)*100,0),colorred;
地产:SUM((VAR2/REF(VAR2,1)-1)*100,0),colormagenta;
金属:SUM((VAR3/REF(VAR3,1)-1)*100,0),COLORLIRED;
医药:SUM((VAR4/REF(VAR4,1)-1)*100,0),colorwhite;
电子:SUM((VAR5/REF(VAR5,1)-1)*100,0),colorcyan;
农林:SUM((VAR6/REF(VAR6,1)-1)*100,0),colorgreen;
石化:SUM((VAR7/REF(VAR7,1)-1)*100,0),coloryellow;
DRAWTEXT(CROSS(ISNULL(REFX(&CLOSE,3)),0.5),金融,'金融'),colorred;
DRAWTEXT(CROSS(ISNULL(REFX(&CLOSE,4)),0.5),地产,'地产'),colormagenta;
DRAWTEXT(CROSS(ISNULL(REFX(&CLOSE,5)),0.5),金属,'金属'),COLOR009fff;
DRAWTEXT(CROSS(ISNULL(REFX(&CLOSE,6)),0.5),医药,'医药'),colorwhite;
DRAWTEXT(CROSS(ISNULL(REFX(&CLOSE,7)),0.5),电子,'电子'),colorcyan;
DRAWTEXT(CROSS(ISNULL(REFX(&CLOSE,8)),0.5),农林,'农林'),colorgreen;
DRAWTEXT(CROSS(ISNULL(REFX(&CLOSE,9)),0.5),石化,'石化'),coloryellow;