1、反转上升结构趋势,波段类 反转上升结构趋势,波段趋势类公式 上升通道趋势线反转通道 {反转上升结构趋势} N:=8; N1:=17; N2:=34; A1A:=EMA(CLOSE, 9); A1B:=((A1A-EMA(CLOSE,5))<0); STICKLINE(C>0,40,60,10,0),COLOR999999; RSV:=(CLOSE-LLV(LOW,N1))/(HHV(HIGH,N1)-LLV(LOW,N1))*100; A1C:=((A1A-EMA(CLOSE,5))>0); A1D:=BARSLAST(A1B); 短K:SMA(RSV,3,1),COLORF580F5,LINETHICK0; 短D:SMA(短K,3,1),COLORCCDD33,LINETHICK0; A1E:=BARSLAST(A1C); A1F:=IF((A1E>0),(CLOSE-REF(CLOSE,1))/REF(CLOSE, 1)*100,0); RSV1:=(CLOSE-LLV(LOW,N2))/(HHV(HIGH,N2)-LLV(LOW,N2))*100; A20:=SUM(A1F,0); A21:=IF((A1D>0),(0-2),0); 中K:SMA(RSV1,5,1),COLORRED,LINETHICK0; 中D:SMA(中K,10,1),COLOR00FFFF,LINETHICK0; A22:=IF((A1E>0),SUM((CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100,A1E),0); A23:=A22/A1E; 短:=3*短K-2*短D,COLORRED,LINETHICK4; 中:=3*中K-2*中D,COLORRED,LINETHICK4; A25:=EMA(EMA(EMA(CLOSE,3),3),3); 上升通道:((A25 - REF(A25,1))+A25),COLORRED; 趋势线:(短+中)/2,COLORFF9900,LINETHICK2; 底线:10,COLORWHITE; 顶线:90,COLOR33FF33; 反转通道:MA(上升通道,15),COLORGREEN; IF(上升通道>REF(上升通道,1),上升通道,DRAWNULL),COLORFFFFCC,LINETHICK4,POINTDOT; IF(反转通道>REF(反转通道,1),反转通道,DRAWNULL),COLOR00FFFF,LINETHICK4,POINTDOT; BB:=IF(BARSLAST(CROSS(短K,RSV))>=3 AND CROSS(RSV,短K) AND 短K<30,20,0); STICKLINE((上升通道>反转通道),反转通道,上升通道,1,0),COLORMAGENTA; STICKLINE((反转通道>上升通道),上升通道,反转通道,1,0),COLORFF0000; STICKLINE(BB,0,50,2.8,1),COLOR0000BB; STICKLINE(BB,0,50,1.4,1),COLOR0000DD; STICKLINE(BB,0,50,0.7,1),COLOR0000FF; DRAWTEXT(CROSS(反转通道,上升通道),上升通道*1.08,'下降趋势'),COLOR00FF00; DRAWTEXT(CROSS(上升通道,反转通道),反转通道*0.97,'上升趋势'),COLOR0000FF; AA:=IF(BARSLAST(CROSS(RSV,短K))>=4 AND CROSS(短K,RSV) AND RSV>50,20,0); DRAWICON(((REF(A21,1)=(0-2)) AND (A21=0)),LOW,5); DRAWICON(((REF(A1E,1)>0) AND (A1E=0)),HIGH,6); 2、KDJ和KD背离增强版,有买卖点背离信号提示 增强版KDJ和KD背离,有买卖点提示,没未来函数( 股 民 学 院 : http://www.58188.net ) 公式集中:多空买卖点提示、金叉死叉、底背和顶背离 {增强版KDJ和KD背离} SJ:=1; Q2:=(CLOSE-LLV(LOW, 18))/(HHV(HIGH, 18)-LLV(LOW, 18))*100; Q3:=SMA(Q2, 9, 1); Q4:=SMA(Q3, 3, 1); 长趋势:3*Q3-2*Q4,COLORWHITE,LINETHICK1; 趋势线:EMA(Q3, 3)*SJ,COLORRED,LINETHICK1; DRAWTEXT(CROSS(趋势线, 长趋势) AND REF(长趋势,1)>80, REF(长趋势,3), '空'),COLORGREEN; DRAWTEXT(REF(CROSS(长趋势,趋势线),1) AND 长趋势>1.3*趋势线,趋势线,'多'),COLORRED; RSV1:=(CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100; K1:=SMA(RSV1,5,1)*SJ; D1:=SMA(K1,3,1)*SJ; J1:=3*K1-2*D1; AA1:=EMA(J1,12); AA2:=REF(AA1,1); STICKLINE(AA1>AA2,AA1,AA2,2,1),COLORRED; STICKLINE(AA1<=AA2,AA1,AA2,2,1),COLORGREEN; AA:=REF(CLOSE,1); QS:=SMA(MAX(CLOSE-AA,0),8,1)/SMA(ABS(CLOSE-AA),8,1)*100,COLORYELLOW,LINETHICK1; 超买:100*SJ,COLORRED,DOTLINE; 超卖:0*SJ,COLOR00FF00,DOTLINE; AA3:=CROSS(80,QS) AND AA1<=AA2; C1:=CROSS(80,QS); C2:=FILTER(C1,10); D2:=CROSS(QS,19); D3:=FILTER(D2,10); D4:=FILTER(CROSS(QS,15),10); A5:=3*SMA((CLOSE-LLV(LOW,18))/(HHV(HIGH,18)-LLV(LOW,18))*100,21,1)-2* SMA(SMA((CLOSE-LLV(LOW,18))/(HHV(HIGH,18)-LLV(LOW,18))*100,20,1),8,1) ; AQW:=20; ZQ:=CROSS(A5,AQW); AA4:=(3*C+H+L+O)/6; VAR8:=(8*AA4+7*REF(AA4,1)+6*REF(AA4,2)+5*REF(AA4,3)+4*REF(AA4,4)+3*REF(AA4,5)+2*REF(AA4,6)+REF(AA4,8))/36; VAR9:=(LLV(VAR8,2)+LLV(VAR8,4)+LLV(VAR8,6))/3; MA1:=MA(CLOSE,5); MA2:=MA(CLOSE,10); M3:=CROSS(MA2,MA1); VAR1:=(CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100; VAR2:=SMA(VAR1,3,1); VAR3:=SMA(VAR2,3,1); VAR4:=SMA(VAR3,3,1); 波:= VAR3; 段:= VAR4; VAR6:=CROSS(VAR3,VAR4) AND VAR3<20; CD:=FILTER(CROSS(VAR3,VAR4),10) ; HH:=HHV(HIGH,3); LL:=LLV(LOW,3); HH1:=BARSLAST((HH > REF(HH,1))); LL1:=BARSLAST((LL < REF(LL,1))); A6:=HH1>LL1; VAR7:=CROSS(VAR4,VAR3) AND VAR3>80; 看多:=ZQ AND CD; STICKLINE(看多>0,15,看多*1.01,1,0),COLORMAGENTA; DIFF:=EMA(CLOSE,12) - EMA(CLOSE,26); DEA:=EMA(DIFF,9); MMACD:=(DIFF-DEA)*2; A1:=BARSLAST(REF(CROSS(DIFF,DEA),1)); B1:=REF(C,A1+1)>C AND REF(DIFF,A1+1)<DIFF AND CROSS(DIFF,DEA) AND DEA<0; DRAWTEXT(FILTER(B1,10)=1,15,'底背'); STICKLINE(FILTER(B1,10)=1,0,30,2,0)*SJ,COLORBLUE ; A2:= BARSLAST(REF(CROSS(DEA,DIFF),1)); B2:= REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF); STICKLINE(FILTER(B2,5)=1,80,100,2,0)*SJ,COLORCYAN; DRAWTEXT(FILTER(B2,5)=1,90,'顶背'),COLORYELLOW ; RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9)); K:=SMA(RSV,9,3); D:=SMA(K,9,3); J:=3*K-2*D; A:=CROSS(DIFF,DEA) AND CROSS(K,D) AND CROSS(J,D) AND DIFF<0; SA:=CROSS(DEA,DIFF) AND CROSS(D,K) AND CROSS(D,J) AND DIFF>0; DRAWTEXT(FILTER(A,10)=1,12,' 金叉'),COLORYELLOW; STICKLINE(FILTER(A,10)=1,0,20,2,0)*SJ,COLORRED ; DRAWTEXT(FILTER(SA,10)=1,97,'死叉'),COLORYELLOW; STICKLINE(FILTER(SA,10)=1,80,100,2,0)*SJ,COLORWHITE; 3、均线通道主图 加浪60副图 均线通道主图 加浪60副图,两个公式( 股 民 学 院 : http://www.58188.net ) {浪60-3} 短期3:=(CLOSE-MA(CLOSE,3))/MA(CLOSE,3); DRAWBAND(短期3,RGB(159,2,6),0,RGB(5,41,23)); DRAWBAND(0,RGB(159,2,6),-短期3,RGB(5,41,23)); 分界线60日:0,COLOR1567C1; XX:-短期3,COLOR1C4F13,DOTLINE; SS:短期3,COLOR1C4F13,DOTLINE; QS5:=(CLOSE-MA(CLOSE,5))/MA(CLOSE,5); 强弱线:EMA(EMA(QS5,6),6),COLOREDC32D,DOTLINE; QS60:=(CLOSE-MA(CLOSE,60))/MA(CLOSE,60); 趋势5日:MA(QS60,4),COLORWHITE,LINETHICK2; QS9:MA(QS60,9),COLORB31DD8,LINETHICK3; 趋势9日:QS9,COLOR75B216,POINTDOT,LINETHICK3; 趋势20日:MA(QS60,20),COLORYELLOW,LINETHICK2; QS20:趋势20日,COLORBLACK,POINTDOT,LINETHICK4; GJ:QS60,COLORYELLOW,LINETHICK1; {均线通道} DRAWTEXT_FIX(ISLASTBAR,0,0,0,HYBLOCK); {3日布林通道} 短线:=MA(C,3); 压力:=短线+ 1.5*STD(C,3); 支撑:=短线- 1.5*STD(C,3); DRAWBAND(压力,RGB(106,2,18),支撑,DRAWNULL); DRAWKLINE(HIGH,OPEN,LOW,CLOSE); Y3:压力,COLOR3A18FC,LINETHICK1; Z3:支撑,COLOR3A18FC,LINETHICK1; {9日布林通道} 短线9:=MA(C,9); 压力9:短线9+ 1.5*STD(C,9),COLORDCDAFE,LINETHICK2; 支撑9:短线9- 1.5*STD(C,9),COLORDCDAFE,LINETHICK2; Y9:压力9,POINTDOT,COLORBLACK,LINETHICK4; Z9:支撑9,POINTDOT,COLORBLACK,LINETHICK4; {趋势} K60:MA(C,60),COLORF2DABB,LINETHICK1; K20线:MA(C,20),COLORYELLOW,LINETHICK2; K9线:MA(C,9),COLORB31DD8,LINETHICK1; K9中:K9线,COLORYELLOW,POINTDOT,LINETHICK2; K5线:MA(C,5),COLORWHITE,LINETHICK1; 短线3:MA(C,3),COLORYELLOW,DOTLINE; DRAWTEXT_FIX(ISLASTBAR,0,1,0,' 买在5日线上!'),COLORYELLOW; |