源码
cyc5:CYC(5);
cyc13:cyc(13);
cyc34:cyc(34);
cyc0:MAXCYC,colorff9900;
散户:SELFDATA('散户'),linethick0;
中户:SELFDATA('中户'),linethick0;
大户:SELFDATA('大户'),linethick0;
法人:SELFDATA('法人'),linethick0;
机构:SELFDATA('券基'),linethick0;
帐户数:SELFDATA('总户数'),linethick0;
机构成本:SELFDATA('机构成本'),linethick0;
月增减:=(帐户数-ref(帐户数,22))/ref(帐户数,22);
S3:=ref(散户,3);
Z3:=ref(中户,3);
D3:=ref(大户,3);
F3:=ref(法人,3);
J3:=ref(机构,3);
S5:=ref(散户,5);
Z5:=ref(中户,5);
D5:=ref(大户,5);
F5:=ref(法人,5);
J5:=ref(机构,5);
S10:=ref(散户,10);
Z10:=ref(中户,10);
D10:=ref(大户,10);
F10:=ref(法人,10);
J10:=ref(机构,10);
S20:=ref(散户,20);
Z20:=ref(中户,20);
D20:=ref(大户,20);
F20:=ref(法人,20);
J20:=ref(机构,20);
BL3:=400/MAX(S3,Z3,D3,F3,J3);
BL5:=400/MAX(S5,Z5,D5,F5,J5);
BL10:=400/MAX(S10,Z10,D10,F10,J10);
BL20:=400/MAX(S20,Z20,D20,F20,J20);
DRAWTEXTREL(80,26,'散户'),color00ff00;
DRAWTEXTREL(140,26,'中户'),colorblue;
DRAWTEXTREL(200,26,'大户'),colorcyan;
DRAWTEXTREL(260,26,'法人'),coloryellow;
DRAWTEXTREL(320,26,'机构'),colorred;
DRAWTEXTREL(380,26,'帐户数'),Colorwhite;
DRAWTEXTREL(380,110,'机构成本'),Colorwhite;
DRAWTEXTREL(380,195,'月增减'),Colorwhite;
DRAWTEXTREL(30,70,'今日'),Colorwhite;
DRAWTEXTREL(80,70,NUMTOSTRN(散户,2)), color00ff00;
DRAWTEXTREL(140,70,NUMTOSTRN(中户,2)), colorblue;
DRAWTEXTREL(200,70,NUMTOSTRN(大户,2)), colorcyan;
DRAWTEXTREL(260,70,NUMTOSTRN(法人,2)), coloryellow;
DRAWTEXTREL(320,70,NUMTOSTRN(机构,2)), colorred;
DRAWTEXTREL(380,70,NUMTOSTRN(帐户数,2)), color00ffff;
DRAWTEXTREL(30,110,'3日'), Colorwhite;
DRAWTEXTREL(80,110,NUMTOSTRN(S3,2)), color00ff00;
DRAWTEXTREL(140,110,NUMTOSTRN(Z3,2)), colorblue;
DRAWTEXTREL(200,110,NUMTOSTRN(D3,2)), colorcyan;
DRAWTEXTREL(260,110,NUMTOSTRN(F3,2)), coloryellow;
DRAWTEXTREL(320,110,NUMTOSTRN(J3,2)), colorred;
DRAWTEXTREL(30,152,'5日'), Colorwhite;
DRAWTEXTREL(80,152,NUMTOSTRN(S5,2)), color00ff00;
DRAWTEXTREL(140,152,NUMTOSTRN(Z5,2)), colorblue;
DRAWTEXTREL(200,152,NUMTOSTRN(D5,2)), colorcyan;
DRAWTEXTREL(260,152,NUMTOSTRN(F5,2)), coloryellow;
DRAWTEXTREL(320,152,NUMTOSTRN(J5,2)), colorred;
DRAWTEXTREL(380,152,NUMTOSTRN(机构成本,2)), colorred;
DRAWTEXTREL(30,195,'10日'), Colorwhite;
DRAWTEXTREL(80,195,NUMTOSTRN(S10,2)), color00ff00;
DRAWTEXTREL(140,195,NUMTOSTRN(Z10,2)), colorblue;
DRAWTEXTREL(200,195,NUMTOSTRN(D10,2)), colorcyan;
DRAWTEXTREL(260,195,NUMTOSTRN(F10,2)), coloryellow;
DRAWTEXTREL(320,195,NUMTOSTRN(J10,2)), colorred;
DRAWTEXTREL(30,235,'20日'), Colorwhite;
DRAWTEXTREL(80,235,NUMTOSTRN(S20,2)), color00ff00;
DRAWTEXTREL(140,235,NUMTOSTRN(Z20,2)), colorblue;
DRAWTEXTREL(200,235,NUMTOSTRN(D20,2)), colorcyan;
DRAWTEXTREL(260,235,NUMTOSTRN(F20,2)), coloryellow;
DRAWTEXTREL(320,235,NUMTOSTRN(J20,2)), colorred;
DRAWTEXTREL(380,235,NUMTOSTRN(月增减,2)),color00ffff;
VAR3:=LLV(HIGH,240);
VAR4:=100*(CLOSE-VAR3)/VAR3;
VAR5:=(CLOSE-LLV(LOW,528))/(HHV(HIGH,528)-LLV(LOW,528))*100;
VAR6:=(CLOSE-LLV(CLOSE,530))/(HHV(CLOSE,530)-LLV(CLOSE,530))*100;
VAR7:=0;
VAR8:=SMA(MAX(CLOSE-REF(CLOSE,1),0),34,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),7,1)*100;
VAR9:=SMA(MAX(CLOSE-REF(CLOSE,1),0),13,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),13,1)*100;
VAR10:=IF(TROUGHBARS(3,16,1)=0 AND HIGH>LOW+0.04,4,0);
VAR11:=ZIG(3,6)>REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)<=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)<=REF(ZIG(3,6),3);
VAR12:=ZIG(3,6)<REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)>=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)>=REF(ZIG(3,6),3);
VAR13:=ZIG(3,22)>REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)<=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)<=REF(ZIG(3,22),3);
VAR14:=ZIG(3,22)<REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)>=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)>=REF(ZIG(3,22),3);
VAR15:=ZIG(3,51)>REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)<=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)<=REF(ZIG(3,51),3);
VAR16:=ZIG(3,51)<REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)>=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)>=REF(ZIG(3,51),3);
VAR17:=ZIG(3,72)>REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)<=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)<=REF(ZIG(3,72),3);
VAR18:=ZIG(3,72)<REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)>=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)>=REF(ZIG(3,72),3);
VAR19:=EMA(CLOSE,2)-EMA(CLOSE,150);
买1:=VAR10;
买2:=(VAR11+VAR13+VAR15+VAR17);
卖1:=(VAR12+VAR14+VAR16+VAR18);
DRAWTEXT(买1>0 OR 买2>0,LOW*0.99,'←买入'),CROSSDOT,LINETHICK1,COLORRED;
DRAWTEXT(卖1>0,HIGH*1.02,'←卖出'),CROSSDOT,LINETHICK1,COLORGREEN;
VAR100:=(100 - ((90 * (HHV(HIGH,20) - CLOSE)) / (HHV(HIGH,20) - LLV(LOW,20))));
VAR200:=(100 - ((90 * (HHV(HIGH,20) - CLOSE)) / (HHV(HIGH,20) - LLV(LOW,20))));
VAR300:=(100 - MA(((100 * (HHV(HIGH,5) - CLOSE)) / (HHV(HIGH,5) - LLV(LOW,5))),34));