通达信★超跌一击★ 源码
HJ_1:=REF(CLOSE,1);
HJ_2:=SMA(MAX(CLOSE-HJ_1,0),6,1)/SMA(ABS(CLOSE-HJ_1),6,1)*100;
HJ_3:=SUM(HIGH-OPEN,26)/SUM(OPEN-LOW,26)*100;
HJ_4:=CROSS(85,HJ_2)*30;
HJ_5:=SMA(MAX(CLOSE-HJ_1,0),7,1)/SMA(ABS(CLOSE-HJ_1),7,1)*100;
HJ_6:=SMA(MAX(CLOSE-HJ_1,0),13,1)/SMA(ABS(CLOSE-HJ_1),13,1)*100;
HJ_7:=BARSCOUNT(CLOSE);
HJ_8:=CROSS(HJ_2,25);
HJ_9:=EMA((CLOSE-MA(CLOSE,7))/MA(CLOSE,7)*480,2)*5;
HJ_10:=EMA((CLOSE-MA(CLOSE,11))/MA(CLOSE,11)*480,7)*5;
HJ_11:=CROSS(HJ_9,HJ_10) AND HJ_9<(-100);
HJ_12:=FILTER(COUNT(HJ_8 OR HJ_11,3)>=2,3);
超跌一击:(HJ_5<20 AND HJ_6<25 AND HJ_7>50 AND HJ_3<70 AND HJ_9<(-130))*300,COLOR37D42B;
HJ_13:=KDJ.J#MONTH;
HJ_14:=KDJ.J#WEEK;
HJ_15:=KDJ.J;
{股票指标网}
HJ_16:=IF(CROSS(HJ_15,0),300,0);
中线买点:IF(CROSS(HJ_14,0),200,0),COLORRED,LINETHICK2;
长线买点:IF(CROSS(HJ_13,0),300,0),COLORMAGENTA,LINETHICK2;
DRAWICON(中线买点 AND HJ_16,5,15);
DRAWICON(中线买点 AND 长线买点,8,11);
DRAWICON(HJ_16 AND 长线买点,13,17);
HJ_17:=(HIGH+LOW+CLOSE)/3;
CCI:EMA((HJ_17-MA(HJ_17,36.027))/(0.015*AVEDEV(HJ_17,36.027)),2),COLORWHITE;
STICKLINE(CCI<(-150),CCI,(-150),2.5,0),COLORRED;
STICKLINE(CLOSE>0,(-150),(-151),2.5,0),COLORBLUE;
STICKLINE(CLOSE>0,150,151,2.5,0),COLORBLUE;
STICKLINE(CLOSE>0,100,100,2.5,0),COLORYELLOW;
STICKLINE(CLOSE>0,(-100),(-100),2.5,0),COLORYELLOW;
STICKLINE(CLOSE>0,0,0,2.5,0),COLORRED;
主力潜伏:COUNT(MACD.DIF<0,10)=10,NODRAW,COLORRED;
STICKLINE(主力潜伏,0,MACD.DIF*200,10,0),COLORRED;
STICKLINE(CCI<(-100),CCI,(-100),1,0),COLORMAGENTA;
(-100);{股票指标网}
(-100),STICK,COLORYELLOW;
DRAWTEXT_FIX(1,0.88,5,0,40),COLOR889999;
{-----------------------------------}
未来函数检测结果如下:
该公式包含未来函数:#MONTH
该公式包含未来函数:#WEEK
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
HJ_1赋值:1日前的收盘价
HJ_2赋值:SMA(收盘价-HJ_1和0较大值,6,1)/SMA(收盘价-HJ_1的绝对值,6,1)*100
HJ_3赋值:26的最高价-开盘价日累和/26的开盘价-最低价日累和*100
HJ_4赋值:85上穿HJ_2*30
HJ_5赋值:SMA(收盘价-HJ_1和0较大值,7,1)/SMA(收盘价-HJ_1的绝对值,7,1)*100
HJ_6赋值:SMA(收盘价-HJ_1和0较大值,13,1)/SMA(收盘价-HJ_1的绝对值,13,1)*100
HJ_7赋值:收盘价的有效数据周期数
HJ_8赋值:HJ_2上穿25
HJ_9赋值:EMA((收盘价-MA(收盘价,7))/MA(收盘价,7)*480,2)*5
HJ_10:=EMA((收盘价-MA(收盘价,11))/MA(收盘价,11)*480,7)*5
HJ_11:=HJ_9上穿HJ_10 AND HJ_9<(-100)
HJ_12:=FILTER(统计3日满足HJ_8 OR HJ_11的天数>=2,3)
输出
超跌一击:(HJ_5<20 AND HJ_6<25 AND HJ_7>50 AND HJ_3<70 AND HJ_9<(-130))*300,COLOR37D42B
HJ_13:=KDJ.J#MONTH
HJ_14:=KDJ.J#WEEK
HJ_15:=KDJ.J
{股票指标网}
HJ_16:=IF(HJ_15上穿0,300,0)
输出
中线买点:IF(HJ_14上穿0,200,0),画红色, 线宽为2
输出
长线买点:IF(HJ_13上穿0,300,0),画洋红色, 线宽为2
当满足条件中线买点 AND HJ_16时,在5和15之间画图标
当满足条件中线买点 AND 长线买点时,在8和11之间画图标
当满足条件HJ_16 AND 长线买点时,在13和17之间画图标
HJ_17:=(最高价+最低价+收盘价)/3
输出
CCI:EMA((HJ_17-MA(HJ_17,36.027))/(0.015*AVEDEV(HJ_17,36.027)),2),画白色
STICKLINE(CCI<(-150),CCI,(-150),2.5,0),画红色
STICKLINE(收盘价>0,(-150),(-151),2.5,0), 画蓝色
当满足条件收盘价>0时,在150和151之间画柱状线
当满足条件收盘价>0时,在100和100之间画柱状线
STICKLINE(收盘价>0,(-100),(-100),2.5,0),画黄色
当满足条件收盘价>0时,在0和0之间画柱状线
输出
主力潜伏:统计10日满足MACD.DIF<0的天数=10,NODRAW,画红色
当满足条件主力潜伏时,在0和MACD.DIF*200之间画柱状线
STICKLINE(CCI<(-100),CCI,(-100),1,0),画洋红色
(-100)
{股票指标网}
(-100),STICK,画黄色
当满足条件1时,在横轴0.88纵轴5位置书写文字
{-----------------------------------}