【股票指标公式下载】-【通达信】改良CCI(界、副图)
CCI改编通达信指标公式源码
一个CCI改的副图,多空分明,只做拉升的波段,黄柱关注,粉柱操作,红柱拉升,也是风险,就是这么矛盾,风险大收益高,简洁分明,注意趋势和背离,祝各位发财!均价:=(2*C+(C+H+L+O)/4+O)/4;R:=(2*L+3*均价)/5;R1:=(2*H+3*均价)/5;KX:=(R+R1)/2;CCI:(R-MA(R,84))/(0.015*AVEDEV(R,84))/200,COLORYELLOW;做多:(3*SMA(CCI,2,1)+2*SMA(SMA(CCI,2,1),2,1))/5,COLOR6600FF;STICKLINE(CCI<做多,做多,CCI,2,0),COLORRED;STICKLINE(CCI<做多,做多,CCI,2,0),COLORBROWN;OBV:=SUM(IF(KX>REF(KX,1),VOL,IF(KX<REF(KX,1),-VOL,0)),0);OBV13:=(MA(OBV,1)-MA(OBV,13))/MA(OBV,13)*100;OBV52:=(MA(OBV,1)-MA(OBV,52))/MA(OBV,52)*100;OB:=(3*OBV13+2*OBV52)/5,COLORWHITE;趋势:=EMA(OB,13/2),COLORGREEN;地:=LLV(MA(OB,1),26),COLOR00AA99;天:=HHV(MA(OB,1),26*2/3),COLORRED;STICKLINE(CCI>=0 ,0,CCI,3,0),COLORYELLOW;STICKLINE(CCI>=0.5 ,0.5,CCI,3,0),COLORRED;N:=60;BC:=(IF(C>(H+L+C)/3,(H*0.618+L*0.382)*0.382,(H*0.382+L*0.618)*0.382)+(O*0.382 +C*0.618)*0.618);EMN:=EMA((MA(BC,N)+SMA(BC,N,N/3))/2,N),COLOR6600FF;空头:=EMA((EMN-(C-EMN)*C),1),COLORGREEN;AA05:=MA(空头,3),COLOR0099CC;STICKLINE(AA05<EMN AND CCI>=0 ,0,CCI/2,3,0),COLORMAGENTA;关注:CROSS(做多,0),NODRAW;DRAWICON(关注,-0.1,1);。
通达信CCI自编副图指标公式源码 附图
以下是通达信CCI自编副图指标公式源码 附图(无源码的请下载附件导入)(1)当周MACD确定为上升、向好趋势,周CCI上穿-100时为中期行情启动信号。
(前后伴有周KDJ指标20附近金叉,周MACD金叉)(2)周CCI上穿0轴时为中期行情确认信号。
(同时也伴有周KDJ回头或死叉,但前提是周MACD没有明显变坏,否则无行情)(3)周CCI上穿+100为行情第一次拉升阶段。
此后,CCI每次回调至+100一下再次反身向上突破,都是波段行情的开始,只要周MACD在上升,就可以大胆做多。
但是,如果在下降趋势中,CCI每次靠近0轴都是离场的最好时机!(4) 牛股洗到-220回头就买1. MACD背离+CCI买入信号(注意区分背离的级别)2. MACD双线上0轴后的回抽的2买+CCI买入信号(4)当CCI84上穿100中线买入,下穿100,中线卖出,在这之间CCI14每次跌破100都是买点.DRAWGBK(C>0,RGB(20,10,80),RGB(10,1,5),1,0,1);{CCI}TYP:=(HIGH+LOW+CLOSE)/3;CCI84:(TYP-MA(TYP,84))/(0.015*AVEDEV(TYP,84)),COLORLICYAN;DRAWBAND(100,RGB(0,50,50),CCI84,RGB(100,10,0));CCI14:(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14)),COLORLIRED;{短线精灵}主力资金线:=((CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100+(CLOSE-MA(CLOSE,24) )/MA(CLOSE,24)*100+(CLOSE-MA(CLOSE,32))/MA(CLOSE,32)*100)/3;VAR2LL:=HHV(主力资金线>20,10);STICKLINE(VAR2LL AND CROSS((REF(HIGH,1)+REF(LOW,1))/2,MA(CLOSE,20)+ 2*STD(CLOSE,20)),CCI14,100,1,0),COLORBROWN; {危险:};VAR1T:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20; VAR2T:=2*ABS(VAR1T);VAR5T:=(HIGH+LOW+CLOSE)/3;VAR6T:=(VAR5T-MA(VAR5T,14))/(0.015*AVEDEV(VAR5T,14));VAR7T:=(VAR5T-MA(VAR5T,70))/(0.015*AVEDEV(VAR5T,70));VAR8T:=IF(VAR6T>=150 AND VAR6T<200 AND VAR7T>=150 ANDVAR7T<200,10,0);VAR9T:=IF(VAR6T<=-150 AND VAR6T>-200 AND VAR7T<=-150 ANDVAR7T>-200,-10,VAR8T);VARAT:=(CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*100;VARBT:=100-ABS(VARAT);预警系统:=IF(VAR7T>=200 AND VAR6T>=150,100,IF(VAR7T<=-200 ANDVAR6T<=-150,-100,VAR9T))+0;DRAWBAND(预警系统,RGB(10,100,10),0,RGB(100,10,0));天线:=IF(VARBT<90,VARBT,60);红军:=IF(VAR1T>0,VAR1T,0),COLORRED, LINESTICK;VAR24:=红军>48 AND 预警系统>60 AND 天线<100;DRAWTEXT(VAR24 AND COUNT(VAR24,30)=1,60,'出货') COLOR009900;DRAWICON(COUNT(CROSS(2,预警系统),15)>=1 AND CROSS(100,CCI14),100,2); DRAWICON(COUNT(CROSS(预警系统,-2),15)>=1 AND CROSS(CCI14,0),-100,1); {理财专家}VAR1P:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20; VAR2P:=2*ABS(VAR1P);VAR3P:=100-3*SMA((CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34))*100,2 0,1)+2*SMA(SMA((CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34))*100,20,1),15,1);VAR4P:=100-3*SMA((OPEN-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34))*100,20, 1)+2*SMA(SMA((OPEN-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34))*100,20,1),15,1);VAR5P:=(HIGH+LOW+CLOSE)/3;VAR6P:=(VAR5P-MA(VAR5P,14))/(0.015*AVEDEV(VAR5P,14));VAR7P:=(VAR5P-MA(VAR5P,89))/(0.015*AVEDEV(VAR5P,89));VAR8P:=IF(VAR6P>=150 AND VAR6P<200 AND VAR7P>=150 ANDVAR7P<200,10,0);VAR9P:=IF(VAR6P<=-150 AND VAR6P>-200 AND VAR7P<=-150 ANDVAR7P>-200,-10,VAR8P);VARAP:=(CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*100;VARBP:=100-ABS(VARAP);OXP:=IF(VARBP<90,VARBP,100),COLORFFCC66;VAR21P:=IF(VAR1P>0,VAR1P,0);预警1:=IF(VAR7P>=200 AND VAR6P>=150,10,IF(VAR7P<=-200 ANDVAR6P<=-150,-15,VAR9P))+10,COLOR007700;VAR29P:=VAR21P>50 AND 预警1>10 AND OXP=100;DRAWTEXT(VAR29P ANDCOUNT(VAR29P,30)=1,-150,'上涨过急'),COLOR009900;{捕捉大牛股之预警准确率98%}TR2:=SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),7);HD2:=HIGH-REF(HIGH,1);LD2:=REF(LOW,1)-LOW;DMP2:=SUM(IF(HD2>0 AND HD2>LD2,HD2,0),7);DMM2:=SUM(IF(LD2>0 AND LD2>HD2,LD2,0),7);PDI2:=DMP2*100/TR2;MDI2:=DMM2*100/TR2;ADX2:=MA(ABS(MDI2-PDI2)/(MDI2+PDI2)*100,3);ADXR2:=(ADX2+REF(ADX2,3))/2;神偷线:=((DMP2*100)/TR2);辅助线:=((DMM2*100)/TR2);趋势线:=MA(((ABS((辅助线 - 神偷线))/(辅助线 + 神偷线))*100),3);预警:IF(((趋势线 > 88) AND (神偷线 < 5.8)),-100,-220),COLORRED;大牛股:IF(ADX2>90 AND PDI2=0,-50,-100),COLORYELLOW,LINETHICK1; 350,COLOR004400,POINTDOT;220,COLORMAGENTA,POINTDOT;水面:100,COLORGRAY;0,COLORLICYAN,POINTDOT;-100,COLORYELLOW;-220,COLORBLUE,POINTDOT;。
[通达信]通达信超级顶底优化指标公式(副图源码)
[通达信]通达信超级顶底优化指标公式(副图源码)VARV:=(2*C+H+L)/4;VARU:=LLV(LOW,30);VARA1:=HHV(HIGH,30);B:=EMA((VARV-VARU)/(VARA1-VARU)*100,8);B1:=EMA(B,5);STICKLINE(B-B1>0,B,B1,8,1),COLORRED;STICKLINE(B-B1<0,B,B1,8,1),COLOR00FF00;LC:=REF(CLOSE,1);RSI:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;低吸:IF(CROSS(RSI,11),70,0),COLORWHITE,POINTDOT;STICKLINE(低吸,70,0,4,0),COLORWHITE;VAR7:=EMA(AMOUNT/VOL/100,3);VAR8:=EMA(VAR7,88);VAR9:=EMA(VAR7,88)*0.85;VARA:=VAR9*0.87;VARB:=LOW<VARA AND CLOSE>REF(CLOSE,1)*1.02;STICKLINE(FILTER(VARB,6),65,0,4,0),COLORFF00FF;坚决买进:IF(FILTER(VARB,6),65,0),COLORFF00FF,POINTDOT;VARF:=(2*CLOSE+HIGH+LOW)/4;VA4:=LLV(LOW,34);VA5:=HHV(HIGH,34);VA6:=EMA((VARF-VA4)/(VA5-VA4)*100,6);VA7:=EMA(0.667*REF(VA6,1)+0.333*VA6,4);出击:IF(IF(COUNT(CLOSE<REF(CLOSE,1),8)/8>0.3 AND COUNT(VA6>VA7,3) AND REF(LOW,1)=LLV(LOW,120) AND CLOSE>OPEN,1,0),60,0),COLORYELLOW,POINTDOT;STICKLINE(IF(COUNT(CLOSE<REF(CLOSE,1),8)/8>0.3 ANDCOUNT(VA6>VA7,3) ANDREF(LOW,1)=LLV(LOW,120) AND CLOSE>OPEN,1,0),60,0,4,0),COLORYELLOW;A:=(3*CLOSE+LOW+OPEN+HIGH)/6;D1:=(20*A+19*REF(A,1)+18*REF(A,2)+17*REF(A,3)+16*REF( A,4)+15*REF(A,5)+14*REF(A,6)+13*REF(A,7)+12*REF(A,8)+11*REF(A,9)+10*REF(A,10)+9*R EF(A,11)+8*REF(A,12)+7*REF(A,13)+6*REF(A,14)+5*REF(A,15)+4*REF(A,16)+3*RE F(A,17)+2*REF(A,18)+REF(A,20))/211;D2:=EMA(D1,2);D3:=EMA(D2,2);K1:=EMA(D3,2);波段买入:IF(CROSS(D1,K1),55,0),COLOR0099FF,POINTDOT;STICKLINE(CROSS(D1,K1),55,0,4,0),COLOR0099FF;多方趋势:=7*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*30,4,1)-3*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*30,4,1),3,1)-SMA(SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*30,4,1),3,1),2,1);天线:=78.89;STICKLINE(CROSS(天线,多方趋势),90,95,6,0),COLOR00FF00;STICKLINE(B>0 AND B-B1>=0,79,80,6,0),COLORRED;STICKLINE(B>0 AND B-B1<0,79,80,6,0),COLOR00FF00;STICKLINE(B>0 AND B-B1>=0,49,50,6,0),COLORRED;STICKLINE(B>0 AND B-B1<0,49,50,6,0),COLORFF8899;STICKLINE(B>0 AND B-B1>=0,19,20,6,0),COLORRED;STICKLINE(B>0 AND B-B1<0,19,20,6,0),COLOR00FF00;STICKLINE(B-B1>0,B,B1,8,1),COLORRED;STICKLINE(B-B1<0,B,B1,8,1),COLOR00FF00;地量:DRAWTEXT(CROSS(0.9,1/VOL*1000>0.01 AND "KDJ.J"<0),L*1,'地量'),COLOR00FFFF;STICKLINE(地量>0,0,30,2,0),COLOR008888;STICKLINE(地量>0,0,30,1.5,0),COLOR00AAAA;STICKLINE(地量>0,0,30,0.8,0),COLOR00DDDD;STICKLINE(地量>0,0,30,0.3,0),COLOR00FFFF;VARR1:=SMA(MAX(CLOSE-REF(C,1),0),6,1)/SMA(ABS(CLOSE-REF(C,1)),6,1)*100;DRAWICON(CROSS(82,VARR1),10,15);VAR10:=100-3*SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);VAR11:=100-3*SMA((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);VAR12:=VAR10<REF(VAR11,1) AND VOL>REF(VOL,1) AND CLOSE>REF(CLOSE,1);DRAWTEXT(VAR12 AND COUNT(VAR12,30)=1,40,'有大资金进场迹象,关注!');。
优化CCI并找底通达信指标公式源码
优化CCI并找底通达信指标公式源码在通达信软件中,CCI(顺势指标)是一种常用的技术分析指标,用于判断股价的超买超卖状态。
CCI指标源码如下所示:```python'''该CCI函数传入参数为:high,low,close,n,例如:cci(高价,低价,收盘价,计算周期)计算方法:1.计算典型价(Typical Price):=(High+Low+Close)/32.计算典型价的移动平均数:=SMA(Typical Price,N)3.计算MD(平均绝对偏离) =SUM(ABS(Typical Price-SMA),N)=(Typical Price-Moving Average)/0.015/MD其中,SMA是简单移动平均数,SUM是求和函数,ABS是取绝对值函数。
'''def cci(high, low, close, n):typical_price = (high + low + close) / 3moving_average = []md = []cci_value = []for i in range(len(typical_price)):if i < n:moving_average.append(None)md.append(None)cci_value.append(None)else:moving_average.append(sum(typical_price[i-n:i]) / n)md_value = sum(abs(typical_price[i-n:i] - moving_average[i])) / nmd.append(md_value)cci_value.append((typical_price[i] - moving_average[i]) / (0.015 * md_value))return cci_value```以上是一个简单的CCI指标的计算函数,需要传入股价的高价、低价、收盘价以及计算周期n,返回一个CCI指标值的列表。
股票-通达信CCI看涨跌主图指标公式
通达信CCI看涨跌主图指标公式_正点财经AAF:LLV(LOW,34),LINETHICK1,COLORFFFFCC;BBF:MA(AAF,4),LINETHICK1,COLORYELLOW;TYP:=(HIGH+LOW+CLOSE)/3;CCI1:=(TYP-MA(TYP,6))/(0.015*AVEDEV(TYP,5));差值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立桩量:=FILTER(TJ1,0),NODRAW;TJ2:=IF(BARSLAST(立桩量)=1,1,0);STICKLINE(立桩量!=1,REF(HIGH,BARSLAST(立桩量)),REF(HIGH,BARSLAST(立桩量)),1,1),COLORCYAN; {STICKLINE(立桩量!=1,REF(LOW,BARSLAST(立桩量)),REF(LOW,BARSLAST(立桩量)),1,1),COLORCYAN;}成立1:=TJ2=1;条件成立1:=FILTER(成立1,5);DRAWTEXT(条件成立1,REF(HIGH,BARSLAST(立桩量)),看跌),COLORLIBLUE;TJ11:=CCI1-差值4;立桩量2:=FILTER(TJ11,0),NODRAW;TJ22:=IF(BARSLAST(立桩量2)=1ANDCLOSEREF(HIGH,1),1,0);突破2:=TJ22=1;{STICKLINE(CLOSEAND下跌!=VAR6,REF(HIGH,BARSLAST(立桩量2)),REF(HIGH,BARSLAST(立桩量2)),1,1),COLORYELLOW;}STICKLINE(CLOSEAND下跌!=VAR6,REF(LOW,BARSLAST(立桩量2)),REF(LOW,BARSLAST(立桩量2)),1,1),COLORYELLOW; TJ:=IF(BARSLAST(立桩量2)=1ANDCLOSEREF(LOW,1),1,0); 成立2:=TJ=1;条件成立2:=FILTER(成立2,5);DRAWTEXT(条件成立2,REF(LOW,BARSLAST(立桩量2)),看涨),COLORLIMAGENTA;TJ111:=ABS(CCI1)CCIANDABS(差值1)ABS(差值5);立桩量3:=FILTER(TJ111,3);TJ3:=IF(BARSLAST(立桩量3)=1ANDCLOSEREF(LOW,1),1,IF(BARSLAST(立桩量3)=2ANDCLOSEREF(LOW,2),1,IF(BARSLAST(立桩量3)=3ANDCLOSEREF(LOW,3),1,0)));成立:=TJ3=1;条件成立:=FILTER(成立,5);DRAWTEXT(条件成立AND下跌!=VAR6,L*0.97,☆成立LC:=REF(CLOSE,1);RSI:=((SMA(MAX((CLOSE-LC),0),3,1)/SMA(ABS((CLOSE-LC)),3,1)) *100);FF:=EMA(CLOSE,3);MA15:=EMA(CLOSE,21);DRAWTEXT(CROSS(FF,MA15),BBF,底背离),COLORA6E500;DRAWTEXT(CROSS(88,RSI),(HIGH*1.02),顶背离),COLOR1880FF;X1:=(C+L+H)/3;BB13:=ATAN(EMA(X1,13)-REF(EMA(X1,13),1))*3.1416*10;EMA8:=EMA(C,8);DRAWTEXT(FILTER(BB131ANDEMA(X1,13)REF(EMA(X1,8),1),10) ,EMA8,45),COLORWHITE;STICKLINE(1,C,O,2.8,0),COLOR666600;STICKLINE(立桩量,C,O,2.8,0),COLOR0000FF;STICKLINE(1,C,O,0,0),COLORCCCCCC;通达信CCI看涨跌主图指标公式实例图解:通达信CCI看涨跌主图指标公式。
CCI优化副图指标 源码 通达信
CCI优化副图指标源码通达信STICKLINE(C,320,-320,5,0),COLOR80A16F;M:=14;Q:=6;N:=20;MM:=IF(PERIOD=1,M,IF(PERIOD=2,M,IF(PERIOD=3,M,IF(PERIOD=4,M,IF(P ERIOD=5,M,IF(PERIOD=6,Q,IF(PERIOD=7,Q,IF(PERIOD=8,Q,0)))))))); AVG:=(HIGH+LOW+CLOSE)/3;CCI:=(AVG-MA(AVG,MM))/(0.015*AVEDEV(AVG,MM));DIF:CCI-REF(CCI,1),LINETHICK0,COLOR00FF00;前差值:ABS(REF(CCI,1)-REF(CCI,2)),NODRAW;差值20:IF(DIF>15 AND DIF<120,DIF,0),NODRAW,COLOR0000FF;PI:=ATAN(1)*4;PERIODS:=30;HIGHHIGH:=HHV(HIGH,PERIODS);LOWLOW:=LLV(LOW,PERIODS);RANGEV:=25/(HIGHHIGH-LOWLOW)*LOWLOW;EMA34:=EMA(CLOSE,34);X1_EMA34:=0;X2_EMA34:=1;Y1_EMA34:=0;Y2_EMA34:=(REF(EMA34,1)-EMA34)/AVG*RANGEV;C_EMA34:=SQRT((X2_EMA34-X1_EMA34)*(X2_EMA34-X1_EMA34)+(Y2_EMA 34-Y1_EMA34)*(Y2_EMA34-Y1_EMA34));ANGLE_EMA34V:=ROUND(ABS(180*ACOS((X2_EMA34-X1_EMA34)/C_EMA34) /PI));ANGLE_EMA34:=IF(Y2_EMA34>0,-ANGLE_EMA34V,ANGLE_EMA34V); LSMA25:=FORCAST(CLOSE,25);X1_LSMA25:=0;X2_LSMA25:=1;Y1_LSMA25:=0;Y2_LSMA25:=(REF(LSMA25,1)-LSMA25)/AVG*RANGEV;C_LSMA25:=SQRT((X2_LSMA25-X1_LSMA25)*(X2_LSMA25-X1_LSMA25)+(Y2 _LSMA25-Y1_LSMA25)*(Y2_LSMA25-Y1_LSMA25));ANGLE_LSMA25V:=ROUND(ABS(180*ACOS((X2_LSMA25-X1_LSMA25)/C_LSM A25)/PI));ANGLE_LSMA25:=IF(Y2_LSMA25>0,-ANGLE_LSMA25V,ANGLE_LSMA25V); ARRAY:=CCI;HIGHBARS:=BARSLAST(NOT(ARRAY>0));LOWBARS:=BARSLAST(NOT(ARRAY<0));UPCONDITION:=BARSLAST(HIGHBARS>=6 AND SUM(ARRAY>100,5)>0); DNCONDITION:=BARSLAST(LOWBARS>=6 AND SUM(ARRAY<-100,5)>0); UPTREND:=ARRAY>0 AND UPCONDITION<DNCONDITION; DNTREND:=ARRAY<0 AND UPCONDITION>DNCONDITION; TRTREND:=HIGHBARS>=5 AND NOT(UPTREND) OR LOWBARS>=5 AND NOT(DNTREND);STICKLINE(UPTREND,0,CCI,1,0),COLORFF0000;STICKLINE(DNTREND,0,CCI,1,0),COLOR0000FF;STICKLINE(TRTREND,0,CCI,1,0),COLOR00FFFF;STICKLINE(NOT(UPTREND OR DNTREND ORTRTREND),0,CCI,1,0),COLOR808080;WCCI:CCI,LINETHICK2,COLORBLACK;TCCI:(AVG-MA(AVG,N))/(0.015*AVEDEV(AVG,N)),COLOR7A56B7,LINETHICK1; STICKLINE(ANGLE_EMA34>=5,-301,-321,2,0),COLORD0E040;STICKLINE(ANGLE_EMA34<5 ANDANGLE_EMA34>=3.57,-301,-321,2,0),COLOR006400;STICKLINE(ANGLE_EMA34<3.57 ANDANGLE_EMA34>=2.14,-301,-321,2,0),COLOR98FB98;STICKLINE(ANGLE_EMA34<2.14 ANDANGLE_EMA34>=0.71,-301,-321,2,0),COLOR00FF00;STICKLINE(ANGLE_EMA34<0.71 ANDANGLE_EMA34>-0.71,-301,-321,2,0),COLOR00FFFF;STICKLINE(ANGLE_EMA34<=-0.71 ANDANGLE_EMA34>-2.14,-301,-321,2,0),COLORE0FFFF;STICKLINE(ANGLE_EMA34<=-2.14 ANDANGLE_EMA34>-3.57,-301,-321,2,0),COLOR00A5FF;STICKLINE(ANGLE_EMA34<=-3.57 ANDANGLE_EMA34>-5,-301,-321,2,0),COLOR0000FF;STICKLINE(ANGLE_EMA34<=-5,-301,-321,2,0),COLOR00008B;SW:=IF(ABS(ANGLE_EMA34)>=15 ANDABS(ANGLE_EMA34+ANGLE_LSMA25)>=50,IF(ANGLE_LSMA25>0,2,-2),IF(AB S(ANGLE_EMA34)>=0 AND (ANGLE_EMA34>=0 AND ANGLE_LSMA25>=0 OR ANGLE_EMA34<=0 AND ANGLE_LSMA25<=0) ANDABS(ANGLE_EMA34+ANGLE_LSMA25)>=5,IF(ANGLE_LSMA25>0,1,-1),0)); STICKLINE(ABS(SW)=2,301,321,2,0),COLOR00FF00;STICKLINE(ABS(SW)=1,301,321,2,0),COLOR00FFFF;STICKLINE(ABS(SW)=0,301,321,2,0),COLOR0000FF;IF(CLOSE>LSMA25,0,DRAWNULL),LINETHICK3,COLOR00FF00;IF(CLOSE<LSMA25,0,DRAWNULL),LINETHICK3,COLOR0000FF;IF(CLOSE=LSMA25,0,DRAWNULL),LINETHICK3,COLOR00FFFF; DRAWICON(ABS(CCI)>=200,CCI,12);STICKLINE(C,200,200,1.5,0),COLORFFFF00;STICKLINE(C,-200,-200,1.5,0),COLORFFFF00;STICKLINE(C,100,100,1.5,0),COLORFFFF00;STICKLINE(C,-100,-100,1.5,0),COLORFFFF00;。
通达信多种背离指标公式(副图指标)
通达信多种背离指标公式(副图指标)X_1:=EMA(CLOSE,12)-EMA(CLOSE,26);X_2:=EMA(X_1,9);X_3:=REF(CLOSE,1);RSI1:SMA(MAX(CLOSE-X_3,0),6,1)/SMA(ABS(CLOSE-X_3),6,1)*100,COLORWHITE;RSI2:SMA(MAX(CLOSE-X_3,0),12,1)/SMA(ABS(CLOSE-X_3),12,1)*100,COLORYELLOW;RSI3:SMA(MAX(CLOSE-X_3,0),24,1)/SMA(ABS(CLOSE-X_3),24,1)*100,COLORMAGENTA;RSI:RSI1-RSI3,COLORSTICK,LINETHICK2;X_4:=BARSLAST(REF(CROSS(X_1,X_2),1));X_5:=REF(CLOSE,X_4+1)>CLOSE AND REF(X_1,X_4+1)<X_1 AND CROSS(X_1,X_2);X_6:=BARSLAST(REF(CROSS(KDJ.K(9,3,3),KDJ.D(9,3,3)),1));X_7:=REF(CLOSE,X_6+1)>CLOSE AND REF(KDJ.K(9,3,3),X_6+1)<KDJ.K(9,3,3) AND CROSS(KDJ.K(9,3,3),KDJ.D(9,3,3));X_8:=BARSLAST(REF(CROSS(RSI.RSI1(6,12,24),RSI.RSI2(6,12, 24)),1));X_9:=REF(CLOSE,X_8+1)>CLOSE AND REF(RSI.RSI1(6,12,24),X_8+1)<RSI.RSI1(6,12,24) AND CROSS(RSI.RSI1(6,12,24),RSI.RSI2(6,12,24));X_10:=BARSLAST(REF(CROSS(X_2,X_1),1));X_11:=REF(CLOSE,X_10+1)<CLOSE AND REF(X_1,X_10+1)>X_1 AND CROSS(X_2,X_1);X_12:=BARSLAST(REF(CROSS(KDJ.D(9,3,3),KDJ.K(9,3,3)),1));X_13:=REF(CLOSE,X_12+1)<CLOSE AND REF(KDJ.K(9,3,3),X_12+1)>KDJ.K(9,3,3) ANDCROSS(KDJ.D(9,3,3),KDJ.K(9,3,3));X_14:=BARSLAST(REF(CROSS(RSI.RSI2(6,12,24),RSI.RSI1(6,12 ,24)),1));X_15:=REF(CLOSE,X_14+1)<CLOSE AND REF(RSI.RSI1(6,12,24),X_14+1)>RSI.RSI1(6,12,24) AND CROSS(RSI.RSI2(6,12,24),RSI.RSI1(6,12,24));MACD底背:IF(X_5>0,(-0.1),0),POINTDOT,COLORRED;KDJ底背:IF(X_7>0,(-0.1),0),POINTDOT,COLORMAGENTA;RSI底背:IF(X_9>0,(-0.1),0),POINTDOT,COLORYELLOW;MACD顶背:IF(X_11>0,0.1,0),POINTDOT,COLORGREEN;KDJ顶背:IF(X_13>0,0.1,0),POINTDOT,COLORFFCC66;RSI顶背:IF(X_15>0,0.1,0),POINTDOT,COLORWHITE;STICKLINE(X_5>0,(-25),0,2,0),COLORRED;STICKLINE(X_7>0,(-25),0,2,0),COLORMAGENTA;STICKLINE(X_9>0,(-25),0,2,0),COLORYELLOW;STICKLINE(X_11>0,25,0,2,0),COLORGREEN;STICKLINE(X_13>0,25,0,2,0),COLORFFCC66;STICKLINE(X_15>0,25,0,2,0),COLORWHITE;。
通达信改良主力追踪指标公式
通达信改良主力追踪指标公式通达信是一款国内比较常用的股票分析软件,其中提供了许多技术指标来辅助投资者分析股票走势。
主力追踪指标是一种常用的技术指标之一,用于判断主力资金的流入和流出情况,进而研判股票的走势。
传统的主力追踪指标通常包括主力资金流入指标、主力资金流出指标和主力资金净流入指标。
主力资金流入指标用于衡量主力资金的买入压力,主力资金流出指标用于衡量主力资金的卖出压力,主力资金净流入指标则用于判定主力资金的净流向情况。
改良主力追踪指标的公式相较于传统的主力追踪指标略有不同。
改良的主力追踪指标公式如下:主力资金流入指标(MFI)=(股价-最低价)/(最高价-最低价)×成交量主力资金流出指标(MFO)=(最高价-股价)/(最高价-最低价)×成交量主力资金净流入指标(NFI)=MFI-MFO在这个公式中,股价代表的是当前股价,最低价和最高价分别是一段时间内的最低价和最高价,成交量代表的是一段时间内的成交量。
改良主力追踪指标相较于传统的主力追踪指标主要在计算主力资金流入指标和主力资金流出指标时引入了最高价和最低价的概念。
传统的主力资金流入指标和主力资金流出指标仅仅考虑了股价和成交量之间的关系,而改良主力追踪指标引入了最高价和最低价,可以更全面地判断主力资金的买入和卖出压力。
改良主力追踪指标还引入了主力资金净流入指标,通过比较主力资金流入和流出的情况,可以更准确地判断主力资金的净流向情况。
如果主力资金流入大于主力资金流出,说明主力资金存在净流入的情况,表明主力资金对于该股票持有乐观态度,有可能会继续推高股价;相反,如果主力资金流出大于主力资金流入,说明主力资金存在净流出的情况,表明主力资金对于该股票持有悲观态度,股价可能会下跌。
综上所述,改良的主力追踪指标通过引入最高价和最低价,以及计算主力资金净流入指标,可以更准确地判断主力资金的流入和流出情况。
投资者可以根据该指标对股票走势进行分析,作出更明智的投资决策。
通达信大师CCI源码指标公式
DRAWTEXT(CURRBARSCOUNT=120,200,'抄短底是上升波必不可少的功夫'),COLOR676767;DRAWTEXT(CURRBARSCOUNT=120,170.1,'寻找底背离底部买进信号运用CCI'),COLOR676767;DRAWTEXT(CURRBARSCOUNT=120,140.1,'要比运用KD、RSI、W R有时要灵敏一天半左右'),COLOR676767;{}DRAWTEXT(CURRBARSCOUNT=120,110.1,'早抓低点较滞抄底的人不管是趋利还是避害都更有腾挪空间'),COLOR676767;DRAWTEXT(CURRBARSCOUNT=120,80,'(1)跌破负100如继续创新低而该指标连续反弹可能现短底'),COLOR676767;DRAWTEXT(CURRBARSCOUNT=120,50.1,'(2)升破负100及升破100属短多信号以及空头停损信号'),COLOR676767;DRAWTEXT(CURRBARSCOUNT=120,20,'(3)强势中跌破100及弱势中跌破负100可能产生调整'),COLOR676767;DRAWTEXT(CURRBARSCOUNT=120,-10.1,'(4)升破100后如股指继续创新高而该指标连续下行可能出现短顶'),COLOR676767;DRAWTEXT(CURRBARSCOUNT=120,-40.1,'(5)上述四个作用中第一和第四个更有准确度'),COLOR676767;DRAWTEXT(CURRBARSCOUNT=120,-70.1,'对大涨或下跌一定数值时判断顶部或底部比较容易没极端行情'),COLOR676767;DRAWTEXT(CURRBARSCOUNT=120,-100,'配合MACD、SKD、成交量和均线等才能达到最佳效果'),COLOR676767;DRAWTEXT(CURRBARSCOUNT=75,200.1,''),COLORYELLOW;DRAWTEXT(CURRBARSCOUNT=75,185,''),COLORYELLOW;DRAWTEXT(CURRBARSCOUNT=75,170.1,''),COLORCYAN;DRAWTEXT(CURRBARSCOUNT=75,155.1,''),COLORMAGENTA;DRAWTEXT(CURRBARSCOUNT=75,140.1,''),COLORYELLOW;DRAWTEXT(CURRBARSCOUNT=75,125.1,''),COLORMAGENTA;DRAWTEXT(CURRBARSCOUNT=75,110,''),COLORYELLOW;DRAWTEXT(CURRBARSCOUNT=75,95.1,''),COLORYELLOW;DRAWTEXT(CURRBARSCOUNT=75,80,''),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=75,65.1,''),COLORCYAN; DRAWTEXT(CURRBARSCOUNT=75,50.1,''),COLORMAGENTA; DRAWTEXT(CURRBARSCOUNT=75,35.1,''),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=75,20.1,''),COLORMAGENTA; DRAWTEXT(CURRBARSCOUNT=75,5,''),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=35,200.1,''),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=35,185,' '),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=35,170.1,''),COLORCYAN; DRAWTEXT(CURRBARSCOUNT=35,155.1,''),COLORMAGENTA; DRAWTEXT(CURRBARSCOUNT=35,140.1,''),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=35,125.1,''),COLORMAGENTA; DRAWTEXT(CURRBARSCOUNT=35,110,''),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=35,95.1,''),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=35,80,''),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=35,65.1,''),COLORCYAN; DRAWTEXT(CURRBARSCOUNT=35,50.1,''),COLORMAGENTA; DRAWTEXT(CURRBARSCOUNT=35,35.1,''),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=35,20.1,''),COLORMAGENTA; DRAWTEXT(CURRBARSCOUNT=35,5,''),COLORYELLOW;N:=14;TYP:=(HIGH+LOW+CLOSE)/3;CCI:(TYP-MA(TYP,N))/(0.015*AVEDEV(TYP,N));要卖线:150,POINTDOT,COLOR009F00;要买线:-150,POINTDOT,COLORFF00FF;多空:0,POINTDOT,COLORWHITE;IF(CCI>100,CCI,DRAWNULL),COLORRED,LINETHICK2;IF(CCI<-100,CCI,DRAWNULL),COLORFF2400,LINETHICK2;。
改良版cci指标公式
改良版cci指标公式CCI指标(商品路径指数)是由美国交易员和技术分析师Donald Lambert创立的。
它结合了趋势和震荡市场的信息,帮助交易者判断趋势的强弱以及市场价格是在报价区间中运行、还是超出报价区间。
I指标的概念CCI指标是一种用于识别股票、期货或者其他金融资产的反转点的技术指标,它通过计算其价格和价格区间的函数来识别该资产的异常行为。
它的计算公式是:CCI(n)=(TP-n*(H-L))/3 * n *(H-L),其中TP是收盘价,H是收盘价之前n个交易日的最高价,L是收盘价之前n个交易日的最低价,n则是n个交易日。
I指标的基本用法CCI指标可用于识别特殊的反转点。
用户可以用它来识别当市场价格低于或高于某个数值时的重大变化,这对于技术分析师极大的有用。
正常情况下,市场价格的变化受货币或金融政策等多种因素的影响。
此时使用CCI指标可以有效地判断价格的异常行为。
I指标的经典改进a.调整参数的技术:将CCI指标的参数n从20调整到19或者21,以调整指标的敏感度;b.极坐标形式:对指标做极坐标形式的变形,能够极大地增加它的鲁棒性,在价格走势突变的情况下,能够更快地给出相应的响应;c.结合RSI指标:将RSI指标和CCI指标结合起来,从而可以得到更准确的反转点,令到盈利可能性大大增强;d.结合MACD指标:将MACD指标结合CCI指标使用,能够得到更加可靠且准确的趋势决策;e.波动放量定理:将CCI指标结合波动放量定理来使用,可以更好地把握市场趋势。
4.总结CCI指标是一种判断市场及其价格异常行为的技术指标,它可以帮助交易者更好地判断趋势强度以及价格行为。
由于CCI指标的灵敏度有限,在实际使用过程中可以对它的参数值以及结合其他指标进行综合改进,这样就可以更好地把握市场行情,提高获利能力。
股票-通达信CCI优化版指标公式
通达信CCI优化版指标公式_正点财经TYP:=(HIGH+LOW+CLOSE)/3;CCI:(TYP-MA(TYP,N))/(0.015*AVEDEV(TYP,N)),LINESTICK,COLOR RED,LINETHICK2;跌:IF(CCIREF(CCI,1),CCI,DRAWNULL),COLORGREEN,LINETHICK2;DRAWICON(CROSS(200,CCI),250,27);DRAWICON(CROSS(CCI,-200),-250,26);转强:STICKLINE(CCI0,0,CCI,2,0),COLOR770077;STICKLINE(CCI0,0,CCI,1.5,0),COLOR990099;STICKLINE(CCI0,0,CCI,0.8,0),COLORBB00BB;STICKLINE(CCI0,0,CCI,0.3,0),COLORFF00FF;转弱:STICKLINE(CCI0,0,CCI,2,0),COLOR888800;STICKLINE(CCI0,0,CCI,1.5,0),COLORAAAA00;STICKLINE(CCI0,0,CCI,0.8,0),COLORDDDD00;STICKLINE(CCI0,0,CCI,0.3,0),COLORFFFF00;弱转强:=STICKLINE(CROSS(CCI,-200)ANDCCIREF(CCI,1),CCI,0,2,0),CO LOR00DFDF;STICKLINE(弱转强,-150,0,7,0),COLORYELLOW;STICKLINE(弱转强,-150,0,4,0),COLOR000099;STICKLINE(弱转强,-150,0,2,0),COLOR0000BB;STICKLINE(弱转强,-150,0,1,0),COLOR0000DD;STICKLINE(弱转强,-210,0,0.9,0),COLOR0000FF; DRAWTEXT(弱转强,-210,买),COLORYELLOW;强转弱:=STICKLINE(CROSS(200,CCI)ANDCCIREF(CCI,1),0,CCI,2,0),COL ORGREEN;STICKLINE(强转弱,150,0,7,0)COLORWHITE;STICKLINE(强转弱,150,0,4,0),COLOR009900;STICKLINE(强转弱,150,0,2,0),COLOR00BB00;STICKLINE(强转弱,150,0,1,0),COLOR00DD00;STICKLINE(强转弱,210,0,0.9,0),COLOR00FF00; DRAWTEXT(强转弱,210,卖),COLORGREEN;天顶线:=200,COLORRED;地底线:-200,COLORCYAN;牛熊线:100,POINTDOT,LINETHICK3,COLORWHITE;BIAS1W:=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100;BIAS2W:=(CLOSE-MA(CLOSE,12))/MA(CLOSE,12)*100;BIAS3W:=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100;MM:=(BIAS1W+2*BIAS2W+3*BIAS3W)/6;MN:=MA(MM,3);VAR24:=LLV(LOW,36);VAR25:=HHV(HIGH,30);VAR26:=EMA((CLOSE-VAR24)/(VAR25-VAR24)*4,4)*25;{底背离:=IF((VAR2610),-100,-150),COLORYELLOW,LINETHICK1;} 底背离:IF(MN-4,-100,-150),COLORYELLOW,LINETHICK1;顶背离:IF((VAR2690),150,200),COLORGREEN,LINETHICK1;量能:MA(100*(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N)),N 1),COLORYELLOW,LINETHICK1;通达信CCI优化版指标公式实例图解:通达信CCI优化版指标公式。