N:=17;
LH:=79;
EMA1:EMA(C,1);
EMA13:EMA(C,13),COLORFF8080;
EMA34:EMA(C,34),COLORFFFF00;
EMA55:EMA(C,55),COLORFF00FF;
EMA120:EMA(C,120),COLORGREEN;
MA30:MA(C,30),COLORYELLOW,POINTDOT,LINETHICK2;
生命线:EMA(CLOSE,453),COLORFF00FF,POINTDOT,LINETHICK2;
LOCK:=1;
M8:=EMA(CLOSE,8);
M13:=EMA(M8,13);
VAR1:=EMA(M13,62);
VAR2:=(CLOSE+HIGH+LOW)/3;
VAR3:=EMA(VAR2,10)*LOCK;
VAR4:=REF(VAR3,1)*LOCK;
STICKLINE(OPEN =CLOSE,CLOSE,OPEN,9*0.5,0),COLORFF5B00;
STICKLINE(OPEN =CLOSE,CLOSE,OPEN,8*0.5,0),COLORFF6C00;
STICKLINE(OPEN =CLOSE,CLOSE,OPEN,7*0.5,0),COLORFF7B00;
STICKLINE(OPEN =CLOSE,CLOSE,OPEN,6*0.5,0),COLORFF9C00;
STICKLINE(OPEN =CLOSE,CLOSE,OPEN,5*0.5,0),COLORFFBE00;
STICKLINE(OPEN =CLOSE,CLOSE,OPEN,3.5*0.5,0),COLORFFCC00;
STICKLINE(OPEN =CLOSE,CLOSE,OPEN,1.5*0.5,0),COLORFFFF00;
STICKLINE(CLOSE =OPEN,CLOSE,OPEN,9*0.5,0),COLOR070084;
STICKLINE(CLOSE =OPEN,CLOSE,OPEN,8*0.5,0),COLOR0000A3;
STICKLINE(CLOSE =OPEN,CLOSE,OPEN,7*0.5,0),COLOR0000B7;
STICKLINE(CLOSE =OPEN,CLOSE,OPEN,6*0.5,0),COLOR0000CD;
STICKLINE(CLOSE =OPEN,CLOSE,OPEN,5*0.5,0),COLOR0000E9;
STICKLINE(CLOSE =OPEN,CLOSE,OPEN,3*0.5,0),COLOR0754E9;
STICKLINE(CLOSE =OPEN,CLOSE,OPEN,1.5*0.5,0),COLOR076EF3;
STICKLINE(CLOSE =OPEN,CLOSE,OPEN,1*0.5,0),COLOR077BF3;
STICKLINE(CLOSE OPEN,OPEN,LOW,1*0.5,0),COLOR0726CA;
STICKLINE(CLOSE OPEN,CLOSE,HIGH,1*0.5,0),COLOR0726CA;
STICKLINE(OPEN CLOSE,CLOSE,LOW,1*0.5,0),COLORDE9100;
STICKLINE(OPEN CLOSE,OPEN,HIGH,1*0.5,0),COLORDE9100;
AAA:=MA(C,10);
BBB:=ATAN((AAA/REF(AAA,1)-1)*100)*180/3.1416;
CCC:=FILTER(CROSS(BBB,30),5);
DRAWTEXT(CCC AND C AAA,AAA*0.95,'十日三十度角'),COLORFF00FF;
AR1:=EMA55 EMA34 AND EMA34 EMA13;
AR2:=BARSLAST((C-EMA13)/EMA13*100
AR3:=EMA13 =REF(EMA13,2);
AR4:=COUNT(CROSS(C,EMA13),AR2)=1;
AR5:=AR1 AND AR2 AND AR3 AND AR4;
AR6:=AR5 AND FILTER(AR5,10);
DRAWTEXT(AR6,L-0.09,'红杏出墙'),COLOR00CCFF;
STICKLINE(AR6,H,L,0.5,1),COLOR00CCFF;
STICKLINE(AR6,O,C,6,1),LINETHICK2,COLOR00CCFF;
BR1:=COUNT(BETWEEN((C-REF(C,1))/REF(C,1)*100,0,5) ,5)=5;
BR2:=ABS((EMA13-EMA34)+(EMA34-EMA55))/C
BR3:=C EMA55 AND (REF(C,1) REF(EMA55,1) OR REF(C,2) REF(EMA55,2) OR REF(C,3) REF(EMA55,3) OR REF(C,4) REF(EMA55,4) OR REF(C,5) REF(EMA55,5));
BR4:=BR1 AND BR2 AND BR3;
DRAWTEXT(BR4 AND FILTER(BR4,10),L-0.09,'蚂蚁上树'),COLOR00C5FF;
STICKLINE(BR4 AND FILTER(BR4,10),H,L,0.5,1),COLOR00C5FF;
STICKLINE(BR4 AND FILTER(BR4,10),O,C,6,1),LINETHICK2,COLOR00C5FF;
CR1:=(C-REF(C,1))/REF(C,1)*100
CR2:=V MA(V,5)*0.6;
CR3:=COUNT(CROSS(EMA13,EMA55),3)=1;
CR4:=ABS(EMA34-EMA55)/EMA55 0.03;
CR5:=EMA55 =EMA120 AND EMA55 =REF(EMA55,1);
CR6:=FILTER(CR1 AND CR2 AND CR3 AND CR4 AND CR5,2);
STICKLINE(CR6,H,L,0.5,1),COLORF00FF0;
STICKLINE(CR6,O,C,6,1),LINETHICK2,COLORF00FF0;
DRAWTEXT(CR6,L-0.09,'红衣侠女'),COLORF00FF0;
DR1:=EMA13 EMA34 AND EMA34 EMA55;
DR2:=BARSLAST(CROSS(C,EMA55) );
DR3:=H=HHV(H,DR2);
DR4:=BARSLAST(DR3);
DR5:=COUNT(O C AND C REF(C,1) AND C EMA55 AND BETWEEN((C-EMA55)/EMA55,0,0.02),DR4)=1;
DR6:=C REF(C,1) ;
DR7:= DR1 AND DR5 AND DR6 ;
DR8:=DR7 AND FILTER(DR7 ,10);
DRAWTEXT(DR8,L-0.09,'黑客点击'),COLORD6BA63;
STICKLINE(DR8,H,L,0.5,1),COLORD6BA63;
STICKLINE(DR8,O,C,6,1),LINETHICK2,COLORD6BA63;
ER:=BARSLAST(REF(CROSS(EMA55,EMA34),1)) AND CROSS(EMA34,EMA55);
DRAWTEXT(ER,L-0.09,'均线互换'),COLOR0099FF;
STICKLINE(ER,H,L,0.5,1),COLOR0099FF;
STICKLINE(ER,O,C,6,1),LINETHICK2,COLOR0099FF;
FR:=BARSLAST(REF(CROSS(EMA34,EMA13),1)) AND CROSS(EMA13,EMA34);
DRAWTEXT(FR,L-0.09,'梅开二度'),COLORWHITE;
STICKLINE(FR,H,L,0.5,1),COLORWHITE;
STICKLINE(FR,O,C,6,1),LINETHICK1,COLORWHITE;
GR1:=BARSLAST(BETWEEN( BIAS.BIAS2 (6,13,24),0,5) );
GR2:=EMA13 EMA34 AND EMA34 EMA55 AND EMA13 REF(EMA13,1);
GR3:=COUNT( BIAS.BIAS2 (6,13,24) 10 AND H=HHV(H,GR1),GR1);
GR4:=H=HHV(H,GR1);
GR5:= MACD.MACD (12,26,9) REF( MACD.MACD (12,26,9),1);
GR6:=GR2 AND GR3 AND GR4;
GR7:=GR2 AND GR3 AND GR4 AND GR5;
DRAWTEXT(GR6 AND GR7,H+0.13,'见好就收!'),COLOR00FF00;
DRAWTEXT(GR6 AND GR7,H+0.1,''),COLOR00FF00;
HR2:=EMA13 =REF(EMA13,3) AND EMA34 =REF(EMA34,1) AND EMA55 =REF(EMA55,1) AND CROSS(C,EMA13) AND CROSS(C,EMA34) AND CROSS(C,EMA55);
DRAWTEXT(HR2 AND FILTER(HR2,10),H+0.1,'▲'),COLORFFC8FF;
DRAWTEXT(HR2 AND FILTER(HR2,10),H+0.5,'揭竿而起'),COLOR9900CC;
DRAWTEXT(HR2 AND FILTER(HR2,10),L-0.09,'三线推进'),COLORYELLOW;
STICKLINE(HR2 AND FILTER(HR2,10),H,L,0.5,1),COLORYELLOW;
STICKLINE(HR2 AND FILTER(HR2,10),O,C,6,1),LINETHICK2,COLORYELLOW;
SK:= EMA(VAR1,13)-EMA(VAR1,73);
SD:= EMA(SK,2);
DRAWTEXT((CROSS(SK,SD) AND SK -0.04 AND (C-REF(C,1))/REF(C,1) =0.03) OR (CROSS(SK,SD) AND SK =-0.14 )
OR (CROSS(SK,SD) AND SK =0.05 AND (V/MA(V,5) 2 OR C/REF(C,1) 0.035)) ,L*0.99,'短'),COLOR0000CC;
STICKLINE((CROSS(SK,SD) AND SK -0.04 AND (C-REF(C,1))/REF(C,1) =0.03) OR (CROSS(SK,SD) AND SK =-0.14 )
OR (CROSS(SK,SD) AND SK =0.05 AND (V/MA(V,5) 2 OR C/REF(C,1) 0.035)),H,L,0.5,0),COLOR0000CC;
STICKLINE((CROSS(SK,SD) AND SK -0.04 AND (C-REF(C,1))/REF(C,1) =0.03) OR (CROSS(SK,SD) AND SK =-0.14 )
OR (CROSS(SK,SD) AND SK =0.05 AND (V/MA(V,5) 2 OR C/REF(C,1) 0.035)),O,C,10,1),LINETHICK1,COLOR0000CC;
MA1:=MA(((HIGH + LOW) / 2),5);MA2:=MA(((HIGH + LOW) / 2),35);X:=((MA1 - MA2) * 100);
均势一:=(((((((((CLOSE + REF(CLOSE,1)) + REF(CLOSE,2)) + REF(CLOSE,3)) + REF(CLOSE,4)) + REF(CLOSE,5)) + REF(CLOSE,6)) + REF(CLOSE,7)) + REF(CLOSE,8)) / 9);
均势二:=((((CLOSE + REF(CLOSE,1)) + REF(CLOSE,2)) + REF(CLOSE,3)) / 4);
趋势一:=((((均势一 - REF(均势一,1)) / REF(均势一,1)) * 1000) + 50);
趋势二:=((((均势二 - REF(均势二,1)) / REF(均势二,1)) * 1000) + 50);
波段高位:=(CROSS(趋势一,趋势二) AND (COUNT((CLOSE REF(HIGH,1)),12) 5));
LC:=REF(CLOSE,1);
方向值:=((SMA(MAX((CLOSE - LC),0),6,1) / SMA(ABS((CLOSE - LC)),6,1)) * 100);
短抄一:=((CROSS(趋势二,(趋势一 + 2)) AND (X 0)) AND ((方向值 10) OR (REF(方向值,1) 10)));
短抄二:=((((CROSS(趋势二,MA1) AND (MA1 20)) AND (方向值 趋势二)) AND (X 0)) AND
(((趋势二 20) OR (REF(趋势二,1) 15)) OR (REF(趋势二,2) 15)));
DRAWTEXT((短抄一 OR 短抄二),(LOW * 0.99),'短底'),COLOR0000FF;
DRAWTEXT(波段高位,(HIGH * 1.03),'卖出'),COLORFF0000;
DRAWICON(波段高位,(HIGH * 1.06),2),COLORFF0000;DRAWICON((短抄一 OR 短抄二),(LOW * 0.97),1);
V5:=EMA(CLOSE,1);主线:=EMA(V5,5) ;
本:=EMA(HHV(主线,5),1);
急进:=EMA(HHV(本,17),1);
稳健:=EMA(HHV(急进,17),2);
投资:EMA(HHV(稳健,17),3),LINETHICK2, COLORGRAY;
Y:=(MA(C,13)-MA(C,55))/MA(C,13)*100;
YY1:=C MA(C,13) AND OPEN MA(C,13);{一阳三线}
YY3:=C MA(C,34) AND OPEN MA(C,34);
YY5:=C MA(C,55) AND OPEN MA(C,55);
X2:DRAWTEXT(YY1 AND YY5 AND YY3,LOW-0.1,'一阳三线'),COLORRED;
SJ1:=ABS(MA(CLOSE,13)-MA(CLOSE,34)) C*0.01;{13线34线55线接近}
SJ2:=ABS(MA(CLOSE,34)-MA(CLOSE,55)) C*0.01;
SJ3:=CROSS(MA(CLOSE,13),MA(CLOSE,55));{13线上穿55线}
X3:DRAWTEXT(SJ1 AND SJ2 AND SJ3,HIGH+0.1,'三军集结'),COLORRED;
RY1:=C/OPEN 1.04;{阳线4%}
RY2:=REF(OPEN,1)/REF(CLOSE,1) 1.04;{阴线4%}
RY3:=ABS(OPEN-REF(C,1)) C*0.02 AND ABS(C-REF(OPEN,1)) C*0.02;{两线相等}
X4:DRAWTEXT(RY1 AND RY2 AND RY3 ,LOW,'日月合璧'),COLORYELLOW;
JW1:=C OPEN AND REF(C,1) REF(OPEN,1);
JW2:=OPEN REF(C,1) AND C REF(L,1);
JW3:=O MA(C,13) AND O MA(C,34) AND O MA(C,55);
JW:=JW1 AND JW2 AND JW3;
X8:DRAWTEXT(JW,LOW-0.2,'金屋藏娇'),COLORYELLOW;
TS1:=CROSS(MA(C,13),MA(C,34));{13线上穿34线}
TS2:=MA(C,13) MA(C,55);
TS:=TS1 AND TS2;
X9:DRAWTEXT(TS,LOW-0.2,'投石问路'),COLORF00FF0;
YZ1:=C/O 1.02 AND H/C 1.02 AND O/L 1.02;{收阳有上影}
YZ2:=REF(C,1) REF(O,1) AND O MA(C,11);{昨收阳 今大于均线}
YZ:=YZ1 AND YZ2 AND Y
X11:DRAWTEXT(YZ,HIGH+0.2,'一枝独秀'),COLORF00FF0;
DS1:=OPEN/C 1.04 AND O/REF(C,1) 1.03;{高开收阴}
DS2:=V*100/FINANCE(7) 0.08 AND Y {换手高涨幅大}
DS:=DS1 AND DS2;
X12:DRAWTEXT(DS,HIGH+0.2,'独上高楼'),COLORGREEN;
YJ1:=H/O 1.04;
YJ2:=ABS(C-O) C*0.03;
YJ3:=C/MA(C,13)
YJ:=YJ1 AND YJ2 AND DS2 AND YJ3 AND YZ2;
X13:DRAWTEXT(YJ,HIGH+0.3,'一剑封喉'),COLORRED;
T:=(MA(C,13)-MA(C,55))/MA(C,13)*100;
TT1:=C MA(C,13) AND OPEN MA(C,13);{断头铡刀}
TT3:=C MA(C,34) AND OPEN MA(C,34);
TT5:=C MA(C,55) AND OPEN MA(C,55);
X28:DRAWTEXT(TT1 AND TT5 AND TT3,LOW-0.6,'断头铡刀'),COLORRED;
X39:DRAWTEXT(CROSS(EMA34,EMA13),EMA34*1.01,'S分道扬镳'), COLOR00FF00;
X30:DRAWTEXT(CROSS(EMA55,EMA13),EMA55*1.01,'S一箭穿心'), COLOR00FF00;
X31:DRAWTEXT(CROSS(EMA55,EMA34),EMA55*1.01,'S各自为政'), COLOR00FF00;
VAR10:=MA(CLOSE,80)-MA(CLOSE,10)/3;
VAR11:=REF(CLOSE,1);{九毛八公式指标网www.9m8.cn}
VAR12:=(SMA(MAX(CLOSE-VAR11,0),N,1))/(SMA(ABS(CLOSE-VAR11),N,1))*100;
X14:DRAWTEXT(IF(CLOSE VAR10 AND VOL/240 MA(VOL,5)/240 AND CLOSE REF
(CLOSE,1)*1.08 AND CLOSE MA(CLOSE,13)*1.3,1,0),LOW-0.7,'进场'),COLORRED;
X16:DRAWTEXT(CROSS(LH,VAR12),HIGH*1.04,'获利减仓');
X17:DRAWTEXT(CROSS(VAR3,VAR4),L-0.3,'买');
X18:DRAWTEXT(CROSS(EMA13,EMA34),H+0.5,'投石,增持'),COLORYELLOW;
X19:DRAWTEXT(CROSS(EMA13,EMA55),H+0.3,'红客,加仓'),COLORYELLOW;
X20:DRAWTEXT(CROSS(EMA34,EMA55),L-0.5,'互换,重仓'),COLORYELLOW;
X21:DRAWTEXT(REF(CLOSE,1) REF(OPEN,1) AND CLOSE REF(OPEN,1),L*0.97,'克阴'),COLORFF00FF;
X22:DRAWTEXT(REF(CLOSE,1) REF(OPEN,1) AND CLOSE REF(OPEN,1),H*1.05,'克阳'),COLOR00FF00;
X23:DRAWICON(CROSS(EMA13,EMA34),EMA34,1);
X24:DRAWICON(CROSS(EMA13,EMA55),EMA55,1);
X25:DRAWICON(CROSS(EMA34,EMA55),EMA55,1);
STICKLINE(HR2 AND FILTER(HR2,10),H,L,0,1),COLORFFC8FF;
FF:=EMA(CLOSE,3);MA15:=EMA(CLOSE,21);
DRAWTEXT(CROSS(FF,MA15),(LOW * 0.99),' 底背'),COLORA6E500;
RSI:=((SMA(MAX((CLOSE - LC),0),3,1) / SMA(ABS((CLOSE - LC)),3,1)) * 100);
DRAWTEXT(CROSS(88,RSI),(HIGH * 1.04),' 顶背'),COLOR1880FF;
X35:DRAWICON(CROSS(EMA13,EMA34),EMA34,1);
X36:DRAWICON(CROSS(EMA13,EMA55),EMA55,1);
X37:DRAWICON(CROSS(EMA34,EMA55),EMA55,1);
X38:DRAWICON(CROSS(EMA34,EMA13),EMA34,2);
X139:DRAWICON(CROSS(EMA55,EMA13),EMA55,2);
X40:DRAWICON(CROSS(EMA55,EMA34),EMA55,2);