通达信高空止损主图,卖出信号明确主图源码
TYP:=(HIGH+LOW+CLOSE)/3;
cci:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14)),COLORMAGENTA;
DIF:=(EMA(CLOSE,12)-EMA(CLOSE,26))/(0.015*AVEDEV(TYP,14)),COLORYELLOW;
DEB:=EMA(DIF*(0.015*AVEDEV(TYP,14)),9)/(0.015*AVEDEV(TYP,14)),COLORCYAN;
MacC:=(DIF-DEB)*4,COLORSTICK;
{DRAWBAND(DIF+50,RGB(200,20,20),DEB+50,RGB(60,245,60));}
CCI1:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14)),COLORMAGENTA;
大跌:=CCI<REF(CCI,1) AND DIF>REF(DIF,1) AND CCI<DIF AND DIF>100,COLORGREEN;
DRAWTEXT(大跌 AND COUNT(大跌,5)=1, H*1.02,'大跌'),COLORGREEN;
DRAWTEXT(crOSS(DEB,CCI) AND COUNT(CROSS(DEB,CCI),5)=1, H*1.06,'卖'),COLORLIBLUE;
高空:=CCI>REF(CCI,1) AND DIF>REF(DIF,1) AND CCI>DIF AND DIF>100,COLORBLUE;
DRAWTEXT(CCI>REF(CCI,1) AND DIF>REF(DIF,1) AND CCI>DIF AND DIF>100, H*1.02,'高空'),COLORBLUE;
DRAWTEXT(CROSS(CCI,DIF) AND DEB>DIF AND COUNT(CROSS(CCI,DIF),5)=1, H*1.02,'反弹卖'),COLORLIRED;
B1:=MA(C,1);
B2:=SMA(SMA(SMA(B1,2,1),2,1),2,1);
SMA2:=MA(B2,3);
停损下限:IF(LLV(MA(B2,8),3)<B2,LLV(MA(B2,8),3),B2),NODRAW;
IF(B2>SMA2,B2,DRAWNULL),COLORRED,LINETHICK4;
IF(B2<SMA2,B2,DRAWNULL),COLORGREEN,LINETHICK4;
来函数检测结果如下:
该公式没有未来函数
解密、定制、编写股票指标请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
TYP赋值:(最高价+最低价+收盘价)/3
CCI赋值:(TYP-TYP的14日简单移动平均)/(0.015*AVEDEV(TYP,14)),画洋红色
DIF赋值:(收盘价的12日指数移动平均-收盘价的26日指数移动平均)/(0.015*AVEDEV(TYP,14)),画黄色
DEB赋值:EMA(DIF*(0.015*AVEDEV(TYP,14)),9)/(0.015*AVEDEV(TYP,14)),画青色
MACC赋值:(DIF-DEB)*4,COLORSTICK
{DRAWBAND(DIF+50,RGB(200,20,20),DEB+50,RGB(60,245,60))
}
CCI1:=(TYP-TYP的14日简单移动平均)/(0.015*AVEDEV(TYP,14)),画洋红色
大跌赋值:CCI<1日前的CCI AND DIF>1日前的DIF AND CCI100,画绿色
DRAWTEXT(大跌 AND 统计5日满足大跌的天数=1, H*1.02,'大跌'),画绿色
DRAWTEXT(DEB上穿CCI AND 统计5日满足DEB上穿CCI的天数=1, H*1.06,'卖'),COLORLIBLUE
高空赋值:CCI>1日前的CCI AND DIF>1日前的DIF AND CCI>DIF AND DIF>100, 画蓝色
DRAWTEXT(CCI>1日前的CCI AND DIF>1日前的DIF AND CCI>DIF AND DIF>100, H*1.02,'高空'), 画蓝色
DRAWTEXT(CCI上穿DIF AND DEB>DIF AND 统计5日满足CCI上穿DIF的天数=1, H*1.02,'反弹卖'),COLORLIRED
B1赋值:C的1日简单移动平均
B1的2日[1日权重]移动平均
SMA2赋值:B2的3日简单移动平均
输出停损下限:IF(LLV(B2的8日简单移动平均,3)2的B2日[DRAWNULL日权重]移动平均
2的B2日[DRAWNULL日权重]移动平均