飞狐 通达信 大智慧 看上证,深证股票时显示对应指数 副图,源码
源码:
飞狐:
DRAWGBK(CLOSE, COLORRGB(50,100,50), COLORRGB(50,100,50),1);
TC:=STRCMP(MARKETLABEL,'SH')=0;
CC:if(tc=1,"SH000001$CLOSE","SZ399001$CLOSE"),LINETHICK;
OO:if(tc=1,"SH000001$OPEN","SZ399001$OPEN"),LINETHICK;
HH:if(tc=1,"SH000001$HIGH","SZ399001$HIGH"),LINETHICK;
LL:if(tc=1,"SH000001$LOW","SZ399001$LOW"),LINETHICK;
STICKLINE(OO>=CC ,CC ,OO,8,0 ),COLOR777700;
STICKLINE(OO>=CC ,CC ,OO,7,0 ),COLOR999900;
STICKLINE(OO>=CC ,CC ,OO,5,0 ),COLORbbbb00;
STICKLINE(OO>=CC ,CC ,OO,3,0 ),COLORdddd00;
STICKLINE(OO>=CC ,HH,LL,1 ,0 ),COLORffff00;
STICKLINE(CC>OO ,CC,OO,8,0) ,COLOR000077;
STICKLINE(CC>OO ,CC,OO,7,0) ,COLOR000099;
STICKLINE(CC>OO ,CC,OO,5,0) ,COLOR0000bb;
STICKLINE(CC>OO ,CC,OO,3,0) ,COLOR0000dd;
STICKLINE(CC>OO ,HH,LL,1,0 ),COLOR0000FF;
MA5:MA(CC,5),COLOR00FFFF;
MA10:MA(CC,10),COLORFFFF00;
MA20:MA(CC,20),COLOR00FF00;
MA30:MA(CC,30),COLOR0000FF;
MA40:MA(CC,40),COLOR009FFF;
MA60:MA(CC,60),COLORFF0000;
MA120:MA(CC,120),COLORFF00FF;
MA250:MA(CC,250),COLORFFFFFF;
DRAWTEXT(ISLASTBAR,MA5,' '+NUMTOSTR(MA5,2)),COLOR00FFFF;
DRAWTEXT(ISLASTBAR,MA10,' '+NUMTOSTR(MA10,2)),COLORFFFF00;
DRAWTEXT(ISLASTBAR,MA20,' '+NUMTOSTR(MA20,2)),COLOR00FF00;
DRAWTEXT(ISLASTBAR,MA30,' '+NUMTOSTR(MA30,2)),COLOR0000FF;
DRAWTEXT(ISLASTBAR,MA40,' '+NUMTOSTR(MA40,2)),COLOR009FFF;
DRAWTEXT(ISLASTBAR,MA60,' '+NUMTOSTR(MA60,2)),COLORFF0000;
DRAWTEXT(ISLASTBAR,MA120,' '+NUMTOSTR(MA120,2)),COLORFF00FF;
DRAWTEXT(ISLASTBAR,MA250,' '+NUMTOSTR(MA250,2)),COLORFFFFFF;
====================================================================
通达信:
OO:IF(CODELIKE('600'),"999999$OPEN","399001$OPEN"),NODRAW;
CC:IF(CODELIKE('600'),"999999$CLOSE","399001$CLOSE"),NODRAW;
LL:IF(CODELIKE('600'),"999999$LOW","399001$LOW"),NODRAW;
HH:IF(CODELIKE('600'),"999999$HIGH","399001$HIGH"),NODRAW;
FH:=CONST(HHV(HH,120));
FL:=CONST(LLV(LL,120));
STICKLINE(CC ,FH,FL,40,0 ),COLOR556655;
STICKLINE(CC>=OO ,OO,CC,2.8,0 ),COLOR000099;
STICKLINE(CC>=OO ,OO,CC,1.5,0 ),COLOR0000CC;
STICKLINE(CC>=OO ,OO,CC,0.5,0 ),COLOR0000EE;
STICKLINE(CC>=OO ,HH,LL,0,0 ),COLOR0000FF;
STICKLINE(CC<OO ,OO,CC,2.8,0 ),COLORFF8800;
STICKLINE(CC<OO ,OO,CC,1.5,0 ),COLORFFCC00;
STICKLINE(CC<OO ,OO,CC,0.5,0 ),COLORFFEE00;
STICKLINE(CC<OO ,HH,LL,0,0 ),COLORFFFF00;
MA5:MA(CC,5),COLOR00FFFF;
MA10:MA(CC,10),COLORFFFF00;
MA20:MA(CC,20),COLOR00FF00;
MA30:MA(CC,30),COLOR0000FF;
MA40:MA(CC,40),COLOR009FFF;
MA60:MA(CC,60),COLORFF0000;
MA120:MA(CC,120),COLORFF00FF;
MA250:MA(CC,250),COLORFFFFFF;
DRAWNUMBER(ISLASTBAR,MA5,MA5),COLOR00FFFF;
DRAWNUMBER(ISLASTBAR,MA10,MA10),COLORFFFF00;
DRAWNUMBER(ISLASTBAR,MA20,MA20),COLOR00FF00;
DRAWNUMBER(ISLASTBAR,MA30,MA30),COLOR0000FF;
DRAWNUMBER(ISLASTBAR,MA40,MA40),COLOR009FFF;
DRAWNUMBER(ISLASTBAR,MA60,MA60),COLORFF0000;
DRAWNUMBER(ISLASTBAR,MA120,MA120),COLORFF00FF;
DRAWNUMBER(ISLASTBAR,MA250,MA250),COLORFFFFFF;
======================================================================
同花顺:
DRAWGBKLAST(CLOSE>0,STRIP(RGB(100,100,100),RGB(100,100,100),1));
TC:=STRFIND(STRLEFT(CODE,3),'600',1);
CC:IF(tc=1,INDEXDATA("1A0001",&CLOSE),INDEXDATA("399001",&CLOSE));//线形不输出
OO:IF(tc=1,INDEXDATA("1A0001",&OPEN),INDEXDATA("399001",&OPEN)); //线形不输出
HH:IF(tc=1,INDEXDATA("1A0001",&HIGH),INDEXDATA("399001",&HIGH)); //线形不输出
LL:IF(tc=1,INDEXDATA("1A0001",&LOW),INDEXDATA("399001",&LOW)); //线形不输出
STICKLINE(OO>=CC ,CC ,OO,8,0 ),COLOR777700;
STICKLINE(OO>=CC ,CC ,OO,7,0 ),COLOR999900;
STICKLINE(OO>=CC ,CC ,OO,5,0 ),COLORbbbb00;
STICKLINE(OO>=CC ,CC ,OO,3,0 ),COLORdddd00;
STICKLINE(OO>=CC ,HH,LL,1 ,0 ),COLORffff00;
STICKLINE(CC>OO ,CC,OO,8,0) ,COLOR000077;
STICKLINE(CC>OO ,CC,OO,7,0) ,COLOR000099;
STICKLINE(CC>OO ,CC,OO,5,0) ,COLOR0000bb;
STICKLINE(CC>OO ,CC,OO,3,0) ,COLOR0000dd;
STICKLINE(CC>OO ,HH,LL,1,0 ),COLOR0000FF;
MA5:MA(CC,5),COLOR00FFFF;
MA10:MA(CC,10),COLORFFFF00;
MA20:MA(CC,20),COLOR00FF00;
MA30:MA(CC,30),COLOR0000FF;
MA40:MA(CC,40),COLOR009FFF;
MA60:MA(CC,60),COLORFF0000;
MA120:MA(CC,120),COLORFF00FF;
MA250:MA(CC,250),COLORFFFFFF;
gg:=ISNULL(REFX(&CLOSE,1));
DRAWTEXT(gg,MA5,'``'+TOSTRING(MA5,2)),COLOR00FFFF;
DRAWTEXT(gg,MA10,'``'+TOSTRING(MA10,2)),COLORFFFF00;
DRAWTEXT(gg,MA20,'``'+TOSTRING(MA20,2)),COLOR00FF00;
DRAWTEXT(gg,MA30,'``'+TOSTRING(MA30,2)),COLOR0000FF;
DRAWTEXT(gg,MA40,'``'+TOSTRING(MA40,2)),COLOR009FFF;
DRAWTEXT(gg,MA60,'``'+TOSTRING(MA60,2)),COLORFF0000;
DRAWTEXT(gg,MA120,'``'+TOSTRING(MA120,2)),COLORFF00FF;
DRAWTEXT(gg,MA250,'``'+TOSTRING(MA250,2)),COLORFFFFFF;
==============================================================
大智慧:
DRAWGBKLAST(C>0,STRIP(rgb(100,100,100),rgb(100,100,100),0));
TC:=STRCMP(STRLEFT(MARKETLABEL,2),'SH')=0;
CC:if(tc=1,"SH000001$CLOSE","SZ399001$CLOSE"),LINETHICK0;
OO:if(tc=1,"SH000001$OPEN","SZ399001$OPEN"),LINETHICK0;
HH:if(tc=1,"SH000001$HIGH","SZ399001$HIGH"),LINETHICK0;
LL:if(tc=1,"SH000001$LOW","SZ399001$LOW"),LINETHICK0;
STICKLINE(OO>=CC ,CC ,OO,8,0 ),COLOR777700;
STICKLINE(OO>=CC ,CC ,OO,7,0 ),COLOR999900;
STICKLINE(OO>=CC ,CC ,OO,5,0 ),COLORbbbb00;
STICKLINE(OO>=CC ,CC ,OO,3,0 ),COLORdddd00;
STICKLINE(OO>=CC ,HH,LL,1 ,0 ),COLORffff00;
STICKLINE(CC>OO ,CC,OO,8,0) ,COLOR000077;
STICKLINE(CC>OO ,CC,OO,7,0) ,COLOR000099;
STICKLINE(CC>OO ,CC,OO,5,0) ,COLOR0000bb;
STICKLINE(CC>OO ,CC,OO,3,0) ,COLOR0000dd;
STICKLINE(CC>OO ,HH,LL,1,0 ),COLOR0000FF;
MA5:MA(CC,5),COLOR00FFFF;
MA10:MA(CC,10),COLORFFFF00;
MA20:MA(CC,20),COLOR00FF00;
MA30:MA(CC,30),COLOR0000FF;
MA40:MA(CC,40),COLOR009FFF;
MA60:MA(CC,60),COLORFF0000;
MA120:MA(CC,120),COLORFF00FF;
MA250:MA(CC,250),COLORFFFFFF;
DRAWTEXT(DISPSTATUS=2,MA5,' '+NUMTOSTRN(MA5,2)),COLOR00FFFF;
DRAWTEXT(DISPSTATUS=2,MA10,' '+NUMTOSTRN(MA10,2)),COLORFFFF00;
DRAWTEXT(DISPSTATUS=2,MA20,' '+NUMTOSTRN(MA20,2)),COLOR00FF00;
DRAWTEXT(DISPSTATUS=2,MA30,' '+NUMTOSTRN(MA30,2)),COLOR0000FF;
DRAWTEXT(DISPSTATUS=2,MA40,' '+NUMTOSTRN(MA40,2)),COLOR009FFF;
DRAWTEXT(DISPSTATUS=2,MA60,' '+NUMTOSTRN(MA60,2)),COLORFF0000;
DRAWTEXT(DISPSTATUS=2,MA120,' '+NUMTOSTRN(MA120,2)),COLORFF00FF;
DRAWTEXT(DISPSTATUS=2,MA250,' '+NUMTOSTRN(MA250,2)),COLORFFFFFF;