N:=3;
M:=5;
柱:SUM(IF(C>REF(C,1),vol,IF(C
短:EMA(柱,1),colorred;
中:EMA(EMA(EMA(EMA(柱,1),2),1),2),colorgreen;
长:EMA(EMA(EMA(柱,3),6),9),colorcyan;
UPT3:=TROUGHBARS(3,N,M)
UPT2:=TROUGHBARS(2,N,M)
UPT1:=TROUGHBARS(1,N,M)
DNP3:=PEAKBARS(3,N,M)
DNP2:=PEAKBARS(2,N,M)
DNP1:=PEAKBARS(1,N,M)
DRAWTEXT(UPT3 OR UPT2 OR UPT1,短,'B'),colorgreen;
DRAWTEXT(DNP3 OR DNP2 OR DNP1,短,'S'),colorred;