X1:=(C+L+H)/3;
X2:=EMA(X1,6);
X3:=EMA(X2,5);
GR1:=BARSLAST(BETWEEN("BIAS.BIAS2"(6,13,24),0,5));
GR2:=(C,13)>(C,21) AND (C,21)>(C,34) AND (C,13)>REF((C,13),1);
GR3:=COUNT("BIAS.BIAS2"(6,13,24)>10 AND H=HHV(H,GR1),GR1);
GR4:=H=HHV(H,GR1);
GR5:="MACD.MACD"(9,17,8)<REF("MACD.MACD"(9,17,8),1);
GR6:=GR2 AND GR3 AND GR4;
GR7:=GR2 AND GR3 AND GR4 AND GR5;
GR8:=GR6 AND GR7;
LC := REF(CLOSE,1);
RSI6:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;
BIAS5:=(CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*100;
换手:=100*V/CAPITAL;
BB13:=ATAN((C,13)-REF((C,13),1))*3.1416*10;
EMA8:=EMA(C,8);
AA1:=AMOUNT/VOL;
BB1:=L<AA1*0.9;
CC1:=(C-REF(C,1))/REF(C,1)*100>1.2;
DD1:=L<MA(C,6)*0.921;
EE1:=VOL<MA(V,5)*1.5;
STAR:BB1 AND CC1 AND DD1 AND EE1;
{MB}
梦乡:=(CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,34))*89;
初醒:SMA(梦乡,7,1);
清醒:SMA(初醒,5,1);
挣开眼就买吧:IF(CROSS(初醒,清醒) AND 清醒<20,50,10);
睡醒了就卖吧:IF(CROSS(清醒,初醒) AND 清醒>40,50,10);
{百年一遇}
VAR1:=(CLOSE-REF(CLOSE,24))/REF(CLOSE,24)*100;
CROSS(VAR1,MA(VAR1,12)) AND OPEN<CLOSE AND OPEN/REF(CLOSE,1)<=0.97 AND CLOSE/OPEN>=1.05 AND VAR1<-25;
=========================================
{老鸭回头---- 副图}
{N:1,20,10;}
MA5:=MA(C,5),COLORWHITE;
MA10:=MA(C,10),COLORFF00FF;
MA20:=MA(C,20),COLOR00FF00;
MA30:=MA(C,30),COLORYELLOW;
MA120:=SMA(C,120,1),COLOR0000FF;
ZH520:=ABS(MA5-MA20)/MA20*100<=N;
ZH530:=ABS(MA5-MA30)/MA30*100<=N;
QSXS1:=MA5>REF(MA5,1);
QSXS2:=MA20>REF(MA20,1);
QSXS3:=MA30>REF(MA30,1);
DTPL:=MA20>MA30 AND MA30>MA120;
LYHT:=DTPL AND QSXS2 AND QSXS3 AND NOT(QSXS1) AND REF(QSXS1,1);
老鸭回头:LYHT*50,COLORFF00FF;
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;
坑:IF(WR<0,WR,0),COLORYELLOW;
LYT:=DTPL AND QSXS2 AND QSXS3 AND COUNT(QSXS1,4)<=1;
GJHS:=C>MA5 AND ((QSXS1 AND NOT(REF(QSXS1,1))) OR C>REF(C,3));
LYKK:=GJHS AND (ZH520 OR ZH530) AND LYT;
买:(LYKK AND NOT(REF(LYKK,1)))*50,COLOR00FF00,LINETHICK2;
优选:(买 AND COUNT((MA10>MA20),5)=5)*100,COLORYELLOW,LINETHICK2;
{以下设置副图显示方式}
DRAWTEXT(老鸭回头,10,'●'),COLORFF00FF;
DRAWTEXT(老鸭回头,10,'¤'),COLORFF00FF;
STICKLINE(WR<0,WR,0,2,0),COLORYELLOW;
STICKLINE(WR<-10,WR,-10,2,0),COLORWHITE;
DRAWTEXT(买,80,'买★买'),COLOR00FF00;
DRAWICON(优选,10,1);
{以下设置逃顶指标}
VARC:=SMA(MAX(C-REF(C,1),0),6,1)/SMA(ABS(C-REF(C,1)),6,1)*100;
DRAWICON(CROSS(82,VARC),80,2);
VAR6:=REF(C,1);
VAR7:=SMA(MAX(C-VAR6,0),6,1)/SMA(ABS(C-VAR6),6,1)*100;
DRAWTEXT(CROSS(84,VAR7),100,'逃顶'),COLORYELLOW ;
===============================
{短线买卖}
均衡:=IF (YEAR<=2017,IF(YEAR<2017, EMA(EMA(CLOSE,5),5),IF(YEAR=2017 AND MONTH<10, EMA(EMA(CLOSE,5),5),1000)),1000);
中轨:=HHV(MA(HIGH,13),13);
趋势:=LLV(MA(HIGH,13),1);
VARA:=(CLOSE-REF(OPEN,29))/REF(OPEN,29)*100;
VARB:=EMA(0.667*REF(VARA,1)+0.333*VARA,5);
VARC:=SMA(MAX(CLOSE-REF(CLOSE,1),0),6,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),6,1)*100;
VAR1:=(HIGH+LOW+OPEN+2*CLOSE)/5;
VAR2:=REF(VAR1,1);
VAR3:=SMA(MAX(VAR1-VAR2,0),10,1)/SMA(ABS(VAR1-VAR2),10,1)*100;
VAR4:=(IF(COUNT(VAR3<20,5)>=1 AND COUNT(VAR1=LLV(VAR1,10),10)>=1 AND CLOSE>=OPEN*1.038 AND VOL>MA(VOL,5)*1.2,1,0));
VAR5:=(均衡>REF(均衡,1)AND 中轨<REF(中轨,1)AND CLOSE>REF(CLOSE,1));
趋势向上:=IF (MA(CLOSE,1)>MA(CLOSE,2) AND MA(CLOSE,2)>MA(CLOSE,3),1,0);
出击A:=IF (VAR5 AND 趋势向上 ,100,0);
均衡A:=BARSLAST(出击A>0);
A:=REF(均衡A,1)>5 AND 出击A>0;
CALF:=EMA((C/REF(C,10)-1)*100,5);
CALF1:=EMA((C/REF(C,10)-1)*100,30);
CALF2:=EMA((C/REF(C,10)-1)*100,120);
CALF3:=CROSS(CALF,CALF1);
B1F:=IF (YEAR>2005 AND CALF3>0,1,0);
D1F:=IF(REF(CLOSE,1)<REF(OPEN,1),1,0);
C1F:=IF((CLOSE-REF(CLOSE,1))/CLOSE*100>3.6,1,0);
AFF:=IF(B1F AND C1F AND D1F ,1,0);
FLY1:=FORCAST(CLOSE,8);
FLY2:=HHV(FLY1,18);
FLY3:=EMA(COST(5),17);
DRAWTEXT(关注A>20 AND YEAR>2005,CLOSE*0.96,'★'),COLORYELLOW;
CCVAR99:=IF (REF(CCVAR8,1)>1 AND CCVAR8<1, 1,0);
CCCVAR99:=IF (REF(CCVAR8,1)>1 AND CCVAR8<1, 1,0);
DRAWTEXT(CCVAR99>0 AND YEAR>2005,CLOSE*0.96,'★'),COLORYELLOW;
DRAWTEXT(ZJMR1>0 AND YEAR>2005,CLOSE*0.96,'★'),COLORYELLOW;
DRAWTEXT(ZJMR2>0 AND YEAR<2006,CLOSE*0.96,'★'),COLORYELLOW;
AF:=EMA((CLOSE+HIGH+LOW)/3,10);BF:=IF (YEAR<=2017,IF(YEAR<2017,REF(AF,1),IF(YEAR=2017 AND MONTH<10,REF(AF,1),0)),0);
STICKLINE(AF>BF,AF,BF,6,0),COLORRED;
STICKLINE(AF<BF,AF,BF,6,0),COLORBLUE;