编写要求:
www.gszx.com.cn网解答:
网友求助:
把融胜抄底改成大智慧,谢谢!
CC:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20);
DD:=DMA(CLOSE,CC);
上:(1+7/100)*DD,CIRCLEDOT,COLORBLUE;
下:(1-7/100)*DD,CIRCLEDOT,COLORBLUE;
中:(上+下)/2,CIRCLEDOT,COLORF0F000;
STICKLINE(C/REF(C,1)>1.095,C,O,2,0),COLORMAGENTA;
STICKLINE(C/REF(C,1)<0.95,C,O,2,0),COLORGREEN;
疯狂:(1+14/100)*DD,DOTLINE,COLORYELLOW;
炒底:(1-14/100)*DD,DOTLINE,COLOR9000F5;
{好底}
D:=EMA((C*3+H+L+O)/6,5);
A线:=HHV(D,13)COLORYELLOW,LINETHICK2;
B线:=LLV(D,13)COLORYELLOW,LINETHICK2;日平:="MACD.MACD#DAY"(12,26,9);
周平:="MACD.MACD#WEEK"(12,26,9);
JC:=(A线-B线);
壹:=COUNT(JC>REF(JC,1)AND A线>REF(A线,1),5)=1 AND JC>REF(JC,1)AND A线>REF(A线,1)AND D>=REF(D,1);
G1:=FILTER(壹=1,10);
G2:=BARSLAST(G1>0);
G3:=IFF(G2>0 AND G2<=10,1,0)=1 AND ((C-REF(C,G2))/REF(C,G2))*100>=5;
概壹:=(SUM(FILTER(G3,10),0)/SUM(G1>0,0))*100;
加1:=COUNT(日平>=0 AND 周平>=0,5)=1 AND 日平>=0 AND 周平>=0;
加2:=FILTER(D=A线 AND REF(D,1)<REF(A线,1)AND REF(D,2)<REF(A线,2),10);
①:=FILTER(加1=1,10);
②:=BARSLAST(①>0);
③:=IFF(②>0 AND ②<=10,1,0)=1 AND ((C-REF(C,②))/REF(C,②))*100>=5;
概加1:=(SUM(FILTER(③,10),0)/SUM(①>0,0))*100;
好底:FILTER(COUNT(D=B线,3)>=2 AND D>B线,5),COLORRED,NODRAW;
DRAWTEXT(好底,L-0.3,'←好底'),COLOR1880FF;
{金兰三宝}
N:=9;
N1:=6;
M:=14;
TYP := (HIGH + LOW + CLOSE)/3;
CC1:=(TYP-MA(TYP,M))/(0.015*AVEDEV(TYP,M)),COLORFF00FF;
C1:=SMA(CC1,3,1);
C2:=SMA(C1,3,1);
C3:=3*C1-2*C2;
CB1:=EMA(C3,5);
CB2:=REF(CB1,1);
LC := REF(CLOSE,1);
RSI1:=SMA(MAX(CLOSE-LC,0),N1,1)/SMA(ABS(CLOSE-LC),N1,1)*100;
RSI:=(RSI1-50)*5,LINETHICK2,COLORFFFFFF;
R1:=SMA(RSI,3,1);
D1:=SMA(R1,3,1);
J1:=3*R1-2*D1;
RR1:=EMA(J1,5);
RR2:=REF(RR1,1);
RR:=RR1>RR2;
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:=SMA(RSV,3,1);
K1:=(K-50)*5,COLOR00FF00;
K2:=SMA(K1,3,1);
D2:=SMA(K2,3,1);
J2:=3*K2-2*D2;
BB1:=EMA(J2,5);
BB2:=REF(BB1,1);
买入:=RR AND NOT(REF(RR,1)) AND (RR1<-100 AND BB1<-100) AND CB1<-100,LINETHICK0;
DRAWICON(买入>0,L-0.05,11);
DRAWTEXT(买入>0,L-0.1,'←三宝'),COLOR9000F5;
{抄底特准 选股}
VAB1:=REF(CLOSE,1);
VAB2:=SMA(MAX(CLOSE-VAB1,0),7,1)/SMA(ABS(CLOSE-VAB1),7,1)*100;
特准:=FILTER(REF(VAB2,1)<20 AND VAB2>REF(VAB2,1),5);
DRAWTEXT(特准,L-0.5,'←特准'),COLOR00FFFF;
{极地上涨 选股}
VA1:=HHV(HIGH,9)-LLV(LOW,9);
VA2:=HHV(HIGH,9)-CLOSE;
VA3:=CLOSE-LLV(LOW,9);
VA4:=VA2/VA1*100-70;
VA5:=(CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60))*100;
VA6:=(CLOSE+HIGH+LOW)/3;
VA7:=SMA(VA3/VA1*100,3,1);
VA8:=LLV(LOW,34);
VA9:=SMA(VA7,3,1)-SMA(VA4,9,1);
VARA:=IF(VA9>100,VA9-100,0);
VARB:=HHV(HIGH,34);
VARC:=EMA((VA6-VA8)/(VARB-VA8)*100,13);
VARD:=EMA(0.667*REF(VARC,1)+0.333*VARC,2);
VARE:=SMA(MAX(CLOSE-REF(CLOSE,1),0)/CLOSE,8,1)/SMA(ABS(INDEXC-REF(INDEXC,1))/INDEXC,8,1)*100-25;
VARF:=MA(VARE,3);
VAR1:=HHV(HIGH,9)-LLV(LOW,9);
VAR2:=HHV(HIGH,9)-CLOSE;
VAR3:=CLOSE-LLV(LOW,9);
VAR4:=((VAR2)/(VAR1))*(100)-70;
VAR5:=((CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60)))*(100);
VAR6:=((2)*(CLOSE)+HIGH+LOW)/(4);
VAR7:=SMA(((VAR3)/(VAR1))*(100),3,1);
VAR8:=LLV(LOW,34);
VAR9:=SMA(VAR7,3,1)-SMA(VAR4,9,1);
VAR10:=IF((VAR9>100),VAR9-100,0);
VAR11:=HHV(HIGH,34);
B1:=EMA(((VAR6-VAR8)/(VAR11-VAR8))*(100),8);
领先:=EMA(B1,5);
生命线:=EMA(VARD,1);
V1:=MA(C,5)=HHV(MA(C,5),20);
V2:=MA(C,5)>MA(C,10);
V3:=MA(V,5)>MA(V,40)*1.01;
V4:=COUNT(MA(C,1)>REF(C,1),2)=2;
VV:=V1 AND V2 AND V3 AND V4;
A1:=EMA(CLOSE,8);
A2:=EMA(A1,20);
A3:=CROSS(A1,A2);
A4:=A1<EMA(CLOSE,120);
A5:=3*SMA((CLOSE-LLV(LOW,18))/(HHV(HIGH,18)-LLV(LOW,18))*100,21,1)-2*
SMA(SMA((CLOSE-LLV(LOW,18))/(HHV(HIGH,18)-LLV(LOW,18))*100,20,1),8,1);
安全位:=20;
低位转强:=CROSS(A5,安全位);
开始拉升:=CROSS(VARC,生命线) AND VARC>VARD AND VARC<55 AND C>O;
A6:=LLV(C,500)=LLV(C,5) AND C/REF(C,1)>(1+9.8/100);
极地上涨:=A6;
极底:开始拉升>0 AND 开始拉升<400 OR 极地上涨>0 AND 极地上涨<400
OR (低位转强>0 AND 低位转强<400) OR (低位转强>0),COLORCDFFBB,NODRAW;
DRAWTEXT(极底,L-0.7,'←极底'),COLORCDFFBB;
{抄底 选股}
MMM:=1;
SVOL:=INTPART(SUM(V,0)/CAPITAL);
TJ0:=SVOL>REF(SVOL,1) OR BARSSINCE(CLOSE)=0;
S1:=BARSLAST(TJ0)+1;
TJJ2:=S1<REF(S1,1);
S2:=IF(TJJ2,REF(S1,1)+1,S1);
S3:=SUM(TJJ2,0);
ZK1:="KD.K#WEEK"(9,3,3);
ZD2:="KD.D#WEEK"(9,3,3);
ZF1:="MACD.DIF#WEEK"(12,26,9);
ZA2:="MACD.DEA#WEEK"(12,26,9);
换手:=V/CAPITAL*100,LINETHICK0;
JCD:=CROSS(ZK1,ZD2) AND REF(ZD2,1)<30;
抄底:EXIST(JCD,MMM),COLORCYAN,NODRAW;
DRAWTEXT(抄底,L-0.8,'←抄底'),COLORCYAN;
{只做牛市 选股}
HR:=HHV(HIGH,55);
HRY:=LLV(LOW,55);
HRY11:=HR*HRY;
HRY33:=SQRT(HRY11);
WLT1:=EMA(C,3);
WLT2:=EMA(C,5);
WLT3:=EMA(WLT2,5);
HP:=(HHV(CLOSE,10)-LLV(CLOSE,10))/CLOSE<0.10;
LB:=VOL/MA(VOL,5);
X1:=(C+L+H)/3;
BB5:=ATAN(EMA(X1,7)-REF(EMA(X1,7),1))*3.1416*10;
EMA3:=EMA(C,3);
TT:=FILTER(BB5>1 AND EMA(X1,7)>REF(EMA(X1,7),1),10);
MM:=WLT1>REF(WLT1,1) AND REF(WLT1,1)<REF(WLT1,2) ;
GG1:=CROSS(WLT1,WLT2);
TYB:= (HIGH + LOW + CLOSE)/3;
CCI1:=(TYB-MA(TYB,6))/(0.015*AVEDEV(TYB,5));
差值1:=ABS(REF(CCI1,1)-CCI1),LINETHICK0;
CCI2:=(TYB-MA(TYB,10))/(0.015*AVEDEV(TYB,10));
差值2:=ABS(REF(CCI2,1)-CCI2),LINETHICK0;
CCI3:=(TYB-MA(TYB,20))/(0.015*AVEDEV(TYB,20));
差值3:=ABS(REF(CCI3,1)-CCI3),LINETHICK0;
CCI4:=(TYB-MA(TYB,30))/(0.015*AVEDEV(TYB,30));
差值4:=ABS(REF(CCI4,1)-CCI4),LINETHICK0;
CCI5:=(TYB-MA(TYB,60))/(0.015*AVEDEV(TYB,60));
差值5:=ABS(REF(CCI5,1)-CCI5),LINETHICK0;
CCI:=(CCI1+CCI2+CCI3+CCI4+CCI5)/2,COLORRED,LINETHICK2;
WLT91:=HHV(CCI,13);
WLT92:=LLV(CCI,13)<-100;
WLT95:=COUNT(WLT92,13)>=3;
WLT93:=CCI>WLT91;
WLT96:=CROSS(CCI,100);
TJ91:=WLT95 AND WLT96;
JLP:=FILTER(TJ91,5);
超买:=MA(C,10)*IF(CAPITAL=0,1.04,1.1);
超卖:=MA(C,10)*IF(CAPITAL=0,0.95,0.9);
TEND:=EMA(((SLOPE(CLOSE,21) * 20) + CLOSE),42);
BB:=TEND>REF(TEND,1) AND REF(TEND,1) >REF(TEND,2);
GG2:=CROSS(WLT1,TEND);
HRY1:=LLV(LOW,55);
HRY2:=HHV(HIGH,21);
GG3:=C<HRY2*0.8 AND C>HRY33;
JJ1:=C<HRY1*1.62;
TJ1:=GG1;
TJ2:=GG2 AND JJ1;
TJ3:=GG1 AND GG3 ;
XG:=TJ1 OR TJ3 ;
XG2:=C<HRY2*0.86 OR LB>1;
XG1:=XG AND XG2 AND C>HRY33 AND JLP;
XG3:=XG AND C<HHV(HIGH,250)*0.3;
XG11:=XG1 OR XG3;
W8:=XG11 OR XG1;
GET:=ZIG(3,5),COLORFFFFFF;
PL5:=ZIG(3,5);
EN1:=ZIG(3,5)>REF(ZIG(3,5),1) AND REF(ZIG(3,5),1)<=REF(ZIG(3,5),2)
AND REF(ZIG(3,5),2)<=REF(ZIG(3,5),3);
EX1:=ZIG(3,5)<REF(ZIG(3,5),1) AND REF(ZIG(3,5),1)>=REF(ZIG(3,5),2)
AND REF(ZIG(3,5),2)>=REF(ZIG(3,5),3);
PL10:=ZIG(3,10);
EN2:=ZIG(3,10)>REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)<=REF(ZIG(3,10),2)
AND REF(ZIG(3,10),2)<=REF(ZIG(3,10),3);
EX2:=ZIG(3,10)<REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)>=REF(ZIG(3,10),2)
AND REF(ZIG(3,10),2)>=REF(ZIG(3,10),3);
PL20:=ZIG(3,20);
EN3:=ZIG(3,20)>REF(ZIG(3,20),1) AND REF(ZIG(3,20),1)<=REF(ZIG(3,20),2)
AND REF(ZIG(3,20),2)<=REF(ZIG(3,20),3);
EX3:=ZIG(3,20)<REF(ZIG(3,20),1) AND REF(ZIG(3,20),1)>=REF(ZIG(3,20),2)
AND REF(ZIG(3,20),2)>=REF(ZIG(3,20),3);
PL40:=ZIG(3,40);
走强1:=BARSLAST(PL5<REF(PL5,1));
走弱1:=BARSLAST(PL5>REF(PL5,1));
走强2:=BARSLAST(PL10<REF(PL10,1));
走弱2:=BARSLAST(PL10>REF(PL10,1));
走强3:=BARSLAST(PL20<REF(PL20,1));
走弱3:=BARSLAST(PL20>REF(PL20,1));
ZTJZ5:=IF(PL10>REF(PL10,1),COUNT(EN1,走强2),0);
ZTJD5:=IF(PL10>REF(PL10,1),COUNT(EX1,走强2),0);
DTJZ5:=IF(PL10<REF(PL10,1),COUNT(EN1,走弱2),0);
DTJD5:=IF(PL10<REF(PL10,1),COUNT(EX1,走弱2),0);
ZTJZ10:=IF(PL20>REF(PL20,1),COUNT(EN2,走强3),0);
ZTJD10:=IF(PL20>REF(PL20,1),COUNT(EX2,走强3),0);
DTJZ10:=IF(PL20<REF(PL20,1),COUNT(EN2,走弱3),0);
DTJD10:=IF(PL20<REF(PL20,1),COUNT(EX2,走弱3),0);
WLT11:=EN1 AND DTJZ5=1;
WLT22:=EN2 AND ZTJZ5=1;
WLT33:=WLT11 OR WLT22;
WLT01:=EN2 AND DTJZ10=1;
WLT02:=EN3 AND ZTJZ10=1;
WLT03:=WLT01 OR WLT02;
WLT:=WLT33 AND WLT03;
未来牛:W8 OR WLT,COLORLIMAGENTA,NODRAW;
DRAWTEXT(未来牛,L-0.08,'←未来牛'),COLORCYAN;
{雨青底 选股}
M5:=MA(CLOSE,5);
M4:=MA(CLOSE,4);
MA3:=MA(CLOSE,3);
VOL5:=MA(VOL,5);
雨青:M5>M4 AND SLOPE(M5,5)<0 AND SLOPE(M4,4)<0 AND SLOPE(MA3,3) AND REF(M4>MA3,1)
AND CROSS(MA3,M4) AND VOL>VOL5,COLORRED,NODRAW;
DRAWTEXT(雨青,L-0.08,'←雨青底'),COLORRED;
{千均买 选股}
JE:=VOL;
JJ2:=(HIGH+LOW+CLOSE)/3;
QJ00:=VOL/IF(HIGH=LOW,4,HIGH-LOW);
主买:=(QJ00*(JJ2-MIN(CLOSE,OPEN)));
主卖:=(QJ00*(MIN(OPEN,CLOSE)-LOW));
AAQ:=IF(C>(H+L)/2,JE,0);
BBQ:=IF(C<(H+L)/2,JE,0);
F1:=SUM(AAQ,5);F2:=SUM(BBQ,5);F3:=EMA(F1-F2,3);
千均买:主买>主卖 AND CROSS(F3,REF(F3,1)) AND F3<0 AND C<15,COLORWHITE,NODRAW;
DRAWTEXT(千均买>0,L-0.9,'←千均买'),COLORWHITE;
{BAIS买入}
BIAS5:=(C-MA(C,6))/MA(C,6)*100;
BIAS6:=(C-MA(C,12))/MA(C,12)*100;
BIAS7:=(C-MA(C,24))/MA(C,24)*100;
BIAS8:=(BIAS5+2*BIAS6+3*BIAS7)/6;
乖离1:=MA(BIAS8,6);
乖离:=CROSS(BIAS8,乖离1) AND 乖离1<-9,COLORYELLOW,NODRAW;
DRAWTEXT(乖离,L+0.15,'←BAIS买入'),COLORWHITE;
{枯木逢春}
急速超跌:=(C-MA(C,34))/MA(C,34)*100<-14;{34日乖离率}
当日收阳:=(H-L)/L>0.07{当天振幅大于7%} AND (C-O)/O>0.07{当天的K线实体长度大于7%}
AND C/REF(C,1)>1.05{当日涨幅超过5%};
枯木逢春:急速超跌 AND 当日收阳,COLORFF00FF,NODRAW;
DRAWTEXT(枯木逢春,L+0.85,'←枯木逢春'),COLORWHITE;
解答如下:
CC:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20);
DD:=DMA(CLOSE,CC);
上:(1+7/100)*DD,CIRCLEDOT,COLORBLUE;
下:(1-7/100)*DD,CIRCLEDOT,COLORBLUE;
中:(上+下)/2,CIRCLEDOT,COLORF0F000;
STICKLINE(C/REF(C,1)>1.095,C,O,2,0),COLORMAGENTA;
STICKLINE(C/REF(C,1)<0.95,C,O,2,0),COLORGREEN;
疯狂:(1+14/100)*DD,DOTLINE,COLORYELLOW;
炒底:(1-14/100)*DD,DOTLINE,COLOR9000F5;
{好底}
D:=EMA((C*3+H+L+O)/6,5);
A线:HHV(D,13),COLORYELLOW,LINETHICK2;
B线:LLV(D,13),COLORYELLOW,LINETHICK2;
日平:="MACD.MACD#DAY"(12,26,9);
周平:="MACD.MACD#WEEK"(12,26,9);
JC:=(A线-B线);
壹:=COUNT(JC>REF(JC,1)AND A线>REF(A线,1),5)=1 AND JC>REF(JC,1)AND A线>REF(A线,1)AND D>=REF(D,1);
G1:=FILTER(壹=1,10);
G2:=BARSLAST(G1>0);
加1:=COUNT(日平>=0 AND 周平>=0,5)=1 AND 日平>=0 AND 周平>=0;
加2:=FILTER(D=A线 AND REF(D,1)<REF(A线,1)AND REF(D,2)<REF(A线,2),10);
①:=FILTER(加1=1,10);
②:=BARSLAST(①>0);
好底:FILTER(COUNT(D=B线,3)>=2 AND D>B线,5),COLORRED,LINETHICK0;
DRAWTEXT(好底,L-0.3,'←好底'),COLOR1880FF;
{金兰三宝}
N:=9;
N1:=6;
M:=14;
TYP := (HIGH + LOW + CLOSE)/3;
CC1:(TYP-MA(TYP,M))/(0.015*AVEDEV(TYP,M)),COLORFF00FF,LINETHICK0;
C1:=SMA(CC1,3,1);
C2:=SMA(C1,3,1);
C3:=3*C1-2*C2;
CB1:=EMA(C3,5);
CB2:=REF(CB1,1);
LC :REF(CLOSE,1),LINETHICK0;
RSI1:SMA(MAX(CLOSE-LC,0),N1,1)/SMA(ABS(CLOSE-LC),N1,1)*100,LINETHICK0;
RSI:(RSI1-50)*5,LINETHICK0,COLORFFFFFF;
R1:=SMA(RSI,3,1);
D1:=SMA(R1,3,1);
J1:=3*R1-2*D1;
RR1:=EMA(J1,5);
RR2:=REF(RR1,1);
RR:=RR1>RR2;
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:SMA(RSV,3,1),LINETHICK0;
K1:(K-50)*5,COLOR00FF00,LINETHICK0;
K2:=SMA(K1,3,1);
D2:=SMA(K2,3,1);
J2:=3*K2-2*D2;
BB1:=EMA(J2,5);
BB2:=REF(BB1,1);
买入:RR AND NOT(REF(RR,1)) AND (RR1<-100 AND BB1<-100) AND CB1<-100,LINETHICK0;
DRAWICON(买入>0,L-0.05,11);
DRAWTEXT(买入>0,L-0.1,'←三宝'),COLOR9000F5;
{抄底特准 选股}
VAB1:=REF(CLOSE,1);
VAB2:=SMA(MAX(CLOSE-VAB1,0),7,1)/SMA(ABS(CLOSE-VAB1),7,1)*100;
特准:=FILTER(REF(VAB2,1)<20 AND VAB2>REF(VAB2,1),5);
DRAWTEXT(特准,L-0.5,'←特准'),COLOR00FFFF;
{极地上涨 选股}
VA1:=HHV(HIGH,9)-LLV(LOW,9);
VA2:=HHV(HIGH,9)-CLOSE;
VA3:=CLOSE-LLV(LOW,9);
VA4:=VA2/VA1*100-70;
VA5:=(CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60))*100;
VA6:=(CLOSE+HIGH+LOW)/3;
VA7:=SMA(VA3/VA1*100,3,1);
VA8:=LLV(LOW,34);
VA9:=SMA(VA7,3,1)-SMA(VA4,9,1);
VARA:=IF(VA9>100,VA9-100,0);
VARB:=HHV(HIGH,34);
VARC:=EMA((VA6-VA8)/(VARB-VA8)*100,13);
VARD:=EMA(0.667*REF(VARC,1)+0.333*VARC,2);
VARE:=SMA(MAX(CLOSE-REF(CLOSE,1),0)/CLOSE,8,1)/SMA(ABS(INDEXC-REF(INDEXC,1))/INDEXC,8,1)*100-25;
VARF:=MA(VARE,3);
VAR1:=HHV(HIGH,9)-LLV(LOW,9);
VAR2:=HHV(HIGH,9)-CLOSE;
VAR3:=CLOSE-LLV(LOW,9);
VAR4:=((VAR2)/(VAR1))*(100)-70;
VAR5:=((CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60)))*(100);
VAR6:=((2)*(CLOSE)+HIGH+LOW)/(4);
VAR7:=SMA(((VAR3)/(VAR1))*(100),3,1);
VAR8:=LLV(LOW,34);
VAR9:=SMA(VAR7,3,1)-SMA(VAR4,9,1);
VAR10:=IF((VAR9>100),VAR9-100,0);
VAR11:=HHV(HIGH,34);
B1:=EMA(((VAR6-VAR8)/(VAR11-VAR8))*(100),8);
领先:=EMA(B1,5);
生命线:=EMA(VARD,1);
V1:=MA(C,5)=HHV(MA(C,5),20);
V2:=MA(C,5)>MA(C,10);
V3:=MA(V,5)>MA(V,40)*1.01;
V4:=COUNT(MA(C,1)>REF(C,1),2)=2;
VV:=V1 AND V2 AND V3 AND V4;
A1:=EMA(CLOSE,8);
A2:=EMA(A1,20);
A3:=CROSS(A1,A2);
A4:=A1<EMA(CLOSE,120);
A5:=3*SMA((CLOSE-LLV(LOW,18))/(HHV(HIGH,18)-LLV(LOW,18))*100,21,1)-2*
SMA(SMA((CLOSE-LLV(LOW,18))/(HHV(HIGH,18)-LLV(LOW,18))*100,20,1),8,1);
安全位:=20;
低位转强:=CROSS(A5,安全位);
开始拉升:=CROSS(VARC,生命线) AND VARC>VARD AND VARC<55 AND C>O;
A6:=LLV(C,500)=LLV(C,5) AND C/REF(C,1)>(1+9.8/100);
极地上涨:=A6;
极底:开始拉升>0 AND 开始拉升<400 OR 极地上涨>0 AND 极地上涨<400
OR (低位转强>0 AND 低位转强<400) OR (低位转强>0),COLORCDFFBB,LINETHICK0;
DRAWTEXT(极底,L-0.7,'←极底'),COLORCDFFBB;
{抄底 选股}
MMM:=1;
SVOL:=INTPART(SUM(V,0)/CAPITAL);
TJ0:=SVOL>REF(SVOL,1) OR BARSSINCE(CLOSE)=0;
S1:=BARSLAST(TJ0)+1;
TJJ2:=S1<REF(S1,1);
S2:=IF(TJJ2,REF(S1,1)+1,S1);
S3:=SUM(TJJ2,0);
ZK1:="KD.K#WEEK"(9,3,3);
ZD2:="KD.D#WEEK"(9,3,3);
ZF1:="MACD.DIFF#WEEK"(12,26,9);
ZA2:="MACD.DEA#WEEK"(12,26,9);
换手:V/CAPITAL*100,LINETHICK0;
JCD:=CROSS(ZK1,ZD2) AND REF(ZD2,1)<30;
抄底:ANY(JCD,MMM),COLORCYAN,LINETHICK0;
DRAWTEXT(抄底,L-0.8,'←抄底'),COLORCYAN;
{只做牛市 选股}
HR:=HHV(HIGH,55);
HRY:=LLV(LOW,55);
HRY11:=HR*HRY;
HRY33:=SQRT(HRY11);
WLT1:=EMA(C,3);
WLT2:=EMA(C,5);
WLT3:=EMA(WLT2,5);
HP:=(HHV(CLOSE,10)-LLV(CLOSE,10))/CLOSE<0.10;
LB:=VOL/MA(VOL,5);
X1:=(C+L+H)/3;
BB5:=ATAN(EMA(X1,7)-REF(EMA(X1,7),1))*3.1416*10;
EMA3:=EMA(C,3);
TT:=FILTER(BB5>1 AND EMA(X1,7)>REF(EMA(X1,7),1),10);
MM:=WLT1>REF(WLT1,1) AND REF(WLT1,1)<REF(WLT1,2) ;
GG1:=CROSS(WLT1,WLT2);
TYB:= (HIGH + LOW + CLOSE)/3;
CCI1:=(TYB-MA(TYB,6))/(0.015*AVEDEV(TYB,5));
差值1:ABS(REF(CCI1,1)-CCI1),LINETHICK0;
CCI2:=(TYB-MA(TYB,10))/(0.015*AVEDEV(TYB,10));
差值2:ABS(REF(CCI2,1)-CCI2),LINETHICK0;
CCI3:=(TYB-MA(TYB,20))/(0.015*AVEDEV(TYB,20));
差值3:ABS(REF(CCI3,1)-CCI3),LINETHICK0;
CCI4:=(TYB-MA(TYB,30))/(0.015*AVEDEV(TYB,30));
差值4:ABS(REF(CCI4,1)-CCI4),LINETHICK0;
CCI5:=(TYB-MA(TYB,60))/(0.015*AVEDEV(TYB,60));
差值5:ABS(REF(CCI5,1)-CCI5),LINETHICK0;
CCI:(CCI1+CCI2+CCI3+CCI4+CCI5)/2,COLORRED,LINETHICK0;
WLT91:=HHV(CCI,13);
WLT92:=LLV(CCI,13)<-100;
WLT95:=COUNT(WLT92,13)>=3;
WLT93:=CCI>WLT91;
WLT96:=CROSS(CCI,100);
TJ91:=WLT95 AND WLT96;
JLP:=FILTER(TJ91,5);
超买:=MA(C,10)*IF(CAPITAL=0,1.04,1.1);
超卖:=MA(C,10)*IF(CAPITAL=0,0.95,0.9);
TEND:=EMA(((SLOPE(CLOSE,21) * 20) + CLOSE),42);
BB:=TEND>REF(TEND,1) AND REF(TEND,1) >REF(TEND,2);
GG2:=CROSS(WLT1,TEND);
HRY1:=LLV(LOW,55);
HRY2:=HHV(HIGH,21);
GG3:=C<HRY2*0.8 AND C>HRY33;
JJ1:=C<HRY1*1.62;
TJ1:=GG1;
TJ2:=GG2 AND JJ1;
TJ3:=GG1 AND GG3 ;
XG:=TJ1 OR TJ3 ;
XG2:=C<HRY2*0.86 OR LB>1;
XG1:=XG AND XG2 AND C>HRY33 AND JLP;
XG3:=XG AND C<HHV(HIGH,250)*0.3;
XG11:=XG1 OR XG3;
W8:=XG11 OR XG1;
GET:ZIG(3,5),COLORFFFFFF;
PL5:=ZIG(3,5);
EN1:=ZIG(3,5)>REF(ZIG(3,5),1) AND REF(ZIG(3,5),1)<=REF(ZIG(3,5),2)
AND REF(ZIG(3,5),2)<=REF(ZIG(3,5),3);
EX1:=ZIG(3,5)<REF(ZIG(3,5),1) AND REF(ZIG(3,5),1)>=REF(ZIG(3,5),2)
AND REF(ZIG(3,5),2)>=REF(ZIG(3,5),3);
PL10:=ZIG(3,10);
EN2:=ZIG(3,10)>REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)<=REF(ZIG(3,10),2)
AND REF(ZIG(3,10),2)<=REF(ZIG(3,10),3);
EX2:=ZIG(3,10)<REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)>=REF(ZIG(3,10),2)
AND REF(ZIG(3,10),2)>=REF(ZIG(3,10),3);
PL20:=ZIG(3,20);
EN3:=ZIG(3,20)>REF(ZIG(3,20),1) AND REF(ZIG(3,20),1)<=REF(ZIG(3,20),2)
AND REF(ZIG(3,20),2)<=REF(ZIG(3,20),3);
EX3:=ZIG(3,20)<REF(ZIG(3,20),1) AND REF(ZIG(3,20),1)>=REF(ZIG(3,20),2)
AND REF(ZIG(3,20),2)>=REF(ZIG(3,20),3);
PL40:=ZIG(3,40);
走强1:=BARSLAST(PL5<REF(PL5,1));
走弱1:=BARSLAST(PL5>REF(PL5,1));
走强2:=BARSLAST(PL10<REF(PL10,1));
走弱2:=BARSLAST(PL10>REF(PL10,1));
走强3:=BARSLAST(PL20<REF(PL20,1));
走弱3:=BARSLAST(PL20>REF(PL20,1));
ZTJZ5:=IF(PL10>REF(PL10,1),COUNT(EN1,走强2),0);
ZTJD5:=IF(PL10>REF(PL10,1),COUNT(EX1,走强2),0);
DTJZ5:=IF(PL10<REF(PL10,1),COUNT(EN1,走弱2),0);
DTJD5:=IF(PL10<REF(PL10,1),COUNT(EX1,走弱2),0);
ZTJZ10:=IF(PL20>REF(PL20,1),COUNT(EN2,走强3),0);
ZTJD10:=IF(PL20>REF(PL20,1),COUNT(EX2,走强3),0);
DTJZ10:=IF(PL20<REF(PL20,1),COUNT(EN2,走弱3),0);
DTJD10:=IF(PL20<REF(PL20,1),COUNT(EX2,走弱3),0);
WLT11:=EN1 AND DTJZ5=1;
WLT22:=EN2 AND ZTJZ5=1;
WLT33:=WLT11 OR WLT22;
WLT01:=EN2 AND DTJZ10=1;
WLT02:=EN3 AND ZTJZ10=1;
WLT03:=WLT01 OR WLT02;
WLT:=WLT33 AND WLT03;
未来牛:W8 OR WLT,LINETHICK0;
DRAWTEXT(未来牛,L-0.08,'←未来牛'),COLORCYAN;
{雨青底 选股}
M5:=MA(CLOSE,5);
M4:=MA(CLOSE,4);
MA3:=MA(CLOSE,3);
VOL5:=MA(VOL,5);
雨青:M5>M4 AND SLOPE(M5,5)<0 AND SLOPE(M4,4)<0 AND SLOPE(MA3,3) AND REF(M4>MA3,1)
AND CROSS(MA3,M4) AND VOL>VOL5,COLORRED,LINETHICK0;
DRAWTEXT(雨青,L-0.08,'←雨青底'),COLORRED;
{千均买 选股}
JE:=VOL;
JJ2:=(HIGH+LOW+CLOSE)/3;
QJ00:=VOL/IF(HIGH=LOW,4,HIGH-LOW);
主买:=(QJ00*(JJ2-MIN(CLOSE,OPEN)));
主卖:=(QJ00*(MIN(OPEN,CLOSE)-LOW));
AAQ:=IF(C>(H+L)/2,JE,0);
BBQ:=IF(C<(H+L)/2,JE,0);
F1:=SUM(AAQ,5);F2:=SUM(BBQ,5);F3:=EMA(F1-F2,3);
千均买:主买>主卖 AND CROSS(F3,REF(F3,1)) AND F3<0 AND C<15,COLORWHITE,LINETHICK0;
DRAWTEXT(千均买>0,L-0.9,'←千均买'),COLORWHITE;
{BAIS买入}
BIAS5:=(C-MA(C,6))/MA(C,6)*100;
BIAS6:=(C-MA(C,12))/MA(C,12)*100;
BIAS7:=(C-MA(C,24))/MA(C,24)*100;
BIAS8:=(BIAS5+2*BIAS6+3*BIAS7)/6;
乖离1:=MA(BIAS8,6);
乖离:CROSS(BIAS8,乖离1) AND 乖离1<-9,COLORYELLOW,LINETHICK0;
DRAWTEXT(乖离,L+0.15,'←BAIS买入'),COLORWHITE;
{枯木逢春}
急速超跌:=(C-MA(C,34))/MA(C,34)*100<-14;{34日乖离率}
当日收阳:=(H-L)/L>0.07{当天振幅大于7%} AND (C-O)/O>0.07{当天的K线实体长度大于7%}
AND C/REF(C,1)>1.05{当日涨幅超过5%};
枯木逢春:急速超跌 AND 当日收阳,COLORFF00FF,LINETHICK0;
DRAWTEXT(枯木逢春,L+0.85,'←枯木逢春'),COLORWHITE;