午炎 发表于 2017-1-3 22:30

成功率90% 通达信 CCI底背离

本帖最后由 午炎 于 2017-1-3 22:31 编辑


DRAWGBK(C>0, RGB(1,1,1),RGB(1,1,1),0,'0',0);
STICKLINE(C>0,-100,100,28,0)COLOR000840;
STICKLINE(C>0,200,200,28,-1)COLOR000080;
STICKLINE(C>0,100,100,28,-1)COLOR000080;
STICKLINE(C>0,-2.5,2.5,28,0)COLOR000080;
STICKLINE(C>0,-100,-100,28,-1)COLOR000080;
STICKLINE(C>0,-200,-200,28,-1)COLOR000080;
TYP:=(HIGH+LOW+CLOSE)/3;
CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14)),STICK;{CCI柱线}
趋势线:EXPMA(CCI,4.5),COLORFF8000,NODRAW;{CCI的5天EMA}
DRAWBAND(CCI,RGB(128,0,0),趋势线,RGB(0,128,0));
STICKLINE(CCI>=0,0,CCI,0,-1),COLORLIRED;{红柱}
STICKLINE(CCI<0,0,CCI,0,-1),COLORLIBLUE;{绿柱}
{CCI}
{TYP:=(HIGH+LOW+CLOSE)/3;}
CCI值:(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14)),COLORYELLOW,LINETHICK1;{CCI线}
DRAWTEXT(ISLASTBAR,CCI值,' ←CCI'),COLORYELLOW;
{CCI背离}
N:=5;
CCI底背:=REF(C,BARSLAST(REF(FILTER(BACKSET(REF(CCI,N)=LLV(CCI,2*N+1),N+1),N) AND CCI=LLV(CCI,N+1),1))+1)>C AND
REF(CCI,BARSLAST(REF(FILTER(BACKSET(REF(CCI,N)=LLV(CCI,2*N+1),N+1),N) AND CCI=LLV(CCI,N+1),1))+1)<CCI AND
FILTER(BACKSET(REF(CCI,N)=LLV(CCI,2*N+1),N+1),N) AND CCI=LLV(CCI,N+1),COLORWHITE,NODRAW;
DRAWLINE(FILTER(BACKSET(REF(CCI,N)=LLV(CCI,2*N+1),N+1),N) AND CCI=LLV(CCI,N+1),CCI,FILTER(CCI底背>0,5),CCI,0),
COLORWHITE,DOTLINE;
DRAWTEXT(CCI底背,CCI,'底背'),COLORWHITE;
CCI顶背:=REF(C,BARSLAST(REF(FILTER(BACKSET(REF(CCI,N)=HHV(CCI,2*N+1),N+1),N) AND CCI=HHV(CCI,N+1),1))+1)<C AND
REF(CCI,BARSLAST(REF(FILTER(BACKSET(REF(CCI,N)=HHV(CCI,2*N+1),N+1),N) AND CCI=HHV(CCI,N+1),1))+1)>CCI AND
FILTER(BACKSET(REF(CCI,N)=HHV(CCI,2*N+1),N+1),N) AND CCI=HHV(CCI,N+1),COLORGREEN,NODRAW;
DRAWLINE(FILTER(BACKSET(REF(CCI,N)=HHV(CCI,2*N+1),N+1),N) AND CCI=HHV(CCI,N+1),CCI,FILTER(CCI顶背>0,5),CCI,0),
COLORGREEN,DOTLINE;
DRAWTEXT(CCI顶背,CCI,'顶背'),COLORGREEN;
{趋势线的背离}
趋势线底背:=REF(C,BARSLAST(REF(FILTER(BACKSET(REF(趋势线,N)=LLV(趋势线,2*N+1),N+1),N) AND 趋势线=LLV(趋势线,N+1),1))+1)>C AND
REF(趋势线,BARSLAST(REF(FILTER(BACKSET(REF(趋势线,N)=LLV(趋势线,2*N+1),N+1),N) AND 趋势线=LLV(趋势线,N+1),1))+1)<趋势线 AND
FILTER(BACKSET(REF(趋势线,N)=LLV(趋势线,2*N+1),N+1),N) AND 趋势线=LLV(趋势线,N+1),COLORWHITE,NODRAW;
DRAWLINE(FILTER(BACKSET(REF(趋势线,N)=LLV(趋势线,2*N+1),N+1),N) AND 趋势线=LLV(趋势线,N+1),趋势线,FILTER(趋势线底背>0,5),趋势线,0),
COLORWHITE,DOTLINE;
DRAWTEXT(趋势线底背,趋势线,'趋势底背'),COLORFF80FF;
趋势线顶背:=REF(C,BARSLAST(REF(FILTER(BACKSET(REF(趋势线,N)=HHV(趋势线,2*N+1),N+1),N) AND 趋势线=HHV(趋势线,N+1),1))+1)<C AND
REF(趋势线,BARSLAST(REF(FILTER(BACKSET(REF(趋势线,N)=HHV(趋势线,2*N+1),N+1),N) AND 趋势线=HHV(趋势线,N+1),1))+1)>趋势线 AND
FILTER(BACKSET(REF(趋势线,N)=HHV(趋势线,2*N+1),N+1),N) AND 趋势线=HHV(趋势线,N+1),COLORGREEN,NODRAW;
DRAWLINE(FILTER(BACKSET(REF(趋势线,N)=HHV(趋势线,2*N+1),N+1),N) AND 趋势线=HHV(趋势线,N+1),趋势线,FILTER(趋势线顶背>0,5),趋势线,0),
COLORGREEN,DOTLINE;
DRAWTEXT(趋势线顶背,趋势线,'趋势顶背'),COLORFF8000;
{面积背离}
JC:= 0-CCI;
绿柱面积:=IF(CCI<0,SUM(CCI,BARSLAST(JC<0)),0);
红柱面积:=IF(CCI>0,SUM(CCI,BARSLAST(JC>0)),0);
本次最低价:=LLV(L,BARSLAST(JC<0));
本次最高价:=HHV(H,BARSLAST(JC>0));
X1:=IF (CCI<0,BARSLAST(CROSS(CCI,0)),0);
前次绿柱面积:=REF(绿柱面积,X1+1);
前次最低价:=REF(本次最低价,X1+1);
Y1:=IF((绿柱面积<0 AND ABS(绿柱面积)<ABS(前次绿柱面积) AND 本次最低价<前次最低价 ),1,0);
RS1:= CCI<0 AND REF(CCI,1)<0 AND C<前次最低价
AND ABS(绿柱面积)<ABS(前次绿柱面积) AND ABS(CCI)<ABS(REF(CCI,1));
底背驰:= IF (CROSS(CCI,0),REF(Y1,1),0);
DRAWTEXT(底背驰,LLV(CCI,5),'←面积底背'),COLORLIRED;
X2:=IF (CCI>0,BARSLAST(CROSS(0,CCI)),0);
前次红柱面积:=REF(红柱面积,X2+1);
前次最高价:=REF(本次最高价,X2+1);
Y2:=IF((红柱面积>0 AND 红柱面积<前次红柱面积 AND 本次最高价>前次最高价 ),1,0);
RS2:= CCI>0 AND REF(CCI,1)>0 AND C>前次最高价 AND ABS(红柱面积)<ABS(前次红柱面积) AND ABS(CCI)<ABS(REF(CCI,1));
顶背驰:= IF (CROSS(0,CCI),REF(Y2,1),0);
DRAWTEXT(顶背驰,HHV(CCI,5),'←面积顶背'),COLORCYAN;

补给舰 发表于 2017-1-4 01:20

DRAWGBK(C>0, RGB(1,1,1),RGB(1,1,1),0,'0',0);
STICKLINE(C>0,-100,100,28,0),COLOR000840;
STICKLINE(C>0,200,200,28,-1),COLOR000080;
STICKLINE(C>0,100,100,28,-1),COLOR000080;
STICKLINE(C>0,-2.5,2.5,28,0),COLOR000080;
STICKLINE(C>0,-100,-100,28,-1),COLOR000080;
STICKLINE(C>0,-200,-200,28,-1),COLOR000080;
TYP:=(HIGH+LOW+CLOSE)/3;
CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14)),STICK;{CCI柱线}
趋势线:EXPMA(CCI,4.5),COLORFF8000,NODRAW;{CCI的5天EMA}
DRAWBAND(CCI,RGB(128,0,0),趋势线,RGB(0,128,0));
STICKLINE(CCI>=0,0,CCI,0,-1),COLORLIRED;{红柱}
STICKLINE(CCI<0,0,CCI,0,-1),COLORLIBLUE;{绿柱}
{CCI}
{TYP:=(HIGH+LOW+CLOSE)/3;};
CCI值:(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14)),COLORYELLOW,LINETHICK1;{CCI线}
DRAWTEXT(ISLASTBAR,CCI值,' ←CCI'),COLORYELLOW;
{CCI背离}
N:=5;
CCI底背:=REF(C,BARSLAST(REF(FILTER(BACKSET(REF(CCI,N)=LLV(CCI,2*N+1),N+1),N) AND CCI=LLV(CCI,N+1),1))+1)>C AND
REF(CCI,BARSLAST(REF(FILTER(BACKSET(REF(CCI,N)=LLV(CCI,2*N+1),N+1),N) AND CCI=LLV(CCI,N+1),1))+1)<CCI AND
FILTER(BACKSET(REF(CCI,N)=LLV(CCI,2*N+1),N+1),N) AND CCI=LLV(CCI,N+1),COLORWHITE,NODRAW;
DRAWLINE(FILTER(BACKSET(REF(CCI,N)=LLV(CCI,2*N+1),N+1),N) AND CCI=LLV(CCI,N+1),CCI,FILTER(CCI底背>0,5),CCI,0),
COLORWHITE,DOTLINE;
DRAWTEXT(CCI底背,CCI,'底背'),COLORWHITE;
CCI顶背:=REF(C,BARSLAST(REF(FILTER(BACKSET(REF(CCI,N)=HHV(CCI,2*N+1),N+1),N) AND CCI=HHV(CCI,N+1),1))+1)<C AND
REF(CCI,BARSLAST(REF(FILTER(BACKSET(REF(CCI,N)=HHV(CCI,2*N+1),N+1),N) AND CCI=HHV(CCI,N+1),1))+1)>CCI AND
FILTER(BACKSET(REF(CCI,N)=HHV(CCI,2*N+1),N+1),N) AND CCI=HHV(CCI,N+1),COLORGREEN,NODRAW;
DRAWLINE(FILTER(BACKSET(REF(CCI,N)=HHV(CCI,2*N+1),N+1),N) AND CCI=HHV(CCI,N+1),CCI,FILTER(CCI顶背>0,5),CCI,0),
COLORGREEN,DOTLINE;
DRAWTEXT(CCI顶背,CCI,'顶背'),COLORGREEN;
{趋势线的背离}
趋势线底背:=REF(C,BARSLAST(REF(FILTER(BACKSET(REF(趋势线,N)=LLV(趋势线,2*N+1),N+1),N) AND 趋势线=LLV(趋势线,N+1),1))+1)>C AND
REF(趋势线,BARSLAST(REF(FILTER(BACKSET(REF(趋势线,N)=LLV(趋势线,2*N+1),N+1),N) AND 趋势线=LLV(趋势线,N+1),1))+1)<趋势线 AND
FILTER(BACKSET(REF(趋势线,N)=LLV(趋势线,2*N+1),N+1),N) AND 趋势线=LLV(趋势线,N+1),COLORWHITE,NODRAW;
DRAWLINE(FILTER(BACKSET(REF(趋势线,N)=LLV(趋势线,2*N+1),N+1),N) AND 趋势线=LLV(趋势线,N+1),趋势线,FILTER(趋势线底背>0,5),趋势线,0),
COLORWHITE,DOTLINE;
DRAWTEXT(趋势线底背,趋势线,'趋势底背'),COLORFF80FF;
趋势线顶背:=REF(C,BARSLAST(REF(FILTER(BACKSET(REF(趋势线,N)=HHV(趋势线,2*N+1),N+1),N) AND 趋势线=HHV(趋势线,N+1),1))+1)<C AND
REF(趋势线,BARSLAST(REF(FILTER(BACKSET(REF(趋势线,N)=HHV(趋势线,2*N+1),N+1),N) AND 趋势线=HHV(趋势线,N+1),1))+1)>趋势线 AND
FILTER(BACKSET(REF(趋势线,N)=HHV(趋势线,2*N+1),N+1),N) AND 趋势线=HHV(趋势线,N+1),COLORGREEN,NODRAW;
DRAWLINE(FILTER(BACKSET(REF(趋势线,N)=HHV(趋势线,2*N+1),N+1),N) AND 趋势线=HHV(趋势线,N+1),趋势线,FILTER(趋势线顶背>0,5),趋势线,0),
COLORGREEN,DOTLINE;
DRAWTEXT(趋势线顶背,趋势线,'趋势顶背'),COLORFF8000;
{面积背离}
JC:= 0-CCI;
绿柱面积:=IF(CCI<0,SUM(CCI,BARSLAST(JC<0)),0);
红柱面积:=IF(CCI>0,SUM(CCI,BARSLAST(JC>0)),0);
本次最低价:=LLV(L,BARSLAST(JC<0));
本次最高价:=HHV(H,BARSLAST(JC>0));
X1:=IF (CCI<0,BARSLAST(CROSS(CCI,0)),0);
前次绿柱面积:=REF(绿柱面积,X1+1);
前次最低价:=REF(本次最低价,X1+1);
Y1:=IF((绿柱面积<0 AND ABS(绿柱面积)<ABS(前次绿柱面积) AND 本次最低价<前次最低价 ),1,0);
RS1:= CCI<0 AND REF(CCI,1)<0 AND C<前次最低价
AND ABS(绿柱面积)<ABS(前次绿柱面积) AND ABS(CCI)<ABS(REF(CCI,1));
底背驰:= IF (CROSS(CCI,0),REF(Y1,1),0);
DRAWTEXT(底背驰,LLV(CCI,5),'←面积底背'),COLORLIRED;
X2:=IF (CCI>0,BARSLAST(CROSS(0,CCI)),0);
前次红柱面积:=REF(红柱面积,X2+1);
前次最高价:=REF(本次最高价,X2+1);
Y2:=IF((红柱面积>0 AND 红柱面积<前次红柱面积 AND 本次最高价>前次最高价 ),1,0);
RS2:= CCI>0 AND REF(CCI,1)>0 AND C>前次最高价 AND ABS(红柱面积)<ABS(前次红柱面积) AND ABS(CCI)<ABS(REF(CCI,1));
顶背驰:= IF (CROSS(0,CCI),REF(Y2,1),0);
DRAWTEXT(顶背驰,HHV(CCI,5),'←面积顶背'),COLORCYAN;

午炎 发表于 2017-1-3 22:48

本帖最后由 午炎 于 2017-1-3 23:33 编辑

RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1)COLORCYAN;
D:=SMA(K,3,1)COLORYELLOW;
J:=3*K-2*D,COLORMAGENTA;
N:=5;
J底背:REF(C,BARSLAST(REF(FILTER(BACKSET(REF(KDJ.J,N)=LLV(KDJ.J,2*N+1),N+1),N) AND KDJ.J=LLV(KDJ.J,N+1),1))+1)>C AND
REF(KDJ.J,BARSLAST(REF(FILTER(BACKSET(REF(KDJ.J,N)=LLV(KDJ.J,2*N+1),N+1),N) AND KDJ.J=LLV(KDJ.J,N+1),1))+1)<KDJ.J AND
FILTER(BACKSET(REF(KDJ.J,N)=LLV(KDJ.J,2*N+1),N+1),N) AND KDJ.J=LLV(KDJ.J,N+1);


KDJ底背离

懒汉梦 发表于 2018-8-29 14:47

谢谢楼主你的大公无私,指标非常好。
有一句通不过:CCI值?TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14)),COLORYELLOW,LINETHICK1;{CCI线}
楼主:CCI值?问号位置应该是什么符号?是否能给解惑。

午炎 发表于 2017-1-3 22:35

CCI底背信号出现,三日内涨幅大于8%,小单参与。

午炎 发表于 2017-1-3 22:42


CCI与kdj同时背离共振最妙。

苏德强 发表于 2017-1-3 22:49

11111111111111111111

板凳腿 发表于 2017-1-3 23:02

谢谢楼主分享

allblue58 发表于 2017-1-3 23:10

谢谢楼主分享。

霖霖炒股 发表于 2017-1-3 23:22

错误句 : {绿柱}
{CCI}
{TYP:=(HIGH+LOW+CLOSE)/3;}
CCI值:=TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14)),COLORYELLOW,LINETHICK1
详细信息 :
错误起始位置 : 541 ; 长度: 9

cjq777 发表于 2017-1-3 23:29

谢谢楼主分享!

无一问 发表于 2017-1-3 23:44

谢谢楼主分享

纵横驰骋569 发表于 2017-1-4 00:04

谢谢您的分享!

1281095217 发表于 2017-1-4 00:21

谢谢辛苦了

东升123 发表于 2017-1-4 02:01

成功率90% 通达信 CCI底背离
页: [1] 2 3
查看完整版本: 成功率90% 通达信 CCI底背离