{江哥作品}
RA:=MAX(O,C);{RA}
RB:=MIN(O,C);{RB}
RC:=REF(L,1);
RD:=IF(RA REF(H,1),IF(RB =RC,0,1),IF(RB =RC,-1,0));
RE:=BARSLAST(RD=-1);
RF:=REF(H,RE);
RG:=BARSLAST(RD=1);
RH:=REF(L,RG);
T1:=IF(RD=1,IF(L RF,1,0),IF(RD=-1,IF(H RH,-1,0),0));
T2:=BARSLAST(T1=0);
TH:=REF(REF(H,BARSLAST(T1=1)),T2);
TL:=REF(REF(L,BARSLAST(T1=-1)),T2);
TA:=IF(T1=1,IF(RA TH,1,0),IF(T1=-1,IF(RB TL,-1,0),0));
WWWCHAGULACOM:SMA(MAX(CLOSE-C,0),7,1)/SMA(ABS(CLOSE-C),7,1)*100,NODRAW;
{只在特定走势内显示}
X:=CURRBARSCOUNT;
P1:=BARSLAST(TA=-1);
P2:=BARSSINCEN(CROSS(0.5,TA),P1)+1;
{临界水平线}{九毛八公式指标网www.9m8.cn}
P3:=BARSLAST(CROSS(COUNT(CROSS(-0.5,RD),P1),0.5));
PAH:=REF(HHV(RA,P1),P3);
NOTEXT1:IF(X CONST(P3)+1,PAH,DRAWNULL),DOTLINE;{虚线}
NOTEXT2:IF(X CONST(P2)+1,PAH,DRAWNULL),COLORRED;{虚线};