MKD启动指标[同花顺公式]
相关标签: 龙头启动指标 、 通达信盯庄跟庄指标公式 、 跟庄神器指标 、 真正跟庄的指标 、 准备拉升指标公式 、 通达信五图共振指标 、
mkd方法很重要,举做菜为例,我们炒菜时不用用炖锅吧?剁鸡肉时也不用把水果刀?在股票市场也是一样的,在不同的时期有着不同的应对方法,用KD指标当例子就好,整体行情使用KD指标,准确的机率只有40%左右,但是,在行情进入多头趋势时,KD指标的准确率却是可以超过80%以上;准确的分析行情,正确的使用操作工具,是我们散户能在市场赚钱的重要法则!
原理解析:
来源:程序化99( WWW.CXH99.COM )
源码:
DIFF : =EMA(CLOSE,12) - EMA(CLOSE,26);DEA :=EMA(DIFF,9);MACD1 : =2*(DIFF-DEA/2);MAA:=MA(MACD1,5);AH:=HHV(MACD1,11);AL:=LLV(MACD1,11);DIFF2 : =EMA(CLOSE,24) - EMA(CLOSE,52);DEA2 :=EMA(DIFF2,18);MACD2 : =2*(DIFF2-DEA2/2);MAA2:=MA(MACD2,10);AH2:=HHV(MACD2,18);AL2:=LLV(MACD2,18);DIFF8 : =EMA(CLOSE,12*8) - EMA(CLOSE,26*8);DEA8 :=EMA(DIFF8,9*8);MACD8 : =2*(DIFF8-DEA8/2);MAA8:=MA(MACD8,5*8);STICKLINE(1,21,20,3,0),colorgray;STICKLINE(1,81,80,3,0),colorgray;STICKLINE(1,51,50,3,0),colorgray;M5:=MA(C,5);GJ2:=REF(C,2);KM5:=(M5*5-REF(C,4)+C)/5;M10:=MA(C,10);M30:=MA(C,30);M60:=MA(C,60);M40:=MA(C,40);MVOL5:=MA(VOL,5);M20:=MA(C,20);M13:=MA(C,13);MM1:=MACD1>REF(MACD1,1) AND MACD1>0 AND DEA>REF(DEA,1);MM2:=MACD1<REF(MACD1,1) AND MACD1>0 AND DEA>REF(DEA,1);MM3:=MACD1>REF(MACD1,1) AND MACD1>0 AND DEA<REF(DEA,1);MM4:=MACD1>REF(MACD1,1) AND MACD1<0 AND DEA>REF(DEA,1);MM5:=MACD1>REF(MACD1,1) AND MACD1<0 AND DEA<REF(DEA,1);MM0:=DIFF<REF(DIFF,1) AND MACD1<REF(MACD1,1);STICKLINE(MM1,61,51,9,0),colorred;STICKLINE(MM2,61,51,9,1),colorred;STICKLINE(MM3,56,51,9,1),colorred;STICKLINE(MM4,49,39,9,1),colorred;STICKLINE(MM5,44,39,9,1),colorred;MID := MA(CLOSE,20);SG:= MID + 2*STD(CLOSE,20);XG:= MID - 2*STD(CLOSE,20);RSV1=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;a1=SMA(RSV1,3,1);b1=SMA(a1,3,1);e1=3*a1-2*b1;K1:=a1;D1:=b1;J1:=e1;a:=a1;b:=b1;e:=e1;IF(e<0) e=0;IF(e>100) e=100;IF(a<0) a=0;IF(a>100) a=100;IF(b<0) b=0;IF(b>100) b=100;K:a,coloryellow;D:b,colorwhite;J:e,colormagenta;RSV2=(CLOSE-LLV(LOW,18))/(HHV(HIGH,18)-LLV(LOW,18))*100;a2=SMA(RSV2,6,1);b2=SMA(a2,6,1);e2=3*a2-2*b2;K2:=a2;D2:=b2;J2:=e2;RSV3=(CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100;a3=SMA(RSV3,9,1);b3=SMA(a3,9,1);e3=3*a3-2*b3;K3:=a3;D3:=b3;J3:=e3;RSV4=(CLOSE-LLV(LOW,72))/(HHV(HIGH,72)-LLV(LOW,72))*100;a4=SMA(RSV4,24,1);b4=SMA(a4,24,1);e4=3*a4-2*b4;K4:=a4;D4:=b4;J4:=e4;JC1:=BARSLAST(CROSS(K1,D1));SC1:=BARSLAST(CROSS(D1,K1));JC1C:=BARSLAST(CROSS(K1,D1),1);SC1C:=BARSLAST(CROSS(D1,K1),1);JC2:=BARSLAST(CROSS(K2,D2));SC2:=BARSLAST(CROSS(D2,K2));SC3:=BARSLAST(CROSS(D3,K3));JC4:=BARSLAST(CROSS(K4,D4));SC4:=BARSLAST(CROSS(D4,K4));M5S20:=BARSLAST(CROSS(M5,M20));M5X20:=BARSLAST(CROSS(M20,M5));JC2B:=BARSLAST(CROSS(K2,D2),2);JC3B:=BARSLAST(CROSS(K3,D3),2);JC2C:=BARSLAST(CROSS(K2,D2),1);SC2C:=BARSLAST(CROSS(D2,K2),1);GD:=BARSLAST(H=HHV(H,JC2B));GD3:=BARSLAST(H=HHV(H,JC3B));GDSC4:=COUNT(CROSS(D4,K4),GD);GDSC2:=COUNT(CROSS(D2,K2),GD);GDSC3:=COUNT(CROSS(D3,K3),GD3);SC2B:=BARSLAST(CROSS(D2,K2),2);SC3B:=BARSLAST(CROSS(D3,K3),2);SC2Z:=BARSLAST(CROSS(D2,K2),4);DD:=BARSLAST(L=LLV(L,SC2B,SC2));DD3:=BARSLAST(L=LLV(L,SC3B));DD4:=BARSLAST(L=LLV(L,SC2Z));DDJC2:=COUNT(CROSS(K2,D2),DD);DDJC3:=COUNT(CROSS(K3,D3),DD3);DD4SC2:=COUNT(CROSS(D2,K2),DD4);JC4J1:=COUNT(CROSS(K1,D1),JC4);SC4J1:=COUNT(CROSS(K1,D1),SC4);JC4S1:=COUNT(CROSS(D1,K1),JC4);SC4S1:=COUNT(CROSS(D1,K1),SC4);JC4J2:=COUNT(CROSS(K2,D2),JC4);SC4J2:=COUNT(CROSS(K2,D2),SC4);SC3J2:=COUNT(CROSS(K2,D2),SC3);JC4S2:=COUNT(CROSS(D2,K2),JC4);SC4S2:=COUNT(CROSS(D2,K2),SC4);DXH1Q:=COUNT(CROSS(D1,K1),M5S20);CSM5:=COUNT(CROSS(C,M5),M5S20);SC2J1:=COUNT(CROSS(K1,D1),SC2);JC2S1:=COUNT(CROSS(D1,K1),JC2);JJ4:=JC4<SC4;MJ:=M5S20<M5X20;JJ2:=JC2<SC2;SS4:=JC4>SC4;MS:=M5S20>M5X20;SS2:=JC2>SC2;XBL1:=HHV(H,JC2)>=HHV(H,JC2C)*0.995 AND HHV(AH,JC2)<HHV(AH,JC2C,JC2) AND JJ2;XBL3:=HHV(H,JC1)>=HHV(H,JC1C)*0.995 AND HHV(AH,JC1)<HHV(AH,JC1C,JC1) AND K1>D1;XBL4:=HHV(H,JC2)>=HHV(H,JC2C)*0.995 AND HHV(D2,JC2)<HHV(D2,JC2C,JC2) AND JJ2;MXBL:=MAA>0 AND AH=REF(AH,1) AND J1<REF(J1,1) AND (XBL1 OR XBL3 OR XBL1) AND H>C;STICKLINE(MXBL,100,90,6,0),colorgreen;NBL1:=LLV(L,SC2)<=LLV(L,SC2C)*1.005 AND LLV(AL,3)>LLV(AL,SC2C) AND REF(L,1)=LLV(L,SC2) AND AL=REF(AL,1);NBL3:=L=LLV(L,12) AND MACD1>AL AND MAA>MACD1 AND AL=REF(AL,1);NBL4:=LLV(L,SC2)<=LLV(L,SC2C)*1.005 AND LLV(K1,SC2)>LLV(K1,SC2C);MNBL:=MAA<0 AND SS2 AND K1<D1 AND J1>REF(J1,1) AND (NBL1 OR NBL1 OR NBL1);STICKLINE(MNBL,100,90,6,0),colorred;MMR1A:=AL>LLV(AL,SC1C,JC1) AND AL2>LLV(AL2,SC1C,JC1);MMR1B:=AL>LLV(AL,SC2C,JC2) AND AL2>LLV(AL2,SC2C,JC2);MMR1:=MMR1A OR MMR1B;MMR2:= MACD1<0 AND MACD2<0 AND AL2>=REF(AL2,1) AND SS2;MMR3:=HHV(MNBL,SC1)>0 OR MAA8<MACD8 OR (K2>REF(K2,1) OR D2<50);MMR4:=CROSS(MACD1,MAA) AND MACD1>LLV(MACD1,SC4)*0.8 AND (K2>REF(K2,1) OR D2<50);MMRD:=MMR1 AND MMR2 AND MMR3 AND MMR4;DRAWTEXT( MMRD,100,"进");HJM1:=LLV(C,SC2)>LLV(L,SC2C,JC2) AND AL>LLV(AL,SC2C,JC2) AND MACD1<0;HJM2A:=HHV(MNBL,JC2+5)>0 AND COUNT(CROSS(0,MACD1),JC2)=0 AND SS2;HJM2:=COUNT(CROSS(MACD1,0),JC2)=1 AND (COUNT(CROSS(0,MACD1),JC2)=1 OR HJM2A) AND COUNT(CROSS(MACD2,0),SC2)=0;HJM3:=CROSS(K1,D1) AND MACD2<0 AND MACD1>REF(MACD1,1) AND MACD1>LLV(MACD1,SC4)*0.6 AND (K2>REF(K2,1) OR D2<50);HJM4:=AH>=REF(AH,JC2) AND MACD8>REF(MACD8,1) AND (C>M5 OR M5>REF(M5,1)) AND SC4S2>=2;HJMD:=HJM1 AND HJM2 AND HJM3 AND HJM4;DRAWTEXT(HJMD,100,"金");DSFT1:=MACD2>REF(MACD2,1) AND REF(MACD2,2)>REF(MACD2,1) AND AH2<REF(AH2,1);DSFT2:=MACD1>REF(MACD1,1) AND K2>REF(K2,1) AND SS4 AND AH2<0;DSFT3:=AL<=LLV(AL,SC1C,JC1) OR AL<=LLV(AL,SC2C,JC2);DSFT:=DSFT1 AND DSFT2 AND DSFT3;DRAWTEXT(DSFT,85,"弹");FTP:=HHV(DSFT,JC1+3)>0 AND M5<REF(M5,1) AND REF(M5,2)<REF(M5,1);DRAWTEXT(FTP,85,"跑");JH:=BARSLAST(HJMD>0 OR MMRD>0);HMC1:=C<M5 OR M5<REF(M5,1);HMC2:=CROSS(MAA,MACD1) AND AH>0 AND H>C AND JJ2;HMJ:=HMC1 AND HMC2 AND HHV(MXBL,JC2)=0;DRAWTEXT( HMJ,100,"减");HMC:=(CROSS(D1,K1) OR CROSS(MAA,MACD1)) AND HHV(MXBL,JC2)>0 AND MACD1>0 AND H>C AND AL<>REF(AL,1);DRAWTEXT(HMC,100,"出");QCC1:=M30<REF(M30,1) AND REF(M30,1)>REF(M30,2) AND REF(M30,2)>REF(M30,3);QCC2:=M5<M20 AND C<M40;QCC:=QCC1 AND QCC2;QCCC:=HHV(QCC,8) AND M60<REF(M60,1);DRAWTEXT(QCC,100,"清");STICKLINE(QCCC,85,80,11,0),colorgreen;HJJ1:=AL2>=REF(AL2,1) AND AL=REF(AL,1);HJJ2:=CROSS(K1,D1) AND SS2 AND MACD8>REF(MACD8,1);HJJ3:=M30>REF(M30,1) AND JC4S2<=3 AND K4>REF(K4,1);HJJ:=HJJ1 AND HJJ2 AND HJJ3;DRAWTEXT( HJJ,80,"加");TYP := (IF(ISNULL(HIGH),CLOSE,HIGH) + IF(ISNULL(LOW),CLOSE,LOW) + CLOSE)/3;CCI:=(TYP-MA(TYP,21))/(0.015*AVEDEV(TYP,21));MCCI1:=MA(CCI,21)/2+50;IF(MCCI1<0) MCCI1=0;IF(MCCI1>100) MCCI1=100;MCCI:MCCI1,colorlired;MRD1:=CROSS(K1,D1) OR CROSS(MACD1,REF(MACD1,1));XMD1:=SC4S2=2 AND SS4 AND SS2 AND HHV(MNBL,SC2)>0 AND MRD1 AND K1>D1;DRAWTEXT( XMD1,100,"试买");///www..comXMD3:=JC4S2=3 AND JJ4 AND SS2 AND MRD1 AND K1>D1 AND M20>REF(M20,1);DRAWTEXT( XMD3,100,"买K");QD1:=SC4S2>=2 OR M60>REF(M60,1);XMDQ:=MAA>REF(MAA,1) AND REF(MAA,1)<=REF(MAA,2) AND K1>D1 AND (D1<25 OR D2<25) AND SC4S2<=1 AND QD1;DRAWTEXT( XMDQ,100,"抢短");
公式导入教程: 【通达信公式源码导入方法教程】 【同花顺公式源码导入方法教程】 【大智慧新一代公式源码导入方法教程】
有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友
可联系技术人员 QQ: 1145508240 进行 有偿 编写!(不贵!点击查看价格!)
相关文章
-
没有相关内容