求前一交易时段的波幅,
即:日盘时求上一个夜盘, 夜盘时求上一个日盘
rp:=time>=130000 and time<=190000;
yp:=time>=010000 and time<=070000;
n1:=barslast(time=closetime(0));
n2:=barslast(time=closetime(1));
bz1:=(ref(hhv(h,n1),n2)-ref(llv(l,n1),n2))/ref(llv(l,n1),n2);
bz2:=(ref(hhv(h,n2),n1)-ref(llv(l,n2),n1))/ref(llv(l,n2),n1);
波幅_当前白天:valuewhen(rp,bz1);
波幅_当前晚上:valuewhen(yp,bz2)
不对无效
菜粕