ihzx 发表于 2021-8-21 14:01:54

大智慧能量对比分析指标公式

<p>本公式有3条线:个股能量线(红色)、大盘能量线(黄色)和行业能量线(绿色),如果行业线在大盘线之上,且能量线上穿行业线或大盘线时为买入点;如果配合公式的买点信号(白色),便得到捕捉龙头股的最佳点!!<br />
公式源码如下:</p>
<p>INPUT:N(70,1,999),M(5,1,120);<br />
ZSC:=IF(INBLOCK('工程建筑'),&quot;991002$CLOSE&quot;,IF(INBLOCK('电力 '),&quot;991003$CLOSE&quot;,IF(INBLOCK('计算机'),&quot;991004$CLOSE&quot;,<br />
IF(INBLOCK('电子信息'),&quot;991006$CLOSE&quot;,IF(INBLOCK('房地产 '),&quot;991007$CLOSE&quot;,IF(INBLOCK('纺织服装'),&quot;991008$CLOSE&quot;,<br />
IF(INBLOCK('钢铁'),&quot;991009$CLOSE&quot;,IF(INBLOCK('供水供气 '),&quot;991010$CLOSE&quot;,IF(INBLOCK('化工化纤'),&quot;991011$CLOSE&quot;,<br />
IF(INBLOCK('电器'),&quot;991014$CLOSE&quot;,IF(INBLOCK('交通设施 '),&quot;991016$CLOSE&quot;,IF(INBLOCK('银行类'),&quot;991017$CLOSE&quot;,<br />
IF(INBLOCK('旅游酒店'),&quot;991018$CLOSE&quot;,IF(INBLOCK('煤炭石油 '),&quot;991019$CLOSE&quot;,IF(INBLOCK('酿酒食品'),&quot;991020$CLOSE&quot;,<br />
IF(INBLOCK('农林牧渔'),&quot;991021$CLOSE&quot;,IF(INBLOCK('商业连锁 '),&quot;991023$CLOSE&quot;,IF(INBLOCK('建材'),&quot;991024$CLOSE&quot;,<br />
IF(INBLOCK('其他行业'),&quot;991025$CLOSE&quot;,IF(INBLOCK('汽车类 '),&quot;991026$CLOSE&quot;,IF(INBLOCK('机械'),&quot;991027$CLOSE&quot;,<br />
IF(INBLOCK('医药'),&quot;991028$CLOSE&quot;,IF(INBLOCK('外贸 '),&quot;991031$CLOSE&quot;,IF(INBLOCK('教育传媒'),&quot;991032$CLOSE&quot;,<br />
IF(INBLOCK('仪电仪表'),&quot;991033$CLOSE&quot;,IF(INBLOCK('有色金属 '),&quot;991034$CLOSE&quot;,IF(INBLOCK('造纸印刷'),&quot;991035$CLOSE&quot;,<br />
IF(INBLOCK('券商'),&quot;991036$CLOSE&quot;,IF(INBLOCK('电力设备 '),&quot;991037$CLOSE&quot;,IF(INBLOCK('通信'),&quot;991135$CLOSE&quot;,<br />
IF(INBLOCK('运输物流'),&quot;991136$CLOSE&quot;,IF(INBLOCK('保险 '),&quot;991255$CLOSE&quot;,0))))))))))))))))))))))))))))))));<br />
ZSH:=IF(INBLOCK('工程建筑'),&quot;991002$HIGH&quot;,IF(INBLOCK('电力 '),&quot;991003$HIGH&quot;,IF(INBLOCK('计算机'),&quot;991004$HIGH&quot;,<br />
IF(INBLOCK('电子信息'),&quot;991006$HIGH&quot;,IF(INBLOCK('房地产 '),&quot;991007$HIGH&quot;,IF(INBLOCK('纺织服装'),&quot;991008$HIGH&quot;,<br />
IF(INBLOCK('钢铁'),&quot;991009$HIGH&quot;,IF(INBLOCK('供水供气 '),&quot;991010$HIGH&quot;,IF(INBLOCK('化工化纤'),&quot;991011$HIGH&quot;,<br />
IF(INBLOCK('电器'),&quot;991014$HIGH&quot;,IF(INBLOCK('交通设施 '),&quot;991016$HIGH&quot;,IF(INBLOCK('银行类'),&quot;991017$HIGH&quot;,<br />
IF(INBLOCK('旅游酒店'),&quot;991018$HIGH&quot;,IF(INBLOCK('煤炭石油 '),&quot;991019$HIGH&quot;,IF(INBLOCK('酿酒食品'),&quot;991020$HIGH&quot;,<br />
IF(INBLOCK('农林牧渔'),&quot;991021$HIGH&quot;,IF(INBLOCK('商业连锁 '),&quot;991023$HIGH&quot;,IF(INBLOCK('建材'),&quot;991024$HIGH&quot;,<br />
IF(INBLOCK('其他行业'),&quot;991025$HIGH&quot;,IF(INBLOCK('汽车类 '),&quot;991026$HIGH&quot;,IF(INBLOCK('机械'),&quot;991027$HIGH&quot;,<br />
IF(INBLOCK('医药'),&quot;991028$HIGH&quot;,IF(INBLOCK('外贸 '),&quot;991031$HIGH&quot;,IF(INBLOCK('教育传媒'),&quot;991032$HIGH&quot;,<br />
IF(INBLOCK('仪电仪表'),&quot;991033$HIGH&quot;,IF(INBLOCK('有色金属 '),&quot;991034$HIGH&quot;,IF(INBLOCK('造纸印刷'),&quot;991035$HIGH&quot;,<br />
IF(INBLOCK('券商'),&quot;991036$HIGH&quot;,IF(INBLOCK('电力设备 '),&quot;991037$HIGH&quot;,IF(INBLOCK('通信'),&quot;991135$HIGH&quot;,<br />
IF(INBLOCK('运输物流'),&quot;991136$HIGH&quot;,IF(INBLOCK('保险 '),&quot;991255$HIGH&quot;,0))))))))))))))))))))))))))))))));<br />
ZSL:=IF(INBLOCK('工程建筑'),&quot;991002$LOW&quot;,IF(INBLOCK('电力 '),&quot;991003$LOW&quot;,IF(INBLOCK('计算机'),&quot;991004$LOW&quot;,<br />
IF(INBLOCK('电子信息'),&quot;991006$LOW&quot;,IF(INBLOCK('房地产 '),&quot;991007$LOW&quot;,IF(INBLOCK('纺织服装'),&quot;991008$LOW&quot;,<br />
IF(INBLOCK('钢铁'),&quot;991009$LOW&quot;,IF(INBLOCK('供水供气 '),&quot;991010$LOW&quot;,IF(INBLOCK('化工化纤'),&quot;991011$LOW&quot;,<br />
IF(INBLOCK('电器'),&quot;991014$LOW&quot;,IF(INBLOCK('交通设施 '),&quot;991016$LOW&quot;,IF(INBLOCK('银行类'),&quot;991017$LOW&quot;,<br />
IF(INBLOCK('旅游酒店'),&quot;991018$LOW&quot;,IF(INBLOCK('煤炭石油 '),&quot;991019$LOW&quot;,IF(INBLOCK('酿酒食品'),&quot;991020$LOW&quot;,<br />
IF(INBLOCK('农林牧渔'),&quot;991021$LOW&quot;,IF(INBLOCK('商业连锁 '),&quot;991023$LOW&quot;,IF(INBLOCK('建材'),&quot;991024$LOW&quot;,<br />
IF(INBLOCK('其他行业'),&quot;991025$LOW&quot;,IF(INBLOCK('汽车类 '),&quot;991026$LOW&quot;,IF(INBLOCK('机械'),&quot;991027$LOW&quot;,<br />
IF(INBLOCK('医药'),&quot;991028$LOW&quot;,IF(INBLOCK('外贸'),&quot;991031$LOW&quot;,IF(INBLOCK(' 教育传媒'),&quot;991032$LOW&quot;,<br />
IF(INBLOCK('仪电仪表'),&quot;991033$LOW&quot;,IF(INBLOCK('有色金属 '),&quot;991034$LOW&quot;,IF(INBLOCK('造纸印刷'),&quot;991035$LOW&quot;,<br />
IF(INBLOCK('券商'),&quot;991036$LOW&quot;,IF(INBLOCK('电力设备 '),&quot;991037$LOW&quot;,IF(INBLOCK('通信'),&quot;991135$LOW&quot;,<br />
IF(INBLOCK('运输物流'),&quot;991136$LOW&quot;,IF(INBLOCK('保险 '),&quot;991255$LOW&quot;,0))))))))))))))))))))))))))))))));<br />
Var12:=(HHV(HIGH,34)-CLOSE)/(HHV(HIGH,34)-LLV(LOW,34))*100;<br />
能量线:SMA(Var12,3,1)*(-1)+100,colorRED,linethick2;<br />
KNX:=SMA(Var12,3,1);<br />
MK:=MA(KNX,M);<br />
买点:IF(KNX&gt;N AND CROSS(MK , KNX),50,0),COLORWHITE,LINETHICK1;<br />
Var13:=(HHV(ZSH,34)-ZSC)/(HHV(ZSH,34)-LLV(ZSL,34))*100;<br />
行业线:SMA(Var13,3,1)*(-1)+100,colorgreen,linethick1;<br />
Var11:=(HHV(INDEXH,34)-INDEXC)/(HHV(INDEXH,34)-LLV(INDEXL,34))*100;<br />
大盘线:SMA(Var11,3,1)*(-1)+100,colorYELLOW,linethick1;<br />
板块:=IFS(INBLOCK('工程建筑'),'工程建筑',IFS(INBLOCK('电力'),'电力',IFS(INBLOCK('计算机 '),'计算机',IFS(INBLOCK('电子信息'),'电子信息',<br />
IFS(INBLOCK('房地产'),'房地产',IFS(INBLOCK('纺织服装'),'纺织服装',IFS(INBLOCK('钢铁'),'钢铁',IFS(INBLOCK('供水供气'),'供水供气',<br />
IFS(INBLOCK('化工化纤'),'化工化纤',IFS(INBLOCK('电器'),'电器',IFS(INBLOCK('交通设施'),'交通设施',IFS(INBLOCK('银行类'),'银行类',<br />
IFS(INBLOCK('旅游酒店'),'旅游酒店',IFS(INBLOCK('煤炭石油'),'煤炭石油',IFS(INBLOCK('酿酒食品 '),'酿酒食品',IFS(INBLOCK('农林牧渔'),'农林牧渔',<br />
IFS(INBLOCK('商业连锁'),'商业连锁',IFS(INBLOCK('建材'),'建材',IFS(INBLOCK('其他行业'),'其他行业',IFS(INBLOCK('汽车类'),'汽车类',<br />
IFS(INBLOCK('机械'),'机械',IFS(INBLOCK('医药'),'医药',IFS(INBLOCK('外贸'),'外贸 ',IFS(INBLOCK('教育传媒'),'教育传媒',IFS(INBLOCK('仪电仪表'),'仪电仪表',<br />
IFS(INBLOCK('有色金属'),'有色金属',IFS(INBLOCK('造纸印刷'),'造纸印刷',IFS(INBLOCK('券商 '),'券商',IFS(INBLOCK('电力设备'),'电力设备',<br />
IFS(INBLOCK('通信'),'通信',IFS(INBLOCK('运输物流'),'运输物流',IFS(INBLOCK('保险'),'保险 ',''))))))))))))))))))))))))))))))));<br />
DRAWTEXTABS(10,5,'所属: '+板块+'指数'),COLORYELLOW;</p>
<p></p>
<p>&nbsp;</p>
页: [1]
查看完整版本: 大智慧能量对比分析指标公式