1,cci穿過-100,并且趨勢變紅色,底部買點(diǎn)
2,面織背離是我自己加上去的,面積底背是指cci在0軸下方的面織也前一個(gè)在0軸下方的面積的對(duì)比,頂背也是這道理
3,所有背離信號(hào)只能作參考!
4,指標(biāo)非本人原創(chuàng),根據(jù)論壇甘大神的改編哦……
{背景}
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);
本次最低價(jià):=LLV(L,BARSLAST(JC<0));
本次最高價(jià):=HHV(H,BARSLAST(JC>0));
X1:=IF (CCI<0,BARSLAST(CROSS(CCI,0)),0);
前次綠柱面積:=REF(綠柱面積,X1+1);
前次最低價(jià):=REF(本次最低價(jià),X1+1);
Y1:=IF((綠柱面積<0 AND ABS(綠柱面積)<ABS(前次綠柱面積) AND 本次最低價(jià)<前次最低價(jià) ),1,0);
RS1:= CCI<0 AND REF(CCI,1)<0 AND C<前次最低價(jià)
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);
前次最高價(jià):=REF(本次最高價(jià),X2+1);
Y2:=IF((紅柱面積>0 AND 紅柱面積<前次紅柱面積 AND 本次最高價(jià)>前次最高價(jià) ),1,0);
RS2:= CCI>0 AND REF(CCI,1)>0 AND C>前次最高價(jià) AND ABS(紅柱面積)<ABS(前次紅柱面積) AND ABS(CCI)<ABS(REF(CCI,1));
頂背馳:= IF (CROSS(0,CCI),REF(Y2,1),0);
DRAWTEXT(頂背馳,HHV(CCI,5),'←面積頂背'),COLORCYAN;
|