hh:=valuewhen(time=某时间,hhv(h,todaybar));
ll:=valuewhen(time=某时间,llv(l,todaybar));
价差:hh-ll
你要用北京时间,那么要修改成:
nn:=barslast(time=090100);+1//以1分钟周期为例,其他周期做对应修改090100为其他周期当天第一根k线的时间
hh:=valuewhen(time=某时间,hhv(h,nn));
ll:=valuewhen(time=某时间,llv(l,nn));
价差:hh-ll;
你要用北京时间,那么要修改成: nn:=barslast(time=090100); hh:=valuewhen(time=某时间,hhv(h,nn)); ll:=valuewhen(time=某时间,llv(l,nn)); 价差:hh-ll; |