在个股分时上自适应叠加上证、深证和创业板指数(源码)
指标功能:[B]国产软件[/B]
指标类型:简体中文
所需积分:0
推荐星级:
授权方式:共享版
公式大小:9.00 KB
更新时间:2010-06-29 11:19:00
公式简介:
{指数叠加}
gqc:=DYNAINFO(3);{昨收}
gh:=DYNAINFO(5);{今最高}
gL:=DYNAINFO(6);{今最低}
gzdz:=max(gh-gqc,gqc-gL);{今涨跌最大值}
gf:=gzdz/gqc;{今涨跌最大幅度}
w:=gqc-gzdz;{最低位置}
shqc:=hhv(STKINDI('sh000001','001.rc#day'),0);{昨收}
shH:=hhv(STKINDI('sh000001','001.H1#day'),0);{今最高}
shL:=HHv(STKINDI('sh000001','001.L1#day'),0);{今最低}
shc:=STKINDI('sh000001','001.c1#min1');{今分时收盘}
shjh:=STKINDI('sh000001','001.j#min1');{今分时成交额}
szqc:=hhv(STKINDI('sz399001','001.rc#day'),0);{昨收}
szH:=hhv(STKINDI('sz399001','001.H1#day'),0);{今最高}
szL:=HHv(STKINDI('sz399001','001.L1#day'),0);{今最低}
szc:=STKINDI('sz399001','001.c1#min1');{今分时收盘}
szjh:=STKINDI('sz399001','001.j#min1');{今分时成交额}
cybqc:=hhv(STKINDI('sz399006','001.rc#day'),0);{昨收}
cybH:=hhv(STKINDI('sz399006','001.H1#day'),0);{今最高}
cybL:=HHv(STKINDI('sz399006','001.L1#day'),0);{今最低}
cybc:=STKINDI('sz399006','001.c1#min1');{今分时收盘}
cybjh:=STKINDI('sz399006','001.j#min1');{今分时成交额}
zqc:=if(STRCMP(MARKETLABEL,'SH')=0,shqc,if(STRCMP(STRLEFt(STKLABEL,1),'0')=0,szqc,cybqc));{昨收}
zc:=if(STRCMP(MARKETLABEL,'SH')=0,shc,if(STRCMP(STRLEFt(STKLABEL,1),'0')=0,szc,cybc));{今分时收盘}
zh:=if(STRCMP(MARKETLABEL,'SH')=0,shh,if(STRCMP(STRLEFt(STKLABEL,1),'0')=0,szh,cybh));{今最高}
zl:=if(STRCMP(MARKETLABEL,'SH')=0,shl,if(STRCMP(STRLEFt(STKLABEL,1),'0')=0,szl,cybl));{今最低}
zjh:=if(STRCMP(MARKETLABEL,'SH')=0,shjh,if(STRCMP(STRLEFt(STKLABEL,1),'0')=0,szjh,cybjh));{今分时成交额}
zzdz:=max(zh-zqc,zqc-zl);{大盘今涨跌最大值}
Z,:=zzdz/zqc;{大盘今涨跌最大幅度}
bl:=GF/Z,;{个股相对于大盘今涨跌最大比例}
s:=(zc/zqc-1)*bl*gqc+gqc;
POLYLINE(C,s),COLORMAGENTA;
大盘指数:zc,LINETHICK0,COLORMAGENTA,PRECIS2;
大盘涨跌%:(zc/zqc-1)*100,LINETHICK0,COLORMAGENTA,PRECIS2;
大盘成交(亿):zjh/10000/10000,LINETHICK0,COLORMAGENTA,PRECIS2;
指数成交额:=zjh/hhv(zjh,0)*gzdz*50+w;
STICKLINE(zc>=ref(zc,1),w,指数成交额,0.1,1),COLORRED;
STICKLINE(zc<ref(zc,1),w,指数成交额,0.1,1),COLORCYAN;
STICKLINE(c,w,w,10,1),COLORCYAN;
if STRCMP(STRLEFt(STKLABEL,1),'6')=0 then
wz:='叠加:上证指数 000001';
if STRCMP(STRLEFt(STKLABEL,1),'0')=0 then
wz:='叠加:深圳成指 399001';
if STRCMP(STRLEFt(STKLABEL,1),'3')=0 then
wz:='叠加:创业指数 399006';
DRAWTEXTABS( 2,3,wz),LINETHICK1,COLORMAGENTA;
{放量预测}
m:=if((time > 93000 and time <= 113000),(hour - 9)*60 + minute - 30,if((time > 130000 and time <= 150000),(hour - 13)*60 + minute + 120,240));
mday:=sum(v,0)*240/m;
换手:=mday*100/capital;
yv:="001.上一日成交量#day";
if barstatus = 2 then
begin
if mday < yv then
drawtextabs(150,3,'昨日成交:'+numtostrn(yv/CAPITAL*100,2)+'%,本日趋势:'+numtostrn(mday/CAPITAL*100,2)+'%。缩量。'),colorgreen;
if mday >= yv then
drawtextabs(150,3,'昨日成交:'+numtostrn(yv/CAPITAL*100,2)+'%,本日趋势:'+numtostrn(mday/CAPITAL*100,2)+'%。放量。'),colorred;
end;
[url=http://www.goodgupiao.com/gupiaogongshi/8313.html][B]在个股分时上自适应叠加上证、深证和创业板指数(源码)[/B][/url]