通达信特别版Woodies CCI指标副图源码
特别版Woodies CCI指标 【源码、副图、附图、说明】
说明;你自己、当下永远是你的当下,好好把握。你可以认为Woodies CC指标错误百出,也可以认为他天衣无缝。那还是你的当下。不要被当下所当下,慢慢当下吧。
特别版Woodies CCI指标源码:
AVG:=(HIGH+LOW+CLOSE)/3;
CCI:=(AVG-MA(AVG,14))/(0.015*AVEDEV(AVG,14));
DIF:CCI-REF(CCI,1),COLORFF00FF;
前差值:ABS(REF(CCI,1)-REF(CCI,2));
差值20:IF(DIF>15 AND DIF<120,DIF,0);
200,COLORRED;
-200,COLORGREEN;
100,COLOR0055FF;
-100,COLORCYAN ;
PI:=ATAN(1)*4;
RANGEV:=25/(HHV(HIGH,30)-LLV(LOW,30))*LLV(LOW,30);
EMA34:=EMA(CLOSE,34);
Y2_EMA34:=(REF(EMA34,1)-EMA34)/AVG*RANGEV;
C_EMA34:=SQRT((1)*(1)+(Y2_EMA34)*(Y2_EMA34));
ANGLE_EMA34V:=ROUND(ABS(180*ACOS((1)/C_EMA34)/PI));
ANGLE_EMA34:=IF(Y2_EMA34>0,-ANGLE_EMA34V,ANGLE_EMA34V);
LSMA25:=FORCAST(CLOSE,25);
Y2_LSMA25:=(REF(LSMA25,1)-LSMA25)/AVG*RANGEV;
C_LSMA25:=SQRT(1+(Y2_LSMA25)*(Y2_LSMA25));
ANGLE_LSMA25V:=ROUND(ABS(180*ACOS((1)/C_LSMA25)/PI));
ANGLE_LSMA25:=IF(Y2_LSMA25>0,-ANGLE_LSMA25V,ANGLE_LSMA25V);
HIGHBARS:=BARSLAST(NOT(CCI>0));
LOWBARS:=BARSLAST(NOT(CCI<0));
UPCONDITION:=BARSLAST(HIGHBARS>=6 AND SUM(CCI>100,5)>0);
DNCONDITION:=BARSLAST(LOWBARS>=6 AND SUM(CCI<-100,5)>0);
UPTREND:=CCI>0 AND UPCONDITION<DNCONDITION;
DNTREND:=CCI<0 AND UPCONDITION>DNCONDITION;
TRTREND:=HIGHBARS>=5 AND NOT(UPTREND) OR LOWBARS>=5 AND NOT(DNTREND);
STICKLINE(UPTREND,0,CCI,3,0),COLOR0055FF;
STICKLINE(DNTREND,0,CCI,3,0),COLORBLUE;
STICKLINE(TRTREND,0,CCI,3,0),COLORFF0099;
STICKLINE(NOT(UPTREND OR DNTREND OR TRTREND),0,CCI,3,0),COLOR808080;
WCCI:CCI;
TCCI:(AVG-MA(AVG,5))/(0.015*AVEDEV(AVG,5));
STICKLINE(ANGLE_EMA34>=5,-301,-321,8,0),COLORYELLOW;
STICKLINE(ANGLE_EMA34<5 AND ANGLE_EMA34>=3.57,-301,-321,8,0),COLORYELLOW;
STICKLINE(ANGLE_EMA34<3.57 AND ANGLE_EMA34>=2.14,-301,-321,8,0),COLOR98FB98;
STICKLINE(ANGLE_EMA34<2.14 AND ANGLE_EMA34>=0.71,-301,-321,8,0),COLORGREEN;
STICKLINE(ANGLE_EMA34<0.71 AND ANGLE_EMA34>-0.71,-301,-321,8,0),COLORGREEN;
STICKLINE(ANGLE_EMA34<=-0.71 AND ANGLE_EMA34>-2.14,-301,-321,8,0),COLORGREEN;
STICKLINE(ANGLE_EMA34<=-2.14 AND ANGLE_EMA34>-3.57,-301,-321,8,0),COLORGREEN;
STICKLINE(ANGLE_EMA34<=-3.57 AND ANGLE_EMA34>-5,-301,-321,8,0),COLORGREEN;
STICKLINE(ANGLE_EMA34<=-5,-301,-321,8,0),COLORGREEN;
SW:=IF(ABS(ANGLE_EMA34)>=15 AND ABS(ANGLE_EMA34+ANGLE_LSMA25)>=50,IF(ANGLE_LSMA25>0,2,-2),IF(ABS(ANGLE_EMA34)>=0 AND (ANGLE_EMA34>=0 AND ANGLE_LSMA25>=0 OR ANGLE_EMA34<=0 AND ANGLE_LSMA25<=0) AND ABS(ANGLE_EMA34+ANGLE_LSMA25)>=5,IF(ANGLE_LSMA25>0,1,-1),0));
STICKLINE(ABS(SW)=2,301,321,8,0),COLORRED;
STICKLINE(ABS(SW)=1,301,321,8,0),COLOR00FFFF;
STICKLINE(ABS(SW)=0,301,321,8,0),COLORGREEN;