通達(dá)信六脈神劍指標(biāo)1 六脈神劍(KDJ金叉,、MACD金叉,、RSI金叉)-指標(biāo)公式源碼 網(wǎng)上購(gòu)買(mǎi)的不敢私藏,,這次貢獻(xiàn)個(gè)大家,。 DIFF:=EMA(CLOSE,8)-EMA(CLOSE,13); DEA:=EMA(DIFF,5); A1:=DIFF>DEA; MACD金叉:IF(A1,1,0),COLORRED; RSV1:=(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100; K:=SMA(RSV1,3,1); D:=SMA(K,3,1); DRAWICON(K>D,2,1); DRAWICON(K<D,2,2); DRAWTEXT(ISLASTBAR=1,2,'.KDJ'),COLORFFFFFF; A2:=K>D; KDJ金叉:IF(A2,2,0),COLORRED; LC:=REF(CLOSE,1); RSI1:=(SMA(MAX(CLOSE-LC,0),5,1))/(SMA(ABS(CLOSE-LC),5,1))*100; RSI2:=(SMA(MAX(CLOSE-LC,0),13,1))/(SMA(ABS(CLOSE-LC),13,1))*100; DRAWICON(RSI1>RSI2,3,1); DRAWICON(RSI1<RSI2,3,2); DRAWTEXT(ISLASTBAR=1,3,'.RSI'),COLORFFFFFF; A3:=RSI1>RSI2; RSI金叉:IF(A3,3,0),COLORRED; RSV:=-(HHV(HIGH,13)-CLOSE)/(HHV(HIGH,13)-LLV(LOW,13))*100; LWR1:=SMA(RSV,3,1); LWR2:=SMA(LWR1,3,1); DRAWICON(LWR1>LWR2,4,1); DRAWICON(LWR1<LWR2,4,2); DRAWTEXT(ISLASTBAR=1,4,'.LWR'),COLORFFFFFF; A4:=LWR1>LWR2; LWR金叉:IF(A4,4,0),COLORRED; BBI:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4; DRAWICON(CLOSE>BBI,5,1); DRAWICON(CLOSE<BBI,5,2); DRAWTEXT(ISLASTBAR=1,5,'.BBI'),COLORFFFFFF; A5:=CLOSE>BBI; BBI金叉:IF(A5,5,0),COLORRED; MTM:=CLOSE-REF(CLOSE,1); MMS:=100*EMA(EMA(MTM,5),3)/EMA(EMA(ABS(MTM),5),3); MMM:=100*EMA(EMA(MTM,13),8)/EMA(EMA(ABS(MTM),13),8); DRAWICON(MMS>MMM,6,1); DRAWICON(MMS<MMM,6,2); DRAWTEXT(ISLASTBAR=1,6,'.MTM'),COLORFFFFFF; A6:=MMS>MMM; MTM金叉:IF(A6,6,0),COLORRED; 漲買(mǎi)入:IF((A1 AND A2 AND A3 AND A4 AND A5 AND A6) AND REF(A1 AND A2 AND A3 AND A4 AND A5 AND A6,1)=0,7,0),COLORYELLOW,LINETHICK2; 上漲:IF(A1 AND A2 AND A3 AND A4 AND A5 AND A6,7,0),COLORYELLOW,LINETHICK2; 晴天:BARSLASTCOUNT(A1 AND A2 AND A3 AND A4 AND A5 AND A6),LINETHICK0; 雨天:BARSLASTCOUNT(MACD金叉+KDJ金叉+RSI金叉+LWR金叉+BBI金叉+MTM金叉>0 AND MACD金叉+KDJ金叉+RSI金叉+LWR金叉+BBI金叉+MTM金叉<21 ),LINETHICK0; 雪天:BARSLASTCOUNT(MACD金叉+KDJ金叉+RSI金叉+LWR金叉+BBI金叉+MTM金叉=0),LINETHICK0; 六脈神劍選股指標(biāo): DIFF:=EMA(CLOSE,8)-EMA(CLOSE,13); DEA:=EMA(DIFF,5); A1:=DIFF>DEA; RSV1:=(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100; K:=SMA(RSV1,3,1); D:=SMA(K,3,1); A2:=K>D; LC:=REF(CLOSE,1); RSI1:=(SMA(MAX(CLOSE-LC,0),5,1))/(SMA(ABS(CLOSE-LC),5,1))*100; RSI2:=(SMA(MAX(CLOSE-LC,0),13,1))/(SMA(ABS(CLOSE-LC),13,1))*100; A3:=RSI1>RSI2; RSV:=-(HHV(HIGH,13)-CLOSE)/(HHV(HIGH,13)-LLV(LOW,13))*100; LWR1:=SMA(RSV,3,1); LWR2:=SMA(LWR1,3,1); A4:=LWR1>LWR2; BBI:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4; A5:=CLOSE>BBI; MTM:=CLOSE-REF(CLOSE,1); MMS:=100*EMA(EMA(MTM,5),3)/EMA(EMA(ABS(MTM),5),3); MMM:=100*EMA(EMA(MTM,13),8)/EMA(EMA(ABS(MTM),13),8); A6:=MMS>MMM; 漲買(mǎi)入:IF((A1 AND A2 AND A3 AND A4 AND A5 AND A6) AND REF(A1 AND A2 AND A3 AND A4 AND A5 AND A6,1)=0,7,0); 六脈神劍源碼圖2 {N1=1;N2=5;N3=9;N4=13;N5=21;N6=34} DIFF:=EMA(CLOSE,N3)-EMA(CLOSE,N4); DEA:=EMA(DIFF,N2); DRAWICON(DIFF>DEA,1,1); DRAWICON(DIFF<DEA,1,2); {DRAWTEXT(ISLASTBAR=1,1,'.MACD'),COLORFFFFFF;} A1:=DIFF>DEA; RSV1:=(CLOSE-LLV(LOW,N3))/(HHV(HIGH,N3)-LLV(LOW,N3))*100; K:=SMA(RSV1,N1,1); D:=SMA(K,N1,1); DRAWICON(K>D,1.1,1); DRAWICON(K<D,1.1,2); {DRAWTEXT(ISLASTBAR=1,1.1,'.KDJ'),COLORFFFFFF;} A2:=K>D; LC:=REF(CLOSE,1); RSI1:=(SMA(MAX(CLOSE-LC,0),N2,1))/(SMA(ABS(CLOSE-LC),N2,1))*100; RSI2:=(SMA(MAX(CLOSE-LC,0),N4,1))/(SMA(ABS(CLOSE-LC),N4,1))*100; DRAWICON(RSI1>RSI2,1.2,1); DRAWICON(RSI1<RSI2,1.2,2); {DRAWTEXT(ISLASTBAR=1,1.2,'.RSI'),COLORFFFFFF;} A3:=RSI1>RSI2; RSV:=-(HHV(HIGH,N4)-CLOSE)/(HHV(HIGH,N4)-LLV(LOW,N4))*100; LWR1:=SMA(RSV,N1,1); LWR2:=SMA(LWR1,N1,1); DRAWICON(LWR1>LWR2,1.3,1); DRAWICON(LWR1<LWR2,1.3,2); {DRAWTEXT(ISLASTBAR=1,1.3,'.LW&R'),COLORFFFFFF;} A4:=LWR1>LWR2; BBI:=(MA(CLOSE,N1)+MA(CLOSE,N2)+MA(CLOSE,N3)+MA(CLOSE,N4))/4; DRAWICON(CLOSE>BBI,1.4,1); DRAWICON(CLOSE<BBI,1.4,2); {DRAWTEXT(ISLASTBAR=1,1.4,'.BBI'),COLORFFFFFF;} A5:=CLOSE>BBI; MTM:=CLOSE-REF(CLOSE,1); MMS:=100*EMA(EMA(MTM,N2),N1)/EMA(EMA(ABS(MTM),N2),N1); MMM:=100*EMA(EMA(MTM,N4),N3)/EMA(EMA(ABS(MTM),N4),N3); DRAWICON(MMS>MMM,1.5,1); DRAWICON(MMS<MMM,1.5,2); {DRAWTEXT(ISLASTBAR=1,1.5,'.ZLMM'),COLORFFFFFF;} A6:=MMS>MMM; BIAS:=(C-MA(C,N2))/MA(C,N2); DIF:=(BIAS-REF(BIAS,16)); DBCD:=SMA(DIF,76,1); MM:=MA(DBCD,5); DRAWICON(DBCD>MM ,1.6,1); DRAWICON(DBCD<MM,1.6,2); {DRAWTEXT(ISLASTBAR=1,1.6,'.DBCD'),COLORFFFFFF;} A7:=DBCD>MM; 持股:=3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1),LINETHICK0,COLORRED; 支撐:=LLV(持股,3),LINETHICK0,COLOR00FFFF; 下跌:=MA(持股,12),COLOR6B8E23,LINETHICK0; 轉(zhuǎn)向:=CROSS(持股,下跌){ AND 下跌<30}; MA1:=MA(持股,5); 向下:=CROSS(MA1,持股) AND MA1>80; DRAWICON(持股>下跌 ,1.7,1); DRAWICON(持股<下跌,1.7,2); {DRAWTEXT(ISLASTBAR=1,1.7,'.CGZ'),COLORFFFFFF;} A8:=持股>下跌; MT:=C-REF(C,1); ZLGJ:=100*EMA(EMA(MT,N3),N3)/EMA(EMA(ABS(MT),N3),N3); MAZL:=MA(ZLGJ,5); DRAWICON(ZLGJ>MAZL,1.8,1); DRAWICON(ZLGJ<MAZL,1.8,2); A9:=ZLGJ>MAZL; {DRAWTEXT(ISLASTBAR=1,1.8,'.ZLGJ'),COLORFFFFFF;} PJJ:=DMA((HIGH+LOW+CLOSE*2)/4,0.9); JJ:=REF(EMA(PJJ,3),1); QJJ:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN)); XVL:=IF(CLOSE>OPEN,QJJ*(HIGH-LOW),IF(CLOSE<OPEN,QJJ*(HIGH-OPEN+CLOSE-LOW),VOL/2))+IF(CLOSE>OPEN,0-QJJ*(HIGH-CLOSE+OPEN-LOW),IF(CLOSE<OPEN,0-QJJ*(HIGH-LOW),0-VOL/2)); HSL:=(XVL/20)/1.15; 攻擊流量:=((HSL*0.55+(REF(HSL,1)*0.33))+(REF(HSL,2)*0.22)); GJJ:=EMA(攻擊流量,8); LLJX:=EMA(攻擊流量,3); 資金流量:=LLJX,LINETHICK0,COLOR0000FF; DRAWICON(資金流量>0,1.95,1); DRAWICON(資金流量<0,1.95,2); A10:=資金流量>0; {DRAWTEXT(ISLASTBAR=1,1.89,'.ZJL'),COLORFFFFFF;} 指導(dǎo)線:=(A1+A2+A3+A4+A5+A6+A7+A8+A9+A10),LINETHICK0,COLORFFFF00; 操作:IF(指導(dǎo)線 >6 ,1.1,1),LINETHICK3,COLORYELLOW; |
|
來(lái)自: LEIBULEIGE > 《通達(dá)信代碼》