指数代码我已经改成飞狐的了,可以通过却提示”引用股票数据缺少数据名称描述“,无法显示。俺写指标的水平实在一般请高手帮忙指导下
INPUT:N(70,1,999),M(5,1,120);
ZSC:=IF(INBLOCK('工程建筑'),"Aa08$CLOSE",IF(INBLOCK('电力'),"Aa01$CLOSE",IF(INBLOCK('计算机'),"Aa12$CLOSE",
IF(INBLOCK('电子信息'),"Aa04$CLOSE",IF(INBLOCK('房地产'),"Aa05$CLOSE",IF(INBLOCK('纺织服装'),"AA06$CLOSE",
IF(INBLOCK('钢铁'),"Aa07$CLOSE",IF(INBLOCK('供水供气'),"Aa09$CLOSE",IF(INBLOCK('化工化纤'),"AA10$CLOSE",
IF(INBLOCK('电器'),"Aa03$CLOSE",IF(INBLOCK('交通设施'),"Aa14$CLOSE",IF(INBLOCK('银hang类'),"Aa28$CLOSE",
IF(INBLOCK('旅游酒店'),"Aa16$CLOSE",IF(INBLOCK('煤炭石油'),"Aa17$CLOSE",IF(INBLOCK('酿酒食品'),"Aa18$CLOSE",
IF(INBLOCK('农林牧渔'),"Aa19$CLOSE",IF(INBLOCK('商业连锁'),"Aa23$CLOSE",IF(INBLOCK('建材'),"Aa13$CLOSE",
IF(INBLOCK('其他行业'),"Aa20$CLOSE",IF(INBLOCK('汽车类'),"Aa21$CLOSE",IF(INBLOCK('机械'),"Aa11$CLOSE",
IF(INBLOCK('医药'),"Aa26$CLOSE",IF(INBLOCK('外贸'),"Aa25$CLOSE",IF(INBLOCK('教育传媒'),"Aa15$CLOSE",
IF(INBLOCK('仪电仪表'),"Aa27$CLOSE",IF(INBLOCK('有色金属'),"Aa29$CLOSE",IF(INBLOCK('造纸印刷'),"Aa31$CLOSE",
IF(INBLOCK('券商'),"Aa22$CLOSE",IF(INBLOCK('电力设备'),"Aa02$CLOSE",IF(INBLOCK('通信'),"Aa24$CLOSE",
IF(INBLOCK('运输物流'),"Aa30$CLOSE",0)))))))))))))))))))))))))))))));
ZSH:=IF(INBLOCK('工程建筑'),"Aa08$high",IF(INBLOCK('电力'),"Aa01$high",IF(INBLOCK('计算机'),"Aa12$high",
IF(INBLOCK('电子信息'),"Aa04$high",IF(INBLOCK('房地产'),"Aa05$high",IF(INBLOCK('纺织服装'),"AA06$high",
IF(INBLOCK('钢铁'),"Aa07$high",IF(INBLOCK('供水供气'),"Aa09$high",IF(INBLOCK('化工化纤'),"AA10$high",
IF(INBLOCK('电器'),"Aa03$high",IF(INBLOCK('交通设施'),"Aa14$high",IF(INBLOCK('银hang类'),"Aa28$high",
IF(INBLOCK('旅游酒店'),"Aa16$high",IF(INBLOCK('煤炭石油'),"Aa17$high",IF(INBLOCK('酿酒食品'),"Aa18$high",
IF(INBLOCK('农林牧渔'),"Aa19$high",IF(INBLOCK('商业连锁'),"Aa23$high",IF(INBLOCK('建材'),"Aa13$high",
IF(INBLOCK('其他行业'),"Aa20$high",IF(INBLOCK('汽车类'),"Aa21$high",IF(INBLOCK('机械'),"Aa11$high",
IF(INBLOCK('医药'),"Aa26$high",IF(INBLOCK('外贸'),"Aa25$high",IF(INBLOCK('教育传媒'),"Aa15$high",
IF(INBLOCK('仪电仪表'),"Aa27$high",IF(INBLOCK('有色金属'),"Aa29$high",IF(INBLOCK('造纸印刷'),"Aa31$high",
IF(INBLOCK('券商'),"Aa22$high",IF(INBLOCK('电力设备'),"Aa02$high",IF(INBLOCK('通信'),"Aa24$high",
IF(INBLOCK('运输物流'),"Aa30$high",0)))))))))))))))))))))))))))))));
ZSL:=IF(INBLOCK('工程建筑'),"Aa08$low",IF(INBLOCK('电力'),"Aa01$low",IF(INBLOCK('计算机'),"Aa12$low",
IF(INBLOCK('电子信息'),"Aa04$low",IF(INBLOCK('房地产'),"Aa05$low",IF(INBLOCK('纺织服装'),"AA06$low",
IF(INBLOCK('钢铁'),"Aa07$low",IF(INBLOCK('供水供气'),"Aa09$low",IF(INBLOCK('化工化纤'),"AA10$low",
IF(INBLOCK('电器'),"Aa03$low",IF(INBLOCK('交通设施'),"Aa14$low",IF(INBLOCK('银hang类'),"Aa28$low",
IF(INBLOCK('旅游酒店'),"Aa16$low",IF(INBLOCK('煤炭石油'),"Aa17$low",IF(INBLOCK('酿酒食品'),"Aa18$low",
IF(INBLOCK('农林牧渔'),"Aa19$low",IF(INBLOCK('商业连锁'),"Aa23$low",IF(INBLOCK('建材'),"Aa13$low",
IF(INBLOCK('其他行业'),"Aa20$low",IF(INBLOCK('汽车类'),"Aa21$low",IF(INBLOCK('机械'),"Aa11$low",
IF(INBLOCK('医药'),"Aa26$low",IF(INBLOCK('外贸'),"Aa25$low",IF(INBLOCK('教育传媒'),"Aa15$low",
IF(INBLOCK('仪电仪表'),"Aa27$low",IF(INBLOCK('有色金属'),"Aa29$low",IF(INBLOCK('造纸印刷'),"Aa31$low",
IF(INBLOCK('券商'),"Aa22$low",IF(INBLOCK('电力设备'),"Aa02$low",IF(INBLOCK('通信'),"Aa24$low",
IF(INBLOCK('运输物流'),"Aa30$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);
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;
买点:IF(KNX>N AND CROSS(MK,KNX) and 行业线>大盘线,50,0),COLORWHITE,LINETHICK1;
注意:公式需要建立板块指数(即自定义板块指数),指数代码需要和指标中定义的一样,才可以显示 |