M1:MA(C,25),COLORYELLOW;SQ:=M1>REF(M1,1);XQ:=M1
[=5,BARSLAST(NOT(SQ)));XQS:=BACKSET(BARSLAST(NOT(XQ))>=5,BARSLAST(NOT(XQ)));上:=NOT(XQS) AND BARSLAST(SQS)BARSLAST(XQS),COLOR808000;{ _公式}PARTLINE(上趋势,M1),COLORYELLOW,LINETHICK2;{画,不要可以屏蔽或删掉,要了加上}PARTLINE(下趋势,M1),COLORCYAN,LINETHICK2;{画均线,不要可以屏蔽或删掉,要了加上}:=FILTERX(HHV(H,BARSLAST(下趋势))=H,BARSLAST(下趋势));:=FILTERX(LLV(L,BARSLAST(上趋势))=L,BARSLAST(上趋势));DRAWLINE(高点,H,低点,L,0),COLOR
]