N:=12;{高手指标公式网www.gs6699.com}
B:(CLOSE-MA(CLOSE,N))/MA(CLOSE,N)*100,COLORMAGENTA;
M:=INTPART(2*N/4);
判断股票涨跌:=REF(B,M)=HHV(B,2*M+1);
最简单的指标:=FILTER(判断股票涨跌,M);
sfews1:=BACKSET(最简单的指标,M+1);
sfews2:=FILTER(sfews1,M);
sfews3:=BACKSET(ISLASTBAR,BARSLAST(sfews2)+1); S1:=sfews3>REF(sfews3,1);
DRAWLINE(sfews2,B,S1,B,1),COLORWHITE;
sfews4:=INTPART(3*N/7);
sfews5:=REF(B,sfews4)=HHV(B,2*sfews4+1);
sfews6:=FILTER(sfews5,sfews4);
sfews7:=BACKSET(sfews6,sfews4+1);
sfews219:=FILTER(sfews7,sfews4);
sfews8:=BACKSET(ISLASTBAR,BARSLAST(sfews219)+1); S10:=sfews8>REF(sfews8,1);
DRAWLINE(sfews219,B,S10,B,1),COLORYELLOW;
sfews9:=INTPART(1*N/10);
ccssd1:=REF(B,sfews9)=HHV(B,2*sfews9+1);
B2:=FILTER(ccssd1,sfews9);
ccssd3:=BACKSET(B2,sfews9+1);
D2:=FILTER(ccssd3,sfews9);
ccssd6:=BACKSET(ISLASTBAR,BARSLAST(D2)+1); S2:=ccssd6>REF(ccssd6,1);
DRAWLINE(D2,B,S2,B,1),COLORGREEN;