N:=20;P:=7;
波段:ZIG(3,P),COLORWHITE,LINETHICK1;
小波段底:=ZIG(3,P)>REF(ZIG(3,P),1) AND REF(ZIG(3,P),1)<=REF(ZIG(3,P),2) AND REF(ZIG(3,P),2)<=REF(ZIG(3,P),3);
小波段顶:=ZIG(3,P)<REF(ZIG(3,P),1) AND REF(ZIG(3,P),1)>=REF(ZIG(3,P),2) AND REF(ZIG(3,P),2)>=REF(ZIG(3,P),3);
{ 爱约股_通达信股票指标公式}
DRAWTEXT(小波段底,L-0.02,'买'),COLORYELLOW;
DRAWTEXT(小波段顶,H+0.15,'卖'),COLORMAGENTA;
趋势:ZIG(3,N);
大波段底:IF(趋势>REF(趋势,1),趋势,DRAWNULL),COLORRED,LINETHICK2;
大波段顶:IF(趋势<REF(趋势,1),趋势,DRAWNULL),COLORGREEN,LINETHICK2;

 

通达信波段趋势主图指标公式