{趋势反折线}
M1:MA(C,25),COLORYELLOW;
SQ:=M1>REF(M1,1);
XQ:=M1<REF(M1,1);
SQS:=BACKSET(BARSLAST(NOT(SQ))>=5,BARSLAST(NOT(SQ)));
XQS:=BACKSET(BARSLAST(NOT(XQ))>=5,BARSLAST(NOT(XQ)));
上趋势:=NOT(XQS) AND BARSLAST(SQS)<BARSLAST(XQS),COLOR8000FF;
下趋势:=NOT(SQS) AND BARSLAST(SQS)>BARSLAST(XQS),COLOR808000;
{www.gupang.com 股旁网_飞狐股票指标公式}
PARTLINE(上趋势,M1),COLORYELLOW,LINETHICK2;{画均线,不要可以屏蔽或删掉,要了加上}
PARTLINE(下趋势,M1),COLORCYAN,LINETHICK2;{画均线,不要可以屏蔽或删掉,要了加上}
高点:=FILTERX(HHV(H,BARSLAST(下趋势))=H,BARSLAST(下趋势));
低点:=FILTERX(LLV(L,BARSLAST(上趋势))=L,BARSLAST(上趋势));
DRAWLINE(高点,H,低点,L,0),COLOR808000,LINETHICK2;
DRAWLINE(低点,L,高点,H,0),COLOR8000FF,LINETHICK2;
DRAWNUMBER(高点,H,H,2),COLORCYAN,PXUP30;
DRAWNUMBER(低点,L,L,2),COLORYELLOW,PXDN10;
{DRAWLINE(高点,H,ISLASTBAR,L,0),COLORGREEN;
DRAWLINE(低点,L,ISLASTBAR,H,0),COLORRED;}