您现在的位置:程序化交易>> 股票公式>> 其他>> 其他软件公式>>正文内容

见凌见KM指标 公式 源码[其他软件公式]

指标代码分析及参考建议使用:

 

根据给出的代码,我们可以看出该指标是基于KDJ和MACD等技术指标进行衍生的。以下是对该指标的分析和操作建议:

MACD衍生:代码中的DIFXD是通过EMA计算得到的差离值,DEAXD是DIFXD的EMA平均线,MACDXD是DIFXD与DEAXD之间的差值的2倍。当DIFXD从负值向上穿过DEAXD,并且MACDXD变大时,可以视为买入信号;当DIFXD从正值向下穿过DEAXD,并且MACDXD变小时,可以视为卖出信号。

KDJ衍生:代码中的KKzz、DDzz和JJzz分别是KDJ指标的K、D和J值。当K线从下方向上突破D线,并且J线处于低位(一般小于20),可以看作买入信号;当K线从上方向下穿D线,并且J线处于高位(一般大于80),可以看作卖出信号。

综合上述两个衍生指标的分析,可以得出以下思路和操作建议:

当MACD指标给出买入信号(DIFXD向上穿过DEAXD,MACDXD变大)且KDJ指标也给出买入信号(K线从下方向上突破D线,J线处于低位),可以考虑买入股票。
当MACD指标给出卖出信号(DIFXD向下穿过DEAXD,MACDXD变小)且KDJ指标也给出卖出信号(K线从上方向下穿D线,J线处于高位),可以考虑卖出股票。
注意及时止损和止盈,避免过度追涨或抄底。
需要注意的是,以上仅为基于代码的分析和操作建议,具体的投资决策还需综合考虑其他因素,如市场整体风险、个股基本面等。建议结合自己的投资经验和风险

源码:


{参数设置:YS(1,4,1) ;1=MACD由RSV衍生,2=由K衍生;3=由D衍生;4=由J衍生}
{特SE参数; 可作分时线的技术指标}
T:=DATATYPE;
SJ:=T>1;
{经原点校正之KDJ,可用于抄新股};
BG:=BARSCOUNT(CLOSE);
LL:=LLV(L,SHORTt);
HH:=HHV(H,SHORTt);
CCzz:=CLOSE;
RSVzz:=(CCzz-LL)/(1.001*HH-LL)*100;
RSVJGL:=IF(BG>0,RSVzz,50);
KKzz:SMA(RSVJGL,M1,1),COLORYELLOW;
DDzz:=SMA(KKzz,M2,1);
JJzz:2.7*KKzz-1.7*DDzz,COLORMAGENTA;
{附加显示};
TS:=(JJzz>REF(JJzz,1)OR Kkzz>REF(KKzz,1)OR DDzz>REF(DDzz,1))AND C>(H+L)/2;
FH:=(JJzz>REF(JJzz,1)AND JJzz<80)OR (TS AND JJzz>=80);
FF:=NOT(FH);
RF:=REF(JJzz,1);ZJ:=ABS(JJzz-RF);{由RSV或JJ 衍生 XD_MACD};
DIFXD:1.7*(EMA(IF(YS=1,RSVJGL,IF(YS=2,KKzz,IF(YS=3,DDzz,JJzz))),LONGg)-50),COLORABCDEF;
DEAXD:EMA(DIFXD,MIDd),COLORGREEN;{http://www.cxh99.com}
MACDXD:2*(DIFXD-DEAXD),COLORCYAN,COLORSTICK;
转强:PARTLINE(DIFXD>REF(DIFXD,1) OR FH,DIFXD),COLORRED,LINETHICK1;GL:=DIFXD<DEAXD AND {DIF<-50 AND} DIFXD>REF(DIFXD,1) AND
REF(DIFXD,1)<REF(DIFXD,2);
GL1:=FILTER(GL,5);
DRAWICON(GL1,-50,4);
DD:=C=HHV(C,180);
EE:=DEAXD< REF(DEAXD,1) AND REF(DEAXD< REF(DEAXD,1),1)=1;
CC:=C> REF(C,1) AND REF(C> REF(C,1),1)=1;
顶背离:=(DD AND EE AND DEAXD< HHV(DEAXD,180))*DEAXD;
A2:=BARSLAST(REF(CROSS(DEAXD,DIFXD),1));
DRAWLINE(A2=0,DEAXD,顶背离,DEAXD,0),COLORRED,LINETHICK2;A1:=BARSLAST(REF(CROSS(DIFXD,DEAXD),1));
B1:=REF(C,A1+1)>C AND REF(DIFXD,A1+1)<DIFXD AND CROSS(DIFXD,DEAXD);
A22:=BARSLAST(REF(CROSS(KKZZ,DDZZ),1));
B2:=REF(C,A22+1)>C AND REF(KKZZ,A22+1)<KKZZ AND CROSS(KKZZ,DDZZ);
{A3:=BARSLAST(REF(CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24)),1));}
{B3:=REF(C,A3+1)>C AND REF("RSI.RSI1"(6,12,24),A3+1)<"RSI.RSI1"(6,12,24) AND CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24));}
DRAWTEXT(B1,DEAXD,'▲M底背'),COLORWHITE;
DRAWTEXT(B2,DDZZ,'●K底背'),COLORFF00FF;DIF:=(EMA(CLOSE,12)-EMA(CLOSE,26))*100,COLOR00FFFF;
DEA:=EMA(DIF,9),COLORFF8800;
MCD:=(DIF-DEA)*2,COLORSTICK;
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,9,3),COLORFFFF00;
D:=SMA(K,9,3),COLORWHITE;
J:=3*K-2*D,COLORMAGENTA;
STICKLINE(CROSS(J,DIF) AND J>REF(J,1) AND C>MA(C,135) ,80,100,6,0),COLORRED;BA:=DEA>REF(DEA,1);
BB:=SUM(BA,5)>=4;
BC:=C<O;
BD:=SUM(BC,5)>=2;
STICKLINE(CROSS(J,DIF) AND J>REF(J,1) ,80,100,6,0),COLOR00DDFF;
STICKLINE(REF(J,1)<REF(J,2) AND J>REF(J,1) AND J<DEA AND REF(J,1)<0,75,100,6,0),COLORRED;TYP:=(HIGH+LOW+CLOSE)/3;
CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14));
A00:=EXIST(CCI<-240,8) AND CROSS(CCI,-100);
A11:=(C>MA(C,60) AND (CROSS(CCI,-121) OR CROSS(CCI,0) OR A00)) OR
(C<MA(C,60) AND A00);
A222:={(C>MA(C,60) AND CROSS(180,CCI) ) OR} (C<MA(C,60) AND CROSS(90,CCI));
DRAWICON(A222,90,9),COLORGREEN;{http://www.cxh99.com}
DRAWTEXT(A222,100,'熊'),COLORGREEN;{http://www.cxh99.com}A0:=(2*C+H+L)/4;
均线:=MA(A0,3)>REF(MA(A0,3),1);
AA1:=(CLOSE-LLV(LOW,7))/(HHV(HIGH,7)-LLV(LOW,7))*100;
AA2:=EMA(WINNER(C)*100,5);
AA3:=MA(SMA(C-REF(C,1),3,1)/SMA(H-REF(C,1),3,1),3)*100;
A4:=SMA(MAX(C-REF(C,2),0),6,1)/SMA(ABS(C-REF(C,2)),6,1)*100;
A5:=MA(3*SMA((C-LLV(L,21))/(HHV(H,21)-LLV(L,21))*100,5,1)-2*SMA(SMA((C-LLV(L,21))/(HHV(H,21)-LLV(L,21))*100,5,1),3,1),3);
低吸:IF(CROSS(A4,14) OR A5>REF(A5,1) AND CROSS(KKZZ,A2)AND KKZZ<40,15,0)*2;
{IF(A2>80 AND CROSS(85,KKZZ),85,100);}
{跌幅较大:=KKZZ<5 AND LLV(C,3)/HHV(C,20)<0.8,COLOR00FF00;}
{STICKLINE(跌幅较大,0,15,2,0),COLOR00FF00;}
DRAWTEXT(CROSS(84,A4)AND CROSS(KKZZ,A4),90,'脱险'),COLOR00FF00;
A66:=COUNT(CROSS(KKZZ,A2),2)=1 AND CROSS(KKZZ,A5)AND A5/REF(A5,1)>0.9 AND KKZZ<50;
A77:=CROSS(KKZZ,DDZZ)AND DDZZ<10 OR CROSS(KKZZ,DDZZ)AND CROSS(KKZZ,A5)AND DDZZ<18;
DRAWTEXT(FILTER((A66 OR A77)AND KKZZ>REF(KKZZ,1),5)AND 均线 ,DDZZ,'金叉');
DRAWTEXT(CROSS(DDZZ,KKZZ)AND CROSS(A5,KKZZ)AND DDZZ>85,DDZZ,'死叉');
DRAWTEXT(FILTER(KKZZ>REF(KKZZ,1)AND (CROSS(KKZZ,10)OR CROSS(KKZZ,A2))AND
COUNT(A4<14,3)>=1,3),15,'虎口拔牙');
无限风光:A2>85 AND KKZZ>80 OR A2>90 OR KKZZ>85,LINETHICK0,COLORFFFF00;
STICKLINE(无限风光,MAX(A2,KKZZ),100,6,1),COLORFFFF00;
A100:=MA((A0-MA(A0,13))/(0.15*AVEDEV(A0,13)),3);
DRAWICON(CROSS(A100,-15)AND JJZZ>REF(JJZZ,1),5,1);
DRAWICON(CROSS(20,A100),95,3);A6:=(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)));
A7:=(10);
CXH21:=(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*100;
K2:=SMA(CXH21,3,1);
D2:=SMA(K2,3,1);
CXH34:=(CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34))*100;
K3:=SMA(CXH34,3,1);
D3:=SMA(K3,3,1);
DI1:= K2<20 AND D2<20 AND K3<25 AND D3<25 AND K2<D2 AND C<MA(C,135);
DI2:= K2<50 AND D2<50 AND K3<50 AND D3<50 AND K2<D2 AND C>=MA(C,135);
DIBU:=EXIST(DI1,3) OR EXIST(DI2,3);测底:(CROSS(A6,A7) AND DIBU)*30 ,LINETHICK2,COLOR3333FF;
A8:=(REF(CLOSE,1)) / CLOSE;
A9:=MIN((MA(((AMOUNT / VOL) / 100),15)),(EMA(((AMOUNT / VOL) / 100),15)));
A10:=((1 - ((SMA(((LOW * A8) - (A8 / 10)),6,1)) / (EMA(((AMOUNT / VOL) / 100),15)))) * 100) - (100 / 10);
A111:=((((1 - ((MA((LOW - (A8 / 10)),6)) / A9)) * (DMA(CLOSE,(VOL / CAPITAL)))) / (MA(LOW,6))) * 100) - (100 / 10);
A12:=((((A10 + (A111 / 10)) > 0) AND (DATE > 1000101)) AND (DATE < 1301231)) AND ((COUNT((((1 - (CLOSE / (REF(CLOSE,1)))) > 0.099) AND ((1 - ((REF(CLOSE,1)) / (REF(CLOSE,2)))) > 0.099)),20)) < 3);
A13:=(((((((A10 + (A111 / 10)) > -3.688) AND (DATE > 1000101)) AND (DATE < 1301231)) AND ((CLOSE / (REF(CLOSE,1))) > 1.02)) AND ((COUNT((((1 - (CLOSE / (REF(CLOSE,1)))) > 0.099) AND ((1 - ((REF(CLOSE,1)) / (REF(CLOSE,2)))) > 0.099)),20)) < 3)) AND (((REF(CLOSE,1)) / (REF(CLOSE,2))) < 0.95)) AND ((CLOSE / (HHV(HIGH,20))) < 0.855);
黑马:((IF(((((100 < 100) AND ((A10 + (A111 / 10)) > 0)) AND (DATE > 1000101)) AND (DATE < 1301231)),(A12 = 1),(A13 = 1))) * 30),LINETHICK2,COLORLIRED;MTM:=C-REF(C,1);
DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);
YXF:=IF(LLV(DX,2)=LLV(DX,7) AND COUNT(DX<0,2) AND CROSS(DX,MA(DX,2)),1,0);
MK:=V<HHV(V,60)/8;
MG:=FILTER(YXF=1,5);
停牌:=(DYNAINFO(4)=0);
MN:=NOT(停牌);
CXH2:=LLV(LOW,10);
CXH3:=HHV(HIGH,25);
KK:=EMA((CLOSE-CXH2)/(CXH3-CXH2)*4,4);
AF:=KK>REF(KK,1);
ML:=CROSS(AF,0.5);
MM:=C/REF(C,1)>1.025;
MH:=INDEXC>MA(INDEXC,4);
FT:=MK AND MG AND MN AND ML AND MM AND MH;
短线:IF(FT,30,0),COLOR00FFFF;JJ:=(H+L+C)/3;QJ0:=VOL/IF(H=L,4,H-L);YJ:="KDJ.J";
QJ1:=IF(CAPITAL=0,QJ0*(JJ-MIN(C,O)),QJ0*(MIN(O,C)-L));
QJ2:=IF(CAPITAL=0,QJ0*(MIN(O,C)-L),QJ0*(JJ-MIN(C,O)));
QJ3:=QJ0*(H-MAX(O,C));QJ4:=QJ0*(MAX(C,O)-JJ);
QJ5:=QJ1+QJ2;QJ6:=QJ3+QJ4;DDD:=(QJ5-QJ6)/(QJ5+QJ6)*100;
DDX:=((QJ1+QJ2)-(QJ3+QJ4))/SUM(VOL,10)*100;
DDZ:=DDD*17;
DDY:=((QJ2+QJ4)-(QJ1+QJ3))/SUM(VOL,10)*100;
弄钱玩1:(CROSS(YJ,0) AND ((DDX>0 AND DDY>0) OR DDZ>400))*30;
弄钱玩2:(弄钱玩1 AND VOL>1.5*REF(VOL,1))*50,COLOR0000FF;

公式导入教程: 【通达信公式源码导入方法教程】 【同花顺公式源码导入方法教程】 【大智慧新一代公式源码导入方法教程

 

 

有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友

可联系技术人员 QQ: 262069696  点击在线交流或微信:cxhjy888 进行 有偿收费 编写!(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)

怎么收费,代编流程等详情请点击查阅!

(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)

 


【字体: 】【打印文章】【查看评论

相关文章

    没有相关内容