【分析家公式网提示:源码中需引用的公式:涨幅引用xx 没有提供,公式不能使用 】
A1:=F10FIND('◆ 控盘情况 ◆',500);
A2:=F10FIND('点评',A1);
B1:=F10TEXT(A2,120);
DRAWTEXTEX(C,1,0,1850,B1),COLORwhite;
C1:=F10TEXT(A2+120,200);
DRAWTEXTEX(C,1,0,1900,C1),COLOrwhite;
INPUT:N(2,1,100);
RQ:=DATE;//取日期
A:=BLKNAME;
HY:=IF(STRFIND(A,',',1)>0,STRLEFT(A,STRFIND(A,',',1)-1),A);//DRAWTEXT(BARPOS=SYSPARAM(2),2,HY);
HYs:=STKCOUNT(HY);
DYZB:=IF(X=1,'涨幅引用xx.ZDF',IF(X=2,'涨幅引用xx.HSH','涨幅引用xx.CC'));
DAS:=DATACOUNT;
D0:=RQ[DAS];//取最后日期
variable:DM[HYs]='',vcp[HYs]=0,vci[HYs]=0,TP=0;
for k=1 to HYs do begin
DDD:=STKFROMBLK(HY,k);
DM[k]:=DDD;
TMP:=STKINDI(DDD,DYZB,0,6);
TMPD:=STKINDI(DDD,'涨幅引用xx.DD',0,6);
vcp[k]:=TMP[DAS];
vci[k]:=IF(TMPD[DAS]=D0,TMP[DAS],-1000);//去除当天停牌股
TP:=TP+IF(vci[k]=-1000,1,0);
end;
PX1:=SORTPOS(vci,1,1,HYs);
KHYS:=HYS-TP,LINETHICK;
BKXS:='当前股所属行业: '+HY;
Z,:=IF(X=3,' 元',' %');
LBS:=IF(X=3,'收盘价',IF(X=1,'涨跌幅','换手率'));
WZ:=INTPART((SYSPARAM(3)-SYSPARAM(2))/10);
HST:=' \n\n';
kg:='领涨';
//
COL1:=HST+kg+' ①'+STKNAMEEX(DM[vci[1]])+' '+numtostr(vcp[vci[1]],2)+Z,+
' ②'+STKNAMEEX(DM[vci[2]])+' '+numtostr(vcp[vci[2]],2)+Z,+
IF(KHYS>3,' ③'+STKNAMEEX(DM[vci[3]])+' '+numtostr(vcp[vci[3]],2)+Z,,'')+
IF(KHYS>4,' ④'+STKNAMEEX(DM[vci[4]])+' '+numtostr(vcp[vci[4]],2)+Z,+' ⑤'+STKNAMEEX(DM[vci[5]])+' '+numtostr(vcp[vci[5]],2)+' ⑥'+STKNAMEEX(DM[vci[6]])+' '+numtostr(vcp[vci[6]],2)+Z,+' ⑦'+STKNAMEEX(DM[vci[7]])+' '+numtostr(vcp[vci[7]],2)+Z,
+' ⑧'+STKNAMEEX(DM[vci[8]])+' '+numtostr(vcp[vci[8]],2)+Z,+' ⑨'+STKNAMEEX(DM[vci[9]])+' '+numtostr(vcp[vci[9]],2)+Z,
+' ⑩'+STKNAMEEX(DM[vci[10]])+' '+numtostr(vcp[vci[10]],2)
+Z,,'');//领
DRAWTEXTEX(c,1,1,1590,COL1),Colorwhite;
zq:=DATATYPE;
r:=OPENMINUTES(TIME);
zs:=ref(c,r);
zsr:=DYNAINFO( 3);
j:=SUM(C*V,SUMBARS(VOL,CAPITAL))/SUM(V,SUMBARS(VOL,CAPITAL));
jj:=SUM(C*V,0)/SUM(V,0);
jj1:=SUM(C*V,r)/SUM(V,r)LINETHICK0;
jja:=if(zq=6,jj,if(zq=1,jj1,jj));
zsa:=if(zq=6,zsr,if(zq=1,zs,zsr));
cr:=if(zq=6,c>0,if(zq=1,r>1,c>0));
PARTLINE(cr,zsa),COLORGRAY,POINTDOT;
dk:=(SMA(C,2,1)-SMA(C,6,1))*2.1,LINETHICK0;
STICKLINE(dk>0and jja>0 ,zsa,ZSa+dk,0.1,0),Color5050FF;
STICKLINE(dk<=0and jja>0 ,zsa,ZSa+dk,0.1,0),ColorCyan;
fv:=v;
pv:=fv;
fh:=h;
ph:=fh;
fl:=L;
pl:=fl;
a:=SORTPOS(pv,1,1,DATACOUNT);
a:=SORTPOS(ph,1,1,DATACOUNT);
a:=SORTPOS(pl,0,1,DATACOUNT);
h1:=fh[ph[1]];
l1:=fl[pl[1]];
v1:=fv[pv[1]];
jh:=(max(zs,h1)-min(zs,l1))/n;
jl:=min(zs,l1)-jh;
xs:=jh/v1;
vs:=v*xs;
STICKLINE(c>0,jl,jl+vs,0.1,1)COLORYELLOW;
A1:=EMA(((((2 * CLOSE) + HIGH) + LOW) / 4),34);
A2:=EMA(A1,3);
A3:=EMA(A2,3);
A4:=EMA(A3,3);
A5:=EMA(A4,3);
A6:=EMA(A5,3);
A7:=EMA(A6,3);
A8:=EMA(A7,3);
A9:=EMA(A8,3);
A10:=EMA(A9,3);
A11:=EMA(A10,3);
A12:=EMA(A11,3);
A13:=EMA(A12,3);
A14:=EMA(A13,3);
A15:=EMA(A14,3);
A:=REF(HHV(HIGH,240),1);
AA:=A[DATACOUNT];
B:=REF(LLV(LOW,240),1);
BB:=B[DATACOUNT];
ZJ1:=(((HIGH + LOW) + (2 * CLOSE)) / 4);
ZJ2:=(((ZJ1 - EMA(ZJ1,21)) / STD(ZJ1,21)) * 100);
ZJ3:=EMA(ZJ2,5);
ZJ4:=EMA(ZJ3,2);
ZJ5:=EMA(ZJ4,2);
ZJ6:=(((3 * ZJ4) - (2 * ZJ5)) / 2);
IF((ZJ6 > 90),(AA * 0.995),AA),LINETHICK2,coloryellow;
IF((ZJ6 < (0 - 95)),(BB * 1.005),BB),LINETHICK2,colorDD66AA;
Var41:=IF(DYNAINFO( 7)<REF(ASKPRICE(1),1) AND REF(BIDVOL(1),1)>0 AND REF(ASKVOL(1),1)>0,BUYVOL,0);
Var42:=IF((BUYVOL>REF(ASKVOL(1),1) AND DYNAINFO( 7)=REF(ASKPRICE(1),1) AND REF(BIDVOL(1),1)>0),BUYVOL,0);
Var42a:=IF(Var42>0,Var42-REF(ASKVOL(1),1),0);
Var4b:=Var41+Var42a;
Var51:=IF(BUYVOL>REF(ASKVOL(1),1) AND DYNAINFO( 7)>REF(ASKPRICE(1),1) AND DYNAINFO( 7)<REF(ASKPRICE(2),1),BUYVOL,0);
Var52:=IF(BUYVOL>(REF(ASKVOL(1),1)+REF(ASKVOL(2),1)) AND DYNAINFO( 7)=REF(ASKPRICE(2),1) AND REF(BIDVOL(1),1)>0,BUYVOL,0);
Var52a:=IF(Var52>0,Var52-(REF(ASKVOL(1),1)+REF(ASKVOL(2),1)),0);
Var5b:=Var51+Var52a;
Var61:=IF(BUYVOL>REF(ASKVOL(1),1)+REF(ASKVOL(2),1) AND DYNAINFO( 7)>REF(ASKPRICE(2),1) AND DYNAINFO( 7)<REF(ASKPRICE(3),1),BUYVOL,0);
Var62:=IF(BUYVOL>(REF(ASKVOL(1),1)+REF(ASKVOL(2),1)+REF(ASKVOL(3),1)) AND DYNAINFO( 7)=REF(ASKPRICE(3),1) AND REF(BIDVOL(1),1)>0,BUYVOL,0);
Var62a:=IF( Var62>0,Var62-(REF(ASKVOL(1),1)+REF(ASKVOL(2),1)+REF(ASKVOL(3),1)),0);
Var6b:=Var61+Var62a;
VarA2:=IF(SELLVOL>REF(BIDVOL(1),1) AND DYNAINFO( 7)=REF(BIDPRICE(1),1) AND REF(ASKVOL(1),1)>0,SELLVOL,0);
VarAa:=IF(VarA2>0,SELLVOL-REF(BIDVOL(1),1),0);
VarB1:=IF(SELLVOL>REF(BIDVOL(1),1) AND DYNAINFO( 7)<REF(BIDPRICE(1),1) AND DYNAINFO( 7)>REF(BIDPRICE(2),1),SELLVOL,0);
VarB2:=IF(SELLVOL>(REF(BIDVOL(1),1)+REF(BIDVOL(2),1)) AND DYNAINFO( 7)=REF(BIDPRICE(2),1) AND REF(ASKVOL(1),1)>0,SELLVOL,0);
VarBa:=if(VarB2>0,SELLVOL-(REF(BIDVOL(1),1)+REF(BIDVOL(2),1)),0);
VarAb:=VarB1+VarBa;
VarC1:=IF(SELLVOL>REF(BIDVOL(1),1)+REF(BIDVOL(2),1) AND DYNAINFO( 7)<REF(BIDPRICE(2),1) AND DYNAINFO( 7)>REF(BIDPRICE(3),1),SELLVOL,0);
VarC2:=IF(SELLVOL>(REF(BIDVOL(1),1)+REF(BIDVOL(2),1)+REF(BIDVOL(3),1)) AND DYNAINFO( 7)=REF(BIDPRICE(3),1) AND REF(ASKVOL(1),1)>0,SELLVOL,0);
VarCa:=if(VarC2>0,SELLVOL-(REF(BIDVOL(1),1)+REF(BIDVOL(2),1)+REF(BIDVOL(3),1)),0);
VarAc:=VarC1+VarCa;
VarF:=IF(ASKVOL(1)<REF(ASKVOL(1),1) AND ASKPRICE(1)=REF(ASKPRICE(1),1) AND DYNAINFO( 7)<REF(ASKPRICE(1),1) AND (REF(ASKVOL(1),1)-ASKVOL(1))<>SELLVOL,REF(ASKVOL(1),1)-ASKVOL(1),0);
Var10:=IF(ASKVOL(3)<REF(ASKVOL(3),1) AND ASKPRICE(3)=REF(ASKPRICE(3),1) AND DYNAINFO( 7)<REF(ASKPRICE(3),1),REF(ASKVOL(3),1)-ASKVOL(3),0);
Var11:=IF((REF(BIDVOL(1),1)+REF(BIDVOL(2),1)+REF(BIDVOL(3),1))=0 AND REF(ASKVOL(1),1)>0 AND (REF(ASKVOL(1),1)-ASKVOL(1))<SELLVOL AND ASKVOL(1)<REF(ASKVOL(1),1) AND ASKPRICE(1)=REF(ASKPRICE(1),1) AND DYNAINFO( 7)<REF(ASKPRICE(1),1),REF(ASKVOL(1),1)-ASKVOL(1),0);
Var12:=IF(ASKVOL(2)<REF(ASKVOL(3),1) AND ASKPRICE(2)=REF(ASKPRICE(3),1) AND DYNAINFO( 7)<REF(ASKPRICE(3),1),REF(ASKVOL(3),1)-ASKVOL(2),0);
Var13:=IF(ASKVOL(3)<REF(ASKVOL(2),1) AND ASKPRICE(3)=REF(ASKPRICE(2),1) AND DYNAINFO( 7)<REF(ASKPRICE(2),1),REF(ASKVOL(2),1)-ASKVOL(3),0);
Var14:=IF(BIDVOL(1)<REF(BIDVOL(1),1) AND BIDPRICE(1)=REF(BIDPRICE(1),1) AND DYNAINFO( 7)>REF(BIDPRICE(1),1) AND REF(BIDVOL(1),1)-BIDVOL(1)<>BUYVOL,REF(BIDVOL(1),1)-BIDVOL(1),0);
Var15:=IF(BIDVOL(3)<REF(BIDVOL(3),1) AND BIDPRICE(3)=REF(BIDPRICE(3),1) AND DYNAINFO( 7)>REF(BIDPRICE(3),1),REF(BIDVOL(3),1)-BIDVOL(3),0);
Var16:=IF(REF(ASKVOL(1),1)+REF(ASKVOL(2),1)+REF(ASKVOL(3),1)=0 AND REF(BIDVOL(1),1)>0 AND REF(BIDVOL(1),1)-BIDVOL(1)<BUYVOL AND BIDVOL(1)<REF(BIDVOL(1),1) AND BIDPRICE(1)=REF(BIDPRICE(1),1) AND DYNAINFO( 7)=REF(BIDPRICE(1),1),REF(BIDVOL(1),1)-BIDVOL(1),0);
Var17:=IF(BIDVOL(2)<REF(BIDVOL(3),1) AND BIDPRICE(2)=REF(BIDPRICE(3),1) AND DYNAINFO( 7)>REF(BIDPRICE(3),1),REF(BIDVOL(3),1)-BIDVOL(2),0);
Var18:=IF(BIDVOL(3)<REF(BIDVOL(2),1) AND BIDPRICE(3)=REF(BIDPRICE(2),1) AND DYNAINFO( 7)>REF(BIDPRICE(2),1),REF( |