龙听期货论坛's Archiver

龙听 发表于 2018-10-10 09:38

[转载]大盘副图指标(源码、贴图)

这个是副图指标,用于比较个股与大盘的强弱。
[code]
DPC:=INDEXC;
DPO:=INDEXO;
DPH:=INDEXH;
DPL:=INDEXL;
{ma5:ma(dpc,5);ma13:ma(dpc,13);ma21:ma(dpc,21);}
STICKLINE(DPC>DPO,DPC,DPO,8,0),COLOR0000FF;
STICKLINE(DPC>DPO,DPH,DPL,0.5,0),COLOR0000FF;
STICKLINE(DPC<DPO,DPC,DPO,8,0),COLOR00FF00;
STICKLINE(DPC<DPO,DPH,DPL,0.5,0),COLOR00FF00;

SH:=STKINDI('1A0001','1A0001');
SZ:=STKINDI('399001','399001');
IF STRCMP(MARKETLABEL,'SH')=0 THEN BEGIN DRAWTEXTABS(200,0,'上证指数'),LINETHICK5,Color6666FF;END;
IF STRCMP(MARKETLABEL,'SZ')=0 THEN BEGIN DRAWTEXTABS(200,0,'深圳成份指数'),LINETHICK5,Color6666FF;END;
DRAWTEXTABS(5 ,30 ,'目前指数:'+INDEXC+' 点'),COLORFFFFFF;
DRAWTEXTABS(5 ,50 ,'昨日收盘:'+REF(INDEXC,1)+' 点'),COLORFFFFFF;
DRAWTEXTABS(5 ,70 ,'今日开盘:'+INDEXO+' 点'),COLORFFFFFF;
DRAWTEXTABS(5 ,90 ,'今日最高:'+INDEXH+' 点'),COLORFFFFFF;
DRAWTEXTABS(5 ,110 ,'今日最低:'+INDEXL+' 点'),COLORFFFFFF;
DRAWTEXTABS(5 ,130 ,'指数涨幅:'+((INDEXC-REF(INDEXC,1))/INDEXC)*100+' %'),COLORFFFFFF;
[/code]

[attach]4472[/attach]

页: [1]