N:=8;N1:=5;P1:=3;
上轨:(SMA(HIGH,13,2))*(1.05),COLOR0000FF,LINETHICK1;
中轨:SMA(LOW,3,1),COLOR9156C0,LINETHICK1;
下轨:(SMA(LOW,13,2))*(0.94999998),{COLOR00FF00}COLOR678E30,LINETHICK2;
VAR1:=REF(CLOSE,1);
VAR2:=MA(CLOSE,5);
VAR3:=SMA(MAX(CLOSE-VAR1,0),N,1)/SMA(ABS(CLOSE-VAR1),N,1)*100;
VAR33:=((3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1)-50)*1.032+50);
VAR333:=(VAR3+VAR33)/2;
RSV6:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;
KK:=SMA(RSV6,3,1);
DD:=SMA(KK,3,1);
JJ:=3*KK-2*DD;
M:=BARSLAST(CROSS(DD,JJ));
警示:REF(H,M),POINTDOT,COLOR33C8B5,LINETHICK1;
STICKLINE(警示,警示,警示,10,1),COLORYELLOW,LINETHICK2;
VARA:=IF(CLOSE>150,91.3,0.913);
箱体下沿:=INTPART(CLOSE/VARA )*VARA;
箱体上沿:=箱体下沿+VARA;
箱体中线:=(箱体下沿+箱体上沿)/2;
STICKLINE(C>0 ,箱体下沿,箱体下沿,2,1),COLORGREEN;
STICKLINE(C>0,箱体上沿,箱体上沿,2,1),COLORYELLOW ;
STICKLINE(C>0,箱体中线,箱体中线,2,1),COLORWHITE ;
XRSV6:=(HHV(H,9)-C)/(HHV(H,9)-LLV(L,9))*100;
XKK:=SMA(XRSV6,3,1);
XDD:=SMA(XKK,3,1);
XJJ:=3*XKK-2*XDD;
XM:=BARSLAST(CROSS(XDD,XJJ));
{买卖提示}
MA5:=MA(CLOSE,5);
MA10:=MA(CLOSE,10);
MA20:=MA(CLOSE,20);
MA30:=MA(CLOSE,30);
MA120:=MA(CLOSE,120);
MA250:=MA(CLOSE,250);
DTPL:=MA10>MA30 AND MA20>MA30 AND MA30>REF(MA30,1);
破线:=MIN(MA20*1.05,MA30*1.1);
差幅:=C/MIN(MA20*1.05,MA30*1.1)-1;
均线流:=(DTPL AND MA5>MA30 AND MA5<MA10)*-0.1;
偏离率:=(C<MIN(MA20*1.05,MA30*1.1) AND C>MA30)*0.1;
BDGD:=C=HHV(C,20);
GDSJ:=BARSLAST(BDGD);
目标:=IF(均线流=-0.1 AND 偏离率=0.1 AND GDSJ>=N,0.8,0);
MBSJ:=BARSLAST(目标=0.8);
TP1:=CROSS(C,MIN(MA20*1.05,MA30*1.1)) AND REF(GDSJ,1)>=N;
TP2:=偏离率=0 AND REF(COUNT(偏离率=0.1,N)=N,1) AND C>REF(C,1);
突破:=(TP1 OR TP2)*1;
QSXS1:=MA5>REF(MA5,1);
LYHT:=DTPL AND MA5>MA10 AND NOT(QSXS1) AND REF(QSXS1,1);
MAV5:=EMA(V,5);
MAV10:=EMA(V,10);
LNMACD:=((V-MAV5)/MAV5*2+(V-MAV10)/MAV10)*10;
量坑:=LNMACD<=-10;
优选:=目标 AND COUNT(量坑,3)>=1;
DRAWTEXT(突破,L,'★'),COLORYELLOW;
GX:=MAX(MA5,MAX(MA10,MA20));
DX:=MIN(MA5,MIN(MA10,MA20));
QSXS:=DX>MA30 AND MA30>REF(MA30,1);
均线粘合:=IF(ABS(GX/DX-1)*100<=3,1,0);
FL:=V>REF(V,1) OR V>MA(V,5);
SZ:=(CROSS(C,MA(C,3)) OR CROSS(C,MA(C,5))) AND C>=O;
放量上涨:=IF(FL AND SZ,1,0);
果断出击:=FILTER(COUNT(均线粘合,2) AND COUNT(放量上涨,2) AND C>O AND QSXS,2)*100;
{以下设置果断出击后的涨幅跟踪,不需要的可以删除};
MRSJ:=BARSLAST(果断出击);
涨:=(C/REF(C,MRSJ)-1)*100*(MRSJ<=20);
ZZ:=MRSJ<20 AND CROSS(H,REF(C,MRSJ)*1.09999);
知足:=ZZ AND COUNT(ZZ,MRSJ)=1;
DB:=MRSJ<20 AND CROSS(H,REF(C,MRSJ)*1.05);
达标:=DB AND COUNT(DB,MRSJ)=1;
DRAWTEXT(知足,H*1.03,'+10%'),COLORFFFFFF;
DRAWTEXT(果断出击,L*0.99,'出击'),COLORFFFF33;
DRAWTEXT(达标,H*1.01,'+5%'),COLORYELLOW;
WR5:=100*(HHV(H,5)-C)/(HHV(H,5)-LLV(L,5));
WR6:=100*(HHV(H,6)-C)/(HHV(H,6)-LLV(L,6));
WR:=80-(WR5*3+WR6*2)/5;
DRAWTEXT(WR<-10,L*0.99, '#'),COLOR00FF00;
MTM:=C-REF(C,1);
DX1:=100*EMA(EMA(MTM,N1),N1)/EMA(EMA(ABS(MTM),N1),N1);
买1:=IF(LLV(DX1,2)=LLV(DX1,7) AND COUNT(DX1<0,2) AND CROSS(DX1,MA(DX1,2)),1,0);
卖1:=IF(HHV(DX1,2)=HHV(DX1,7) AND COUNT(DX1>50,2) AND CROSS(MA(DX1,2),DX1),1,0);
DRAWTEXT(FILTER(卖1=1,5),HIGH*1.02, '←▼'),COLOR00FF00;
DRAWTEXT(FILTER(买1=1,5),LOW*0.99, '←▲'),COLORRED; |