唐奇安通道 通达信主图指标 源码 贴图
{唐奇安通道}{N:=20;T:=10;}
M1:MA(C,N);
HPB:=REF(HHV(H,N),1);
LPB:=REF(LLV(L,T),1);
{多头交易}
BUYIN:=H HPB AND C
BUYEXIT:=L
SINGAL:=IF(BUYIN,1,IF(BUYEXIT,-1,0));
CURRSIGN:=REF(SINGAL,BARSLAST(SINGAL));
UPTREND:=CURRSIGN= 1;
DWTREND:=CURRSIGN=-1;
{跟踪止损}{www.9m8.cn 九毛八公式指标网}
空平:IF(DWTREND,HPB,DRAWNULL),COLORBLUE,LINETHICK2;
多止:IF(UPTREND,LPB,DRAWNULL),COLORRED,LINETHICK2;
信号持续:IF(DWTREND,BARSLAST(UPTREND),BARSLAST(DWTREND)),NODRAW,COLORMAGENTA;
DRAWICON(BARSLAST(DWTREND)=1,多止,7);
DRAWICON(BARSLAST(UPTREND)=1,空平,8);
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);