drawgbk(close>0,colorrgb(120,154,127),colorrgb(120,154,127),0);
mm:=if(datatype=1,m,if(datatype=2,m,if(datatype=3,m,if(datatype=4,m,if(datatype=5,m,if(datatype=6,q,if(datatype=7,q,if(datatype=8,q,0))))))));
avg:=(high+low+close)/3;
cci:=(avg-ma(avg,mm))/(0.015*avedev(avg,mm));
dif:cci-ref(cci,1),linethick0,colorff00;
前差值:abs(ref(cci,1)-ref(cci,2)),linethick0;
差值20:if(dif>15 and dif<120,dif,0),linethick0,colorff;
200,linedot,colorffff00;
-200,linedot,colorffff00;
100,linedot,colorffff00;
-100,linedot,colorffff00;
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_ema34-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_lsma25)/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,3,0),colorff0000;
stickline(dntrend,0,cci,3,0),colorff;
stickline(trtrend,0,cci,3,0),colorffff;
stickline(not(uptrend or dntrend or trtrend),0,cci,3,0),color808080;
wcci:cci,linethick2,color10000;
tcci:(avg-ma(avg,n))/(0.015*avedev(avg,n)),color80;
stickline(angle_ema34>=5,-301,-321,8,0),colord0e040;
stickline(angle_ema34<5 and angle_ema34>=3.57,-301,-321,8,0),color6400;
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),colorff00;
stickline(angle_ema34<0.71 and angle_ema34>-0.71,-301,-321,8,0),colorffff;
stickline(angle_ema34<=-0.71 and angle_ema34>-2.14,-301,-321,8,0),colore0ffff;
stickline(angle_ema34<=-2.14 and angle_ema34>-3.57,-301,-321,8,0),colora5ff;
stickline(angle_ema34<=-3.57 and angle_ema34>-5,-301,-321,8,0),colorff;
stickline(angle_ema34<=-5,-301,-321,8,0),color8b;
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),colorff00;
stickline(abs(sw)=1,301,321,8,0),colorffff;
stickline(abs(sw)=0,301,321,8,0),colorff;
partline(close>lsma25,0),linethick3,colorff00;
partline(close<lsma25,0),linethick3,colorff;
partline(close=lsma25,0),linethick3,colorffff;
drawicon(abs(cci)>=200,cci,12);
tm:=if(datatype=1,1,if(datatype=2,5,if(datatype=3,15,if(datatype=4,30,if(datatype=5,60,240)))));
alert1:=if(datatype=1,10,if(datatype=2,34,if(datatype=3,100,if(datatype=4,180,if(datatype=5,300,600)))));
timeframe:=tm;
alert:=alert1;
stime:=timetot0(currenttime);
sstime:=timeframe*60-mod(stime,timeframe*60);
sstep:=300/timeframe/60;
stickline(islastbar,0,300,6,1),shift2,color10000;
stickline(islastbar and sstime>alert,300,sstime*sstep,6,0),shift2,colorffff00;
stickline(islastbar and sstime<alert,300,sstime*sstep,6,0),shift2,colorff;
drawnumber(islastbar,300,timeframe*60,0),shift3;
drawnumber(islastbar,sstime*sstep,sstime,0),shift3;
drawnumber(islastbar,alert*sstep,alert,0),shift3;
stickline(islastbar,0,0,6,1),shift6,color10000;
drawnumber(islastbar,-20,-ref(cci,1)+cci,3),shift3;
大庆老杨、指标区班长、老师:(改成通达信源码:)
通达信的。最后少部分因时间转换函数,舍去了:
m:=14;n:=6;q:=20;
mm:=if(period=0,m,if(period=1,m,if(period=2,m,if(period=3,m,if(period=4,
m,if(period=5,q,if(period=6,q,if(period=7,q,0))))))));
avg:=(high+low+close)/3;
cci:=(avg-ma(avg,mm))/(0.015*avedev(avg,mm));
dif:cci-ref(cci,1),linethick0;
前差值:abs(ref(cci,1)-ref(cci,2)),linethick0;
差值20:if(dif>15 and dif<120,dif,0),linethick0;
200,colorffff00;
-200,colorffff00;
100,colorffff00;
-100,colorffff00;
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_ema34-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_lsma25)/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,3,0),colorff0000;
stickline(dntrend,0,cci,3,0),colorff00ff;
stickline(trtrend,0,cci,3,0),colorfffff0;
stickline(not(uptrend or dntrend or trtrend),0,cci,3,0),color808080;
wcci:cci,colorf00ff0,linethick2;
tcci:(avg-ma(avg,n))/(0.015*avedev(avg,n));
stickline(angle_ema34>=5,-301,-321,8,0),colord0e040;
stickline(angle_ema34<5 and angle_ema34>=3.57,-301,-321,8,0),colorff6400;
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),colorff00ff;
stickline(angle_ema34<0.71 and angle_ema34>-0.71,-301,-321,8,0),colorfff00f;
stickline(angle_ema34<=-0.71 and angle_ema34>-2.14,-301,-321,8,0),colore0ffff;
stickline(angle_ema34<=-2.14 and angle_ema34>-3.57,-301,-321,8,0),colora5ff00;
stickline(angle_ema34<=-3.57 and angle_ema34>-5,-301,-321,8,0);
stickline(angle_ema34<=-5,-301,-321,8,0),color8b0000;
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),colorff0088;
stickline(abs(sw)=1,301,321,8,0),colorffff88;
stickline(abs(sw)=0,301,321,8,0),colorff8800;
if(close>lsma25,0,drawnull),linethick3,colorff0099;
if(close<lsma25,0,drawnull),linethick3,colorff6666;
if(close=lsma25,0,drawnull),linethick3,colorffff66;
drawicon(abs(cci)>=200,cci,12);
{tm:=if(period=0,1,if(period=1,5,if(period=2,15,if(period=3,30,if(period=4,60,240)))));
alert1:=if(period=0,10,if(period=1,34,if(period=2,100,if(period=3,180,if(period=4,300,600)))));}
上一指标公式:精准线高量柱止损线单阳不破主题投资组合主图指标下载 通达信附图止损
下一指标公式:倍量双子星均线组合图主图指标下载 通达信均线附图
☉ 好公式网发布的指标公式主要用于软件技术面分析,仅供参考,勿用于实际操作,据此操作风险自负!
☉ 解压密码:www.goodgongshi.com 就是好公式网域名,希望大家看清楚,切勿输错。
☉ tnc和tni格式指标公式,仅可以用通达信软件引入使用,例如可以用通达信软件引入使用指标公式;
☉ tne格式指标公式,仅可以用通达信软件公式编辑器5.0版导入,高版本兼容低版本;
☉ fnc格式指标公式,可以用大智慧软件新一代高速行情分析系统股票软件使用,少部分可以用分析家软件引入使用;
☉ alg格式指标公式,仅仅可以用飞狐交易师软件引入使用;exp格式指标公式,仅可以用大智慧经典版软件引入使用;
☉ hxf格式指标公式,仅可以用同花顺软件引入使用。
☉ 如果您发现下载软件链接错误,请联系管理员报告错误。
☉ 好公式网欢迎各位网友帮忙宣传转发本站网址,有您的支持,我们会做得更好!
☉ 本文供大家交流学习的伍德CCI副图指标下载 通达信源码指标仅供学习研究。