通达信公式源码概况:
指标类别:通达信公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
一、通达信热门板块指标公式
开幅%:(O-REF(C,1))/REF(C,1)*100,NODRAW;
收益:=(C-O)/O*100;
MA5:=MA(C,5);
MA10:=MA(C,10);
MA20:=MA(C,20);
MA30:=MA(C,30);
MA60:=MA(C,60);
MA120:=MA(C,120);
热度:1/((MA5+MA10+MA20+MA30+MA60+MA120)/6/C),NODRAW;
昨热:REF(热度,1);
MA5A:=(MA(C,4)*4+O)/5;
MA10A:=(MA(C,9)*9+O)/10;
MA20A:=(MA(C,19)*19+O)/20;
MA30A:=(MA(C,29)*29+O)/30;
MA60A:=(MA(C,59)*59+O)/60;
MA120A:=(MA(C,119)*119+O)/120;
热度2:1/((MA5A+MA10A+MA20A+MA30A+MA60A+MA120A)/6/O),NODRAW;
昨热2:REF(热度2,1);
MA5B:=MA(O,5);
MA10B:=MA(O,10);
MA20B:=MA(O,20);
MA30B:=MA(O,30);
MA60B:=MA(O,60);
MA120B:=MA(O,120);
热度3:1/((MA5+MA10+MA20+MA30+MA60+MA120)/6/O);
昨热3:REF(热度3,1);
{大盘深圳k线}
DPC:=INDEXC;
dpo:=INDEXO;
DPH:=INDEXH;
DPL:=INDEXL;
stICKLINE(DPC>DPO,DPC,DPO,8,0),COLOR0000FF;
STICKLINE(DPC>DPO,DPH,DPL,0.5,0),COLOR0000FF;
STICKLINE(DPC<DPO,DPC,DPO,8,0),COLOR00FF00;
STICKLINE(DPC<DPO,DPH,DPL,0.5,0),COLOR00FF00;
SH:=STKINDI('1A0001','1A0001');
SZ:=STKINDI('399001','399001');
IFSTRCMP(maRKETLABEL,'SH')=0THENBEGINDRAWTEXTABS(10,5,'上证指数'),LINETHICK5,Color6666FF;END;
IFSTRCMP(MARKETLABEL,'SZ')=0THENBEGINDRAWTEXTABS(10,5,'深圳成份指数'),LINETHICK5,Color6666FF;END;
上证MA1:=STKINDI('1A0001','MA.MA1');
深证MA1:=STKINDI('399001','MA.MA1');
上证MA2:=STKINDI('1A0001','MA.MA2');
深证MA2:=STKINDI('399001','MA.MA2');
上证MA3:=STKINDI('1A0001','MA.MA3');
深证MA3:=STKINDI('399001','MA.MA3');
上证MA4:=STKINDI('1A0001','MA.MA4');
深证MA4:=STKINDI('399001','MA.MA4');
上证MA5:=STKINDI('1A0001','MA.MA5');
深证MA5:=STKINDI('399001','MA.MA5');
上证MA6:=STKINDI('1A0001','MA.MA6');
深证MA6:=STKINDI('399001','MA.MA6');
大盘MA5:IF(STRCMP(MARKETLABEL,'SH')=0,上证MA1,深证MA1),COLORFFFFFF;
大盘MA10:IF(STRCMP(MARKETLABEL,'SH')=0,上证MA2,深证MA2),COLOR00FFFF;
大盘MA20:IF(STRCMP(MARKETLABEL,'SH')=0,上证MA3,深证MA3),COLOR3333FF;
大盘MA30:IF(STRCMP(MARKETLABEL,'SH')=0,上证MA4,深证MA4),COLOR5399FF;
大盘MA60:IF(STRCMP(MARKETLABEL,'SH')=0,上证MA5,深证MA5),COLOR9900CC;
大盘MA120:IF(STRCMP(MARKETLABEL,'SH')=0,上证MA6,深证MA6),COLOR39FF00;
{板块K线}
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))))))))))))))))))))))))))))))));
ZSO:=IF(INBLOCK('工程建筑'),"991002$open",IF(INBLOCK('电力'),"991003$open",IF(INBLOCK('计算机'),"991004$open",
IF(INBLOCK('电子信息'),"991006$open",IF(INBLOCK('房地产'),"991007$open",IF(INBLOCK('纺织服装'),"991008$open",
IF(INBLOCK('钢铁'),"991009$open",IF(INBLOCK('供水供气'),"991010$open",IF(INBLOCK('化工化纤'),"991011$open",
IF(INBLOCK('电器'),"991014$open",IF(INBLOCK('交通设施'),"991016$open",IF(INBLOCK('银行类'),"991017$open",
IF(INBLOCK('旅游酒店'),"991018$open",IF(INBLOCK('煤炭石油'),"991019$open",IF(INBLOCK('酿酒食品'),"991020$open",
IF(INBLOCK('农林牧渔'),"991021$open",IF(INBLOCK('商业连锁'),"991023$open",IF(INBLOCK('建材'),"991024$open",
IF(INBLOCK('其他行业'),"991025$open",IF(INBLOCK('汽车类'),"991026$open",IF(INBLOCK('机械'),"991027$open",
IF(INBLOCK('医药'),"991028$open",IF(INBLOCK('外贸'),"991031$open",IF(INBLOCK('教育传媒'),"991032$open",
IF(INBLOCK('仪电仪表'),"991033$open",IF(INBLOCK('有色金属'),"991034$open",IF(INBLOCK('造纸印刷'),"991035$open",
IF(INBLOCK('券商'),"991036$open",IF(INBLOCK('电力设备'),"991037$open",IF(INBLOCK('通信'),"991135$open",
IF(INBLOCK('运输物流'),"991136$open",IF(INBLOCK('保险'),"991255$open",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))))))))))))))))))))))))))))))));
STICKLINE(ZSC>=ZSO,ZSO,ZSC,7,1),COLORRED;
STICKLINE(ZSO>ZSC,ZSC,ZSO,7,0),COLORGREEN;
STICKLINE(ZSC>=ZSO,ZSC,ZSH,0,1),COLORRED;
STICKLINE(ZSC>=ZSO,ZSO,ZSL,0,1),COLORRED;
STICKLINE(ZSO>ZSC,ZSC,ZSL,0,0),COLORGREEN;
STICKLINE(ZSO>ZSC,ZSO,ZSH,0,0),COLORGREEN;
板块:=IFS(INBLOCK('工程建筑'),'工程建筑',IFS(INBLOCK('电力'),'电力',IFS(INBLOCK('计算机'),'计算机',IFS(INBLOCK('电子信息'),'电子信息',
IFS(INBLOCK('房地产'),'房地产',IFS(INBLOCK('纺织服装'),'纺织服装',IFS(INBLOCK('钢铁'),'钢铁',IFS(INBLOCK('供水供气'),'供水供气',
IFS(INBLOCK('化工化纤'),'化工化纤',IFS(INBLOCK('电器'),'电器',IFS(INBLOCK('交通设施'),'交通设施',IFS(INBLOCK('银行类'),'银行类',
IFS(INBLOCK('旅游酒店'),'旅游酒店',IFS(INBLOCK('煤炭石油'),'煤炭石油',IFS(INBLOCK('酿酒食品'),'酿酒食品',IFS(INBLOCK('农林牧渔'),'农林牧渔',
IFS(INBLOCK('商业连锁'),'商业连锁',IFS(INBLOCK('建材'),'建材',IFS(INBLOCK('其他行业'),'其他行业',IFS(INBLOCK('汽车类'),'汽车类',
IFS(INBLOCK('机械'),'机械',IFS(INBLOCK('医药'),'医药',IFS(INBLOCK('外贸'),'外贸',IFS(INBLOCK('教育传媒'),'教育传媒',IFS(INBLOCK('仪电仪表'),'仪电仪表',
IFS(INBLOCK('有色金属'),'有色金属',IFS(INBLOCK('造纸印刷'),'造纸印刷',IFS(INBLOCK('券商'),'券商',IFS(INBLOCK('电力设备'),'电力设备',
IFS(INBLOCK('通信'),'通信',IFS(INBLOCK('运输物流'),'运输物流',IFS(INBLOCK('保险'),'保险',''))))))))))))))))))))))))))))))));
{DRAWTEXTABS(10,5,'所属:'+板块+'指数'),COLORYELLOW;}
DRAWTEXTABS(10,5,''+板块+''),COLORYELLOW,LINETHICK3;
收盘:ZSC,LINETHICK0,COLORFFFFFF,PRECIS2;
开盘:ZSO,LINETHICK0,COLOR00FFFF,PRECIS2;
最高:ZSH,LINETHICK0,COLOR0000FF,PRECIS2;
最低:ZSL,LINETHICK0,COLOR00FF00,PRECIS2;
涨跌:收盘-REF(收盘,1),LINETHICK0,PRECIS2,COLORFFFF00;
涨幅:SUM(收盘/REF(收盘,1)*100-100,1),LINETHICK0,PRECIS2,COLORFF00FF;
ma5:MA(收盘,5),COLORFFFFFF,PRECIS2;
ma10:MA(收盘,10),COLOR00FFFF,PRECIS2;
ma20:MA(收盘,20),COLORFF00FF,PRECIS2;
{ma30:MA(收盘,30),COLOR00FF00,PRECIS2;
ma60:MA(收盘,60),COLORB5B5B5,PRECIS2;};
{大盘深圳K线}
DPC:=INDEXC;
DPO:=INDEXO;
DPH:=INDEXH;
DPL:=INDEXL;
STICKLINE(DPC>DPO,DPC,DPO,8,0),COLOR0000FF;
STICKLINE(DPC>DPO,DPH,DPL,0.5,0),COLOR0000FF;
STICKLINE(DPC<DPO,DPC,DPO,8,0),COLOR00FF00;
STICKLINE(DPC<DPO,DPH,DPL,0.5,0),COLOR00FF00;
SH:=STKINDI('1A0001','1A0001');
SZ:=STKINDI('399001','399001');
IFSTRCMP(MARKETLABEL,'SH')=0THENBEGINDRAWTEXTABS(10,5,'上证指数'),LINETHICK5,Color6666FF;END;
IFSTRCMP(MARKETLABEL,'SZ')=0THENBEGINDRAWTEXTABS(10,5,'深圳成份指数'),LINETHICK5,Color6666FF;END;
上证MA1:=STKINDI('1A0001','MA.MA1');
深证MA1:=STKINDI('399001','MA.MA1');
上证MA2:=STKINDI('1A0001','MA.MA2');
深证MA2:=STKINDI('399001','MA.MA2');
上证MA3:=STKINDI('1A0001','MA.MA3');
深证MA3:=STKINDI('399001','MA.MA3');
上证MA4:=STKINDI('1A0001','MA.MA4');
深证MA4:=STKINDI('399001','MA.MA4');
上证MA5:=STKINDI('1A0001','MA.MA5');
深证MA5:=STKINDI('399001','MA.MA5');
上证MA6:=STKINDI('1A0001','MA.MA6');
深证MA6:=STKINDI('399001','MA.MA6');
大盘MA5:IF(STRCMP(MARKETLABEL,'SH')=0,上证MA1,深证MA1),COLORFFFFFF;
大盘MA10:IF(STRCMP(MARKETLABEL,'SH')=0,上证MA2,深证MA2),COLOR00FFFF;
大盘MA20:IF(STRCMP(MARKETLABEL,'SH')=0,上证MA3,深证MA3),COLOR3333FF;
大盘MA30:IF(STRCMP(MARKETLABEL,'SH')=0,上证MA4,深证MA4),COLOR5399FF;
大盘MA60:IF(STRCMP(MARKETLABEL,'SH')=0,上证MA5,深证MA5),COLOR9900CC;
大盘MA120:IF(STRCMP(MARKETLABEL,'SH')=0,上证MA6,深证MA6),COLOR39FF00;
{板块K线}
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))))))))))))))))))))))))))))))));
ZSO:=IF(INBLOCK('工程建筑'),"991002$open",IF(INBLOCK('电力'),"991003$open",IF(INBLOCK('计算机'),"991004$open",
IF(INBLOCK('电子信息'),"991006$open",IF(INBLOCK('房地产'),"991007$open",IF(INBLOCK('纺织服装'),"991008$open",
IF(INBLOCK('钢铁'),"991009$open",IF(INBLOCK('供水供气'),"991010$open",IF(INBLOCK('化工化纤'),"991011$open",
IF(INBLOCK('电器'),"991014$open",IF(INBLOCK('交通设施'),"991016$open",IF(INBLOCK('银行类'),"991017$open",
IF(INBLOCK('旅游酒店'),"991018$open",IF(INBLOCK('煤炭石油'),"991019$open",IF(INBLOCK('酿酒食品'),"991020$open",
IF(INBLOCK('农林牧渔'),"991021$open",IF(INBLOCK('商业连锁'),"991023$open",IF(INBLOCK('建材'),"991024$open",
IF(INBLOCK('其他行业'),"991025$open",IF(INBLOCK('汽车类'),"991026$open",IF(INBLOCK('机械'),"991027$open",
IF(INBLOCK('医药'),"991028$open",IF(INBLOCK('外贸'),"991031$open",IF(INBLOCK('教育传媒'),"991032$open",
IF(INBLOCK('仪电仪表'),"991033$open",IF(INBLOCK('有色金属'),"991034$open",IF(INBLOCK('造纸印刷'),"991035$open",
IF(INBLOCK('券商'),"991036$open",IF(INBLOCK('电力设备'),"991037$open",IF(INBLOCK('通信'),"991135$open",
IF(INBLOCK('运输物流'),"991136$open",IF(INBLOCK('保险'),"991255$open",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))))))))))))))))))))))))))))))));
STICKLINE(ZSC>=ZSO,ZSO,ZSC,7,1),COLORRED;
STICKLINE(ZSO>ZSC,ZSC,ZSO,7,0),COLORGREEN;
STICKLINE(ZSC>=ZSO,ZSC,ZSH,0,1),COLORRED;
STICKLINE(ZSC>=ZSO,ZSO,ZSL,0,1),COLORRED;
STICKLINE(ZSO>ZSC,ZSC,ZSL,0,0),COLORGREEN;
STICKLINE(ZSO>ZSC,ZSO,ZSH,0,0),COLORGREEN;
板块:=IFS(INBLOCK('工程建筑'),'工程建筑',IFS(INBLOCK('电力'),'电力',IFS(INBLOCK('计算机'),'计算机',IFS(INBLOCK('电子信息'),'电子信息',
IFS(INBLOCK('房地产'),'房地产',IFS(INBLOCK('纺织服装'),'纺织服装',IFS(INBLOCK('钢铁'),'钢铁',IFS(INBLOCK('供水供气'),'供水供气',
IFS(INBLOCK('化工化纤'),'化工化纤',IFS(INBLOCK('电器'),'电器',IFS(INBLOCK('交通设施'),'交通设施',IFS(INBLOCK('银行类'),'银行类',
IFS(INBLOCK('旅游酒店'),'旅游酒店',IFS(INBLOCK('煤炭石油'),'煤炭石油',IFS(INBLOCK('酿酒食品'),'酿酒食品',IFS(INBLOCK('农林牧渔'),'农林牧渔',
IFS(INBLOCK('商业连锁'),'商业连锁',IFS(INBLOCK('建材'),'建材',IFS(INBLOCK('其他行业'),'其他行业',IFS(INBLOCK('汽车类'),'汽车类',
IFS(INBLOCK('机械'),'机械',IFS(INBLOCK('医药'),'医药',IFS(INBLOCK('外贸'),'外贸',IFS(INBLOCK('教育传媒'),'教育传媒',IFS(INBLOCK('仪电仪表'),'仪电仪表',
IFS(INBLOCK('有色金属'),'有色金属',IFS(INBLOCK('造纸印刷'),'造纸印刷',IFS(INBLOCK('券商'),'券商',IFS(INBLOCK('电力设备'),'电力设备',
IFS(INBLOCK('通信'),'通信',IFS(INBLOCK('运输物流'),'运输物流',IFS(INBLOCK('保险'),'保险',''))))))))))))))))))))))))))))))));
{DRAWTEXTABS(10,5,'所属:'+板块+'指数'),COLORYELLOW;}
DRAWTEXTABS(10,30,''+板块+''),COLORYELLOW,LINETHICK3;
收盘:ZSC,LINETHICK0,COLORFFFFFF,PRECIS2;
开盘:ZSO,LINETHICK0,COLOR00FFFF,PRECIS2;
最高:ZSH,LINETHICK0,COLOR0000FF,PRECIS2;
最低:ZSL,LINETHICK0,COLOR00FF00,PRECIS2;
涨跌:收盘-REF(收盘,1),LINETHICK0,PRECIS2,COLORFFFF00;
涨幅:SUM(收盘/REF(收盘,1)*100-100,1),LINETHICK0,PRECIS2,COLORFF00FF;
ma5:MA(收盘,5),COLORFFFFFF,PRECIS2;
ma10:MA(收盘,10),COLOR00FFFF,PRECIS2;
ma20:MA(收盘,20),COLORFF00FF,PRECIS2;
{ma30:MA(收盘,30),COLOR00FF00,PRECIS2;
ma60:MA(收盘,60),COLORB5B5B5,PRECIS2;};
指标公式知识:
80个股转势信号的把握
从日k线图、周k线图,可以看出个股走势的反转。
转势信号显示出:个股股价跌了一段时间之后,停止下跌并开始上升。或股价已升了一段时间之后,停止上升,而开始下跌。
如何在第一时间把握转势信号?
有两个要点:
其一经过连续性下跌之后,当日的最低位比前日的最低位还要低。
其二当日的收市价却比前一日收市价高,用转势信号可以用单日转势,或单周转势。单日转势一定要和前一天的市场走势相反。一面倒,当日全面升。或前一天全面升,当日却全面跌。
单周转势一定要和上五个交易日的市价总升跌相反。
转势信号可配合突破信号一齐运用。凭转势信号可指示短线投资者应该建仓还是平仓。
此外,根据个股某日的最高位最低位和收市价及全日波幅,短线投资者也可确定。买卖时机:如前一日股价高收或者连日高收,当日低收,是转弱信号,可平仓卖出;如股价前一日低收,或者连日低收,当日高收,是转强信号,可以短线买人建仓。
每日通达信公式解答:
编写条件:
10天内最高价回落20%的选股公式。
编写方法:
XG:C/REF(H,HHVBARS(H,10))<=0.8;
评论(0)