HV1:=HHVV AND H>=HHV(H,BARSLAST(LLVV));
LV1:=LLVV AND L<=LLV(L,BARSLAST(HHVV));
DRAWLINE(LV1,LOW,HV1, HIGH,COLORYELLOW);
DRAWLINE(HV1,HIGH,LV1, LOW,COLORMAGENTA); ///加入中枢判定//简化版
N1:=10;
N2:=10;
DISP:=2;
K:=1;
P1:=PEAK(O,K*N1,1,1);
P2:=PEAK(O,K*N1,2,1);
WP1:=PEAKBARS(O,K*N1,1,1);
WP2:=PEAKBARS(O,K*N1,2,1);
T1:=TROUGH(H,K*N2,1,1);
T2:=TROUGH(H,K*N2,2,1);
WT1:=TROUGHBARS(H,K*N2,1,1);
WT2:=TROUGHBARS(H,K*N2,2,1);
TJ1:=P1>T1 AND P2>T2 ;
ZD:=MAX(T1,T2);
ZG:=MIN(P1,P2);
LL:=MIN(T1,T2);
HH:=MAX(P1,P2);
TJ2:=FILTER(ZG>ZD,2);
TJ3:=ZG=REF(ZG,BARSLAST(TJ2)) OR ZD=REF(ZD,BARSLAST(TJ2));
TJ4:=TJ1 AND TJ2 AND NOT(TJ3);
TJ5:=BETWEEN(Z