通达信双周期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 AND VAR7T<200,10,0);
VAR9T:=IF(VAR6T<=-150 AND VAR6T>-200 AND VAR7T<=-150 AND VAR7T>-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 AND VAR6T<=-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;
DRAWICON(COUNT(CROSS(2,预警系统),15)>=1 AND CROSS(100,CCI14),100,2);
DRAWICON(COUNT(CROSS(预警系统,-2),15)>=1 AND CROSS(CCI14,0),-100,1);
350,COLOR004400,POINTDOT;
220,COLORMAGENTA,POINTDOT;
水面:100,COLORGRAY;
0,COLORLICYAN,POINTDOT;
-100,POINTDOT,COLORYELLOW;
-220,COLORBLUE,POINTDOT;
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
TYP赋值:(最高价+最低价+收盘价)/3
输出
CCI84:(TYP-TYP的84日简单移动平均)/(0.015*AVEDEV(TYP,84)),COLORLICYAN
DRAWBAND(100,RGB(0,50,50),CCI84,RGB(100,10,0))
输出
CCI14:(TYP-TYP的14日简单移动平均)/(0.015*AVEDEV(TYP,14)),COLORLIRED
主力资金线赋值:((收盘价-收盘价的6日简单移动平均)/收盘价的6日简单移动平均*100+(收盘价-收盘价的24日简单移动平均)/收盘价的24日简单移动平均*100+(收盘价-收盘价的32日简单移动平均)/收盘价的32日简单移动平均*100)/3
VAR2LL赋值:10日内主力资金线>20最高值
STICKLINE(VAR2LL AND CROSS((1日前的最高价+1日前的最低价)/2,收盘价的20日简单移动平均+2*收盘价的20估算标准差),CCI14,100,1,0),COLORBROWN
输出{危险:}
VAR1T赋值:MA(100*(收盘价-34日内收盘价最低值)/(34日内最高价最高值-34日内最低价最低值),5)-20
VAR2T赋值:2*VAR1T的绝对值
{股票指标网}
VAR5T赋值:(最高价+最低价+收盘价)/3
VAR6T赋值:(VAR5T-VAR5T的14日简单移动平均)/(0.015*AVEDEV(VAR5T,14))
VAR7T赋值:(VAR5T-VAR5T的70日简单移动平均)/(0.015*AVEDEV(VAR5T,70))
如果VAR6T>=150 AND VAR6T<200 AND VAR7T>=150 AND VAR7T<200返回10否则返回0
如果VAR6T<=-150 AND VAR6T>-200 AND VAR7T<=-150 AND VAR7T>-200返回-10否则返回VAR8T
VARAT赋值:(收盘价-收盘价的13日简单移动平均)/收盘价的13日简单移动平均*100
VARBT赋值:100-VARAT的绝对值
预警系统赋值:IF(VAR7T>=200 AND VAR6T>=150,100,IF(VAR7T<=-200 AND VAR6T<=-150,-100,VAR9T))+0
DRAWBAND(预警系统,RGB(10,100,10),0,RGB(100,10,0))
如果VARBT<90返回VARBT否则返回60
如果VAR1T>0返回VAR1T否则返回0
VAR24赋值:红军>48 AND 预警系统>60 AND 天线<100
DRAWICON(统计15日满足2上穿预警系统的天数>=1 AND 100上穿CCI14,100,2)
DRAWICON(统计15日满足预警系统上穿-2的天数>=1 AND CCI14上穿0,-100,1)
350,COLOR004400,POINTDOT
220,画洋红色,POINTDOT
输出
水面:100,COLORGRAY
0,COLORLICYAN,POINTDOT
-100,POINTDOT,画黄色
-220, 画蓝色,POINTDOT