N:=7;M:=5;
VA:=(2*C+H+L)/4;
VB:=LLV(L,5);
VC:=HHV(H,5);
红上买:=EMA((VA-VB)/(VC-VB)*27,5),COLORRED;
红下卖:=EMA(红上买,3),COLORFFFF00;
极品底:IF((MA(C,5)-C)/C>0.04 AND (MA(C,10)-MA(C,5))/MA(C,5)>0.04,23,0),LINETHICK2,COLORFF00FF;
QVAR1A:=((HHV(HIGH,21)-CLOSE)/(HHV(HIGH,21)-LLV(LOW,21)))*(100)-10;
QVAR1B:=((CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21)))*(100);
QVAR1C:=SMA(QVAR1B,13,8);
QVAR1D:=SMA(QVAR1A,21,8);
机会来临:=SMA(QVAR1C,13,8),COLORRED;
AAS:=FILTER((COUNT((机会来临-QVAR1D<(-65)),3)=3),34);
波段买点:IF(AAS,15,0),COLORFFFFFF,STICK,LINETHICK4;
DRAWTEXT(波段买点,17,'波段买'),COLORFFFFFF;
VAR27:=(CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60))*80;
{黑马}
AHC1:=CLOSE*vol;
AHC22:=EMA((expma(AHC1,23)/EXPMA(VOL,23)+EXPMA(AHC1,54)/EXPMA(VOL,54)+EXPMA(AHC1,108)/EXPMA(VOL,108)+EXPMA(AHC1,316)/EXPMA(VOL,316))/4,34);
通道:=1.0668*AHC22;
起爆:=crOSS(C,通道) AND REF(C,1)*1.05-C<0.008 AND C>O*0.5;
RRF:=起爆;
A1:=Abs(((3.48*CLOSE+HIGH+LOW)/4-EMA(CLOSE,23))/EMA(CLOSE,23));
A2:=DMA(((2.15*CLOSE+LOW+HIGH)/4),A1);
金线王:=EMA(A2,200)*1.118;
金线王2:=EMA(A2,200)*1.118;
条件:=(C-REF(C,1))/REF(C,1)*100>8;
金k线:=CROSS(C,金线王) AND 条件;
AA05:=MA(C,5);
AA30:=MA(C,30);
MA05:=MA(C,5);
MA10:=MA(C,13);
MA30:=MA(C,34);
速度5:=SMA(EMA((MA05-REF(MA05,1))/REF(MA05,1),3)*100,3,1);
加速度5:=EMA((速度5-REF(速度5,1)),3);
五日乖离率:=(C-AA05)/AA05*100;
三拾日乖离率:=(C-MA30)/MA30*100;
MR:=COUNT(CROSS(五日乖离率,0),3)>=1 AND 三拾日乖离率>REF(三拾日乖离率,1) AND AA05>REF(AA05,1) AND (C/REF(C,1)-1)*100>5 AND REF(C,1)买入:=FILTER(MR,10);
STICKLINE(买入,10,0,10,0),COLORRED;
STICKLINE(IF(金K线,-120,0),+12,0,4,0),COLORLIMAGENTA;
STICKLINE(IF(金K线,-120,0),+9,0,4,0),COLORDD00DD;
STICKLINE(IF(金K线,-120,0),+6,0,4,0),COLOR00CC00;
STICKLINE(IF(金K线,-120,0),+3,0,4,0),COLORFFFFFF;
DRAWTEXT(买入,1.5,'黑马必抓'),COLOR00FFFF;