通达信能量比拟分析副图指标 个股与大盘能量比较判断强弱 源码
N:=999;
M:=120;
ZSC:IF(INBLOCK('工程修建'),"991002$CLOSE",IF(INBLOCK('电力 '),"991003$CLOSE",IF(INBLOCK('盘 算机'),"991004$CLOSE", IF(INBLOCK('电子信息'),"991006$CLOSE",IF(INBLOCK('房地产 '),"991007$CLOSE",IF(INBLOCK('纺织打扮'),"991008$CLOSE", IF(INBLOCK('钢铁'),"991009$CLOSE",IF(INBLOCK('供水供气 '),"991010$CLOSE",IF(INBLOCK('化工化纤'),"991011$CLOSE", IF(INBLOCK('电器'),"991014$CLOSE",IF(INBLOCK('交通办法 '),"991016$CLOSE",IF(INBLOCK('银行类'),"991017$CLOSE", IF(INBLOCK('旅游旅店'),"991018$CLOSE",IF(INBLOCK('煤炭煤油 '),"991019$CLOSE",IF(INBLOCK('酿酒食品'),"991020$CLOSE", IF(INBLOCK('农林牧渔'),"991021$CLOSE",IF(INBLOCK('贸易连锁 '),"991023$CLOSE",IF(INBLOCK('建材'),"991024$CLOSE", IF(INBLOCK('其他行业'),"991025$CLOSE",IF(INBLOCK('汽车类 '),"991026$CLOSE",IF(INBLOCK('机器'),"991027$CLOSE", IF(INBLOCK('医药'),"991028$CLOSE",IF(INBLOCK('外贸 '),"991031$CLOSE",IF(INBLOCK('教诲传媒'),"991032$CLOSE", IF(INBLOCK('仪电仪表'),"991033$CLOSE",IF(INBLOCK('有色金属 '),"991034$CLOSE",IF(INBLOCK('造纸印刷'),"991035$CLOSE", IF(INBLOCK('券商'),"991036$CLOSE",IF(INBLOCK('电力配置 '),"991037$CLOSE",IF(INBLOCK('通讯'),"991135$CLOSE", IF(INBLOCK('运输物流'),"991136$CLOSE",IF(INBLOCK('保险 '),"991255$CLOSE",0))))))))))))))))))))))))))))))));
ZSH:IF(INBLOCK('工程修建'),"991002$HIGH",IF(INBLOCK('电力 '),"991003$HIGH",IF(INBLOCK('盘 算机'),"991004$HIGH", IF(INBLOCK('电子信息'),"991006$HIGH",IF(INBLOCK('房地产 '),"991007$HIGH",IF(INBLOCK('纺织打扮'),"991008$HIGH", IF(INBLOCK('钢铁'),"991009$HIGH",IF(INBLOCK('供水供气 '),"991010$HIGH",IF(INBLOCK('化工化纤'),"991011$HIGH", IF(INBLOCK('电器'),"991014$HIGH",IF(INBLOCK('交通办法 '),"991016$HIGH",IF(INBLOCK('银行类'),"991017$HIGH", IF(INBLOCK('旅游旅店'),"991018$HIGH",IF(INBLOCK('煤炭煤油 '),"991019$HIGH",IF(INBLOCK('酿酒食品'),"991020$HIGH", IF(INBLOCK('农林牧渔'),"991021$HIGH",IF(INBLOCK('贸易连锁 '),"991023$HIGH",IF(INBLOCK('建材'),"991024$HIGH", IF(INBLOCK('其他行业'),"991025$HIGH",IF(INBLOCK('汽车类 '),"991026$HIGH",IF(INBLOCK('机器'),"991027$HIGH", IF(INBLOCK('医药'),"991028$HIGH",IF(INBLOCK('外贸 '),"991031$HIGH",IF(INBLOCK('教诲传媒'),"991032$HIGH", IF(INBLOCK('仪电仪表'),"991033$HIGH",IF(INBLOCK('有色金属 '),"991034$HIGH",IF(INBLOCK('造纸印刷'),"991035$HIGH", IF(INBLOCK('券商'),"991036$HIGH",IF(INBLOCK('电力配置 '),"991037$HIGH",IF(INBLOCK('通讯'),"991135$HIGH", IF(INBLOCK('运输物流'),"991136$HIGH",IF(INBLOCK('保险 '),"991255$HIGH",0))))))))))))))))))))))))))))))));
ZSL:IF(INBLOCK('工程修建'),"991002$LOW",IF(INBLOCK('电力 '),"991003$LOW",IF(INBLOCK('盘 算机'),"991004$LOW", IF(INBLOCK('电子信息'),"991006$LOW",IF(INBLOCK('房地产 '),"991007$LOW",IF(INBLOCK('纺织打扮'),"991008$LOW", IF(INBLOCK('钢铁'),"991009$LOW",IF(INBLOCK('供水供气 '),"991010$LOW",IF(INBLOCK('化工化纤'),"991011$LOW", IF(INBLOCK('电器'),"991014$LOW",IF(INBLOCK('交通办法 '),"991016$LOW",IF(INBLOCK('银行类'),"991017$LOW", IF(INBLOCK('旅游旅店'),"991018$LOW",IF(INBLOCK('煤炭煤油 '),"991019$LOW",IF(INBLOCK('酿酒食品'),"991020$LOW", IF(INBLOCK('农林牧渔'),"991021$LOW",IF(INBLOCK('贸易连锁 '),"991023$LOW",IF(INBLOCK('建材'),"991024$LOW", IF(INBLOCK('其他行业'),"991025$LOW",IF(INBLOCK('汽车类 '),"991026$LOW",IF(INBLOCK('机器'),"991027$LOW", IF(INBLOCK('医药'),"991028$LOW",IF(INBLOCK('外贸'),"991031$LOW",IF(INBLOCK(' 教诲传媒'),"991032$LOW", IF(INBLOCK('仪电仪表'),"991033$LOW",IF(INBLOCK('有色金属 '),"991034$LOW",IF(INBLOCK('造纸印刷'),"991035$LOW", IF(INBLOCK('券商'),"991036$LOW",IF(INBLOCK('电力配置 '),"991037$LOW",IF(INBLOCK('通讯'),"991135$LOW", IF(INBLOCK('运输物流'),"991136$LOW",IF(INBLOCK('保险 '),"991255$LOW",0))))))))))))))))))))))))))))))));
VAR12:=(HHV(HIGH,34)-CLOSE)/(HHV(HIGH,34)-LLV(LOW,34))*100;
能量线:SMA(VAR12,3,1)*(-1)+100,COLORRED,LINETHICK2;
KNX:=SMA(VAR12,3,1);
MK:=MA(KNX,M);
买点:IF(KNX>N AND CROSS(MK,KNX),50,0),COLORWHITE,LINETHICK1;
VAR13:=(HHV(ZSH,34)-ZSC)/(HHV(ZSH,34)-LLV(ZSL,34))*100;
行业线:SMA(VAR13,3,1)*(-1)+100,COLORGREEN,LINETHICK1;
VAR11:=(HHV(INDEXH,34)-INDEXC)/(HHV(INDEXH,34)-LLV(INDEXL,34))*100;
大盘线:SMA(VAR11,3,1)*(-1)+100,COLORYELLOW,LINETHICK1;
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
N赋值:999
M赋值:120
输出ZSC:IF(INBLOCK('工程修建'),"991002$收盘价",IF(INBLOCK('电力 '),"991003$收盘价",IF(INBLOCK('盘 算机'),"991004$收盘价", IF(INBLOCK('电子信息'),"991006$收盘价",IF(INBLOCK('房地产 '),"991007$收盘价",IF(INBLOCK('纺织打扮'),"991008$收盘价", IF(INBLOCK('钢铁'),"991009$收盘价",IF(INBLOCK('供水供气 '),"991010$收盘价",IF(INBLOCK('化工化纤'),"991011$收盘价", IF(INBLOCK('电器'),"991014$收盘价",IF(INBLOCK('交通办法 '),"991016$收盘价",IF(INBLOCK('银行类'),"991017$收盘价", IF(INBLOCK('旅游旅店'),"991018$收盘价",IF(INBLOCK('煤炭煤油 '),"991019$收盘价",IF(INBLOCK('酿酒食品'),"991020$收盘价", IF(INBLOCK('农林牧渔'),"991021$收盘价",IF(INBLOCK('贸易连锁 '),"991023$收盘价",IF(INBLOCK('建材'),"991024$收盘价", IF(INBLOCK('其他行业'),"991025$收盘价",IF(INBLOCK('汽车类 '),"991026$收盘价",IF(INBLOCK('机器'),"991027$收盘价", IF(INBLOCK('医药'),"991028$收盘价",IF(INBLOCK('外贸 '),"991031$收盘价",IF(INBLOCK('教诲传媒'),"991032$收盘价", IF(INBLOCK('仪电仪表'),"991033$收盘价",IF(INBLOCK('有色金属 '),"991034$收盘价",IF(INBLOCK('造纸印刷'),"991035$收盘价", IF(INBLOCK('券商'),"991036$收盘价",IF(INBLOCK('电力配置 '),"991037$收盘价",IF(INBLOCK('通讯'),"991135$收盘价", IF(INBLOCK('运输物流'),"991136$收盘价",IF(INBLOCK('保险 '),"991255$收盘价",0))))))))))))))))))))))))))))))))
输出ZSH:IF(INBLOCK('工程修建'),"991002$最高价",IF(INBLOCK('电力 '),"991003$最高价",IF(INBLOCK('盘 算机'),"991004$最高价", IF(INBLOCK('电子信息'),"991006$最高价",IF(INBLOCK('房地产 '),"991007$最高价",IF(INBLOCK('纺织打扮'),"991008$最高价", IF(INBLOCK('钢铁'),"991009$最高价",IF(INBLOCK('供水供气 '),"991010$最高价",IF(INBLOCK('化工化纤'),"991011$最高价", IF(INBLOCK('电器'),"991014$最高价",IF(INBLOCK('交通办法 '),"991016$最高价",IF(INBLOCK('银行类'),"991017$最高价", IF(INBLOCK('旅游旅店'),"991018$最高价",IF(INBLOCK('煤炭煤油 '),"991019$最高价",IF(INBLOCK('酿酒食品'),"991020$最高价", IF(INBLOCK('农林牧渔'),"991021$最高价",IF(INBLOCK('贸易连锁 '),"991023$最高价",IF(INBLOCK('建材'),"991024$最高价", IF(INBLOCK('其他行业'),"991025$最高价",IF(INBLOCK('汽车类 '),"991026$最高价",IF(INBLOCK('机器'),"991027$最高价", IF(INBLOCK('医药'),"991028$最高价",IF(INBLOCK('外贸 '),"991031$最高价",IF(INBLOCK('教诲传媒'),"991032$最高价", IF(INBLOCK('仪电仪表'),"991033$最高价",IF(INBLOCK('有色金属 '),"991034$最高价",IF(INBLOCK('造纸印刷'),"991035$最高价", IF(INBLOCK('券商'),"991036$最高价",IF(INBLOCK('电力配置 '),"991037$最高价",IF(INBLOCK('通讯'),"991135$最高价", IF(INBLOCK('运输物流'),"991136$最高价",IF(INBLOCK('保险 '),"991255$最高价",0))))))))))))))))))))))))))))))))
输出ZSL:IF(INBLOCK('工程修建'),"991002$最低价",IF(INBLOCK('电力 '),"991003$最低价",IF(INBLOCK('盘 算机'),"991004$最低价", IF(INBLOCK('电子信息'),"991006$最低价",IF(INBLOCK('房地产 '),"991007$最低价",IF(INBLOCK('纺织打扮'),"991008$最低价", IF(INBLOCK('钢铁'),"991009$最低价",IF(INBLOCK('供水供气 '),"991010$最低价",IF(INBLOCK('化工化纤'),"991011$最低价", IF(INBLOCK('电器'),"991014$最低价",IF(INBLOCK('交通办法 '),"991016$最低价",IF(INBLOCK('银行类'),"991017$最低价", IF(INBLOCK('旅游旅店'),"991018$最低价",IF(INBLOCK('煤炭煤油 '),"991019$最低价",IF(INBLOCK('酿酒食品'),"991020$最低价", IF(INBLOCK('农林牧渔'),"991021$最低价",IF(INBLOCK('贸易连锁 '),"991023$最低价",IF(INBLOCK('建材'),"991024$最低价", IF(INBLOCK('其他行业'),"991025$最低价",IF(INBLOCK('汽车类 '),"991026$最低价",IF(INBLOCK('机器'),"991027$最低价", IF(INBLOCK('医药'),"991028$最低价",IF(INBLOCK('外贸'),"991031$最低价",IF(INBLOCK(' 教诲传媒'),"991032$最低价", IF(INBLOCK('仪电仪表'),"991033$最低价",IF(INBLOCK('有色金属 '),"991034$最低价",IF(INBLOCK('造纸印刷'),"991035$最低价", IF(INBLOCK('券商'),"991036$最低价",IF(INBLOCK('电力配置 '),"991037$最低价",IF(INBLOCK('通讯'),"991135$最低价", IF(INBLOCK('运输物流'),"991136$最低价",IF(INBLOCK('保险 '),"991255$最低价",0))))))))))))))))))))))))))))))))
VAR12赋值:(34日内最高价最高值-收盘价)/(34日内最高价最高值-34日内最低价最低值)*100
VAR12的3日[1日权重]移动平均
VAR12的3日[1日权重]移动平均
MK:=KNX的M日简单移动平均
输出买点:IF(KNX>N AND MK上穿KNX,50,0),画白色,LINETHICK1
VAR13赋值:(34日内ZSH最高值-ZSC)/(34日内ZSH最高值-34日内ZSL最低值)*100
VAR13的3日[1日权重]移动平均
VAR11赋值:(34日内INDEXH最高值-INDEXC)/(34日内INDEXH最高值-34日内INDEXL最低值)*100
VAR11的3日[1日权重]移动平均