以下是飞狐价量共振图面指标源码
飞狐价量共振图面指标源码
指标源码:
共除权:=COUNT(SPLITDATA(0),0);上除权:=SPLITBARS(1);本除权:=BARSLAST(IF(SPLITDATA(0)=1,SPLITDATA(0)+1,0));
比例:SPLIT(1),LINETHICK;红股:SPLITDATA(1),LINETHICK;配股:SPLITDATA(2),LINETHICK;
配价:SPLITDATA(3),LINETHICK;红利:SPLITDATA(4),LINETHICK;p:=SYSPARAM(1);
J0:=(HIGH+LOW)/2;QJ:=WMA(J0,3);J1:=IF(CLOSE>QJ,VOL,0);J2:=IF(CLOSE<QJ,VOL,0);
RV:=(qj-LLV(qj,144))/(HHV(qj,144)-LLV(qj,144))*100;统计:SUM(J1-J2,5),LINETHICK;
差:EMA(统计,10)-EMA(统计,34),COLORFFFFFF;趋势:EMA(差,5),COLOR00FFFF;
结:2*(差-趋势),COLORSTICK;GZ:=cross(差,趋势);GG:=cross(趋势,差);KZ:=cross(RV,5);
复权价:=C*(1+比例+红股+配股)+红利+(配价*配股);
KD:=if(CAPITAL<1,cross(90,RV),cross(99,RV));
DRAWICON(KZ,差,4);DRAWICON(KD,趋势,5);
DRAWICON(GZ,差,10);DRAWICON(GG,趋势,11);
DRAWTEXT(GZ and KZ,差,'底共振'),PXDN60,COLORYELLOW;
DRAWTEXT(GG and KD,趋势,'顶共振'),PXUP60,COLOR00FF00;
VERTLINE(GZ and KZ),COLORYELLOW,LINEDOT;
VERTLINE(GG and KD),COLOR00FF00,LINEDOT;
ww:=''+NUMTOSTR(红股[p],0)+' 股 派:'+NUMTOSTR(红利[p],2)+' 元 转配:'+NUMTOSTR(配股[p],2)+' 股 配股价:'+NUMTOSTR(配价[p],2)+' 元';
sj:=CURRENTTIME;rq:=DATE=CURRENTDATE and DYNAINFO(8);
开盘时间:=IF(sj>93000 and sj<=113000,TIMETOT0(sj)-34200,IF(sj>130000 and sj<=150000,TIMETOT0(sj)-39600,TIMETOT0(150000)-39600))/60*rq,PRECISION2;
DRAWTEXTEX(c,1,360,0,'当前交易时间:'+NUMTOSTR(开盘时间[p],2)+' 秒'),COLOREE8899;
DRAWTEXTEX(c,1,10,0,'上市至今除权:'+NUMTOSTR(共除权,0)+' 次'),COLOREE8899;
DRAWTEXTEX(c,1,10,150,'上次除权距今:'+NUMTOSTR(上除权,0)+' 天'),COLOREE8899;
DRAWTEXTEX(c,1,10,300,'本次除权距今:'+NUMTOSTR(本除权,0)+' 天'),COLOREE8899;
DRAWTEXTEX(c,1,10,960,'分配方案10送:'+ww),COLOREE8899;
DRAWTEXTEX(c,1,710,0,'当前复权价格:'+NUMTOSTR(复权价[p],2)+' 元'),COLOREE8899;
//