DAYS1990:=DATETODAY(DATE); {从1990.12.19开始计算到当前的总天数}
Z:=((DAYS1990-REF(DAYS1990,1))>(WEEKDAY-REF(WEEKDAY,1))) OR BARSCOUNT(C)=1; {看两个相邻周期是否跨周}
T:=BARSLAST(Z);
O1:IF(T,REF(O,T),O);
H1:HHV(H,T+1);
L1:LLV(L,T+1);
C1:C;
DAYS1990:=DATETODAY(DATE); {从1990.12.19开始计算到当前的总天数}
Z:=((DAYS1990-REF(DAYS1990,1))>(WEEKDAY-REF(WEEKDAY,1))) OR BARSCOUNT(C)=1; {看两个相邻周期是否跨周}
T:=BARSLAST(Z);
O1:IF(T,REF(O,T),O);
H1:HHV(H,T+1);
L1:LLV(L,T+1);
C1:C;