【千钧DDE系统】公式源码:
{千钧DDX}
input:p1(60),p2(5),p3(10);
DRAWGBK(C>0,COLORRGB(100,120,180),0,1);
varl1:=(EXTDATA(9)+EXTDATA(10)+EXTDATA(11))/CAPITAL*100;
varl2:=(EXTDATA(6)+EXTDATA(7))/SUM(VOL,120);
DDX:IF(C>1000,varl2,varl1),PRECISION3,COLORSTICK,LINETHICK4;
DDX1:(ema(DDX,p1)*60.177)/5;
DDX2:(MA(DDX1,p2));
DDX3:(MA(DDX1,p3));
{显示时间}
variable:wday[7]='星期六';
wday[1]:='星期日';
wday[2]:='星期一';
wday[3]:='星期二';
wday[4]:='星期三';
wday[5]:='星期四';
wday[6]:='星期五';
fy:=年份;
fm:=月份;
fd:=日期;
wd:=星期;
p:=系统参数(1);
str1:=''+numtostr(fy[p],0)+'年'+numtostr(fm[p],0)+'月'+数字转化为字符串(fd[p],0)+'日 '+wday[wd[p]+1];
DRAWTEXT(BARPOS=DATACOUNT-103,0,str1),ALIGN4,PXDN0,Color00FFaF;
DRAWTEXT(BARPOS=DATACOUNT-128,0,STKLABEL+' '+STKNAME+''),ALIGN4,PXDN0,Color00FFaF;
DRAWTEXTEX(c,1,10,150,'大单动向='+NUMTOSTR(DDX,2)+''),ColorFFFF8;
{千钧ddy}
DRAWGBK(C>0,COLORRGB(100,120,180),0,1);
input:p1(60),p2(5),p3(10);
大单量差:=EXTDATA(9)+EXTDATA(10)+EXTDATA(11);
DDy:大单量差/CAPITAL*100,COLORSTICK,linethick4;
买:(ema(DDy,p1)*60.177)/10,Color0000FF,linethick1;
加仓:MA(DDy,p2),Color00FFFF,linethick1;
卖:MA(DDy,p3),Color00FF00,linethick1;
DRAWTEXTEX(c>0,1,10,0,'涨跌动因='+NUMTOSTR(DDy,2)),ColorFFFF8,LINETHICK3;
{千钧DDZ}
DRAWGBK(C>0,COLORRGB(100,120,180),0,1);
大单量差:=EXTDATA(9)+EXTDATA(10)+EXTDATA(11);
大单净值:=大单量差*100*c;
DDZ:((大单净值*c)/CAPITAL*200)/1000;
DDZ1:(大单量差*c)/CAPITAL*170;
FILLRGN(DDZ>DDZ1,DDZ*10,DDZ1),Color0000FF;
FILLRGN(DDZ<DDZ1,DDZ,DDZ1*10),Color00FF00;
DRAWTEXTEX(c>0,1,10,0,'大单分差='+NUMTOSTR(DDZ,2)+' %'),ColorFFFF8;