红轨道:=MA(MA(CLOSE,3),1),LINETHICK1,COLORYELLOW;
轨道:MA(MA(CLOSE,3),3),COLOR32CD32,LINETHICK2;
SHENG:=IF(红轨道 =轨道,轨道,NULL);
升:SHENG,COLORFF00FF,LINETHICK2;
//箱体线
N:=7;
T1:=REFX1(LLVBARS(LOW,N),10000);
T1HIGH:=REFX1(REF(HIGH,T1),10000);
CURRBARSCOUNT:=DATACOUNT-BARPOS+1;
CC:=REFX1(CURRBARSCOUNT,10000);
T2:=REFX1(BARSLAST((CURRBARSCOUNT (CC+T1)) AND (HIGH T1HIGH)),10000);
T2HIGH:=REFX1(REF(HIGH,T2),10000);
T3:=REFX1(BARSLAST((CURRBARSCOUNT (CC+T2)) AND (HIGH T2HIGH)),10000);
T3HIGH:=REFX1(REF(HIGH,T3),10000);
突破杀入线:TRENDLINES(CURRBARSCOUNT=T3+1, T3HIGH, ISLASTBAR, T3HIGH),DOT,COLOR1188FF;
DRAWTEXT(ISLASTBAR, T3HIGH, 突破加仓! ),LINETHICK1,COLOR1188FF;
AB:=EMA(((2*C+H+L)/4-LLV(LOW,30))/(HHV(HIGH,30)-LLV(LOW,30))*100,8);
BA:=EMA(AB,5);
A1高:=REFX1(REF(HHV(H,96),5),10000);
B1低:=REFX1(REF(LLV(L,96),5),10000);
A1:=A1高;
B1:=B1低;
DY中:=((A1)+(B1))/2;
箱顶:IF(AB 0 AND AB-BA =0,A1,A1),LINETHICK2,COLORGREEN;
DY:=DY中;
箱腰:IF(AB 0 AND AB-BA =0,DY,DY),DOT,COLORYELLOW;
箱低:IF(AB 0 AND AB-BA =0,B1,B1),LINETHICK2,COLORRED;
DRAWTEXT(ISLASTBAR,箱顶, 箱顶 ),COLORYELLOW;
DRAWTEXT(ISLASTBAR,箱腰, 箱腰 ),COLORYELLOW;
DRAWTEXT(ISLASTBAR,箱低, 箱低 ),COLORYELLOW;
VARAA:=IF(CLOSE 150,91.3,0.913);
突破:INTPART(CLOSE/VARAA )*VARAA,POINTDOT,LINETHICK4,COLORRED;
再突破:突破+VARAA,POINTDOT,LINETHICK4,COLOR00FF00 ;
回踩:(突破+再突破)/2,POINTDOT,COLORWHITE,LINETHICK4;
STICKLINE(CROSS(ZIGZAG(C,5,1),REF(ZIGZAG(C,5,1),1)),箱低,箱腰,0.1,-1),COLORRED;
STICKLINE(CROSS(REF(ZIGZAG(C,5,1),1),ZIGZAG(C,5,1)),箱顶,箱腰,0.1,-1),COLORGREEN;
DRAWICON(CROSS(ZIGZAG(C,5,1),REF(ZIGZAG(C,5,1),1)),箱腰,1);
DRAWICON(CROSS(REF(ZIGZAG(C,5,1),1),ZIGZAG(C,5,1)),箱腰,2);
//画红色
SZ:=C REF(C,1);
STICKLINE(SZ,HIGH,LOW,0,0),COLORRED;
STICKLINE(SZ,OPEN,CLOSE,3.1, 0),COLOR000077;
STICKLINE(SZ,OPEN,CLOSE,2.5, 0),COLOR000088;
STICKLINE(SZ,OPEN,CLOSE,2.2, 0),COLOR000099;
STICKLINE(SZ,OPEN,CLOSE,1.9, 0),COLOR0000AA;
STICKLINE(SZ,OPEN,CLOSE,1.7, 0),COLOR0000BB;
STICKLINE(SZ,OPEN,CLOSE,1.3, 0),COLOR0000CC;
STICKLINE(SZ,OPEN,CLOSE,1.0, 0),COLOR0000DD;
STICKLINE(SZ,OPEN,CLOSE,0.7, 0),COLOR0000EE;
STICKLINE(SZ,OPEN,CLOSE,0.2, 0),COLOR0000FF;
//画蓝色
XD:=C REF(C,1);
STICKLINE(XD,O,L,0,0),COLOR888800;
STICKLINE(XD,O,L,0,0),COLORFFFF00;
STICKLINE(XD,C,O,3.1,0),COLOR888800;
STICKLINE(XD,C,O,3.0,0),COLOR999900;
STICKLINE(XD,C,O,2.4,0),COLORAAAA00;
STICKLINE(XD,C,O,2.0,0),COLORBBBB00;
STICKLINE(XD,C,O,1.6,0),COLORCCCC00;
STICKLINE(XD,C,O,1.2,0),COLORDDDD00;
STICKLINE(XD,C,O,0.6,0),COLOREEEE00;
STICKLINE(XD,C,O,0.1,0),COLORFFFF00;
//绝密买点
A81:=EMA(C,3),COLORWHITE;
A82:=EMA(C,5),COLORYELLOW;
A83:=EMA(C,7),COLORMAGENTA;
A84:=EMA(C,12),COLORGREEN;
A85:=EMA(C,20),COLORRED;
A86:=EMA(C,50),COLORBLUE,LINETHICK2;
SS8:=CROSS(A81,A85) AND C O AND C REF(C,1) AND C/REF(C,1) =1.018 ;
SSS8:=CROSS(A81,A85) AND C O AND C REF(C,1) AND C/REF(C,1) =1.018;
DRAWICON(SS8 ,L-0.15,5);
DRAWTEXT(SS8,L-0.15, 绝密买点 ),COLORYELLOW;
TR := SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),N);
HD := HIGH-REF(HIGH,1);
LD := REF(LOW,1)-LOW;
DMP:= SUM(IFELSE(HD 0 HD LD,HD,0),12);
DMM:= SUM(IFELSE(LD 0 LD HD,LD,0),12);
PDI: =DMP*100/TR;
MDI:= DMM*100/TR;
ADX: =MA(ABS(MDI-PDI)/(MDI+PDI)*100,6);
ADXR:=(ADX+REF(ADX,6))/2;
ZYX1:=PDI;
ZYX2:=MDI;
ZYX3:=ZYX1 65 AND ZYX1 REF(ZYX1,1);
ZYX4:=LLV(ZYX1,0);
ZYX5:=BARSLAST(ZYX4=ZYX1);
ZYX6:=(0-REF(ZYX2,4))/(ZYX4-REF(ZYX2,ZYX5))
ZYX7:=ZYX1 REF(ZYX1,1);
ZYX8:=VOL 2*MA(VOL,30);
ZYX9:=ADX;
ZYXA:=ADXR;
ZYXB:=CLOSE MA(CLOSE,30) AND CLOSE MA(CLOSE,30)*1.04;
ZYXC:=MA(CLOSE,30) REF(MA(CLOSE,30),1);
ZYXD:=BARSLAST(CROSS(MA(CLOSE,5),MA(CLOSE,10))) BARSLAST(CROSS(MA(CLOSE,10),MA(CLOSE,5)));
DIFF := EMA(CLOSE,7) - EMA(CLOSE,21);
DEA := EMA(DIFF,3);
MACD:=2*(DIFF-DEA),COLORSTICK;
ZYXE:=0-DIFF;
ZYXF:=TROUGHBARS(C,15,1,2)
ZYX10:=EMA(CLOSE,30) REF(EMA(CLOSE,30),2);
ZYX11:=IF(ZYXF=1,50,0);
ZYX12:=CROSS(ZYX2,ZYX1) AND CROSS(ZYXA,ZYX9);
ZYX13:=CROSS(ZYX2,ZYX1) AND CROSS(ZYX9,ZYXA);
ZYX14:=ZYXB AND ZYXC AND ZYXD AND ZYX10 AND ZYX6 AND ZYX7 AND ZYX8*50;
ZYX15:=BARSLAST(CROSS(ZYX2,ZYX1)=1);
ZYX16:=BARSLAST(CROSS(ZYX1,ZYX2)=1);
ZYX17:=HHV(ZYX1,ZYX16);
ZYX18:=BARSLAST(ZYX1=ZYX17);
STICKLINE(FILTER(ZYXF=1,5),50,0,10,0),COLORRED;
ZYX19:=ZYX3 OR ZYX12 OR ZYX13*100;
ZYX1A:=ZYX13*100;
DRAWICON(FILTER(ZYXF=1,3),MA(L,3),23);
DRAWTEXT(FILTER(ZYXF=1,3),箱低-0.1, ■■铁底■■ ),COLORYELLOW;
LC:=REF((O+H+L+2*C)/5,1);
//突破盘整
W1:=C=HHV(C,20);
W2:=BARSLAST(W1);
W3:=IF(W2 0,REF(C,W2),REF(C,W2));
W4:=CROSS(C,REF(W3,1));
突破盘整:=W4 AND COUNT(W4,5)=1;
DRAWTEXT(突破盘整 0,MA(L,3), 突破盘整 ),COLORRED;
C6:=REF(C,1);
涨停:=IF((C-C6)*100/C6 =(10-0.01*100/C6),1,0);
STICKLINE(涨停,OPEN,CLOSE,1,0),COLORYELLOW;
STICKLINE(涨停,H,L,0,0),COLORYELLOW;
DRAWTEXT(涨停,MA(H,3), 涨停 ),COLORYELLOW;
RSI1:=SMA(MAX(CLOSE-LC,0),3,1)/SMA(ABS(CLOSE-LC),3,1)*100;
SELL2:=(CROSS(88,RSI1));
DRAWTEXT(SELL2,MA(H,3), ★出 ),COLOR00FF00;
VB1:=C-REF(C,1);
VB2:=100*EMA(EMA(VB1,6),6)/EMA(EMA(ABS(VB1),6),6);
VB3:=IF(LLV(VB2,2)=LLV(VB2,7) AND COUNT(VB2 0,2) AND CROSS(VB2,MA(VB2,2)),1,0);
VB4:=FILTER(VB3=1,5);
DRAWTEXT(VB4,MA(L,3), ★买 ),COLOR00FFFF;
M:=32;
P:=80;
P2:=100;
VARD1:=(C+H+O+L)/4;
卖出:=MA(VARD1,20)*(1+80/1000),COLORFFFFFF,LINETHICK3;
买入:=MA(VARD1,32)*(1-100/1000),COLOR0000FF,LINETHICK3;
机会来临:=REF(IF((MA(C,5)-C)/C 0.04 AND (MA(C,10)-MA(C,5))/MA(C,5) 0.04,30,0),1),COLORF00FF0,LINETHICK2;
RSV2:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K2:=REF(MA(RSV2,3),1)+(RSV2-REF(MA(RSV2,3),1))/3;
DD2:=REF(MA(K2,3),1)+(K2-REF(MA(K2,3),1))/3;
J2:=3*K2-2*DD2;
BB1:=EMA(J2,5);
BB2:=REF(BB1,1);
金叉:=CROSS(BB1,BB2);
DRAWTEXT(CROSS(C,卖出),MA(H,3), 卖出 ),COLOR00FFFF;
DRAWTEXT(CROSS(C,买入) AND BB1 BB2 AND C REF(O,2),MA(L,3), 买入 ),COLOR0000FF;
DRAWICON(CROSS(C,买入) AND 金叉 AND 机会来临 ,MA(L,3),13);
DRAWTEXT(CROSS(C,买入) AND 金叉 AND 机会来临,MA(L,3), 【绝杀点】 ),COLORYELLOW;