源码:{n1 2 1000 13} {n2 2 1000 21} {n3 2 1000 34} {n4 2 1000 55}
N:=5;
A1:=REF(H,N)=HHV(H,2*N+1);
B1:=FILTER(A1,N);
C1:=BACKSET(B1,N+1);
HD:= FILTER(C1,N);
RH:=BACKSET(CURRBARSCOUNT=2,BARSLAST(HD)+1);
SH:=RH>REF(RH,1);
H1:REF(H ,BARSLAST(SH)),LINETHICK1;
A2:=REF(L,N)=LLV(L,2*N+1);
B2:=FILTER(A2,N);
C2:=BACKSET(B2,N+1);
LD:=FILTER(C2,N);
RL:=BACKSET(CURRBARSCOUNT=2,BARSLAST(LD)+1);
SL:=RL>REF(RL,1);
L1:REF(L ,BARSLAST(SL)),LINETHICK1;
HH0:=CONST(HHV(H,120))*1;
LL0:=CONST(LLV(L,120))*1;
MM0:=CONST((HH0+LL0)/2);
HH1:=IF(CONST(C)<MM0,LL0-(HH0-LL0)*0.4,LL0-(HH0-LL0)*0.2),COLORRED;
LL1:=LL0;HLMAX:=MAX(HH1,LL1);
HLMIN:=MIN(HH1,LL1);
HLMN1:=(HLMAX+HLMIN)/2;
HLMN2:=(HLMAX-HLMIN);
HLMN3:=HHV(V,250)/2;
HLMN4:=HHV(V,250);
VSTD:=STD(VOL,10),VOLSTICK;
VZ:=(VSTD-HLMN3)*HLMN2/HLMN4+HLMN1;
STICKLINE(C>O,VZ,(0-HLMN3)*HLMN2/HLMN4+HLMN1,2,1),COLOR881888;
STICKLINE(C<=O,VZ,(0-HLMN3)*HLMN2/HLMN4+HLMN1,2,0),COLOR888518;
{N 2 1000 100 }
MAVSTD5:=MA(VSTD,5);
MAVSTD10:=MA(VSTD,10);
STICKLINE(IF(CURRBARSCOUNT<=N,V=CONST(LLV(V,N)),DRAWNULL),VZ,(0-HLMN3)*HLMN2/HLMN4+HLMN1,3,0)COLORFF00FF;
倍:=V/REF(V,1);
VOL1:=VOL,VOLSTICK;
换手:=VOL*10000/FINANCE(7);
倍量拄:=VOL>=REF(V,1)*1.95 AND C>REF(C,1);
梯量拄:=V>=REF(V,1) AND REF(V,1)>=REF(V,2) AND C>O AND REF(C>O,1);
STICKLINE(梯量拄,VZ,(0-HLMN3)*HLMN2/HLMN4+HLMN1,1,0),COLORLIRED{粉};
STICKLINE(倍量拄,VZ,(0-HLMN3)*HLMN2/HLMN4+HLMN1,1,0),COLORYELLOW{黄};
STICKLINE(IF(CURRBARSCOUNT<=N1,V=CONST(LLV(V,N1)),DRAWNULL),VZ,(0-HLMN3)*HLMN2/HLMN4+HLMN1,3,0)COLORFF00FF;
STICKLINE(IF(CURRBARSCOUNT<=N2,V=CONST(LLV(V,N)),DRAWNULL),VZ,(0-HLMN3)*HLMN2/HLMN4+HLMN1,3,0)COLORFF00FF;
STICKLINE(IF(CURRBARSCOUNT<=N3,V=CONST(LLV(V,N)),DRAWNULL),VZ,(0-HLMN3)*HLMN2/HLMN4+HLMN1,3,0)COLORFF00FF;
STICKLINE(IF(CURRBARSCOUNT<=N4,V=CONST(LLV(V,N)),DRAWNULL),VZ,(0-HLMN3)*HLMN2/HLMN4+HLMN1,3,0)COLORFF00FF;
{VAR2:=0.0001*AMOUNT,VOLSTICK;
百日地量:LV(VAR2,100)=VAR2,STICK,COLORMAGENTA,NODRAW;}
N3:=100;
百日地量:= V=LLV(V,N3) AND V>0 AND BARSCOUNT(V)>=N3;
STICKLINE(百日地量,OPEN,CLOSE,1.8,0),COLORMAGENTA;
N1:=13;
N2:=55;
地量10日:= V=LLV(V,N1) AND V>0 AND BARSCOUNT(V)>=N1;
地量50日:= V=LLV(V,N2) AND V>0 AND BARSCOUNT(V)>=N2;
STICKLINE(地量10日,OPEN,CLOSE,1.8,0),COLORWHITE;
STICKLINE(地量50日,OPEN,CLOSE,1.8,0),COLORWHITE;
G2:=REF(C,1);
涨停:=IF((C-G2)*100/G2>=(10-0.01*100/G2),1,0);
STICKLINE(涨停,OPEN,CLOSE,-1,0),COLORMAGENTA;
{STICKLINE(涨停,H,L,0,0),COLORMAGENTA;}
跌停:=IF((G2-C)*100/G2>=(10-0.01*100/G2),1,0);
STICKLINE(跌停,OPEN,CLOSE,-1,0),COLORBLUE;
STICKLINE(跌停,H,L,0,1),COLORBLUE;
涨家数:INDEXADV,NODRAW,COLORLIMAGENTA ;
跌家数:INDEXDEC,NODRAW,COLORGREEN;
HHH0:=CONST(HHV(H,120))*1;
LLL0:=CONST(LLV(L,120))*1;
MMM0:=CONST((HHH0+LLL0)/2);
HHH1:=IF(CONST(C)<MMM0,LLL0-(HHH0-LLL0)*0.4,LLL0-(HHH0-LLL0)*0.2),COLORRED;
LLL1:=LLL0;HHLMAX:=MAX(HHH1,LLL1);
HHLMIN:=MIN(HHH1,LLL1);
HHLMN1:=(HHLMAX+HHLMIN)/2;
HHLMN2:=(HHLMAX-HHLMIN);
HHLMN3:=HHV(V,250)/2;
HHLMN4:=HHV(V,250);
VVZ:=(V-HHLMN3)*HHLMN2/HHLMN4+HHLMN1;
STICKLINE(C>=O,VVZ,(0-HHLMN3)*HHLMN2/HHLMN4+HHLMN1,2,1),COLORRED;
STICKLINE(C<O,VVZ,(0-HHLMN3)*HHLMN2/HHLMN4+HHLMN1,2,0),COLORCYAN;
{(MA(V,5)-HHLMN3)*HHLMN2/HHLMN4+HHLMN1,COLORFFFFFF;
(MA(V,10)-HHLMN3)*HHLMN2/HHLMN4+HHLMN1,COLOR00FFFF;};
A11:=CLOSE<OPEN;
A12:=OPEN-CLOSE;{第一个阴线的实柱长}
B11:=BARSLAST(CLOSE>=OPEN);
B12:=REF(CLOSE,B11)-REF(OPEN,B11);{第一个阳线的实柱长}
C10:=B11<3;
C11:=A12-B12>0;
C12:=VOL<REF(VOL,B11);
C13:=VOL<REF(VOL,B11) AND REF(VOL,1)<REF(VOL,2);
C14:=IF(B11=2,C13,C12);
CC:=C10 AND C11 AND C13;{必须条件}
G11:=VOL<SUM(VOL,5)/5;{好,不坏}
G17:=VOL<(REF(VOL,B11)*1/4+REF(VOL,12)*3/4);{有副作用,禁用}
G21:=VOL<(1/3*SUM(VOL,5)/5+1/3*REF(VOL,B11)+1/3*LLV(VOL,5));{好,不坏}
G22:=10.00>100*SUM(DYNAINFO(37),5)/5;{小测试无副作用}
G23:=10000000*(HIGH-LOW)/VOL;
G24:=10000000*(REF(HIGH,B11)-REF(LOW,B11))/REF(VOL,B11);
G241:=SUM(G24,12)/12;
G25:=G23>G241;
GG:=G11 AND G21 AND G22 AND G25;{重要的限制条件}
F11:=CC AND GG;
DRAWICON(F11,HIGH*1.01,27);{输出三:长阴短柱};
T1:=CONST(LLVBARS(LOW,10));
T1HIGH:=CONST(REF(HIGH,T1));
CCB:=CONST(CURRBARSCOUNT);
T2:=CONST(BARSLAST(CURRBARSCOUNT>CCB+T1 AND H>T1HIGH));
T2HIGH:=CONST(REF(HIGH,T2));
T3:=CONST(BARSLAST(CURRBARSCOUNT>CCB+T2 AND HIGH>T2HIGH));
T3HIGH:=CONST(REF(HIGH,T3));
凹口淘金:DRAWLINE(CURRBARSCOUNT=T3+1, T3HIGH, ISLASTBAR, T3HIGH, 1),COLOR00FFFF,LINETHICK1;
DRAWTEXT(ISLASTBAR, T3HIGH, '凹口淘金')LINETHICK1,COLOR00FFFF;
STICKLINE(C/REF(C,1)>1.095,C,O,2,0),DOTLINE,COLORYELLOW;
MAXV:=CONST(HHV(VOL,21));
MAXS:=CONST(HHV(HIGH,21));
BS:=MAXV/MAXS;
VOLUME:=VOL/BS*0.10;
ORIGIN:=CONST(LLV(LOW,0))-CONST(0.5*HHV(VOLUME,0));
NOTEXT1:MA(VOLUME,2)+ORIGIN;
NOTEXT2:MA(VOLUME,6)+ORIGIN;
NOTEXT3:MA(VOLUME,30)+ORIGIN;
说明:画线包含高底价,凹口掏金平衡线;成交量包含百日地量,百日地量群,5日 10日 20日量线;
主图还包含长阴短拄,长阴短拄群。
|