加入高低点起,每天的换手累计,解决指标滞后问题。
同时随时查寻历史累计换手。
通达信指标转折换手
{转折换手}
N:=(1,100,1);
T:=10*N;
A:=H=HHV(H,T) AND HHV(H,T) REF(HHV(H,T),1);
B:=L=LLV(L,T) AND LLV(L,T) REF(LLV(L,T),1);
C1:=DRAWLINE(A,H,B,L,0);
C2:=DRAWLINE(B,L,A,H,0);
GD:=C2=C1 AND A;
DD:=C2=C1 AND B;
GDT:=BARSLAST(GD);
DDT:=BARSLAST(DD);
GHS:=VARCAT(VAR2STR(SUM( HSL.HSL ,GDT),2), %换)
DHS:=VARCAT(VAR2STR(SUM( HSL.HSL ,DDT),2), %换)
ZG:=VARCAT(VAR2STR(DDT,0),VARCAT( 天( ,DHS));
ZD:=VARCAT(VAR2STR(GDT,0),VARCAT( 天( ,GHS));
DRAWBAND(C1,RGB(250,0,250),C1,RGB(0,0,0));
DRAWBAND(C2,RGB(250,0,250),C2,RGB(0,0,0));
DRAWTEXT(GD AND C1 0,(H+L)/2,ZG),COLORYELLOW,DRAWABOVE;
DRAWTEXT(DD AND C1 0,(H+L)/2,ZD),COLORYELLOW,DRAWABOVE;
由低至高:IF(GDT DDT AND DD 1,SUM( HSL.HSL ,DDT),0),NODRAW;
由高至低:IF(DDT GDT AND DD 1,SUM( HSL.HSL ,GDT),0),NODRAW;
DRAWTEXT(GDT DDT AND DD 1 AND CURRBARSCOUNT=1,(H+L)/2,ZG),DRAWABOVE;
DRAWTEXT(DDT GDT AND DD 1 AND CURRBARSCOUNT=1,(H+L)/2,ZD),DRAWABOVE;