在缺口指标中添加日期
-
相关简介:编写要求: www.guhai.com.cn 股海网解答: 网友求助: 请老师帮忙看能不能在 缺口值 前边把 缺口日期 也添加显示出来谢谢!!!!! 如下图中红色标识{红色标识是自行画上的} 指标源码 缺口 {向下跳空缺口} I1:=0; flag1:=0; while I1BARSLAST(DISPSTATUS=1)-BARSLAST(DISPSTATUS=2) DO IF REF(H,I1)REF(L,I1+1) AND REF(L,I1+1)HHV(H,I1+1) THEN BEGIN
-
文章来源:股海网作者:股海网发布时间:2016-01-19浏览次数:
编写要求:
www.guhai.com.cn股海网解答:
网友求助:
请老师帮忙看能不能在 缺口值 前边把 缺口日期 也添加显示出来谢谢!!!!!
如下图中红色标识{红色标识是自行画上的}
指标源码
缺口
{向下跳空缺口}
I1:=0;
flag1:=0;
while I1<BARSLAST(DISPSTATUS=1)-BARSLAST(DISPSTATUS=2)
DO
IF REF(H,I1)<REF(L,I1+1) AND REF(L,I1+1)>HHV(H,I1+1)
THEN BEGIN FLAG1:=1;
S1:=I1;
I1:=BARSLAST(DISPSTATUS=1);
END
ELSE I1:=I1+1;
STICKLINE(FLAG1,REF(L,S1+1),HHV(H,S1+1),(s1+1)*20,0),Colorgray,ALIGN1,LAYER7;
DRAWTEXT(flag1,REF(L,s1+1),NUMTOSTRN(ref(h,s1+1),2)+'-'+NUMTOSTRN(hhV(h,S1+1),2)),ALIGN2,COLOR00ffff;
{向上跳空缺口}
I:=0;
flag:=0;
while I<BARSLAST(DISPSTATUS=1)-BARSLAST(DISPSTATUS=2)
DO
IF REF(L,I)>REF(H,I+1) AND REF(H,I+1)<LLV(LOW,I+1)
THEN BEGIN FLAG:=1;
S:=I;
I:=BARSLAST(DISPSTATUS=1);
END
ELSE I:=I+1;
STICKLINE(FLAG,REF(h,S+1),LLV(LOW,S+1),20*(s+1),500),Colorff000f,ALIGN1,LAYER7;
DRAWTEXT(FLAG,REF(H,s+1),NUMTOSTRN(ref(h,s+1),2)+'-'+NUMTOSTRN(LLV(LOW,S+1),2)),ALIGN2,COLOR00ffff;
flag1:=0;
while I1<BARSLAST(DISPSTATUS=1)-BARSLAST(DISPSTATUS=2)
DO
IF REF(H,I1)<REF(L,I1+1) AND REF(L,I1+1)>HHV(H,I1+1)
THEN BEGIN FLAG1:=1;
S1:=I1;
I1:=BARSLAST(DISPSTATUS=1);
END
ELSE I1:=I1+1; T1:=REF(DATE,S1)+19000000;
STICKLINE(FLAG1,REF(L,S1+1),HHV(H,S1+1),(s1+1)*20,0),ColorC0C0C0,ALIGN1,LAYER7;
DRAWTEXT(flag1,REF(L,s1+1),STRLEFT(STR(T1),4)+'/'+STRMID(STR(T1),5,2)+'/'+STRRIGHT(STR(T1),2)+' '+NUMTOSTRN(ref(h,s1+1),2)+'-'+NUMTOSTRN(hhV(h,S1+1),2)),ALIGN2,COLORgreen;
I:=0;
flag:=0;
while I<BARSLAST(DISPSTATUS=1)-BARSLAST(DISPSTATUS=2)
DO
IF REF(L,I)>REF(H,I+1) AND REF(H,I+1)<LLV(LOW,I+1)
THEN BEGIN FLAG:=1;
S:=I;
I:=BARSLAST(DISPSTATUS=1);
END
ELSE I:=I+1; T:=REF(DATE,S)+19000000;
STICKLINE(FLAG,REF(h,S+1),LLV(LOW,S+1),20*(s+1),500),ColorC0C0C0,ALIGN1,LAYER7;
DRAWTEXT(FLAG,REF(H,s+1),STRLEFT(STR(T),4)+'/'+STRMID(STR(T),5,2)+'/'+STRRIGHT(STR(T),2)+''+NUMTOSTRN(ref(h,s+1),2)+'-'+NUMTOSTRN(LLV(LOW,S+1),2)),ALIGN2,COLORgreen;