1、斐波那契MACD 很经典的一个公式,我一直珍藏多年一直在用,这个结合斐波那契数排序,颜色区分,一目了然。 {斐波那契MACD} QXG:=BARSCOUNT(V)>100; QSTT:=IF(NAMELIKE('ST') OR NAMELIKE('*ST'),0,1); QKC:=IF(CODELIKE('688'),0,1); AA1G:=REF(LOW,1); AA2G:=SMA(ABS(LOW-AA1G),13,1)/SMA(MAX(LOW-AA1G,0),13,1)*100; AA3:=EMA(IF(CLOSE*1.2,AA2G*13,AA2G/13),13); AA4:=LLV(LOW,34); AA5:=HHV(AA3,34); AA6:=IF(LLV(LOW,56),1,0); AA7C:=EMA(IF(LOW<=AA4,(AA3+AA5*2)/2,0),3)/618*AA6; AA8C:=AA7C>REF(AA7C,1); AA9:=REF(LLV(LOW,100),3); AA10:=REFDATE(AA9,DATE); AA11:=LOW=AA10; AA12:=AA8C AND AA11; AA13:=AA12>REF(AA12,1); 起动:(AA13>REF(AA13,1) AND QSTT)/5,COLORRED; DIF:(EMA(CLOSE,12)-EMA(CLOSE,26)),COLORWHITE; DEA:(EMA(DIF,9)),COLORYELLOW; IF(DIF>DEA,DIF,DRAWNULL),COLORRED,LINETHICK2; IF(DEA<DIF,DEA,DRAWNULL),COLORMAGENTA,LINETHICK2; DRAWICON(CROSS(DEA,DIF),DEA,2); MACD:(DIF-DEA)*2,COLORSTICK,COLORGREEN; MACD2:=MACD; MJ:=MACD; S05:=SUM(MJ,0); QST:=BARSLAST(MJ<0 AND REF(MJ,1)>0)+1; QXT:=BARSLAST(MJ>0 AND REF(MJ,1)<0)+1; S5:=IF(MJ>0,S05-REF(S05,BARSLAST(MJ<0)),S05-REF(S05,BARSLAST(MJ>0)))/10; ST:=IF(MJ>0,REF(QST,QXT)+QXT,REF(QXT,QST)+QST); RS5:=REF(S5,ST); WWW58188COM:=REF(S5,ST); BC:IF(MJ>0 AND S5<RS5,0,IF(MJ<0 AND S5>RS5 AND DEA<0,0.02,0)),COLORYELLOW,VOLSTICK; 获利比:WINNER(C),NODRAW; STICKLINE((MACD2>=0),0,MACD2,0,1),COLORRED; STICKLINE(((MACD2>=0) AND (MACD2 < REF(MACD2,1))),0,MACD2,0,0),COLORMAGENTA; STICKLINE((MACD2<0),0,MACD2,0,0),COLORGREEN; STICKLINE(((MACD2<0) AND (MACD2 > REF(MACD2,1))),0,MACD2,0,1),COLORWHITE; DRAWICON(LONGCROSS(CLOSE,MA(CLOSE,5),17),MACD2,1); DRAWICON(LONGCROSS(MA(CLOSE,5),CLOSE,17),MACD2,2); DRAWICON(CROSS(DIF,DEA),LLV(DIF,1),29); DRAWICON(CROSS(DIF>=0,DIF<DEA),DIF,1); 低位金叉:=CROSS(DIF,DEA) AND DIF<-0.1; JCCOUNT:=COUNT(CROSS(DIF,DEA),BARSLAST(DEA>=0)); 二次金叉:=CROSS(DIF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1; DRAWICON(二次金叉,0,25); 三次金叉:=CROSS(DIF,DEA) AND DEA<0 AND COUNT(JCCOUNT=3,60)=1; DRAWICON(三次金叉,0,26);A1:=IF(MACD2>0,1,-1); TJ:=MACD2>0; T:=MACD2<0; A:=LLV(MACD2,50)=MACD2; DRAWICON(A AND FILTERX(A,20), MACD2,1); DRAWTEXT(BARSLAST(TJ)=1,MACD2,'1'),COLORGREEN; DRAWTEXT(BARSLAST(TJ)=2,MACD2,'2'),COLORGREEN; DRAWTEXT(BARSLAST(TJ)=3,MACD2,'3'),COLORGREEN; DRAWTEXT(BARSLAST(TJ)=5,MACD2,'5'),COLORGREEN; DRAWTEXT(BARSLAST(TJ)=8,MACD2,'8'),COLORGREEN; DRAWTEXT(BARSLAST(TJ)=13,MACD2,'13'),COLORGREEN; DRAWTEXT(BARSLAST(TJ)=21,MACD2,'21'),COLORGREEN; DRAWTEXT(BARSLAST(TJ)=34,MACD2,'34'),COLORGREEN; DRAWTEXT(BARSLAST(TJ)=55,MACD2,'55'),COLORGREEN; DRAWTEXT(BARSLAST(T)=1,MACD2,'1'),COLORYELLOW; DRAWTEXT(BARSLAST(T)=2,MACD2,'2'),COLORYELLOW; DRAWTEXT(BARSLAST(T)=3,MACD2,'3'),COLORYELLOW; DRAWTEXT(BARSLAST(T)=5,MACD2,'5'),COLORYELLOW; DRAWTEXT(BARSLAST(T)=8,MACD2,'8'),COLORYELLOW; DRAWTEXT(BARSLAST(T)=13,MACD2,'13'),COLORYELLOW; DRAWTEXT(BARSLAST(T)=21,MACD2,'21'),COLORYELLOW; DRAWTEXT(BARSLAST(T)=34,MACD2,'34'),COLORYELLOW; DRAWTEXT(BARSLAST(T)=55,MACD2,'55'),COLORYELLOW; 2、神奇波段 益盟缠论中枢买卖终极版 MX:=EMA(C,2); MXA:=EMA(SLOPE(C,21)*20+C,42); STICKLINE(MX>=MXA,REFDATE(HHV(H,130),DATE),REFDATE(LLV(L,130),DATE),5,0), COLOR600020; STICKLINE(MX<MXA,REFDATE(HHV(H,130),DATE),REFDATE(LLV(L,130),DATE),5,0), COLOR404050; DRAWKLINE(H,O,L,C); AA:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,30))/MA(CLOSE,30); 趋势线:DMA((2*CLOSE+LOW+HIGH)/4,AA),LINETHICK3,COLORRED; CC:=(CLOSE/趋势线); MA1:=MA(CC*(2*CLOSE+HIGH+LOW)/4,3); MAAA:=((MA1-趋势线)/趋势线)/3; TMP:=MA1-MAAA*MA1; JJ:IF(TMP<=趋势线,趋势线,DRAWNULL),LINETHICK3,COLORGREEN; XJ:IF(TMP<=趋势线,TMP,DRAWNULL),LINETHICK2,COLORBLUE; 建仓:CROSS(MX,MXA),NODRAW; SEL:=CROSS(MXA,MX); DRAWICON(建仓,L-0.1,1); DRAWICON(SEL,H+0.1,2); DRAWTEXT(建仓,L-0.68,'↖建仓持股')COLORMAGENTA; DRAWTEXT(SEL,H+0.38,'↙清仓持币'),COLORBLUE; STICKLINE(MX>=MXA,LOW,HIGH,0.0,1),COLORRED; STICKLINE(MX>=MXA,CLOSE,OPEN,3,1),COLORRED; STICKLINE(MX<MXA,LOW,HIGH,0.0,1),COLORGREEN; STICKLINE(MX<MXA,CLOSE,OPEN,3,1),COLORGREEN; STICKLINE(建仓,OPEN,CLOSE,2,0),COLORYELLOW; STICKLINE(SEL,OPEN,CLOSE,2,0),COLORBLUE; CP:=MA(CLOSE,9),COLORCYAN,LINETHICK1; JD:=MA(CLOSE,18),COLORMAGENTA; DRAWICON(CROSS(CP,JD) AND MX>=MXA,JD-0.1,1); DRAWTEXT(CROSS(CP,JD) AND MX>=MXA,JD-0.38,'↖加仓'),COLORYELLOW; BL:=VOL>=REF(V,1)*1.91 AND C>REF(C,1)*1.01; DRAWTEXT(FILTER(BL,3),H+0.2,'↙倍量柱')COLORYELLOW; STICKLINE(FILTER(BL,3),OPEN,CLOSE,1.5,0),COLORYELLOW; XG:=SUMBARS(FILTER(BL,3),1); STICKLINE(XG,REF(L,XG-1),REF(L,XG-1),10,0),COLORYELLOW; 3、埋伏主升浪 指标源码: Z1:=STRCAT(HYBLOCK,' '); Z2:=STRCAT(Z1,DYBLOCK); Z3:=STRCAT(Z2,' '); DRAWTEXT_FIX(ISLASTBAR,0,0,0,STRCAT(Z3,GNBLOCK)),COLORRED; DRAWTEXT_FIX(ISLASTBAR,0.001,0.050,0,GNBLOCK),COLORCYAN;{概念}; ZT:=REF(C,1)*1.1-C<0.01 AND H=C;{涨停} AA:=MA((2*CLOSE+HIGH+LOW)/4,5); 通1:=AA*102/100; 通2:=AA*(200-102)/100; CC:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20); DD:=DMA(CLOSE,CC); 上:(1+7/100)*DD,DOTLINE,COLORGREEN; 下:(1-7/100)*DD,DOTLINE,COLORGREEN; 中:(上+下)/2,DOTLINE,COLORGREEN; 上上:EMA(上,181),DOTLINE,COLORRED; 下下:EMA(下,181),DOTLINE,COLORRED; 中中:EMA(中,181),DOTLINE,COLORRED; WWW58188COM:=EMA(中,181); STICKLINE(上>=上上,上,上上,0,0),COLORRED; DRAWKLINE(H,O,L,C); {IF((上 <= REF(上,1)),上,DRAWNULL),COLORGREEN,DOTLINE; IF((上 > REF(上,1)),上,DRAWNULL),COLORRED,DOTLINE; IF((中 <= REF(中,1)),中,DRAWNULL),COLORGREEN,DOTLINE; IF((中 > REF(中,1)),中,DRAWNULL),COLORRED,DOTLINE; IF((下 <= REF(下,1)),下,DRAWNULL),COLORGREEN,DOTLINE; IF((下 > REF(下,1)),下,DRAWNULL),COLORRED,LINETHICK2;} 顶:=(1+14/100)*DD,LINETHICK2,COLORBLACK; 底:=(1-14/100)*DD,LINETHICK2,COLORBLACK; 触底:=REF(L,1)<底 AND ZT ; DRAWTEXT(触底,L,'反转'),COLORCYAN; STICKLINE(触底,C,O,3,1),COLORYELLOW; STICKLINE(触底,C,O,1,0),COLORRED; DF:=(C-REF(C,1))/REF(C,1)*100<-5; DF4:=(C-O)/O*100<-4; AAAA:=BARSLAST(DF); 乖离涨停1:=H>上 AND ZT AND CROSS(C,上); DRAWTEXT(乖离涨停1,L,'爆'),COLORYELLOW; STICKLINE(乖离涨停1,C,O,3,1),COLORYELLOW; 乖离涨停2:=O>上 AND ZT; STICKLINE(乖离涨停2,C,O,3,1),COLORCYAN; DRAWTEXT(乖离涨停2,L,'妖股'),COLORCYAN; |