通达信自用双CCI指示公式今日保护价副图源码分享
TYP:=(HIGH+LOW+CLOSE)/3;
CCI:(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14)),COLOR00A600,LINETHICK0;
明日均线:REF(C,2)*2-REF(C,5),LINETHICK0,COLOR550055,NODRAW;
今日保护价:(REF(C,1)+REF(C,2)+O)/3,COLORC87800,NODRAW;
MACD2:=CCI;
STICKLINE((MACD2>=0),0,MACD2,1.5,1),COLOR0000AA;
STICKLINE(((MACD2>=0) AND (MACD2 < REF(MACD2,1))),0,MACD2,1.5,1),COLOR00AAFF;
STICKLINE((MACD2<0),0,MACD2,1.5,1),COLORFF7700;
STICKLINE(((MACD2<0) AND (MACD2 > REF(MACD2,1))),0,MACD2,1.5,1),COLORAA00BB;
CCI84:(TYP-MA(TYP,89))/(0.015*AVEDEV(TYP,89)),{COLOR00A600}COLORGREEN,LINETHICK1;
VAR3:=CCI84;
IF(VAR3>=REF(VAR3,1) AND VAR3>=0,VAR3,DRAWNULL),COLORRED,LINETHICK4,POINTDOT;
IF(VAR3<REF(VAR3,1),VAR3,DRAWNULL),COLORYELLOW,LINETHICK4,POINTDOT;
IF(VAR3>=REF(VAR3,1) AND VAR3<0,VAR3,DRAWNULL),COLORGREEN,LINETHICK4,POINTDOT;
来函数检测结果如下:
该公式没有未来函数
解密、定制、编写股票指标请联系QQ或微信同号:88652583
相关股票指标公式
TYP赋值:(最高价+最低价+收盘价)/3
输出CCI:(TYP-TYP的14日简单移动平均)/(0.015*AVEDEV(TYP,14)),COLOR00A600,LINETHICK0
输出明日均线:2日前的C*2-5日前的C,LINETHICK0,COLOR550055,NODRAW
输出今日保护价:(1日前的C+2日前的C+O)/3,COLORC87800,NODRAW
MACD2赋值:CCI
STICKLINE((MACD2>=0),0,MACD2,1.5,1),COLOR0000AA
STICKLINE(((MACD2>=0) AND (MACD2 < 1日前的MACD2)),0,MACD2,1.5,1),COLOR00AAFF
STICKLINE((MACD2<0),0,MACD2,1.5,1),COLORFF7700
STICKLINE(((MACD2<0) AND (MACD2 > 1日前的MACD2)),0,MACD2,1.5,1),COLORAA00BB
CCI84:(TYP-TYP的89日简单移动平均)/(0.015*AVEDEV(TYP,89)),{COLOR00A600}画绿色, 线宽为1
VAR3赋值:CCI84
IF(VAR3>=1日前的VAR3 AND VAR3>=0,VAR3,DRAWNULL),画红色, 线宽为4,POINTDOT
IF(VAR3<1日前的VAR3,VAR3,DRAWNULL),画黄色, 线宽为4,POINTDOT
IF(VAR3>=1日前的VAR3 AND VAR3<0,VAR3,DRAWNULL),画绿色, 线宽为4,POINTDOT