通达信停复牌大旗指标副图 贴图 源码)
论坛有许多朋友给我消息,需要这个指标,今天有空就分享大家。
复牌后,就是一个小型的新股,重生的机会非常高,收益可观。
指标着重对比停牌期间和复牌后,个股与大盘之间的涨幅差。
同时在复牌当天,显示停复牌的日期,中间间隔的时期和周期。
首先得建立一个名为“引用” 的公式,
源码 :Y1:CURRBARSCOUNT,NODRAW;{复牌}
{停复牌大旗}
BAR:=CALCSTOCKINDEX("999999","引用",1);
ZRRS1:=DATETODAY(DATE)-DATETODAY(REF(DATE,1))-1;
JYRS1:=REF(BAR,1)-BAR-1;
TODAY:=ISLASTBAR AND V=0;
JYRS:=IF(TODAY,JYRS1+1,JYRS1);
ZRRS:=IF(TODAY,ZRRS1+1,ZRRS1);
FP:=JYRS>0;
FPB:=BARSLAST(FP);
最近停牌日期:=REF(DATE,FPB+1),NODRAW,COLORWHITE; {次日停牌}
最近复牌日期:=IF(TODAY,DRAWNULL,REF(DATE,FPB)),NODRAW,COLORWHITE;
停牌自然日日数:=REF(ZRRS,FPB),NODRAW,COLOR00AAFF;
停牌交易日数:=REF(JYRS,FPB),NODRAW,COLOR00AAFF;
最近停牌:=VARCAT(VAR2STR(REF(DATE+19000000,1),0)," 次日起停牌");
最近复牌:=VARCAT(VAR2STR(DATE+19000000,0)," 复牌");
停牌日:=VARCAT(VARCAT("停牌",VAR2STR(停牌自然日日数,0)),"天,");
交易日:=VARCAT(VARCAT("含",VAR2STR(停牌交易日数,0)),"个交易日");
复牌天数:IF(V>0,FPB+1,0),NODRAW;
DPSQ:=INDEXC>=REF(INDEXC,复牌天数);
DPXQ:=INDEXC<REF(INDEXC,复牌天数);
大盘上幅:=IF(FP AND DPSQ,(INDEXC/REF(INDEXC ,复牌天数))*100-100,0);
大盘下幅:=IF(FP AND DPXQ,(INDEXC/REF(INDEXC,复牌天数))*100-100,0);
上幅:=VARCAT(VARCAT("大盘向上幅度:",VAR2STR(大盘上幅,2)),"%");
下幅:=VARCAT(VARCAT("大盘向下幅度:",VAR2STR(大盘下幅,2)),"%");
现价涨幅:C/REF(C,复牌天数)*100-100,NODRAW;
大盘涨幅:INDEXC/REF(INDEXC,复牌天数)*100-100,NODRAW;
对比幅:现价涨幅-大盘涨幅,NODRAW,COLORLIGRAY;
STICKLINE(FP AND V>0,-5,12,1,0),COLORRED;
STICKLINE(FP AND V=0,-5,12,1,0),COLORLIBLUE;
DRAWTEXT(FP AND V>0,10,最近停牌),COLORYELLOW;
DRAWTEXT(FP AND V>0,8,最近复牌),COLORYELLOW;
DRAWTEXT(FP AND DPSQ,4,上幅),COLORYELLOW;
DRAWTEXT(FP AND DPXQ,4,下幅),COLORGREEN;
DRAWTEXT(FP AND V>0,6,VARCAT(停牌日,交易日)),COLORYELLOW;
DRAWTEXT(FP AND V=0,10,最近停牌),COLORWHITE;
DRAWTEXT(FP AND V=0,8,"尚未复牌"),COLORWHITE;
DRAWTEXT(FP AND V=0,6,VARCAT(停牌日,交易日)),COLORWHITE;
- 上一篇公式:通达信买卖点源码副图贴图
- 下一篇公式:通达信超级正背扩展版(指标选股贴图) 完全加密