量价积分统计+划线功能、强弱趋势一目了然的主图、源码介绍
量价积分统计+划线功能、强弱趋势一目了然的主图、源码
{建立两个公式}
{001}
C1:CLOSE;
O1:OPEN;
H1:HIGH;
L1:LOW;
VVLA:VOL;
{日周叠加2}
流通盘:CAPITAL/1000000,colorgreen,LINETHICK0;
上市年: REF(YEAR,BARSCOUNT(C)-1),LINETHICK0;
A1:=ref(h,5)=hhv(h,2*5+1);
B1:=filter(A1,5);
C1:=backset(B1,5+1);
D1:=filter(C1,5);
A2:=ref(l,5)=llv(l,2*5+1);
B2:=filter(A2,5);
C2:=backset(B2,5+1);
D2:=filter(C2,5);
E1:=(ref(llv(l,2*5),1)+ref(hhv(h,2*5),1))/2; E2:=(h+l)/2;
H1:=(D1 AND not(D2 AND E1>=E2)) OR barstatus=2 OR barscount(c)=1;
L1:=(D2 AND not(D1 AND E1<E2)); H2:=D1 AND not(D2 AND E1>=E2);
X1:=ref(barslast(H1),1)+1; F1:=backset(H1 AND count(L1,X1)>0,llvbars
(if(L1,l,10000),X1));
G1:=F1>ref(F1,1); I1:=backset(G1,2); LD:=I1>ref(I1,1);
L2:=LD OR barstatus=2 OR barscount(c)=1;
X2:=ref(barslast(L2),1)+1; F2:=backset(L2 AND count(H2,X2)>0,hhvbars
(if(H2,h,0),X2));
G2:=F2>ref(F2,1); I2:=backset(G2,2); HD:=I2>ref(I2,1);
R1:=backset(barstatus=2,barslast(HD)+1);
S1:=R1>ref(R1,1);
T1:=backset(barstatus=2,barslast(LD)+1);
U1:=T1>ref(T1,1);
R2:=backset(S1,ref(barslast(HD),1)+2);
S2:=R2>ref(R2,1);
T2:=backset(U1,ref(barslast(LD),1)+2);
U2:=T2>ref(T2,1);
短期压力:drawline(S2,h,S1,h,1),Colorred;
短期支撑:drawline(U2,l,U1,l,1),Colorgreen;
HH1:=if(s2,H,ref(H,BARSLAST(s2)));
HH2:=if(s1,H,ref(H,BARSLAST(s1)));
LL1:=if(u2,l,ref(l,BARSLAST(u2)));
LL2:=if(u1,l,ref(l,BARSLAST(u1)));
上线:HH1+(HH2-HH1)*BARSLAST(s2)/(BARSLAST(s2)-BARSLAST(s1)),LINETHICK0;
下线:LL1+(LL2-LL1)*BARSLAST(U2)/(BARSLAST(U2)-BARSLAST(u1)),LINETHICK0;
ccc1:="001.c1#week";
ooo1:="001.o1#week";
hhh1:="001.h1#week";
lll1:="001.l1#week";
vvar1:=if(WEEKDAY=3,hhh1,ccc1);
vvar2:=if(WEEKDAY=3,lll1,ooo1);
STICKLINE(ccc1>=ooo1,ooo1,ccc1,10,0),Color613076;
STICKLINE(ccc1>=ooo1,vvar1,vvar2,4,0),Color613076;
STICKLINE(ooo1>ccc1,ccc1,ooo1,10,0),ColorFA7D32;
STICKLINE(ooo1>ccc1,vvar1,vvar2,4,0),ColorFA7D32;
STICKLINE(C>=O,C,O,8,0),COLOR0000BB;
STICKLINE(C>=O,H,L,0,0),COLOR0000BB;
STICKLINE(C<=O,C,O,8,0),COLORFFFF00;
STICKLINE(C<=O,H,L,0,0),COLORffff00;
TODAY:=DYNAINFO(7)=CLOSE and DYNAINFO(10)=AMOUNT and (ORDER(1)=0 and ORDER(2)=0);
Ddmr:=IF(TODAY,("DDEDATA@BIGORDER"(1,2)-"DDEDATA@BIGORDER"(2,2)),(bigorder(1,2)-bigorder(2,2)))*vol/capital*100;
Ddmrs:=sum(Ddmr,0);
小单买:=IF(TODAY,(1-"DDEDATA@BIGORDER"(1,1)),(1-bigorder(1,1)));
小单卖:=IF(TODAY,(1-"DDEDATA@BIGORDER"(2,1)),(1-bigorder(2,1)));
中单买:=IF(TODAY,("DDEDATA@BIGORDER"(1,1)-"DDEDATA@BIGORDER"(1,2)),(bigorder(1,1)-bigorder(1,2)));
中单卖:=IF(TODAY,("DDEDATA@BIGORDER"(2,1)-"DDEDATA@BIGORDER"(2,2)),(bigorder(2,1)-bigorder(2,2)));
大单买:=IF(TODAY,("DDEDATA@BIGORDER"(1,2)-"DDEDATA@BIGORDER"(1,3)),(bigorder(1,2)-bigorder(1,3)));
大单卖:=IF(TODAY,("DDEDATA@BIGORDER"(2,2)-"DDEDATA@BIGORDER"(2,3)),(bigorder(2,2)-bigorder(2,3)));
特单买:=IF(TODAY,"DDEDATA@BIGORDER"(1,3),bigorder(1,3));
特单卖:=IF(TODAY,"DDEDATA@BIGORDER"(2,3),bigorder(2,3));
主单买:=IF(TODAY,("DDEDATA@BIGORDER"(1,2)),BIGORDER(1,2));
主单卖:=IF(TODAY,("DDEDATA@BIGORDER"(2,2)),BIGORDER(2,2));
主净:=sum((主单买-主单卖),10)*AMOUNT/10000;
超净:=sum((特单买-特单卖),10)*AMOUNT/10000;
大净:=sum((大单买-大单卖),10)*AMOUNT/10000;
中净:=sum((中单买-中单卖),10)*AMOUNT/10000;
散净:=sum((小单买-小单卖),10)*AMOUNT/10000;
DRAWTEXTABS(0,5,'十日各单动态'),COLOR1199FF;
DRAWTEXTABS(0,20,'主净:'+ NUMTOSTRN(主净,2)),COLOR00FFFF;
DRAWTEXTABS(0,35,'超净:'+ NUMTOSTRN(超净,2)),COLORFF00FF;
DRAWTEXTABS(0,50,'大净:'+ NUMTOSTRN(大净,2)),COLOR00FF00;
DRAWTEXTABS(0,65,'中净:'+ NUMTOSTRN(中净,2)),COLORB5B5B5;
DRAWTEXTABS(0,80,'散净:'+ NUMTOSTRN(散净,2)),COLORFF9911;
最大值:=50/(MAX(散净,中净,大净,超净,主净));
散户净买:=140+ABS(散净*最大值);
中户净买:=140+ABS(中净*最大值);
大户净买:=140+ABS(大净*最大值);
超大净买:=140+ABS(超净*最大值);
主力净买:=140+ABS(主净*最大值);
DRAWRECTABS(140,20,ABS(主力净买),35,(IF((主净 >= 0),RGB(255,0,0),RGB(0,200,0)))),COLOR000000,LAYER0;
DRAWRECTABS(140,35,ABS(超大净买),50,(IF((超净 >= 0),RGB(255,0,0),RGB(0,200,0)))),COLOR000000,LAYER0;
DRAWRECTABS(140,50,ABS(大户净买),65,(IF((大净 >= 0),RGB(255,0,0),RGB(0,200,0)))),COLOR000000,LAYER0;
DRAWRECTABS(140,65,ABS(中户净买),80,(IF((中净 >= 0),RGB(255,0,0),RGB(0,200,0)))),COLOR000000,LAYER0;
DRAWRECTABS(140,80,ABS(散户净买),95,(IF((散净 >= 0),RGB(255,0,0),RGB(0,200,0)))),COLOR000000,LAYER0;
股东增减比例:=(PFFIN(4253,0)-PFFIN(4253,1))/PFFIN(4253,1)*100;
量价齐升:=C>REF(C,1) AND V>REF(V,1);
量减价升:=C>REF(C,1) AND V<REF(V,1);
量价齐跌:=C<REF(C,1) AND V<REF(V,1);
量增价跌:=C<REF(C,1) AND V>REF(V,1);
积分:=if(量价齐升,2,if(量减价升,1,if(量价齐跌,-1,if(量增价跌,-2,0))));
累计计分:=sum(积分,10);
DRAWTEXTREL(30,780,'股东增减比例:'+NUMTOSTRN(股东增减比例,2)),coloryellow;
DRAWTEXTREL(30,850,'★量价积分:'+NUMTOSTRN(累计计分,2)),COLOR0000FF;
DRAWRECTREL(10,750,160,900,RGB(0,0,400));
{看各单动态需在论坛下载长风老师的DDE数据}
DRAWRECTABS(140,50,ABS(大户净买),65,(IF((大净 >= 0),RGB(255,0,0),RGB(0,200,0)))),COLOR000000,LAYER0;
DRAWRECTABS(140,65,ABS(中户净买),80,(IF((中净 >= 0),RGB(255,0,0),RGB(0,200,0)))),COLOR000000,LAYER0;
DRAWRECTABS(140,80,ABS(散户净买),95,(IF((散净 >= 0),RGB(255,0,0),RGB(0,200,0)))),COLOR000000,LAYER0;
gd24936