通达信受金老师的启发博易CCI通达信主图显示

原码奉上:
{CCI}
TT:=IF(ISLASTBAR,240/FROMOPEN,1);
NN:=120;
HH:=HHV(V*TT,NN);
LL:=LLV(V,NN);
最高:=CONST(HH);
最低:=CONST(LL);
最高2:=CONST(HHV(H,NN));
最低2:=CONST(LLV(L,NN));
PP:=IF((最高2*0.9-(最高2-最低2)*0.5)>CONST(LLV(L,20)),0.9,IF((最高2*0.9-(最高2-最低2)*0.5)>CONST(LLV(L,50)),0.7,0.6)),NODRAW;
RCC1:=最高2*0.85-(最高2-最低2)*PP;
最低3:=MIN(RCC1,最低2);
AAD:=最低3;
{CCI}
M:=14;
N:=20;
TYP := (HIGH + LOW + CLOSE)/3;
WCCI:=(TYP-MA(TYP,N))/(0.015*AVEDEV(TYP,N)),COLORWHITE,LINETHICK2;
CCI:=(TYP-MA(TYP,M))/(0.015*AVEDEV(TYP,M)),COLOR008000;
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,AAD+CCI/500,AAD,3,0),COLORFF2200;
STICKLINE(UPTREND,AAD+CCI/500,AAD,2,0),COLORFF4400;
STICKLINE(UPTREND,AAD+CCI/500,AAD,1,0),COLORFF6600;
STICKLINE(UPTREND,AAD+CCI/500,AAD,0.1,0),COLORFF8800;
{绿色}
STICKLINE(DNTREND,AAD+CCI/500,AAD,3,0),COLOR004400;
STICKLINE(DNTREND,AAD+CCI/500,AAD,2,0),COLOR008800;
STICKLINE(DNTREND,AAD+CCI/500,AAD,1,0),COLOR00AA00;
STICKLINE(DNTREND,AAD+CCI/500,AAD,0.1,0),COLOR00CC00;

{紫色}
STICKLINE(TRTREND,AAD+CCI/500,AAD,3,0),COLORFF0055;
STICKLINE(TRTREND,AAD+CCI/500,AAD,2,0),COLORFF0077;
STICKLINE(TRTREND,AAD+CCI/500,AAD,1,0),COLORFF0099;
STICKLINE(TRTREND,AAD+CCI/500,AAD,0.1,0),COLORFF00FF;

STICKLINE(NOT(UPTREND OR DNTREND OR TRTREND),AAD+CCI/500,AAD,3,0),COLOR003333;
STICKLINE(NOT(UPTREND OR DNTREND OR TRTREND),AAD+CCI/500,AAD,2,0),COLOR004444;
STICKLINE(NOT(UPTREND OR DNTREND OR TRTREND),AAD+CCI/500,AAD,2,0),COLOR005555;
STICKLINE(NOT(UPTREND OR DNTREND OR TRTREND),AAD+CCI/500,AAD,0.1,0),COLOR00FFFF;

 




来函数检测结果如下:
该公式没有未来函数

解密、定制、编写股票指标请联系QQ或微信同号:88652583
相关股票指标公式

联系我们  |  股票指标网  |  指标网   |  指标公式  |   加入收藏   |  设为主页

@2005-2023 粤ICP备2023063687号-2 股票指标网别名指标网仅为互联网文章,所有股票指标公式及文章仅供学习研究,并不构成投资建议,请勿以此为依据进行股票交易,由此引起的投资亏损与本站无关。股票指标网均来源互联网收集整理,如不慎侵犯了你的权益,请联系我们告知,我们将做删除处理
QQ:88652583 微信 88652583
sitemap站点地图