最新更新 - 网站地图 -
您的当前位置:首页 > 股票公式 > 公式技巧 > CCI指标修改成通达信

CCI指标修改成通达信

来源:网络 点击: 时间:2022-12-16 07:51:52

编写要求:

{ccI-J} DRAWGBKlast(DATE>900101,strip(RGB(0,0,150),RGB(0,0,40),0)); TYB:= (HIGH + LOW + 2*CLOSE)/4; CCIA:=(TYB-MA(TYB,14))/(0.015*AVEDEV(TYB,14)); CCIB:=(TYB-MA(TYB,28))/(0.015*AVEDEV(TYB,28)); CCIC:=(TYB-MA(TYB,42))/(0.015*AVEDEV(TYB,42)); CCI:WMA((CCIA+CCIB+CCIC)/3,3); IF(CROSS(REF(CCI,1),CCI) AND CCI>100,60,100),COLOR0077ff; IF(CROSS(CCI,REF(CCI,1)) AND CCI<-150,-60,-100),COLOR00ffff; XG: IF(CROSS(CCI,REF(CCI,1)) AND CCI<-150 AND "KDJ.J"(9,3,3)<10 ,-80,-100),COLOR0000ff; PARTLINE(cci,cci>REF(cci,1),rgb(255,0,0),cci<=REF(cci,1),rgb(0,255,0) ),LINETHICK2; A1:=cci>REF(cci,1) and REF(cci,1)0,2); D1:=(C1>0 AND REF(C1,1)<1); A2:=cciREF(cci,2); C2:=BACKSET(A2>0,2); D2:=(C2>0 AND REF(C2,1)<1); R1:=BACKSET(DISPSTATUS=2,BARSLAST(D1)+1); S1:=R1>REF(R1,1); T1:=BACKSET(DISPSTATUS=2,BARSLAST(D2)+1); U1:=T1>REF(T1,1); R2:=BACKSET(S1,REF(BARSLAST(D1),1)+2); S2:=R2>REF(R2,1); T2:=BACKSET(U1,REF(BARSLAST(D2),1)+2); U2:=T2>REF(T2,1); DRAWLINE(S2,cci,S1,cci,1),COLOR00ff00,linethick4; DRAWLINE(U2,cci,U1,cci,1),POINTDOT,COLORBLUE,linethick4; Var12:=(HHV(HIGH,34)-CLOSE)/(HHV(HIGH,34)-LLV(LOW,34))*100; 能量线:SMA(Var12,3,1)*(-1)+100,colorRED,linethick0; KNX:=SMA(Var12,3,1); MK:=MA(KNX,18); XG买:IF(KNX>45 AND CROSS(MK , KNX),-50,-100),COLOR00ff00; {顶底背离} {1.MACD} A1:=BARSLAST(REF(CROSS("MACD.DIFF","MACD.DEA"),1)); B1:=REF(C,A1+1)>C AND REF("MACD.DIFF",A1+1)<"MACD.DIFF" AND CROSS("MACD.DIFF","MACD.DEA"); DRAWTEXT(B1>0,-100,'M底背'),COLOR00FFFF,LINETHICK1;{MACD底背离}; C1:=BARSLAST(REF(CROSS("MACD.DEA","MACD.DIFf"),1)); D1:=REF(C,C1+1)"MACD.DIFf" AND CROSS("MACD.DEA","MACD.DIFf"); DRAWTEXT(D1>0,95,'M顶背'),COLOR0077FF,LINETHICK1;{MACD顶背离}; {2.KDJ} A2:=BARSLAST(REF(CROSS("KDJ.K","KDJ.D"),1)); B2:=REF(C,A2+1)>C AND REF("KDJ.K",A2+1)<"KDJ.K" AND CROSS("KDJ.K","KDJ.D"); DRAWTEXT(B2,-50,'J9底背'),COLOR00FFFF,LINETHICK1;{KDJ底背离}; C2:=BARSLAST(REF(CROSS("KDJ.D","KDJ.K"),1)); D2:=REF(C,C2+1)"KDJ.K" AND CROSS("KDJ.D","KDJ.K"); DRAWTEXT(D2>0,80,'J9顶背'),COLOR0077FF,LINETHICK1;{KDJ顶背离}; {3.RSI} A3:=BARSLAST(REF(CROSS("RSI.RSI1","RSI.RSI2"),1)); B3:=REF(C,A3+1)>C AND REF("RSI.RSI1",A3+1)<"RSI.RSI1" AND CROSS("RSI.RSI1","RSI.RSI2"); DRAWTEXT(B3>0,-80,'R底背'),COLOR00FFFF,LINETHICK1;{RSI底背离} C3:=BARSLAST(REF(CROSS("RSI.RSI2","RSI.RSI1"),1)); D3:=REF(C,C3+1)"RSI.RSI1" AND CROSS("RSI.RSI2","RSI.RSI1"); DRAWTEXT(D3>0,65,'R顶背'),COLOR0077FF,LINETHICK1;{RSI顶背离}; {4.CCI} TYB:= (HIGH + LOW + 2*CLOSE)/4; CCI4:=(TYB-MA(TYB,28))/(0.015*AVEDEV(TYB,28)); B4:=LAST(MA(C,5)REF(CCI4,1) AND CROSS(CCI4,-100); { CCI底背离'} XG:=((B1 AND B2) OR (B2 AND B3) OR (B1 AND B3) OR ( B4 AND CCI4<-90) ) AND "KDJ.D"<30; {转向选股} 转向:=TROUGHBARS(3,15,1)<10; {3--收盘.15--转向幅度.前【1个】的ZIG转向波谷值} DDX10红天:=count("DDX.DDX">0,10)>5; if(转向>ref(转向,1) AND "DDX.DDX">0 AND DDX10红天,0,-100),COLORff00ff,linethick1; DRAWTEXT(LAST(MA(C,5)REF(CCI,1) AND CROSS(CCI,-100),-100,'CCI底背离'),COLOR00ff00;

解答:

?

    Copyright 2018- www.dyjian.com/ 大宇股票知识网 海口美兰韩哲棚百货商行 版权所有 琼ICP备2023001966号

    免责声名:本站所发表的内容仅用于学术交流和学习,内容所带来的一切后果均与本站无关。若您发现本站存在您非授权的原创作品,请第一时间联系本站删除!

    Top