通达信时间之窗主图/时间隧道主图指标
源码
{时间之窗主图} A1:=MA(C,5); A2:=MA(C,21); A3:=(A1+A2)/2; IF (A1 A2,A1,A3),COLORRED,LINETHICK2; IF (A1 A2,A2,A3),COLORRED,LINETHICK2; IF (A1 =A2,A1,A3),COLOR00FF00,LINETHICK2; IF (A1 =A2,A2,A3),COLOR00FF00,LINETHICK2; A3,COLORWHITE,LINETHICK2; VAR31:=HHVBARS(ZIG(3, 19) REF(ZIG(3,19),1) AND REF(ZIG(3,19), 1) STICKLINE(VAR31=2,L*0.95,L*0.98,8,0),COLOR0000FF; DRAWTEXT(VAR31=2,L*0.95,'3天'),COLORYELLOW; STICKLINE(VAR31=4,H*1.05,H*1.02,8,0),COLOR9966FF; DRAWTEXT(VAR31=4,H*1.06,'5天'),COLORYELLOW; STICKLINE(VAR31=7,L*0.95,L*0.98,8,0),COLOR00FFFF; DRAWTEXT(VAR31=7,L*0.95,'8天'),COLORYELLOW; STICKLINE(VAR31=12,H*1.05,H*1.02,8,0),COLORFF33FF; DRAWTEXT(VAR31=12,H*1.06,'13天'),COLORYELLOW; STICKLINE(VAR31=20,L*0.95,L*0.98,8,0),COLOR0066FF; DRAWTEXT(VAR31=20,L*0.95,'21天'),COLORYELLOW;{时间隧道主图}
N:=200;M:=13; VAR1:MA(CLOSE,5);VAR2:MA(CLOSE,12);
VAR3:MA(CLOSE,144);
VAR4:MA(CLOSE,169);
TJ:=CLOSE MAX(VAR3,VAR4) AND REF(CLOSE,1)
STICKLINE(TJ,C,O,3,0),COLOR00FFFF;
时间之窗:=HHVBARS(ZIG(3,M) REF(ZIG(3,M),1)
AND REF(ZIG(3,M), 1)
DRAWTEXT(时间之窗=2,L*0.94,'★3天'),COLORRED;
DRAWTEXT(时间之窗=4,H*1.06,'★5天'),COLORGREEN;
DRAWTEXT(时间之窗=7,L*0.94,'★8天'),COLORRED;
DRAWTEXT(时间之窗=12,H*1.06,'★13天'),COLORGREEN;
DRAWTEXT(时间之窗=20,L*0.94,'★21天'),COLORLIRED;
DRAWTEXT(时间之窗=33,H*1.06,'★34天'),COLORLIGREEN;
DRAWTEXT(时间之窗=54,L*0.94,'★55天'),COLORLIRED;
DRAWTEXT(时间之窗=88,H*1.06,'★89天'),COLORLIGREEN;
DRAWTEXT(时间之窗=143,L*0.94,'★144天'),COLORLIRED;
DRAWTEXT(时间之窗=232,H*1.06,'★233天'),COLORLIGREEN;
DRAWTEXT(时间之窗=376,L*0.94,'★377天'),COLORLIRED;
DRAWTEXT(时间之窗=609,H*1.06,'★610天'),COLORLIGREEN;