通达信自动划趋势线公式通达信公式
2017-07-16 来源:网络 编辑:翔博软件
说明:本 指标 滞后,所以针对的是中线 趋势 的把握。 KU1:=IF(HIGH=HHV(HIGH,3),1,0); KD1:=IF(LOW=LLV(LOW,3),1,0); UL:=IF(REF(KU1,2)=1 AND REF(KU1,1)=0 AND KU1=0,REF(HI
KU1:=IF(HIGH=HHV(HIGH,3),1,0);
KD1:=IF(LOW=LLV(LOW,3),1,0);
UL:=IF(REF(KU1,2)=1 AND REF(KU1,1)=0
AND KU1=0,REF(HIGH,2),REF(HIGH,2+BARSLAST(REF(KU1,2)=1
AND REF(KU1,1)=0 AND KU1=0)));
DL:=IF(REF(KD1,2)=1 AND REF(KD1,1)=0
AND KD1=0,REF(LOW,2),REF(LOW,2+BARSLAST(REF(KD1,2)=1
AND REF(KD1,1)=0 AND KD1=0)));
HV:=H>UL AND H>REF(H,1) ;
LV:=L<DL AND L<REF(L,1) ;
GP:=BARSLAST(HV);
DP:=BARSLAST(LV);
IP:=IF(GP=0,DP,GP)>3;
HV1:=HV AND IP AND H>=HHV(H,BARSLAST(LV));
LV1:=LV AND IP AND L<=LLV(L,BARSLAST(HV));
DRAWLINE(LV1,LOW,HV1, HIGH,0),COLORGRAY;
DRAWLINE(HV1,HIGH,LV1, LOW,0),COLORGRAY;