1. MTM指标:该指标计算了当前收盘价与前一个交易日收盘价的价格差,可以反映出市场情绪的变化。MTM指标的波动可以帮助分析者准确把握市场趋势,进行适时买卖操作。
2. ZLGJ指标:该指标是根据MTM指标计算出来的变化率,通过对MTM取绝对值再进行EMA平滑处理,反映当前市场的涨跌情况。在代码中,通过设定特定的ZLGJ数值,可以触发买入或卖出的交易信号。
3. 买卖交易信号:根据ZLGJ指标的数值和条件,分别设定了买1和卖1的交易信号。当最近两个周期内的ZLGJ值出现短期低点,同时根据ZLGJ和均线的交叉情况,可以产生买入信号;当最近两个周期内的ZLGJ值出现短期高点,同时根据ZLGJ和均线的交叉情况,可以产生卖出信号。通过判断买1和卖1信号的出现,可以为分析者提供有效的交易决策参考。
4. 其他交易信号:代码中还包括了其他一些交易信号,如CK、CK1、CDDD、H1、H2等。这些信号的出现可以反映出当前市场处于何种位置,进一步判断市场的走势方向。
5. 图标和文本标记:代码中使用了DRAWICON和DRAWTEXT函数对特定的交易信号和价格位置进行标记。通过这些标记的绘制,可以更直观地提醒分析者进行买卖操作或者注意市场变化。
综上所述,该指标通过对MTM和ZLGJ指标的计算,以及买卖交易信号的设置,提供了一种简单但有效的技术分析方法。
NF:=1;Z1:=(REF(HIGH,NF)-REF(LOW,NF))/REF(CLOSE,NF+1)*100;Z2:=(REF(HIGH,NF+1)-REF(LOW,NF+1))/REF(CLOSE,NF+2)*100;Z3:=(REF(HIGH,NF+2)-REF(LOW,NF+2))/REF(CLOSE,NF+3)*100;前三日均振:(Z1+Z2+Z3)/3,NODRAW;P3:EMA(C,43),COLORGREEN,LINETHICK1;IF(P3>REF(P3,1), P3,DRAWNULL),COLORRED,LINETHICK1;C2:= O<=REF(LOW,1)*0.98 AND C/O>=1.05 AND REF(SUM((CLOSE-REF(CLOSE,1))/C*100,3)<-7,1) ;DRAWICON(C2,L*0.97,38);AP1:=MA(CLOSE,1);BP1:=SMA(SMA(SMA(AP1,2,1),2,1),2,1);CP1:=MA(BP1,3);DRAWBAND(BP1,RGB(255,0,0),CP1,RGB(0,255,0));BDGD:=C=HHV(CLOSE,40);GDSJ:=BARSLAST(FILTER(CROSS(0.8,BDGD),20))+1;GD:REF(HIGH,GDSJ),COLOR00FF00,POINTDOT,LINETHICK1;TTP:=CROSS(CLOSE,REF(GD,1)),COLOR00FFFF,POINTDOT,LINETHICK0;STICKLINE(GDSJ<=6,GD,GD,8,0),COLORFF00FF;BDDD:=C=LLV(CLOSE,N1);DDSJ:=BARSLAST(FILTER(CROSS(0.8,BDDD),N2))+1;DDD1:REF(LOW,DDSJ),COLOR00FFFF,POINTDOT,LINETHICK1;STICKLINE(DDSJ<=6,DDD1,DDD1,8,0),COLOR00FF00;XG6:=DDSJ=1;DRAWICON(XG6,L*0.99,1);XGT6:=BARSLAST(XG6);{ZSJ:IF(XGT6<=30,REF(LOW,XGT6),DRAWNULL),COLORRED,DOTLINE;}DPD:=C=LLV(CLOSE,60);DPD2:=FILTER(CROSS(0.8,DPD),10) AND REF(SUM((CLOSE-REF(CLOSE,1))/C*100,3)<-10,1) ;DRAWICON(DPD2,L*0.95,17);cxh1:=REF(C,1);cxh2:=((SMA(MAX((C - cxh1),0),6,1) / SMA(ABS((C - cxh1)),6,1)) * 100);MC:=CROSS(90,cxh2);DRAWICON(MC,H*1.005,2);A11:=H>MAX(OPEN,C)*1.03;A12:=V=HHV(VOL,30);XG11:=A11 AND A12 AND C/REF(CLOSE,5)>1.081;DRAWICON(XG11,H*1.005,2);A13:=V=HHV(VOL,40) AND C<O AND C/REF(CLOSE,11)>1.1 ;DRAWICON(A13,H*1.005,12);DIFF:=EMA(C,12) - EMA(C,26);DEA2:=EMA(DIFF,9);MACDD:=(DIFF-DEA2)*2;RSV:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9));K:=SMA(RSV,9,3);D:=SMA(K,9,3);J:=3*K-2*D;AP:=CROSS(DIFF,DEA2) AND CROSS(K,D) AND CROSS(J,D) AND DIFF<0;A7:=FILTER(AP,20);DRAWTEXT(A7,L*0.991,'↑金振'),COLOR80FFFF;SA:=CROSS(DEA2,DIFF) AND CROSS(D,K) AND CROSS(D,J) AND DIFF>0;A8:=FILTER(SA,20);DRAWTEXT(A8,H,'↓死振'),COLORWHITE;B:=C/REF(CLOSE,1)>1.095 AND H=O AND L=H;B1:=NOT(B);B2:=FINANCE(42)>360;E2:=DDSJ=1 AND B1;{E3:=DDSJ=2 AND B1;E4:=E2 OR E3;E5:=H>MAX(OPEN,C)*1.03 OR L<MIN(OPEN,C)*0.97 ;E6:=REF(E5,1);E9:=E5 OR E6;}A1:=REF(SUM((CLOSE-REF(CLOSE,1))/C*100,3)<-10,1) OR REF(SUM((CLOSE-REF(CLOSE,1))/C*100,4)<-10,1) OR REF(SUM((CLOSE-REF(CLOSE,1))/C*100,5)<-15,1);A3:=REF(SUM((CLOSE-REF(CLOSE,1))/C*100,3)<-10,1);A2:=DDSJ=1 AND B1;DDD2:=REF(CLOSE,DDSJ);A4:=DDD2>REF(DDD2,1);XGT:=BARSLAST(A2);AD:=REF(LOW,REF(XGT,1)+1);XG7:=BETWEEN(LOW,AD,AD*1.06) AND XGT=0 AND REF(XGT,1)<=30 AND E2 ;XG8:= XG7 AND B2 AND A1 ;DRAWICON(XG8,L*0.95,23);{J3:=SUM((CLOSE-REF(CLOSE,1))/C*100,3)<-15 OR SUM((CLOSE-REF(CLOSE,1))/C*100,4)<-15 OR SUM((CLOSE-REF(CLOSE,1))/C*100,5)<-20;J5:= EVERY(C<O,3) OR EVERY(C<O,4) OR EVERY(C<O,5);J4:=REF(OPEN,1)<REF(CLOSE,2)*0.98 OR O<REF(CLOSE,1)*0.98 OR REF(OPEN,2)<REF(CLOSE,3)*0.98; ;J6:=J3 AND J5;J9:=J3 AND J4 AND J5;J10:=J6 OR J9;J11:=FILTER(J10,5);DRAWICON(J11,L*0.97,41);}BAA:=(C-REF(C,1))/REF(C,1)*100;BAB:=BAA>=9.6 AND C=H;STICKLINE(BAB,C,O,3,0 ),COLOR000085;STICKLINE(BAB,C,O,2.6,0 ),COLOR0000A5;STICKLINE(BAB,C,O,2.2,0 ),COLOR0005B5;STICKLINE(BAB,C,O,1.8,0 ),COLOR0015D5;STICKLINE(BAB,C,O,1.4,0 ),COLOR0025F5;STICKLINE(BAB,C,O,1,0 ),COLOR0035FF;STICKLINE(BAB,C,O,0.5,0 ),COLOR0045FF;STICKLINE(BAB,H,L,0,0 ),COLOR0055FF;DRAWTEXT_FIX(1,0,0,0,'地区:'),COLOR99CC32;DRAWTEXT_FIX(1,0.03,0,0,DYBLOCK),COLOR99CC32;DRAWTEXT_FIX(1,0.1,0,0,'行业:'),COLORGREEN;DRAWTEXT_FIX(1,0.13,0,0,HYBLOCK),COLORGREEN;DRAWTEXT_FIX(1,0.19,0,0,'概念:'),COLORFF00FF;DRAWTEXT_FIX(1,0.22,0,0,GNBLOCK),COLORFF00FF;MTM:=C-REF(CLOSE,1);ZLGJ:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);买1:=IF(LLV(ZLGJ,2)=LLV(ZLGJ,7) AND COUNT(ZLGJ<0,2) AND CROSS(ZLGJ,MA(ZLGJ,2)),1,0);卖1:=IF(HHV(ZLGJ,2)=HHV(ZLGJ,7) AND COUNT(ZLGJ>50,2) AND CROSS(MA(ZLGJ,2),ZLGJ),1,0);STICKLINE(FILTER(买1=1,5),C,O,1,0),COLORFF00FF;STICKLINE(FILTER(卖1=1,1),C,O,1,0),COLOR00FF00;CK:=C/REF(CLOSE,1)>1.095 AND H=O AND L=H;CK1:=NOT(CK);CDDD:=C=LLV(CLOSE,20);DDSJ1:=BARSLAST(FILTER(CROSS(0.8,CDDD),10))+1;XG10:= A2 AND MACD>-0.4 AND A3 AND CK1;DRAWICON(XG10,L*0.97,5);H1:=C/REF(CLOSE,1)>1.095 AND H=O AND L=H;H2:=NOT(H1);H3:=C/REF(CLOSE,1)>1.04 ;N3:=15;H4:=COUNT(L=LLV(LOW,N3),3);H5:=CROSS(H4 AND C>REF(CLOSE,1)*1.095,0.5) ;H6:=REF(CLOSE,1)<REF(CLOSE,2)*0.96;H7:= O<REF(CLOSE,1) AND C>REF(OPEN,1);H8:=REF(CLOSE,1)*1.04;XG9:= H2 AND H3 AND H4 AND H5 AND H7 AND H6;STICKLINE(XG9,O,H8 ,3,0),COLORYELLOW;CD1: IF(BARSLAST(XG9)<=30AND (REF(H8,BARSLAST(XG9)))=REF(REF(H8,BARSLAST(XG9)),1),REF(H8,BARSLAST(XG9)),DRAWNULL),DOTLINE,COLORYELLOW,LINETHICK1;{STICKLINE(XG9,C,O,2,0),COLORYELLOW;STICKLINE(XG9,H,L,2,0),COLORYELLOW;}ZT:=C/REF(CLOSE,1)>1.095;AA1:=C/REF(CLOSE,1)>1.04;AA2:=REF(CLOSE,1)<REF(CLOSE,2)*0.96 ;XG12:=AA1 AND AA2 AND L>REF(L*0.94,BARSLAST(REF(ZT,1))+1) AND L<REF(C*0.95,BARSLAST(REF(ZT,1))+1)AND BARSLAST(REF(ZT,1))>=2 AND BARSLAST(REF(ZT,1))<=30;AA3:=REF(CLOSE,1)*1.04;STICKLINE(XG12,O,AA3 ,3,0),COLORWHITE;CD2: IF(BARSLAST(XG12)<=30AND (REF(AA3,BARSLAST(XG12)))=REF(REF(AA3,BARSLAST(XG12)),1),REF(AA3,BARSLAST(XG12)),DRAWNULL),DOTLINE,COLORWHITE,LINETHICK1;{N:=7;BC:=(H*0.382+L*0.618+O*0.382+C*0.618)/2;LJ:=IF(INDEXC=C,BC,(BC+AMOUNT/(V*100))/2);HT:=REF((HHV(LJ,N*0.691)+HHV(LJ,N)+HHV(LJ,N*1.309))/3,1),LINETHICK,COLORRED;LT:=REF((LLV(LJ,N*0.691)+LLV(LJ,N)+LLV(LJ,N*1.309))/3,1),LINETHICK,COLORGREEN;ZT:=(HT+LT)/2,LINETHICK,COLORYELLOW;STICKLINE(ISLASTBAR=1 AND LJ<ZT,HT,LT,N*8,1),COLORGREEN;STICKLINE(ISLASTBAR=1 AND LJ=ZT,HT,LT,N*8,1),COLORRED;STICKLINE(ISLASTBAR=1 AND LJ>ZT,HT,LT,N*8,1),COLORYELLOW;
公式导入教程: 【通达信公式源码导入方法教程】 【同花顺公式源码导入方法教程】 【大智慧新一代公式源码导入方法教程】
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信:cxhjy888 进行 有偿收费 编写!(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
(怎么收费,代编流程等详情请点击查阅!)
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)