N:=120;K:=BARSLAST(CURRBARSCOUNT=N);GD:=CONST(IF(ISLASTBAR=1,HHV(H,K),0)),NODRAW;{高点}DDDD:=CONST(IF(ISLASTBAR=1,LLV(L,K),0)),NODRAW;{}KJ:=GD-DDDD;{高低点差值=分区高度}平衡:=IF(CURRBARSCOUNT<=N,DDDD+KJ/2,DRAWNULL),COLOR00FFFF,NODRAW;日:=150;昨前:=3;高区:=REF(HHV(H,日),昨前);低区:=REF(LLV(L,日),昨前);H1:=高区-(高区-低区)*0.191;H2:=高区-(高区-低区)*0.382;H3:=高区-(高区-低区)*0.5;H4:=高区-(高区-低区)*0.618;H5:=高区-(高区-低区)*0.809;顶区0:=REFDATE(高区,DATE),COLORBLUE,LINETHICK3;警示0:=REFDATE(H1,DATE),DOTLINE,COLORRED;0:=REFDATE(H2,DATE),COLORMAGENTA,DOT