通达信金字塔用主图划线加解盘公式

[复制链接]
查看180 | 回复0 | 2022-7-24 08:30:08 | 显示全部楼层 |阅读模式

通达信金字塔用主图划线加解盘公式

m:=5;
n1:=10;
n2:=20;
n3:=34;
n:=3;

JJH:=H;
JJL:=L;
AA2:=REF(JJH,N)=HHV(JJH,2*N+1);
AA3:=FILTER(AA2,N);
AA4:=BACKSET(AA3,N+1);
AA5:=FILTER(AA4,N);
AA7:=REF(JJL,N)=LLV(JJL,2*N+1);
AA8:=FILTER(AA7,N);
AA9:=BACKSET(AA8,N+1);
AA10:=FILTER(AA9,N);
AA11:=REF(H,BARSLAST(AA5));
AA12:=REF(L,BARSLAST(AA10));
AA13:=BARSLAST(AA5)<BARSLAST(AA10) AND NOT(AA5) ;
AA14:=BARSLAST(AA5)>BARSLAST(AA10) AND NOT(AA10);
AA15:=BARSLAST(AA5);
AA16:=CONST(AA15);
AA17:=REF(AA11,AA15+1);
AA18:=CONST(AA17);
AA19:=BARSLAST(H=AA18);
AA20:=CONST(AA19);
AA21:=BARSLAST(AA10);
AA22:=CONST(AA21);
AA23:=REF(AA12,AA21+1);
AA24:=CONST(AA23);
AA25:=BARSLAST(L=AA24);
AA26:=CONST(AA25);
RR:=BARSLAST(H=CONST(AA11));

BB2:=REF(JJH,M)=HHV(JJH,2*M+1);
BB3:=FILTER(BB2,M);
BB4:=BACKSET(BB3,M+1);
BB5:=FILTER(BB4,M);
BB7:=REF(JJL,M)=LLV(JJL,2*M+1);
BB8:=FILTER(BB7,M);
BB9:=BACKSET(BB8,M+1);
BB10:=FILTER(BB9,M);
BB11:=REF(H,BARSLAST(BB5));
BB12:=REF(L,BARSLAST(BB10));
BB13:=BARSLAST(BB5)<BARSLAST(BB10) AND NOT(BB5) ;
BB14:=BARSLAST(BB5)>BARSLAST(BB10) AND NOT(BB10);
BB15:=BARSLAST(BB5);
BB16:=CONST(BB15);
BB17:=REF(BB11,BB15+1);
BB18:=CONST(BB17);
BB19:=BARSLAST(H=BB18);
BB20:=CONST(BB19);
BB21:=BARSLAST(BB10);
BB22:=CONST(BB21);
BB23:=REF(BB12,BB21+1);
BB24:=CONST(BB23);
BB25:=BARSLAST(L=BB24);
BB26:=CONST(BB25);

CC2:=REF(JJH,N1)=HHV(JJH,2*N1+1);
CC3:=FILTER(CC2,N1);
CC4:=BACKSET(CC3,N1+1);
CC5:=FILTER(CC4,N1);
CC7:=REF(JJL,N1)=LLV(JJL,2*N1+1);
CC8:=FILTER(CC7,N1);
CC9:=BACKSET(CC8,N1+1);
CC10:=FILTER(CC9,N1);
CC11:=REF(H,BARSLAST(CC5));
CC12:=REF(L,BARSLAST(CC10));
CC13:=BARSLAST(CC5)<BARSLAST(CC10) AND NOT(CC5) ;
CC14:=BARSLAST(CC5)>BARSLAST(CC10) AND NOT(CC10);
CC15:=BARSLAST(CC5);
CC16:=CONST(CC15);
CC17:=REF(CC11,CC15+1);
CC18:=CONST(CC17);
CC19:=BARSLAST(H=CC18);
CC20:=CONST(CC19);
CC21:=BARSLAST(CC10);
CC22:=CONST(CC21);
CC23:=REF(CC12,CC21+1);
CC24:=CONST(CC23);
CC25:=BARSLAST(L=CC24);
CC26:=CONST(CC25);


DD2:=REF(JJH,N2)=HHV(JJH,2*N2+1);
DD3:=FILTER(DD2,N2);
DD4:=BACKSET(DD3,N2+1);
DD5:=FILTER(DD4,N2);
DD7:=REF(JJL,N2)=LLV(JJL,2*N2+1);
DD8:=FILTER(DD7,N2);
DD9:=BACKSET(DD8,N2+1);
DD10:=FILTER(DD9,N2);
DD11:=REF(H,BARSLAST(DD5));
DD12:=REF(L,BARSLAST(DD10));
DD13:=BARSLAST(DD5)<BARSLAST(DD10) AND NOT(DD5) ;
DD14:=BARSLAST(DD5)>BARSLAST(DD10) AND NOT(DD10);
DD15:=BARSLAST(DD5);
DD16:=CONST(DD15);
DD17:=REF(DD11,DD15+1);
DD18:=CONST(DD17);
DD19:=BARSLAST(H=DD18);
DD20:=CONST(DD19);
DD21:=BARSLAST(DD10);
DD22:=CONST(DD21);
DD23:=REF(DD12,DD21+1);
DD24:=CONST(DD23);
DD25:=BARSLAST(L=DD24);
DD26:=CONST(DD25);


EE2:=REF(JJH,N3)=HHV(JJH,2*N3+1);
EE3:=FILTER(EE2,N3);
EE4:=BACKSET(EE3,N3+1);
EE5:=FILTER(EE4,N3);
EE7:=REF(JJL,N3)=LLV(JJL,2*N3+1);
EE8:=FILTER(EE7,N3);
EE9:=BACKSET(EE8,N3+1);
EE10:=FILTER(EE9,N3);
EE11:=REF(H,BARSLAST(EE5));
EE12:=REF(L,BARSLAST(EE10));
EE13:=BARSLAST(EE5)<BARSLAST(EE10) AND NOT(EE5) ;
EE14:=BARSLAST(EE5)>BARSLAST(EE10) AND NOT(EE10);
EE15:=BARSLAST(EE5);
EE16:=CONST(EE15);
EE17:=REF(EE11,EE15+1);
EE18:=CONST(EE17);
EE19:=BARSLAST(H=EE18);
EE20:=CONST(EE19);
EE21:=BARSLAST(EE10);
EE22:=CONST(EE21);
EE23:=REF(EE12,EE21+1);
EE24:=CONST(EE23);
EE25:=BARSLAST(L=EE24);
EE26:=CONST(EE25);


压力:DRAWLINE(CURRBARSCOUNT=CONST(RR)+1,AA11,CURRBARSCOUNT=1,AA11,1),COLORYELLOW;
DRAWLINE(CURRBARSCOUNT=AA20+1,H,IF(CONST(AA11)>=CONST(AA17),CURRBARSCOUNT=AA20+1,CURRBARSCOUNT=AA16+1),H,1),COLORLIRED;
DRAWLINE(CURRBARSCOUNT=AA26+1,L,CURRBARSCOUNT=AA22+1,L,1),COLORRED;
DRAWLINE(CURRBARSCOUNT=BB20+1,H,IF(CONST(BB11)>=CONST(BB17),CURRBARSCOUNT=BB20+1,CURRBARSCOUNT=BB16+1),H,1),COLORBBFFFF;
DRAWLINE(CURRBARSCOUNT=BB26+1,L,CURRBARSCOUNT=BB22+1,L,1),COLORYELLOW;
DRAWLINE(CURRBARSCOUNT=CC20+1,H,IF(CONST(CC11)>=CONST(CC17),CURRBARSCOUNT=CC20+1,CURRBARSCOUNT=CC16+1),H,1),COLORFF00BB;
DRAWLINE(CURRBARSCOUNT=CC26+1,L,CURRBARSCOUNT=CC22+1,L,1),COLORMAGENTA;
DRAWLINE(CURRBARSCOUNT=DD20+1,H,IF(CONST(DD11)>=CONST(DD17),CURRBARSCOUNT=DD20+1,CURRBARSCOUNT=DD16+1),H,1),COLORC5AC72;
DRAWLINE(CURRBARSCOUNT=DD26+1,L,CURRBARSCOUNT=DD22+1,L,1),COLOREEAC72;
DRAWLINE(CURRBARSCOUNT=EE20+1,H,IF(CONST(EE11)>=CONST(EE17),CURRBARSCOUNT=EE20+1,CURRBARSCOUNT=EE16+1),H,1),COLORABD0BC;
DRAWLINE(CURRBARSCOUNT=EE26+1,L,CURRBARSCOUNT=EE22+1,L,1),COLORABD066;
LC:=REF(CLOSE,1);
RSI:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;
DRAWTEXTEX(ISLASTBAR,1,800,950,' ■rsi='  +NUMTOSTR(rsi,0)),COLORGREEN;

MA5:=MA(CLOSE,5);
MA13:=MA(CLOSE,13);

MA60:=MA(CLOSE,60);

VK:=SQRT(VOL/CAPITAL*100*5);

持股线:=MA(C,13);
持股:IF(RSI>=50,持股线,DRAWNULL),LINETHICK2,COLORRED;
加仓:=RSI<15 AND COUNT(C<O,4)=4;
DRAWTEXT(加仓=1,LOW-0.03,'加'),COLORWHITE,ALIGN0;

获利盘:=WINNER(C)*100,LINETHICK0;
高控盘:IF(获利盘>90,H*1.02,DRAWNULL),LINETHICK4,COLORRED;
STICKLINE(CROSS(获利盘,90) ,O,C,4,0 ),COLORRED;

A:=MA(-100*(HHV(HIGH,34)-CLOSE)/(HHV(HIGH,34)-LLV(LOW,34)),19);
B:=-100*(HHV(HIGH,14)-CLOSE)/(HHV(HIGH,14)-LLV(LOW,14));
D:=EMA(-100*(HHV(HIGH,34)-CLOSE)/(HHV(HIGH,34)-LLV(LOW,34)),4);

长期线:=A+100;
短期线:=B+100;
中期线:=D+100;
见顶:=((REF(中期线,1)>85 AND  REF(短期线,1)>85 AND REF(长期线,1)>65) AND CROSS(长期线,短期线));
顶区:=(中期线<REF(中期线,1) AND REF(中期线,1)>80) AND (REF(短期线,1)>95 OR REF(短期线,2)>95 ) AND 长期线>60 AND 短期线<83.5
AND 短期线<中期线 AND 短期线<长期线+4,COLORRED;
STICKLINE( 顶区,L*0.9,H*1.1,0,0-1),COLORGREEN;

底区:IF((长期线<12 AND 中期线<8 AND (短期线<7.2 OR REF(短期线,1)<5) AND (中期线>REF(中期线,1) OR 短期线>REF(短期线,1)))
OR (长期线<8 AND 中期线<7 AND 短期线<15 AND 短期线>REF(短期线,1)) OR (长期线<10 AND 中期线<7 AND 短期线<1),H*1.02,DRAWNULL) ,CROSSDOT,LINETHICK5,COLORWHITE;

低叉:IF((长期线<15 AND REF(长期线,1)<15 AND 中期线<18 AND 短期线>REF(短期线,1) AND CROSS(短期线,长期线) AND 短期线>中期线
AND (REF(短期线,1)<5 OR REF(短期线,2)<5 )  AND (中期线>=长期线 OR REF( 短期线,1)<1 )),H*1.02,DRAWNULL),CROSSDOT,LINETHICK5,COLORLIRED;

{DIFZ:=EMA(C,12)-EMA(C,26);
DEAZ:=EMA(DIFZ,9);
MACDZ:=2*(DIFZ-DEAZ);

零轴:=DYNAINFO(3)*1.25,COLORFFFFFF;
STICKLINE(MACDZ>0,MACDZ*2+零轴,零轴,1,0),COLOR400080;
STICKLINE(MACDZ>0 AND MACDZ>REF(MACDZ,1),MACDZ*2+零轴,零轴,1,0),COLOR0000FF;
STICKLINE(MACDZ<0,MACDZ*2+零轴,零轴,1,0),COLOR00D900;
STICKLINE(MACDZ<0 AND MACDZ>REF(MACDZ,1),MACDZ*2+零轴,零轴,1,0),COLORC080FF;
ZDIF:(DIFZ*2+零轴),COLORRED;
(DEAZ*2+零轴),COLORFFFFFF;
IF(DIFZ<=REF(DIFZ,1),DIFZ*2+零轴,DRAWNULL),COLORFFF000;}


TJ1:=EMA((C-L),20)/EMA((H-L),20)*100;
TJ2:=(L-ABS(MIN(C,O)))/L<=1;
TJ3:=ABS((L-MA(C,5)))/L*100>10 AND MA(C,5)<REF(MA(C,5),1) AND MA(C,5)>L;
TJ4:=TJ1 AND TJ2 AND TJ3;
搏:IF(TJ4 AND TJ1>REF(TJ1,1) AND C>O,LOW*0.99,DRAWNULL),CROSSDOT,LINETHICK5,COLORWHITE;
VARE:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20;
JDSH:=IF(VARE=-20,1,0);
试:IF(CROSS(0.9,JDSH),LOW*0.99,DRAWNULL),CROSSDOT,LINETHICK5,COLORYELLOW;
阴:IF(C>O && MA(C,5)<MA(C,10) && REF(C<O,1) && REF(C<O,2)&&REF(C<O,3)&&(REF(C,1)<REF(C,4)*0.88 OR REF(C,1)<REF(O,4)*0.88),LOW*0.99,DRAWNULL),CROSSDOT,LINETHICK5,COLORWHITE;
阴线买:IF(C>REF(L,1) AND COUNT(C<O,5)>=3 &&(REF(C,1)<REF(C,4)*0.88 OR REF(C,1)<REF(O,4)*0.88),LOW*0.99,DRAWNULL),CROSSDOT,LINETHICK5,COLORWHITE;
阴线:=c<o;
I:=REF(CLOSE,1);
RC:=SMA(MAX(CLOSE-I,0),6,1)/SMA(ABS(CLOSE-I),6,1)*100;

RSI1:=SMA(MAX(CLOSE-I,0),6,1)/SMA(ABS(CLOSE-I),6,1)*100;
年:=1+(BARSLAST(YEAR!=REF(YEAR,1)));
天数:=IF(PERIOD=5,年,DRAWNULL);
高1:=HHV(H,天数);
低1:=LLV(L,天数);


地:=CONST(低1),NODRAW,COLOR00FF00;
RCZ:=地;
Q1:=COUNT(RSI1<20,15)>=1;
Q2:=C<=LLV(C,15);
Q3:=RSI1>LLV(RSI1,15);
Q4:=V<REF(V,1);
DRAWTEXT(Q1 AND Q2 AND Q3 AND Q4  AND REF(C<O,1),l*0.99,'背'),COLORRED;
Q5:=IF(Q1 AND Q2 AND Q3 AND Q4,1,0);
DRAWTEXT(RSI1>REF(RSI1,1) AND REF(Q5=1 ,1),L*0.95,'背'),COLORYELLOW;
{BIAS}
BIAS1:=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100;
BIAS2:=(CLOSE-MA(CLOSE,12))/MA(CLOSE,12)*100;
BIAS3:=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100;
VR4:=(BIAS1+2*BIAS2+3*BIAS3)/6;
乖离:=MA(VR4,3);
STICKLINE(CROSS(VR4,乖离) AND 乖离<-9,l,l*0.88,2,0),COLORRED;
DRAWTEXT( C>O AND REF(乖离<-18,1) ,L*0.97,'坑'),COLORGREEN;
中乖:IF(BIAS2>=10,h*1.04,drawnull),COLORYELLOW,DOTLINE;
长乖:IF(BIAS3>=16,h*1.06,drawnull),COLORRED,DOTLINE;
中跌:IF(BIAS2<=-10,h*1.04,drawnull),COLORYELLOW,DOTLINE;
长跌:IF(BIAS3<=-16,h*1.06,drawnull),COLORLIRED,DOTLINE;
涨停板 :=CLOSE/REF(CLOSE,1)>1.097;
跌停板 :={CLOSE<=OPEN AND} CLOSE/REF(CLOSE,1)<0.91;
K线实体 :=ABS(CLOSE-OPEN);
阳线   :=CLOSE>OPEN OR 涨停板;
带下影阳线:=(阳线 OR 涨停板) AND (CLOSE-LOW)>1.6*(CLOSE-OPEN);
光脚阳线:=阳线 AND (OPEN-LOW)<0.36*(CLOSE-OPEN);
中阳线 :=CLOSE/OPEN>1.030;
短上影阳线:=阳线 AND (HIGH-CLOSE)<(HIGH-OPEN)*0.34;

中阴线 :=CLOSE/REF(CLOSE,1)<0.970;
平盘   :=CLOSE=OPEN;
平台整理:=HHV(CLOSE,5)/LLV(OPEN,5)<1.08;
MA1:= EMA(C,5);
MA2:= EMA(C,10);
MA3:= EMA(C,20);
MA4:= EMA(C,30);
MA5:= MA(C,120);
MID := MA(CLOSE,26);
UPPER:=MID + 20/10*STD(CLOSE,26);
LOWER:=MID - 20/10*STD(CLOSE,26);

多头排列:=MA1>MA2 AND MA2>MA3 AND MA2>MA4 AND MA4>REF(MA4,5);
空头排列:=MA1<MA2 AND MA2<MA3 AND MA3<MA4;
上升趋势:=MA4>REF(MA4,3) AND MA4>REF(MA4,1) AND MA1>MA4;
下跌趋势:=MA4<REF(MA4,3) AND MA4<REF(MA4,1) AND MA1<MA4;
一阴穿两线:=CLOSE/OPEN<0.985 AND HIGH>MA1 AND CLOSE<MA3;
一阳穿两线:=CLOSE/OPEN>1.016 AND LOW<MIN(MA1,MA3) AND CLOSE>MAX(MA1,MA3);
均线密集:=上升趋势 AND (MAX(MA1,MA4)/MIN(MA1,MA4))<1.01 AND MA1>MA2;
均线发散程度:=MA1/MA4;
均线向下发散:=空头排列 AND 均线发散程度<0.90 AND 均线发散程度<0.99*REF(均线发散程度,1);
均线向上发散:=多头排列 AND 均线发散程度>1.070 AND 均线发散程度>(1.013*REF(均线发散程度,1));
上升趋势形成:=上升趋势 AND MA1>REF(MA1,1) AND REF(NOT(上升趋势),1);
换手率:=(VOL/CAPITAL) ;
MV5 :=MA(VOL,5);
MV10:=MA(VOL,10);
MV20:=MA(VOL,20);

放量:=((VOL>REF(VOL,1) AND VOL>2*MV10) OR (VOL>3*MV10 AND VOL>2*MV5) OR (VOL>1.5*REF(VOL,1) AND VOL>1.6*MV5))
        AND ((换手率>2.0 AND NOT(上升趋势)) OR (换手率>3.0 AND 上升趋势));
过分放量:=VOL>2*REF(VOL,1) AND VOL>1.6*MV5 AND 换手率>3.0;

{  PAY ATTENTION!!! }
放量123:=VOL>1.5*REF(VOL,1) AND VOL>1.8*MV5 AND REF(VOL,1)>1.5*REF(VOL,2) {AND EVERY (阳线,2)} AND 换手率>2.0;
缩量:=VOL<(MAX(MV10,MV5)*1.2) AND VOL<(REF(VOL,1)*0.8);

{  PAY ATTENTION!!! }
成交放大:=VOL>MIN(MV10,MV5);
持续成交放大:=成交放大 AND REF(成交放大,1) AND REF(成交放大,2);
持续温和放量:=MV5>REF(MV5,5) AND MV5>MV10 AND HHV(VOL,6)<2.4*MV5 AND LLV(VOL,6)>0.3*MV20 {AND EVERY (阳线,6) AND EVERY (NOT(过分放量),6)}
             AND NOT(多头排列) AND 持续成交放大 AND MV5/CAPITAL<3 AND 换手率<8;

EXPLAIN(CROSS(CLOSE,MA13),'解:今日股价上穿持股线'),COLORMAGENTA;
EXPLAIN(CROSS(MA13,CLOSE),'解:今日股价跌破持股线'),COLORGREEN;
EXPLAIN(CROSS(CLOSE,MA60),'解:今日股价上穿60日线');
EXPLAIN(CROSS(MA60,CLOSE),'解:今日股价跌破60日线'),COLORGREEN;
EXPLAIN(rsi>=50,'解:今日持股'),COLORMAGENTA;
EXPLAIN(rsi<50,'解:今日持币'),COLORGREEN;
EXPLAIN((CLOSE>=MA60),'解:今日股价长线持股'),COLORMAGENTA;
EXPLAIN((MA60>CLOSE),'解:今日股价长线持币'),COLORGREEN;

DRAWTEXTEX(ISLASTBAR,1,500,950,' ■获利盘比例='+NUMTOSTR(WINNER(CLOSE)*100,2)),COLORGREEN;


五日总涨幅:=SUM((C-REF(C,1))/REF(C,1)*100,5)<1;
下影线:=(H-L)/L*100>5 AND (MIN(O,C)-L)/L*100>5;

AA:=REF(C,1)<REF(O,1);
BB:=C<REF(O,1);
BB1:=IF(C>O,O,C);
CC:=(BB1-L)/L>0.05;
T1{双针探底Q}:=COUNT((MIN(O,C)-L)/L*100>3,2)=2 AND REF(C<MA(C,5),1);
eXPLAIN(t1=1, '双针探底'),COLORGREEN;
AA1:=(MIN(CLOSE,OPEN)-LOW)/(HIGH-LOW)>0.66 ;
T2{双针Q}:=AA1 AND REF(AA1,1)  AND MAX(C,REF(C,1))/MIN(C,REF(C,1))<1.005 AND REF(C<MA(C,5),1);
eXPLAIN(t2=1, '双针探底'),COLORGREEN;
T3{单针探底}:=MIN(C,O)<MA(C,5) AND (MIN(C,O)-L)/O>0.05;
eXPLAIN(t3=1, '单针探底\n'),COLORGREEN;
T4{单针探}:=五日总涨幅 AND 下影线;
eXPLAIN(t4=1, '单针探底\n'),COLORGREEN;
T5{早晨十字星}:=REF(CLOSE,2)/REF(OPEN,2) < 0.95 AND REF(OPEN,1)
< REF(CLOSE,2) AND REF(OPEN,1)=REF(CLOSE,1) AND
CLOSE/OPEN>1.05 AND CLOSE>REF(CLOSE,2);
eXPLAIN(t5=1, '早晨十字星,上涨信号,见底回升\n'),COLORGREEN;
T6{黄昏十字星}:=REF(CLOSE,2)/REF(OPEN,2) > 1.05 AND REF(OPEN,1)
> REF(CLOSE,2) AND REF(OPEN,1)=REF(CLOSE,1) AND
CLOSE/OPEN<0.95 AND CLOSE<REF(CLOSE,2);
eXPLAIN(t6=1, '黄昏十字星,趋势停顿或反转,小跌信号\n'),COLORGREEN;
T7{射击之星Q}:=MIN(OPEN,CLOSE)=LOW AND HIGH-LOW > 3*(MAX(OPEN,CLOSE)-LOW) AND CLOSE > MA(CLOSE,5) AND MA1>MA2;
eXPLAIN(t7=1, '射击之星,可能见顶\n'),COLORGREEN;
T8{单针}:=AA AND BB AND CC AND REF(C<MA(C,5),1);
eXPLAIN(t8=1, '单针探底\n'),COLORGREEN;
T9{锤头}:=HIGH = MAX(OPEN,CLOSE) AND HIGH-LOW>3*(HIGH-MIN(OPEN,CLOSE)) AND CLOSE<MA(CLOSE,10);
eXPLAIN(t9=1, '锤头,可能见底回升\n'),COLORGREEN;
T10{吊颈Q}:=(OPEN!=CLOSE  AND ((HIGH-MAX(OPEN,CLOSE))/(HIGH-LOW))<0.16 ) AND (HIGH-LOW)>2.48*(ABS(OPEN-CLOSE)) AND CLOSE>MA1 AND (HIGH-LOW)/LOW>0.020;
eXPLAIN(t10=1, '吊颈,常出现于顶部附近\n'),COLORGREEN;
T11{穿头破脚跌Q}:=ABS((REF(CLOSE,1)-REF(OPEN,1))/REF(OPEN,1)<0.02 AND CLOSE/OPEN<0.986 AND CLOSE<MIN(REF(OPEN,1),REF(CLOSE,1)) AND OPEN>MAX(REF(CLOSE,1),REF(OPEN,1))) AND REF(OPEN,1)>MAX(MA1,MA2);
eXPLAIN(t11=1, '穿头破脚跌,见顶信号\n'),COLORGREEN;
T43{穿头破脚升Q}:=REF(CLOSE,1)/REF(OPEN,1)<0.990 AND CLOSE/OPEN>1.03 AND CLOSE>REF(OPEN,1) AND OPEN<REF(CLOSE,1);
eXPLAIN(t43=1, '穿头破脚升,涨升信号\n'),COLORGREEN;
T12{乌云盖顶}:=REF(CLOSE,1)/REF(OPEN,1)>1.02 AND CLOSE/OPEN<0.97 AND OPEN>REF(CLOSE,1) AND CLOSE<((REF(CLOSE,1) + REF(OPEN,1))/2) AND CLOSE>REF(OPEN,1);
eXPLAIN(t12=1, '乌云盖顶\,见顶或洗盘n'),COLORGREEN;
T13{曙光初现Q}:=REF(CLOSE,1)/REF(OPEN,1)<0.97 AND CLOSE/OPEN>1.03 AND OPEN<REF(CLOSE,1) AND CLOSE>REF(CLOSE,1) AND REF(RSI<40,1);
eXPLAIN(t13=1, '曙光初现,短线拉升\n'),COLORGREEN;
T14{身怀六甲1Q}:=ABS(REF(CLOSE,1)-REF(OPEN,1))/REF(CLOSE,1)>0.017 AND ABS(CLOSE-OPEN)/CLOSE<0.05 AND MAX(CLOSE,OPEN)<MAX(REF(CLOSE,1),REF(OPEN,1)) AND MIN(CLOSE,OPEN) > MIN(REF(CLOSE,1),REF(OPEN,1))
                  AND REF(阳线,1) AND REF(CLOSE,1)>MA1;
eXPLAIN(t14=1, '身怀六甲,盘整\n'),COLORGREEN;
T15{十字胎}:=ABS(REF(CLOSE,1)-REF(OPEN,1))/REF(CLOSE,1)>0.04 AND CLOSE=OPEN AND CLOSE < MAX(REF(CLOSE,1),REF(OPEN,1)) AND CLOSE > MIN(REF(CLOSE,1),REF(OPEN,1));
eXPLAIN(t15=1, '十字胎,盘整\n'),COLORGREEN;
T16{平顶}:=ABS(HIGH-REF(HIGH,1))/HIGH<0.001;
eXPLAIN(t16=1, '平顶股价可能转折\n'),COLORGREEN;
T17{平底}:=(ABS(LOW-REF(LOW,1))/LOW<0.001 AND ABS(REF(LOW,1)-REF(LOW,2))/REF(LOW,1)<=0.001) AND 阳线 AND MIN(OPEN,CLOSE)<MA1;
eXPLAIN(t17=1, '双针探底\n'),COLORGREEN;
T18{大阳烛}:=CLOSE/OPEN>1.07 AND 100*(HIGH/LOW) < 100*(CLOSE/OPEN)+2.3;
eXPLAIN(t18=1, '大阳烛\n'),COLORGREEN;
T19{4连阳Q}:=eVERY(CLOSE>OPEN,4);
eXPLAIN(t19=1, '4连阳,马上将出阴线\n'),COLORGREEN;
T20{5连阴Q}:=EVERY(CLOSE<OPEN,5);
eXPLAIN(t20=1, '5连阴底在眼前\n'),COLORGREEN;
T21{孕育线}:=REF(CLOSE,2)>REF(OPEN,2) AND (REF(CLOSE,2)
-REF(OPEN,2))/REF(OPEN,2)>=2/100  AND REF(OPEN,1)>=REF(CLOSE,1)
AND (REF(OPEN,1)-REF(CLOSE,1))/REF(CLOSE,1)<=2/100 AND REF(OPEN,1)
<=REF(CLOSE,2) AND REF(CLOSE,1)>=REF(OPEN,2) AND C>=OPEN
AND (CLOSE-OPEN)/OPEN>=2/100 AND CLOSE>=REF(OPEN,1) AND OPEN<=REF(CLOSE,1)
AND (MAX(CLOSE,REF(C,2))-MIN(CLOSE,REF(CLOSE,2)))/MIN(CLOSE,REF(CLOSE,2))
<=1/100;
eXPLAIN(t21=1, '孕育线,盘整\n'),COLORGREEN;
T22{大阴Q}:=OPEN/CLOSE>1.06 AND HIGH/LOW <(OPEN/CLOSE+0.030);
eXPLAIN(t22=1, '大阴线\n'),COLORGREEN;
T23{出水芙蓉}:=(OPEN<EMA(C,10) OR OPEN<EMA(C,20)) AND (C>MAX(EMA(C,10),MAX(EMA(C,20),EMA(C,30)))) AND (V/MA(V,30)>1.2 AND C/REF(C,1)>1.049) ;
eXPLAIN(t23=1, '出水芙蓉,股价穿20、40、60日均线,上攻势头初现\n');
T24{升势尽头Q}:=REF(阳线,1) AND REF(HIGH,1)/REF(CLOSE,1)>1.008 AND (ABS(CLOSE-OPEN)/OPEN<0.018 OR T10) AND (MAX(CLOSE,OPEN)<REF(HIGH,1) OR (CLOSE<OPEN
                  AND MAX(CLOSE,OPEN)<=REF(HIGH,1))) AND MIN(CLOSE,OPEN)>REF(CLOSE,1) AND MA1>MA2;
eXPLAIN(t24=1, '升势尽头,长期升势之后收出小实体K线,注意行情有可能临近结束\n'),COLORGREEN;
T25{跳空缺口1}:=LOW>REF(HIGH,1) AND REF(NOT(多头排列),1);
eXPLAIN(t25=1, '跳空缺口向上\n'),COLORGREEN;
T26{跳空缺口2}:=HIGH<REF(LOW,1);
eXPLAIN(t26=1, '跳空缺口向下\n'),COLORGREEN;
T27{加速三阴}:=(REF(阴线,2) OR (REF(平盘,2) AND REF(OPEN,2)<REF(MA1,2))) AND REF(阴线,1) AND 阴线 AND REF(CLOSE,1)<REF(CLOSE,2)*0.95 AND CLOSE<REF(CLOSE,1)
                  AND REF(CLOSE,2)<MIN(REF(MA1,2),REF(MA3,2)) AND REF(空头排列,1) AND CLOSE/OPEN<0.975 AND (CLOSE-LOW)/(OPEN-LOW)<0.35
                  AND ((OPEN<=(REF(CLOSE,1)*1.005) AND CLOSE/OPEN<0.95) OR (OPEN<REF(CLOSE,1)));

eXPLAIN(t27=1, '加速三阴底在眼前\n'),COLORGREEN;
T28{看涨吞没Q}:=REF(C<O,1) AND O<REF(C,1) AND C>REF(O,1);
eXPLAIN(t28=1, '看涨吞没\n'),COLORGREEN;
T29{看跌吞没Q}:=REF(C>O,1) AND O>REF(C,1) AND C<REF(O,1);
eXPLAIN(t29=1, '看跌吞没\n'),COLORGREEN;
T30{断头铡刀Q}:=CLOSE/OPEN<0.98 AND REF(MA1,1)>REF(MA4,1) AND CLOSE<MIN(MA2,MA4) AND OPEN>=MAX(MA1,MA2) AND (CLOSE-LOW)/LOW<0.015
                  AND CLOSE<MIN(REF(OPEN,1),REF(CLOSE,1));
eXPLAIN(t30=1, '断头铡刀,买出\n'),COLORGREEN;
T31{长下影Q}:=(MIN(CLOSE,OPEN)-LOW)/(HIGH-LOW)>0.667 AND (MIN(CLOSE,OPEN)-LOW)/LOW>0.02 AND REF(RSI<40,1) ;
eXPLAIN(t31=1, '长下影近底\n'),COLORGREEN;
T32{长上影Q}:=(HIGH-MAX(CLOSE,OPEN))/(HIGH-LOW)>0.48 AND (HIGH-MAX(CLOSE,OPEN))/CLOSE>0.035 AND REF(RSI>65,1);
eXPLAIN(t32=1, '长上影,短顶\n'),COLORGREEN;
T33{十字星Q}:=(ABS(CLOSE-OPEN))/(HIGH-LOW)<0.19 AND (ABS(CLOSE-OPEN)/CLOSE)<0.009 AND HIGH>LOW AND MAX(OPEN,CLOSE)<HIGH AND MIN(OPEN,CLOSE)>LOW
                  AND NOT(T3) AND NOT(T8) AND NOT(T10);
eXPLAIN(t33=1, '十字星,重要的警告信号,原趋势停顿或反转\n'),COLORGREEN;
T34{高开阴烛Q}:=OPEN/REF(CLOSE,1)>=1+5/100 && CLOSE/OPEN<=1-4/100 AND REF(RSI>70,1);
eXPLAIN(t34=1, '高开阴烛顶部信号\n'),COLORGREEN;
T35{看跌分离Q}:=OPEN=REF(OPEN,1) AND (CLOSE-OPEN)*(REF(CLOSE,1)-REF(OPEN,1))<0 AND REF(阳线,1);
eXPLAIN(t35=1, '看跌分离\n'),COLORGREEN;
T36{看涨分离Q}:=OPEN=REF(OPEN,1) AND (CLOSE-OPEN)*(REF(CLOSE,1)
-REF(OPEN,1))<0;
eXPLAIN(t36=1, '看涨分离\n'),COLORGREEN;
放量后缩量:=(REF(放量,1) OR (REF(放量,2) AND REF(VOL,1)>0.8*REF(VOL,2) AND 换手率>3.0)) AND VOL<REF(VOL,1)*0.6 AND MAX(OPEN,CLOSE)>MA1;
放量后缩量见顶:=((REF(放量,1) OR (REF(放量,2) AND REF(VOL,1)>0.8*REF(VOL,2) AND 换手率>3.0)) AND VOL<REF(VOL,1)*0.56 AND MAX(OPEN,CLOSE)>MA1
                  AND (T33 OR T24 OR T10 OR T14 OR T12 OR T32 )) AND NOT(涨停板) AND REF(阳线,1);
见顶K线:={(十字星 AND HIGH<>CLOSE) OR} T24 OR T10 OR T14 OR T12 OR T11 OR T32;
逃顶K线:=(T11 AND REF(T10,1)) ;
放量见顶:=放量 AND 见顶K线 AND MAX(OPEN,CLOSE)>MA1;


T45{低开大阳Q}:=OPEN<REF(L,1)&& CLOSE/OPEN>=1+4/100 AND REF(RSI<40,1);
eXPLAIN(t45=1, '低开大阳线,主力洗盘\n'),COLORGREEN;
T46{见顶缺口}:=CONST(IF((LOW>REF(HIGH,1)  AND OPEN>MA1 AND (HIGH-MAX(CLOSE,OPEN))/CLOSE>0.02 AND 多头排列  AND 均线向上发散 AND NOT (均线密集)  AND REF(CLOSE,1)>UPPER ),1,0));

eXPLAIN(t1=46, '见顶缺口\n'),COLORGREEN;
T47{冲顶三阳}:=(REF(阳线,2) AND REF(阳线,1) AND 阳线) AND (K线实体/OPEN)>0.04 AND K线实体>REF(K线实体,1)*0.9 AND REF(K线实体,1)>REF(K线实体,2) AND
      REF(CLOSE,1)/REF(CLOSE,2)>1.030 AND OPEN>=REF(CLOSE,1);

eXPLAIN(t47=1, '冲顶三阳,顶在眼前\n'),COLORGREEN;
T48{地量}:=CROSS(0.9,1/VOL*1000>0.01 AND "KDJ.J"<0);
eXPLAIN(t48=1, '地量,看大盘分析\n'),COLORGREEN;
QQ1:=(CLOSE-MA(CLOSE,42))/MA(CLOSE,42)*100;
T49{尾盘或明日搏}:=HHV(C,20)/C>1.15 AND H/L>1.05 AND CROSS(-6,QQ1);
eXPLAIN(t49=1, '尾盘或明日搏\n'),COLORGREEN;
T50{搓揉}:=CONST(IF((REF(H,1)-MAX(REF(C,1),REF(O,1)))/(REF(H,1)-REF(L,1))>0.6 AND (MIN(O,C)-L)/(H-L)>0.6,1,0));
eXPLAIN(t50=1, '搓揉线,主力洗盘或见顶'),COLORGREEN;

{解盘2:=IF(T24=1,'[升势尽头] 长期升势之后收出小实体K线,注意行情有可能临近结束 ',IF(T35=1,'看跌分离',
IF(T36=1,'看涨分离',IF(T19=1,'4连阳,可能转阴下跌',
IF(T20=1,'5连阴,可能回升转阳',IF(T35=1,'看跌分离,股价将下跌',
IF(T23=1,'出水芙蓉,阳线穿过20、40、60日均线,上攻势头初现',
IF(T25=1,'跳空缺口,突破盘整,向上涨开始',
IF(T26=1,'跳空缺口,突破盘整,向下跌开始‖',IF(T47=1,'冲顶三阳,即将见顶',
IF(T28=1,'看涨吞没',IF(T29=1,'看跌吞没',
IF(T45=1,'低开大阳线',IF(T49=1,'尾盘或明日搏',
IF(T30=1,'断头铡刀,股价将下跌',IF(T33=1,'十字星,重要的警告信号,原趋势停顿或反转',
IF(T34=1,'高开阴烛,短线顶部,后市向淡,发生逆转',DRAWNULL)))))))))))))))));
解盘3:=IF(T37=1,'换手率>20,短线即将见顶',IF(T38=1,'持续成交低迷',IF(T39=1,'放量后缩量,顶区',
IF(T41=1,'加速放量,关注量能释放的持续性' ,IF(T42=1,'放量,下跌' ,
IF(T44=1,'持续温何放量' ,IF(T40=1,'放量见顶' ,
IF(T48=1,'地量买点',

IF(T40=1,' 放量明显,将见顶',DRAWNULL)))))))));
DRAWTEXTeX(ISLASTBAR AND (T37=1 OR T38=1 OR T39=1 OR T40=1 OR T41=1 OR T48=1 OR T44=1 ),1,500,400,解盘3),COLORWHITE;
解盘1:=IF(T1=1,'双针探底行态,跌势稍缓',IF(T2=1,'双针探底行态,跌势稍缓',IF(T3=1,'单针探底行态,跌势稍缓',
IF(T4=1,'单针探底行态,跌势稍缓',IF(T5=1,'早晨十字星,上涨信号,见底回升',
IF(T43=1,'穿头破脚,看涨吞没',
IF(T8=1,'单针探底行态,跌势稍缓',
IF(T31=1,'长下影,有可能止跌回升,升势末期,须小心',
IF(T32=1,'长上影,表明行情上档压力沉重,升势受阻',
IF(T10=1,'吊颈,上升行情中见顶回落,顶部出现,见顶信号',IF(T11=1,'穿头破脚,顶部出现,见顶回落信号',
IF(T12=1,'乌云盖顶,见顶回落信号',
IF(T27=1,'加速3阴,底在眼前',
IF(T46=1,'见顶缺口,顶在眼前',DRAWNULL))))))))))))));
DRAWTEXTeX(ISLASTBAR AND (T1=1 OR T2=1 OR T3=1 OR T4=1  OR T5=1  OR T8=1  OR T10=1  OR T11=1 OR T12=1  OR T32=1 OR T31=1 OR T43=1 OR T46=1 ),1,600,300,解盘1),COLORGREEN;}

EXPLAIN(Rsi>85,'Rsi超买,短线即将见顶,应及时卖出'),colorFFFF00;
EXPLAIN(rsi<15,'rsi超卖,短线即将见底,应伺机买进'),colorFF00;
MTM:=CLOSE-REF(CLOSE,6);
MTMMA:=MA(MTM,6);
EXPLAIN(CROSS(MTM,MTMMA) AND MTMMA<-0.8,'MTM从下向上突破MTMMA,买入信号'),colorFF00;
EXPLAIN(CROSS(MTMMA,MTM) AND MTMMA>0.8,'MTM从上向下跌破MTMMA,卖出信号'),colorFFFF00;
EXPLAIN(RSI<15 and COUNT(c<o,4)=4, 'rSI向下跌破15,超卖,加疮买入'),COLORRED;
EXPLAIN(CROSS(RSI,15),'RSI向上突破15,买进信号'),colorFF00;
EXPLAIN(CROSS(RSI,85),'RSI向下跌破85,卖出信号'),colorFFFF00;

个股MSD:=EMA(100*(CLOSE-LLV(LOW,25))/(HHV(HIGH,25)-LLV(LOW,25)),18),LINETHICK2,colorFFFF;
大盘MSD:=EMA(100*(INDEXC-LLV(INDEXL,25))/(HHV(INDEXH,25)-LLV(INDEXL,25)),18),LINETHICK2,colorFF00;
强弱分水岭:=50,POINTDOT;
天:=80,CIRCLEDOT,colorFF0000;
试庄线:=20,CIRCLEDOT,colorFF00;
Q1:=个股MSD<=20 AND 大盘MSD<=20;
Q2:=个股MSD>=20 AND 大盘MSD<=20 AND RANGE(个股MSD,20,50) AND 个股MSD>REF(个股MSD,2);
Q3:=RANGE(个股MSD,50,80) AND RANGE(大盘MSD,20,50) AND 个股MSD>=REF(个股MSD,1) AND 大盘MSD>REF(大盘MSD,1);
Q4:=ANY(CROSS(个股MSD,20),4) AND 大盘MSD>20 AND 大盘MSD>REF(大盘MSD,1) AND 大盘MSD>个股MSD;
Q5:=RANGE(大盘MSD,80,100) AND CROSS(个股MSD,50) AND 个股MSD<80 AND 个股MSD>=REF(个股MSD,2);
Q6:=大盘MSD<20 AND CROSS(个股MSD,50);
Q7:=RANGE(大盘MSD,50,20) AND 个股MSD<=20 AND 个股MSD<REF(个股MSD,2);
Q8:=大盘MSD<REF(大盘MSD,2) AND 个股MSD<REF(个股MSD,2) AND 大盘MSD<80 AND 个股MSD<80 AND 大盘MSD>50 AND 个股MSD>50;
Q9:=大盘MSD<REF(大盘MSD,2) AND 个股MSD<REF(个股MSD,2) AND 大盘MSD<50 AND 个股MSD<50 AND 大盘MSD>20 AND 个股MSD>20;
Q10:=大盘MSD<REF(大盘MSD,2) AND RANGE(个股MSD,20,50) AND RANGE(大盘MSD,20,50) AND 个股MSD>REF(个股MSD,1) AND CROSS(个股MSD,大盘MSD);
Q11:=RANGE(个股MSD,80,100) AND RANGE(大盘MSD,80,100) AND 大盘MSD<=REF(大盘MSD,2) AND 个股MSD<=REF(个股MSD,1);
Q12:=RANGE(个股MSD,50,80) AND RANGE(大盘MSD,50,80) AND 大盘MSD<=REF(大盘MSD,2) AND 个股MSD>=REF(个股MSD,1) AND CROSS(个股MSD,大盘MSD);
Q13:=RANGE(个股MSD,80,100) AND RANGE(大盘MSD,80,100) AND 大盘MSD>=REF(大盘MSD,1) AND 个股MSD>=REF(个股MSD,1);
Q14:=RANGE(个股MSD,50,80) AND RANGE(大盘MSD,50,80) AND 大盘MSD>=REF(大盘MSD,1) AND 个股MSD>=REF(个股MSD,1);
Q15:=RANGE(个股MSD,50,80) AND RANGE(大盘MSD,80,100) AND 个股MSD>=REF(个股MSD,1);
Q16:=RANGE(个股MSD,80,100) AND RANGE(大盘MSD,50,80) AND 个股MSD>=REF(个股MSD,1) AND 大盘MSD<=REF(大盘MSD,1);
Q17:=RANGE(个股MSD,80,100) AND RANGE(大盘MSD,50,80) AND 个股MSD<=REF(个股MSD,1) AND 大盘MSD<=REF(大盘MSD,1);
Q18:=RANGE(个股MSD,20,50) AND RANGE(大盘MSD,0,20) AND 个股MSD<=REF(个股MSD,1) AND 大盘MSD<=REF(大盘MSD,1);
Q19:=RANGE(个股MSD,20,50) AND RANGE(大盘MSD,0,20) AND 个股MSD<=REF(个股MSD,1) AND 大盘MSD<=REF(大盘MSD,1) AND REF(大盘MSD,1)>20 AND REF(大盘MSD,2)>20 AND REF(大盘MSD,3)<20;
Q20:=RANGE(个股MSD,0,20) AND RANGE(大盘MSD,20,50) AND 大盘MSD>=REF(大盘MSD,1);
Q21:=ANY(CROSS(个股MSD,20),3) AND 大盘MSD>20 AND 大盘MSD>REF(大盘MSD,1) AND 个股MSD>大盘MSD;
Q22:=RANGE(个股MSD,50,80) AND RANGE(大盘MSD,20,50) AND 个股MSD>REF(个股MSD,1) AND REF(个股MSD,1)<REF(个股MSD,2);
EXPLAIN(Q1,'<>指数与个股的MSD同时处于20以下的低位,表明个股与大盘同步下跌,表明大盘与个股处于历史低位,密切关注对20试庄线的突破<>'),colorFFFF;
EXPLAIN(Q2,'<>指数MSD处于低位,个股MSD脱离低位区并突破20,表明有庄先行介入,择机买入<>'),colorFF;
EXPLAIN(Q3,'<>大盘反弹,个股已经突破分水岭,进入强势<>'),colorFF;
EXPLAIN(Q4,'<>条件4:个股随大盘一起启动,赶快行动,切勿错过时机<>'),colorFFFF;
EXPLAIN(Q5,'<>后来者居上,个股主升浪开始,买入<>'),colorFFFF;
EXPLAIN(Q6,'<>个股逆市上涨,突破分水岭,择机介入,机者成交量,均线和K线的配合<>'),colorFF00;
EXPLAIN(Q7,'<>个股逆市下跌,关注对于20试庄线的突破<>'),colorFF;
EXPLAIN(Q8,'<>个股随同大盘顺势下跌,个股行情结束,下跌刚刚开始.<>'),colorFFFF;
EXPLAIN(Q9,'<>个股顺势继续下跌,个股行情仍没有见底迹象<>'),colorFFFF;
EXPLAIN(Q10,'<>大盘下跌而个股上涨选择买入时机<>'),colorFFFF;
EXPLAIN(Q11,'<>大盘与个股皆处强势拉升的未期,有可能转势,择机卖出<>'),colorFF00;
EXPLAIN(Q12,'<>大盘从高位下跌,而个股逆市上涨,有拉高出货的嫌疑,仔细分析,择机出局<>'),colorFF00;
EXPLAIN(Q13,'<>大盘与个股皆处强势拉升中期<>'),colorFF00;
EXPLAIN(Q14,'<>大盘与个股皆处强势拉升的初级阶段<>'),colorFF00;
EXPLAIN(Q15,'<>大盘处于超强势,个股拉渐渐进入强势<>'),colorFF00;
EXPLAIN(Q16,'<>大盘处于拉升未期,刚开始下跌,个股反而逆市上涨,寻找介入和出货点<>'),colorFF00;
EXPLAIN(Q17,'<>大盘处于拉升未期,刚开始下跌,个股也处拉升的未期,注意见顶<>'),colorFF00;
EXPLAIN(Q18,'<>大盘处于下跌未期,可能是最后一跌,个股可能还有一跌,现在不是介入时机,等待介入时机<>'),colorFF00;
EXPLAIN(Q19,'<>大盘刚突破底部又开始下跌,,寻找介入时机<>'),colorFF00;
EXPLAIN(Q20,'<>大盘刚突破底部,,个股仍处于底部,寻找介入时机<>'),colorFF00;
EXPLAIN(Q21,'<>个股率先起动,大盘后起动,有可能是领涨股龙头<>'),colorFF00;
EXPLAIN(Q22,'<>个股洗盘结束,再次起动,有可能是领涨股龙头<>'),colorFF00;

YHM:=1;
MA5:=MA(CLOSE,5)*YHM;
MA25:=MA(CLOSE,25)*YHM;
MA55:=MA(CLOSE,55)*YHM;
MA250:=MA(CLOSE,250)*YHM;
MA3:=MA(CLOSE,3)*YHM;
MA10:=MA(CLOSE,10)*YHM;
MA120:=MA(CLOSE,120)*YHM;
AAJJ:=MA(CLOSE,250)*YHM;
BBJJ:=HHV(AAJJ,10)/LLV(AAJJ,10)<1.01 AND CLOSE>MA(CLOSE,250) AND CLOSE<MA(CLOSE,250)*1.2;
JYTJ:=CLOSE<MA55 AND MA55<MA250 AND MA5<MA55 AND CLOSE>MA25;
JYTJ1:=CLOSE>MA55 AND CLOSE<MA250 AND MA55<MA250 AND MA5>MA55;
JYTJ2:=CLOSE>MA55 AND CLOSE<MA250 AND MA55<MA250 AND MA5>MA55 AND CROSS(MA3,MA5);
JYTJ3:=CLOSE>MA55 AND CLOSE>MA250 AND MA55<MA250 AND MA5>MA250 AND MA5>MA55 AND MA250<REF(MA250,10);
JYTJ4:=CLOSE>MA55 AND CLOSE>MA250 AND MA55>MA250 AND MA5>MA250 AND MA5>MA55 AND MA250>REF(MA250,10);
JYTJ5:=CLOSE>MA55 AND CLOSE>MA250 AND MA55>MA250 AND MA5>MA250 AND MA5>MA55 AND MA250>REF(MA250,10) AND MA3>MA5 AND MA3>REF(MA3,1);
JYTJ6:=CLOSE>MA55 AND CLOSE>MA250 AND MA55>MA250 AND MA5>MA250 AND MA5>MA55 AND MA250>REF(MA250,10) AND MA3<REF(MA3,5) AND MA3>MA10;
JYTJ7:=CLOSE>MA5 AND MA5>MA10 AND MA10>MA25 AND MA25>MA55 AND CLOSE>MA250 AND MA55<MA250;
JYTJ8:=CLOSE<MA5 AND CLOSE<MA10 AND CLOSE<MA55 AND MA55>MA250;
JYTJ9:=CLOSE>MA55 AND CLOSE>MA250 AND MA55>MA250 AND MA5>MA250 AND MA5>MA55 AND MA250>REF(MA250,10) AND MA3<REF(MA3,5) AND CLOSE<MA5 AND MA5<MA10;
JYTJ10:=CLOSE>MA55 AND CLOSE>MA250 AND MA55<MA250 AND MA5>MA250 AND MA5>MA55 AND MA250<REF(MA250,10) AND CLOSE<MA5 AND CLOSE<MA10 AND MA5<MA10;
JYTJ11:=CLOSE>MA55 AND CLOSE<MA250 AND MA55<MA250 AND MA5>MA55 AND CLOSE<MA5;
JYTJ12:=CLOSE>MA55 AND CLOSE<MA250 AND MA55<MA250 AND MA5>MA55 AND CLOSE<MA5 AND CROSS(MA25,MA55);
JYTJ13:=CLOSE>MA55 AND CLOSE<MA250 AND MA55<MA250 AND MA5>MA55 AND MA25<MA55;
JYTJ14:=CLOSE>MA55 AND CLOSE<MA250 AND MA55<MA250 AND MA5>MA55 AND CLOSE<MA5 AND MA25>MA55 AND BARSLAST(CROSS(MA25,MA55))<5;
JYTJ15:=CLOSE>MA250 AND MA3>REF(MA3,1) AND BBJJ;
JYTJ16:=CLOSE<MA250 AND CLOSE<MA55 AND MA55<MA250 AND CLOSE>MA25 AND MA5>MA25 AND MA10>MA25 AND MA25<MA55;
JYTJ17:=CLOSE<MA250 AND CLOSE<MA55 AND MA55<MA250 AND CLOSE>MA25 AND MA5>MA25 AND MA10>MA25 AND MA25<MA55 AND CLOSE<MA25*1.02;
JYTJ18:=CLOSE>MA5 AND CLOSE>MA10 AND CLOSE>MA55 AND BARSLAST(CROSS(MA(CLOSE,1),MA55))<2;
JYTJ19:=REF(CLOSE,1)>MA55 AND REF(CLOSE,1)<MA250 AND MA55<MA250 AND MA5>MA55 AND REF(CLOSE,1)<MA5 AND MA25>MA55 AND BARSLAST(CROSS(MA25,MA55))<5 AND (CLOSE<REF(LOW,1) OR CLOSE<(REF(CLOSE,1)+REF(OPEN,1))/2);
JYTJ20:=REF(CLOSE,1)>MA55 AND REF(CLOSE,1)<MA250 AND MA55<MA250 AND MA5>MA55 AND REF(CLOSE,1)<MA5 AND MA25>MA55 AND BARSLAST(CROSS(MA25,MA55))<5 AND (CLOSE>REF(HIGH,1) OR CLOSE>(REF(CLOSE,1)+REF(OPEN,1))/2);
JYTJ21:=REF(CLOSE,1)>MA55 AND REF(CLOSE,1)<MA250 AND MA55<MA250 AND MA5>MA55 AND CLOSE<MA55 AND CLOSE<OPEN;
JYTJ22:=CLOSE<MA55 AND MA55<MA250 AND MA5<MA55 AND MA5<MA25;
JYTJ23:=CLOSE<MA5 AND CLOSE<MA10 AND CLOSE<MA25 AND CLOSE<MA55 AND CLOSE<MA250 AND CLOSE<MA120;
JYTJ24:=CLOSE<MA25 AND CLOSE<MA55 AND CLOSE>MA120;
EXPLAIN(JYTJ23 AND SYSPARAM(1)=BARPOS AND ISLASTBAR,'【●等待空间,耐心等待方向选择●】'),ALIGN0,colorFFFF;
EXPLAIN(JYTJ22 AND SYSPARAM(1)=BARPOS AND ISLASTBAR,'●四度极弱空间,耐心等待超跌放量机会●'),ALIGN0,colorFF00;
EXPLAIN(JYTJ AND SYSPARAM(1)=BARPOS AND ISLASTBAR,'●三度空间●'),ALIGN0,colorF1B96A;
EXPLAIN(JYTJ1 AND SYSPARAM(1)=BARPOS AND ISLASTBAR,'【二度空间】波段走强过渡空间,密切注意后续变化'),ALIGN0,colorFFFF;
EXPLAIN(JYTJ2 AND SYSPARAM(1)=BARPOS AND ISLASTBAR,'【二度空间波段攻击状态】进入了短线攻击状态,量能是否超前量是强弱的关键'),ALIGN0,colorFFFF;
EXPLAIN(JYTJ3 AND SYSPARAM(1)=BARPOS AND ISLASTBAR,'【次一度空间可能回踩】波段走强的特征,一般需要短线回落整理,55日线为波段核心支撑'),ALIGN0,colorFF00;
EXPLAIN(JYTJ4 AND SYSPARAM(1)=BARPOS AND ISLASTBAR,'☆一度空间☆波段走强的强势区间,注意上升以来的幅度,如果较大,会出现阶段性回落,如果刚起步,已经进入中线牛股行列'),ALIGN0,colorFFFF;
EXPLAIN(JYTJ5 AND SYSPARAM(1)=BARPOS AND ISLASTBAR,'☆☆一度空间拉升☆'),ALIGN0,colorFF;
EXPLAIN(JYTJ6 AND SYSPARAM(1)=BARPOS AND ISLASTBAR,'☆一度空间休整☆注意55线的跟进速度'),ALIGN0,colorFFEF40;
EXPLAIN(JYTJ7 AND SYSPARAM(1)=BARPOS AND ISLASTBAR,'【一度空间进入注意回踩】回踩位置在55日线'),ALIGN0,colorFF00;
EXPLAIN(JYTJ8 AND SYSPARAM(1)=BARPOS AND ISLASTBAR,'●无为空间●'),ALIGN0,colorFFEF40;
EXPLAIN(JYTJ9 AND SYSPARAM(1)=BARPOS AND ISLASTBAR,'●一度空间弱化●短线攻击消失,正在短线回落,注意形态何时转入攻击位置才可短线介入'),ALIGN0,colorFFEF40;
EXPLAIN(JYTJ10 AND SYSPARAM(1)=BARPOS AND ISLASTBAR,'【一度空间正在回踩】55线为核心支撑,量能萎缩到55线处要关注'),ALIGN0,colorFFEF40;
EXPLAIN(JYTJ11 AND SYSPARAM(1)=BARPOS AND ISLASTBAR,'【二度空间正在回踩】'),ALIGN0,colorFF00;
EXPLAIN(JYTJ12 AND SYSPARAM(1)=BARPOS AND ISLASTBAR,'【二度空间回踩可能结束】'),ALIGN0,colorFF;
EXPLAIN(JYTJ13 AND SYSPARAM(1)=BARPOS AND ISLASTBAR,'【首次进入二度空间后期有回踩】'),ALIGN0,colorFF;
EXPLAIN(JYTJ14 AND SYSPARAM(1)=BARPOS AND ISLASTBAR,'【二度空间回踩结束临界点】'),ALIGN0,colorD2C681;
EXPLAIN(JYTJ15 AND SYSPARAM(1)=BARPOS AND ISLASTBAR,'【进入一度空间,观察250线的角度】'),ALIGN0,colorD2C681;
EXPLAIN(JYTJ16 AND SYSPARAM(1)=BARPOS AND ISLASTBAR,'【强三度空间】反弹走强的过渡区间,密切注意何时突破上方压力,不突破要一定耐心等待,突破后要注意一定会回落整理,支撑为突破点'),ALIGN0,colorD2C681;
EXPLAIN(JYTJ17 AND SYSPARAM(1)=BARPOS AND ISLASTBAR,'【强三度空间转向临界点】'),ALIGN0,colorFF;
EXPLAIN(JYTJ18 AND SYSPARAM(1)=BARPOS AND ISLASTBAR,'【进入二度空间】首次进入,注意攻击能量的变化和5日线的攻击角度'),ALIGN0,colorD279FB;
EXPLAIN(JYTJ19 AND SYSPARAM(1)=BARPOS AND ISLASTBAR,'【进入三度空间,小心破位急跌】'),ALIGN0,colorFF;
EXPLAIN(JYTJ20 AND SYSPARAM(1)=BARPOS AND ISLASTBAR,'【完成二度空间回踩,放量试探跟进】'),ALIGN0,colorFF;
EXPLAIN(JYTJ21 AND SYSPARAM(1)=BARPOS AND ISLASTBAR,'【跌回三度空间,小心阴跌,减仓】'),ALIGN0,colorFFFF;
EXPLAIN(JYTJ24 AND SYSPARAM(1)=BARPOS AND ISLASTBAR,'【下方有支撑,上方有压力,一般为波段主力的洗盘特征,等待再次走强的时机。】'),ALIGN0,colorFFFF;
A1:=SMA(MAX(CLOSE-LC,0),6,1);
B1:=SMA(ABS(CLOSE-LC),6,1);
界:=IF(C>LC,(REF(A1,1)*5-REF(B1,1)*5*0.5)/(0.5-1)+LC,LC+REF(B1,1)*5-REF(A1,1)*5/0.5)COLORWHITE;
KS:=(C-MA(C,17))/MA(C,17)*(-100);

RKS:=REF(KS,1);

MLS:=RKS/KS>=1.23 AND RKS>=8 AND C/REF(C,1)>=1.02;

超跌:STICKLINE(KS>=17,O,L,8,0),COLORWHITE,LINETHICK6;

反弹:STICKLINE(MLS=1,(h+o)/2,O,8,0),COLORMAGENTA,LINETHICK6;
EXPLAIN(KS>=17,'<>今日股价进入超跌区<>'),COLORWHITE;

EXPLAIN(MLS=1,'<>今日股价反弹<>'),COLORMAGENTA;
超卖了:=(C-EMA(C,60))/C<-0.56;
超买了:=(C-EMA(C,60))/C>0.22;
超卖1:IF(超卖了,MA(C,5),DRAWNULL),COLORGREEN,LINETHICK3;
超买1:IF(超买了,MA(C,5),DRAWNULL),COLORWHITE,LINETHICK3;
STICKLINE(超卖了,O,C,2,0),COLORWHITE;
DRAWTEXT(超卖了 AND C>MA(C,5),L*0.98,'长线\n买点'),COLORWHITE;

EXPLAIN(超卖了 AND C>MA(C,5),'<>长线买点<>'),COLORMAGENTA;

{下跌K线}   
情况1{骤跌并排红}:=CONST(IF(REF(CLOSE,1)>REF(OPEN,1) AND CLOSE>OPEN AND (ABS(OPEN-REF(OPEN,1))/OPEN)<0.001 AND REF(HIGH,1)<REF(LOW,2) AND HIGH<REF(LOW,2),1,0));   
情况2{中阴线}:=CONST(IF(OPEN>CLOSE AND ABS(OPEN-CLOSE)>EMA(ABS(CLOSE-OPEN),60)  AND ABS(OPEN-CLOSE)<EMA(ABS(HIGH-LOW),60),1,0));   
情况3{小阴线群}:=CONST(IF(COUNT(EMA(ABS(CLOSE-OPEN),60)/4<(OPEN-CLOSE) AND (OPEN-CLOSE)<EMA(ABS(CLOSE-OPEN),60) AND (O-C)/(H-L)>0.6,4)>=3,1,0));   
情况4{阴后双阳阴}:=CONST(IF(CLOSE<OPEN AND REF(CLOSE,1)>REF(OPEN,1) AND REF(CLOSE,2)>REF(OPEN,2) AND REF(CLOSE,3)<REF(OPEN,3) AND CLOSE=LLV(CLOSE,4) AND   
REF(H,2)<REF(H,3) AND REF(L,2)>REF(L,3) AND REF(H,1)<REF(H,3) AND REF(L,1)>REF(L,3) AND REF(O,3)/REF(C,3)>1.02,1,0));   
情况5{下降三法}:=CONST(IF(REF(CLOSE,4)/REF(OPEN,4)<0.97 AND REF(CLOSE,3)>REF(OPEN,3) AND REF(CLOSE,2)>REF(OPEN,2) AND REF(CLOSE,1)>REF(OPEN,1) AND   
REF(LOW,4)<REF(LOW,3) AND REF(LOW,4)<REF(LOW,2) AND REF(LOW,4)<REF(LOW,1) AND REF(HIGH,4)>REF(HIGH,3) AND REF(HIGH,4)>REF(HIGH,2) AND   
REF(HIGH,4)>REF(HIGH,1) AND CLOSE/OPEN<0.97 AND CLOSE<REF(CLOSE,4),1,0));   
V1:=ABS(C-O)/(H-L)>0.3;   
情况6{下跌会合线}:=CONST(IF(REF(CLOSE,1)>REF(OPEN,1) AND CLOSE<OPEN AND H=REF(O,1) AND ABS(C-O)/(H-L)>0.3 AND REF(ABS(C-O)/(H-L)>0.3,1) AND   
ABS(ABS(O-C)-ABS(REF(O,1)-REF(C,1)))/C<0.01 AND REF(C,1)<MA(C,5),1,0));   
情况7{乌云笼罩}:=CONST(IF(REF(CLOSE,1)/REF(OPEN,1)>1.02 AND CLOSE/OPEN<0.99 AND OPEN>REF(CLOSE,1) AND CLOSE<REF(CLOSE,1)-(1/2)*(REF(CLOSE,1)-REF(OPEN,1)) AND    
ABS(C-O)/(H-L)>0.7 AND REF(ABS(C-O)/(H-L)>0.7,1) AND H>=HHV(C,20),1,0));   
情况8{死蜘蛛}:=CONST(IF(COUNT(CROSS(MA(CLOSE,20),MA(CLOSE,5)),2)=1 AND COUNT(CROSS(MA(CLOSE,10),MA(CLOSE,5)),2)=1,1,0));   
情况9{双飞乌鸦}:=CONST(IF(REF(C,2)/REF(O,2)>=1.02 AND REF(CLOSE,1)<REF(OPEN,1) AND CLOSE<OPEN AND CLOSE/OPEN<0.98,1,0));   
情况10{射击之星}:=CONST(IF(MIN(OPEN,CLOSE)=LOW AND HIGH-LOW > 3*(MAX(OPEN,CLOSE)-LOW) AND CLOSE > MA(CLOSE,5),1,0));   
情况11{黄昏十字星}:=CONST(IF(REF(CLOSE,2)>REF(OPEN,2) AND (REF(CLOSE,2)-REF(OPEN,2))>EMA(ABS(CLOSE-OPEN),60) AND REF(CLOSE,1)=REF(OPEN,1) AND REF(CLOSE,1)>REF(CLOSE,2)     
  
AND OPEN>CLOSE AND CLOSE<REF(OPEN,2)-(1/2)*(REF(OPEN,2)-REF(CLOSE,2)) AND OPEN<MAX(REF(CLOSE,1),REF(OPEN,1)) AND REF(C,1)>MA(C,20),1,0));   
情况12{三只乌鸦}:=CONST(IF(REF(CLOSE,2)<REF(OPEN,2) AND REF(CLOSE,1)<REF(OPEN,1) AND CLOSE<OPEN AND REF(CLOSE,1)<REF(CLOSE,2) AND CLOSE<REF(CLOSE,1) AND   
OPEN<REF(OPEN,1) AND REF(OPEN,1)<REF(OPEN,2) AND REF(C,3)/REF(O,3)>=1.02,1,0));   
情况13{平顶}:=CONST(IF(ABS(H-REF(H,1))/H<0.001 AND HHV(H,2)=HHV(H,20) AND ABS(C-O)/(H-L)>0.8 AND REF(ABS(C-O)/(H-L)>0.8,1),1,0));   
情况14{空方炮}:=CONST(IF(CLOSE<OPEN  AND REF(CLOSE,1)>REF(OPEN,1) AND REF(CLOSE,2)<REF(OPEN,2) AND CLOSE<REF(OPEN,1) AND CLOSE<REF(CLOSE,2) AND    
REF(H,1)<REF(H,2) AND REF(ABS(C-O)/(H-L)>0.5,1),1,0));   
情况15{看跌吞没形态}:=CONST(IF(REF(CLOSE,1)>REF(OPEN,1) AND OPEN>CLOSE AND OPEN>REF(CLOSE,1) AND CLOSE<REF(OPEN,1) AND HIGH>REF(HIGH,1) AND LOW<REF(LOW,1) AND REF(C,1)   
  
>MA(C,10),1,0));   
情况16{看跌提腰带}:=CONST(IF(OPEN=HIGH AND CLOSE!=LOW AND (CLOSE-LOW)>0.328*(OPEN-CLOSE) AND OPEN>CLOSE AND (ABS(OPEN-CLOSE)>EMA(ABS(HIGH-LOW),60) OR (ABS(OPEN-CLOSE)>EMA(ABS(CLOSE-OPEN),60) 
AND ABS(OPEN-CLOSE)<EMA(ABS(HIGH-LOW),60))),1,0));   
情况17{九阴白股爪}:=CONST(IF(CLOSE<OPEN AND REF(CLOSE,1)<REF(OPEN,1)  AND REF(CLOSE,2)<REF(OPEN,2)  AND REF(CLOSE,3)<REF(OPEN,3)  AND REF(CLOSE,4)<REF(OPEN,4)  AND   
REF(CLOSE,5)<REF(OPEN,5)  AND REF(CLOSE,6)<REF(OPEN,6)  AND REF(CLOSE,7)<REF(OPEN,7)  AND REF(CLOSE,8)<REF(OPEN,8),1,0));   
情况18{黄昏之星}:=CONST(IF(REF(CLOSE,2)>REF(OPEN,2) AND (REF(CLOSE,2)-REF(OPEN,2))>EMA(ABS(CLOSE-OPEN),60) AND ABS(REF(CLOSE,1)-REF(OPEN,1))<(1/4)*EMA(ABS(CLOSE-OPEN),60)    
AND MAX(REF(CLOSE,1),REF(OPEN,1))>REF(CLOSE,2) AND OPEN>CLOSE AND CLOSE<REF(OPEN,2)-(1/2)*(REF(OPEN,2)-REF(CLOSE,2)) AND OPEN<MAX(REF(CLOSE,1),REF(OPEN,1)) AND REF(C,1)>MA(C,20),1,0));   
情况19{断头铡刀}:=CONST(IF(CLOSE<OPEN  AND CLOSE<MA(CLOSE,20) AND CLOSE<MA(CLOSE,10) AND CLOSE<MA(CLOSE,5) AND HIGH>MA(CLOSE,5)  AND HIGH>MA(CLOSE,10)  AND HIGH>MA   
  
(CLOSE,20) ,1,0)) ;   
叠V1:=CLOSE<OPEN AND REF(CLOSE,1)>REF(OPEN,1) AND REF(CLOSE,2)<REF(OPEN,2) AND CLOSE<REF(OPEN,1) AND CLOSE<REF(CLOSE,2);    
叠V2:=V1 AND REF(V1,2) AND C<REF(C,4);   
情况20{叠叠空方炮}:=CONST(IF(叠V1 AND 叠V2,1,0));   
情况21{吊颈线}:=CONST(IF(HIGH = MAX(OPEN,CLOSE) AND HIGH-LOW > 3*(HIGH-MIN(OPEN,CLOSE)) AND CLOSE > MA(CLOSE,5),1,0));   
情况22{长上影线}:=CONST(IF(HIGH-MAX(OPEN,CLOSE)>1.2*EMA(H-L,60),1,0));

{跳空下跌,形成缺口}
TZ1:=REF(H,2)<REF(L,3) AND REF(H,1)<REF(L,3);
{跳空上涨,形成缺口,两缺口间有共同部分}
TZ2:=L>REF(H,1) AND L>REF(H,2);
{反转当日,收真阳,最好没有下影线}
TZ3:=C>REF(C,1);
双岛选股:=TZ1&&TZ2&&TZ3;

 
{上涨K线}   
情1{长下影线}:=CONST(IF((MIN(CLOSE,OPEN)-LOW)>EMA(ABS(HIGH-LOW),60) AND (MIN(CLOSE,OPEN)-LOW)/(HIGH-LOW)>0.5,1,0));   
情2{出水芙蓉}:=CONST(IF(CLOSE>OPEN  AND LOW<MA(CLOSE,20) AND LOW<MA(CLOSE,40) AND LOW<MA(CLOSE,30) AND   
LOW<MA(CLOSE,60) AND CLOSE>MA(CLOSE,30) AND CLOSE>MA(CLOSE,20)  AND CLOSE>MA(CLOSE,40)  AND   
CLOSE>MA(CLOSE,60) AND CLOSE>MA(CLOSE,5) AND C=HHV(C,20) AND REF(HHV(H,10),1)/REF(LLV(H,10),1)<1.05 AND (CLOSE-OPEN)>0.02*CLOSE,1,0));   
情3{倒锤子}:=CONST(IF(MIN(OPEN,CLOSE)=LOW AND HIGH-LOW > 3*(MAX(OPEN,CLOSE)-LOW) AND CLOSE < MA(CLOSE,5),1,0));   
叠叠V1:=CLOSE>OPEN AND REF(CLOSE,1)<REF(OPEN,1) AND REF(CLOSE,2)>REF(OPEN,2) AND CLOSE>REF(OPEN,1) AND CLOSE>REF(CLOSE,2);    
叠叠V2:=叠叠V1 AND REF(叠叠V1,2) AND C>REF(C,4);   
情4{叠叠多方炮}:=CONST(IF(叠叠V1 AND 叠叠V2,1,0)) ;   
情5{东方红连阳}:=CONST(IF(CLOSE>OPEN AND REF(CLOSE>OPEN,1) AND REF(CLOSE>OPEN,2) AND REF(CLOSE>OPEN,3) AND REF(CLOSE>OPEN,4) AND (C-REF(C,5))/REF(C,5)<=0.12,1,0));   
多V0:=ABS(CLOSE-OPEN)/(HIGH-LOW)>0.5;   
情6{多方炮}:=CONST(IF(多V0 AND REF(多V0,2) AND REF(CLOSE,2)>REF(OPEN,2)  AND REF(CLOSE,1)<REF(OPEN,1)  AND CLOSE>OPEN  AND CLOSE>REF(CLOSE,2)    AND CLOSE>REF (OPEN,1) AND REF(C,1)<REF(C,2) AND LOW<REF(C,1),1,0)) ;   
情7{剧涨并排红}:=CONST(IF(REF(CLOSE,1)>REF(OPEN,1) AND CLOSE>OPEN AND (ABS(OPEN-REF(OPEN,1))/OPEN)<0.005 AND REF(OPEN,1)>REF(CLOSE,2) AND   
LLV(LOW,2)>REF(HIGH,2) AND ABS(CLOSE-OPEN)/(HIGH-LOW)>0.8 AND REF(ABS(CLOSE-OPEN)/(HIGH-LOW)>0.8,1),1,0));   
情8{金蜘蛛}:=CONST(IF(COUNT(CROSS(MA(CLOSE,10),MA(CLOSE,20)),2)=1 AND COUNT(CROSS(MA(CLOSE,5),MA(CLOSE,20)),2)=1,1,0));   
情9{看涨提腰带}:=CONST(IF(OPEN=LOW AND CLOSE!=HIGH AND (HIGH-CLOSE)>0.382*(CLOSE-OPEN) AND CLOSE>OPEN AND ((CLOSE-OPEN)>(SUM(ABS(HIGH-LOW),60))/60 OR  (ABS(CLOSE- OPEN)>SUM(ABS(CLOSE-OPEN),60)/60  AND ABS(CLOSE-OPEN)<SUM(ABS(HIGH-LOW),60)/60)),1,0));   
情10{早晨之星}:=CONST(IF(REF(CLOSE,2)<REF(OPEN,2) AND (REF(OPEN,2)-REF(CLOSE,2))>SUM(ABS(CLOSE-OPEN),60)/60 AND ABS(REF(OPEN,1)-REF(CLOSE,1))<(1/4)*SUM (ABS(CLOSE- OPEN),60)/60 AND MIN(REF(OPEN,1),REF(CLOSE,1))<REF(CLOSE,2) AND CLOSE>OPEN AND CLOSE*2>(REF(CLOSE,2)+REF(OPEN,2)),1,0));   
情11{早晨十字星}:=CONST(IF(REF(CLOSE,2)<REF(OPEN,2) AND (REF(OPEN,2)-REF(CLOSE,2))>EMA(ABS(CLOSE-OPEN),60) AND REF(CLOSE,1)=REF(OPEN,1) AND   
REF(OPEN,1)<REF(CLOSE,2) AND CLOSE>OPEN AND CLOSE>REF(CLOSE,2)/2+REF(OPEN,2)/2,1,0));   
情12{上升三法}:=CONST(IF(REF(CLOSE,4)/REF(OPEN,4)>1.03 AND REF(CLOSE,3)<REF(OPEN,3) AND REF(CLOSE,2)<REF(OPEN,2) AND REF(CLOSE,1)<REF(OPEN,1) AND   
REF(LOW,4)<REF(LOW,3) AND REF(LOW,4)<REF(LOW,2) AND REF(LOW,4)<REF(LOW,1) AND REF(HIGH,4)>REF(HIGH,3) AND REF(HIGH,4)>REF(HIGH,2) AND   
REF(HIGH,4)>REF(HIGH,1) AND CLOSE/OPEN>1.03 AND CLOSE>REF(CLOSE,4),1,0));   
情13{阳后双阴阳}:=CONST(IF(CLOSE>OPEN AND REF(CLOSE,1)<REF(OPEN,1) AND REF(CLOSE,2)<REF(OPEN,2) AND REF(CLOSE,3)>REF(OPEN,3) AND CLOSE>REF(CLOSE,3) AND   
REF(LOW,2)<HIGH AND REF(LOW,1)<HIGH AND  REF(CLOSE,3)/REF(OPEN,3)>1.02 AND CLOSE/OPEN>1.02,1,0));   
情14{阳包阴}:=CONST(IF(REF(OPEN,1)>REF(CLOSE,1) AND CLOSE>REF(OPEN,1) AND OPEN<REF(CLOSE,1) AND HIGH>REF(HIGH,1) AND LOW<REF(LOW,1) AND CLOSE>OPEN AND   
(CLOSE-OPEN)>(EMA((HIGH-LOW),60)),1,0)) ;   
情15{小阳线群}:=CONST(IF(COUNT((CLOSE-OPEN)>EMA(ABS(CLOSE-OPEN),60)/4 AND (CLOSE-OPEN)<EMA(ABS(CLOSE-OPEN),60) AND (CLOSE-OPEN)/(HIGH-LOW)>0.3,5)>=4,1,0));   
情16{上涨分离线}:=CONST(IF(REF(C,1)<REF(O,1) AND REF(H,1)=REF(O,1) AND C>O AND O=L AND HHV(C,10)=C AND ABS(O-REF(O,1))/O<0.001 AND ABS((C-O)-(REF(O,1)-REF (C,1)))/O<0.005,1,0));   
情17{上涨红三兵}:=REF(CLOSE,2)>REF(OPEN,2) AND REF(CLOSE,1)>REF(OPEN,1) AND CLOSE>OPEN AND (CLOSE-OPEN)>=REF((CLOSE-OPEN),1) AND   
REF((CLOSE-OPEN),1)>=CONST(IF(REF((CLOSE-OPEN),2) AND OPEN>REF(OPEN,1) AND REF(OPEN,1)>REF(OPEN,2),1,0));   
情18{上涨会合线}:=CONST(IF(REF(CLOSE,1)>REF(OPEN,1)  AND CLOSE<OPEN  AND REF(CLOSE,1)=LOW AND HHV(C,10)<=HIGH AND ABS(OPEN-CLOSE)/(H-L)>0.3 AND REF(ABS(OPEN-CLOSE)/ (H-L)>0.3,1),1,0));   
情19{曙光初现}:=CONST(IF(REF(CLOSE,2)/REF(OPEN,2)<0.97 AND REF(C,2)<REF(C,3) AND REF(OPEN,1)<REF(CLOSE,2) AND REF(CLOSE,1)>REF(CLOSE,2) AND    
REF(CLOSE,1)>(REF(CLOSE,2)+REF(OPEN,2))/2 AND CLOSE>REF(CLOSE,1) AND LLV(LOW,13)=REF(LOW,1),1,0));   
情20{铁锤}:=CONST(IF(HIGH = MAX(OPEN,CLOSE) AND HIGH-LOW > 3*(HIGH-MIN(OPEN,CLOSE)),1,0)) ;   
情21{仙人指路}:=CONST(IF(C<REF(C,1) AND REF(C,1)<REF(C,2) AND REF(CLOSE,2)<REF(OPEN,2)  AND REF(CLOSE,3)>REF(OPEN,3)  AND    
REF(HIGH,3)-REF(CLOSE,3)>(REF(CLOSE,3)-REF(OPEN,3))  AND REF(C,3)>REF(C,4) AND REF(HIGH,3)-REF(CLOSE,3)>REF(CLOSE,3)-REF(LOW,3)  AND    
HHV(H,30)=REF(H,3) AND REF(CLOSE,4)>REF(CLOSE,5)  AND REF(CLOSE,5)>REF(CLOSE,6),1,0)) ;   
情22{剑}:=CONST(IF(VOL>REF(VOL,1)  AND OPEN>=(REF(HIGH,1)) AND REF(HIGH,1)>(REF(HIGH,2)*1.06) AND CLOSE>(REF(CLOSE,1))-(REF(CLOSE,1)*0.01)   
AND CLOSE<(HIGH*0.965) AND HIGH>(OPEN*1.05) AND LOW<OPEN AND LOW<CLOSE AND HIGH>(REF(CLOSE,1)*1.06) AND (HIGH-(MAX(OPEN,CLOSE)))/2>(MIN(OPEN,CLOSE))-LOW   
AND (ABS(OPEN-CLOSE))/2<(MIN(OPEN,CLOSE)-LOW),1,0));   
  X:=H<REF(L,1);
DD:=L>REF(H,1);
情23{岛型反转}:=CONST(IF(BARSLAST(X)<3 AND DD,1,0)); 
VQ2:=REF(LOW,1);
VQ3:=SMA(ABS(LOW-VQ2),13,1)/SMA(MAX(LOW-VQ2,0),13,1)*100;
VQ4:=EMA(IF(CLOSE*1.2,VQ3*13,VQ3/13),13);
VQ5:=LLV(LOW,34);
VQ6:=HHV(VQ4,34);
VQ7:=IF(LLV(LOW,56),1,0);
VQ8:=EMA(IF(LOW<=VQ5,(VQ4+VQ6*2)/2,0),3)/618*VQ7;
VQ9:=EMA(CLOSE,5);
VQ10:=(CLOSE-MA(CLOSE,34))/MA(CLOSE,34)*(-10);
VQ11:=EMA(IF(LOW<=VQ5,(VQ4+VQ6*2)/2,0),3)/618*VQ7*(-1);
VQ12:=EMA(CLOSE,5)*(-1);
力度:=VQ10*5, COLORWHITE,LINETHICK2;
XL1:=MA(LOW,2)*0.96;
XL2:=MA(LOW,26)*0.85;
XL3:=REF(XL1,1)<XL2 AND REF(XL1,1)<XL1 AND REF(XL1,1)<REF(XL1,2);
WR1:=-120*(HHV(HIGH,40)-CLOSE)/(HHV(HIGH,40)-LLV(LOW,40)),COLORGREEN;
超跌:=(CLOSE-MA(CLOSE,40))/MA(CLOSE,60)*100*1.1;
选阴:=力度>7 AND 超跌<-15.5   AND WR1<-100 ;

AI:=AMOUNT/VOL/100;
C0:=REF(C,2)*0.865;
C1:=REF(C,13)*0.772;
DSY:=100*VOL/CAPITAL;
抄底:=IF((C-MIN(C0,C1))/C<0.1 AND SUM(DSY,5)/5<1.8,1, 0);
情24{选阴抄底}:=CONST(IF(选阴 OR 抄底,1,0)) ;   
eXPLAIN(情1=1, '长下影线,看短线升幅'),COLORGREEN;
eXPLAIN(情2=1, '出水芙蓉'),COLORGREEN;
eXPLAIN(情3=1, '倒锤子'),COLORGREEN;
eXPLAIN(情4=1, '叠叠多方炮'),COLORGREEN;
eXPLAIN(情5=1, '东方红连阳'),COLORGREEN;
eXPLAIN(情6=1, '多方炮'),COLORGREEN;
eXPLAIN(情7=1, '剧涨并排红'),COLORGREEN;
eXPLAIN(情8=1, '金蜘蛛'),COLORGREEN;
eXPLAIN(情9=1, '搓看涨提腰带'),COLORGREEN;
eXPLAIN(情10=1, '早晨之星'),COLORGREEN;
eXPLAIN(情11=1, '早晨十字星'),COLORGREEN;
eXPLAIN(情12=1, '上升三法'),COLORGREEN;
eXPLAIN(情13=1, '阳后双阴阳'),COLORGREEN;
eXPLAIN(情14=1, '阳包阴'),COLORGREEN;
eXPLAIN(情15=1, '小阳线群'),COLORGREEN;
eXPLAIN(情16=1, '上涨分离线'),COLORGREEN;
eXPLAIN(情17=1, '上涨红三兵'),COLORGREEN;
eXPLAIN(情18=1, '上涨会合线'),COLORGREEN;
eXPLAIN(情19=1, '曙光初现'),COLORGREEN;
eXPLAIN(情20=1, '铁锤'),COLORGREEN;
eXPLAIN(情21=1, '仙人指路'),COLORGREEN;
eXPLAIN(情22=1, '剑'),COLORGREEN;
eXPLAIN(情23=1, '岛型反转'),COLORGREEN;
eXPLAIN(情24=1, '选阴抄底看大盘找机会'),COLORGREEN;
eXPLAIN(情况1=1, '骤跌并排红'),COLORGREEN;
eXPLAIN(情况2=1, '中阴线'),COLORGREEN;
eXPLAIN(情况3=1, '小阴线群'),COLORGREEN;
eXPLAIN(情况4=1, '阴后双阳阴'),COLORGREEN;
eXPLAIN(情况5=1, '下降三法'),COLORGREEN;
eXPLAIN(情况6=1, '下跌会合线'),COLORGREEN;
eXPLAIN(情况7=1, '乌云笼罩'),COLORGREEN;
eXPLAIN(情况8=1, '死蜘蛛'),COLORGREEN;
eXPLAIN(情况9=1, '双飞乌鸦'),COLORGREEN;
eXPLAIN(情况10=1, '射击之星'),COLORGREEN;
eXPLAIN(情况11=1, '黄昏十字星'),COLORGREEN;
eXPLAIN(情况12=1, '三只乌鸦'),COLORGREEN;
eXPLAIN(情况13=1, '平顶'),COLORGREEN;
eXPLAIN(情况14=1, '空方炮'),COLORGREEN;
eXPLAIN(情况15=1, '看跌吞没形态'),COLORGREEN;
eXPLAIN(情况16=1,'看跌提腰带'),COLORGREEN;
eXPLAIN(情况17=1, '九阴白股爪'),COLORGREEN;
eXPLAIN(情况18=1, '黄昏之星'),COLORGREEN;
eXPLAIN(情况19=1, '断头铡刀'),COLORGREEN;
eXPLAIN(情况20=1, '叠叠空方炮'),COLORGREEN;
eXPLAIN(情况21=1, '吊颈线'),COLORGREEN;
eXPLAIN(情况22=1, '长上影线'),COLORGREEN;
 

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则