CCI改编主图指标源码[同花顺公式]
相关标签: cci 、 cci选股公式 、 cci指标实战技巧图解 、 cci指标 、 cci指标炒股绝招 、 cci精准选股指标公式 、 cci指标 最佳参数 、 cci国际投资 、 cci指标最优参数 、
CCI改编主图指标源码
TYP := (HIGH + LOW + CLOSE)/3;
CCI1:=(TYP-MA(TYP,6))/(0.015*AVEDEV(TYP,6));
差值1:=ABS(ref(CCI1,1)-CCI1),LINETHICK0;
CCI2:=(TYP-MA(TYP,10))/(0.015*AVEDEV(TYP,10));
差值2:=ABS(ref(CCI2,1)-CCI2),LINETHICK0;
CCI3:=(TYP-MA(TYP,20))/(0.015*AVEDEV(TYP,20));
差值3:=ABS(ref(CCI3,1)-CCI3),LINETHICK0;
CCI4:=(TYP-MA(TYP,30))/(0.015*AVEDEV(TYP,30));
差值4:=ABS(ref(CCI4,1)-CCI4),LINETHICK0;
CCI5:=(TYP-MA(TYP,60))/(0.015*AVEDEV(TYP,60));
差值5:=ABS(ref(CCI5,1)-CCI5),LINETHICK0;
CCI:=CCI1+CCI2+CCI3+CCI4+CCI5;
AAA:=(3*C+H+L+O)/6;//本文 来源: //
VAR1:=(8*AAA+7*ref(AAA,1)+6*ref(AAA,2)+5*ref(AAA,3)+4*ref(AAA,4)+3*ref(AAA,5)+2*ref(AAA,6)+ref(AAA,8))/36;
VAR2:=(HHV(VAR1,5)+HHV(VAR1,10)+HHV(VAR1,20))/3;
VAR3:=(LLV(VAR1,5)+LLV(VAR1,10)+LLV(VAR1,20))/3;
VAR4:=(HHV(VAR2,5)+HHV(VAR2,10)+HHV(VAR2,20))/3;
VAR5:=(LLV(VAR3,5)+LLV(VAR3,10)+LLV(VAR3,20))/3;
VAR6:=(LLV(VAR1,2)+LLV(VAR1,4)+LLV(VAR1,6))/3;
短线:VAR1,COLORWHITE;
中线:VAR6,COLORYELLOW;
下跌:IF(VAR1=VAR6,VAR6, DRAWNULL),COLORGREEN;
TJ1:= CCI1>差值4;
立桩量:=FILTER(TJ1,0);
TJ2:=IF(BARSLAST(立桩量)=1 ,1,IF(BARSLAST(立桩量)=2 ,1,IF(BARSLAST(立桩量)=3 ,1,0)));
突破1:=TJ2=1; //本文来至程序化交易网 cxh99.com//
TJ33:=IF(BARSLAST(立桩量)=1 ,1,IF(BARSLAST(立桩量)=2 ,1,
IF(BARSLAST(立桩量)=3 ,1,0)));
三天法则1:=TJ33=1;
成立1:=三天法则1 AND 突破1;
条件成立1:=FILTER(成立1,5);
DRAWTEXT(条件成立1,H*1.01,'破红看跌'),COLORLIBLUE;
TJ11:= CCI1<-差值4 ;
立桩量2:=FILTER(TJ11,0);
TJ22:=IF(BARSLAST(立桩量2)=1 AND CLOSE>ref(HIGH,1),1,
IF(BARSLAST(立桩量2)=2 AND CLOSE>ref(HIGH,2),1,
IF(BARSLAST(立桩量2)=3 AND CLOSE>ref(HIGH,3),1,0)));
突破2:=TJ22=1;
TJ:=IF(BARSLAST(立桩量2)=1 AND CLOSE>ref(LOW,1),1,IF(BARSLAST(立桩量2)=2
AND CLOSE>ref(LOW,2),1,IF(BARSLAST(立桩量2)=3 AND CLOSE>ref(LOW,3),1,0)));
三天法则2:=TJ=1;
成立2:=三天法则2 AND 突破2;
条件成立2:=FILTER(成立2,3);
DRAWTEXT(条件成立2,L*0.99,'破黑看涨'),COLORLIMAGENTA;
TJ111:=ABS(CCI1)>CCI AND ABS( 差值1)> ABS(差值5);
立桩量3:=FILTER(TJ111,3);
TJ222:=IF(BARSLAST(立桩量3)=1 AND CLOSE>ref(HIGH,1),1,IF(BARSLAST(立桩量3)=2 AND CLOSE>ref(HIGH,2),1,IF(BARSLAST(立桩量3)=3 AND CLOSE>ref(HIGH,3),1,0)));
突破3:=TJ222=1;
STICKLINE(CLOSE AND 下跌!= VAR6,ref(HIGH,BARSLAST(立桩量3)),
ref(HIGH,BARSLAST(立桩量3)),10,1),COLORCYAN;
STICKLINE(CLOSE AND 下跌!= VAR6,ref(LOW,BARSLAST(立桩量3)),
ref(LOW,BARSLAST(立桩量3)),10,1),COLORYELLOW;
TJ3:=IF(BARSLAST(立桩量3)=1 AND CLOSE>ref(LOW,1),1,IF(BARSLAST(立桩量3)=2 AND CLOSE>ref(LOW,2),1,IF(BARSLAST(立桩量3)=3 AND CLOSE>ref(LOW,3),1,0)));
三天法则:=TJ3=1;
成立:=三天法则 AND 突破3;
条件成立:=FILTER(成立,3);
DRAWTEXT(条件成立 AND 下跌!= VAR6,L*0.97,'☆成立');
(责任编辑:程序化交易网整理)
有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友
可联系技术人员 QQ: 262069696 进行 有偿 编写!(不贵!点击查看价格!)
相关文章
-
没有相关内容