 
等级: 超级版主
- 注册:
- 2021-5-18
- 曾用名:
- FireScript
|
因为time函数缘故。金字塔的默认时间是北京时间+4小时。是为了把夜盘和次日白盘合并成一个交易日。
不好直接改造,我们直接换一种方式处理:
d:=strleft(numtostr(time,0),2);//截取k线字符串前2位
cd1:=d='13' and not(ref(d='13',1)) and time>=130000;//白盘开盘位置
cd2:=ref(time,1)=closetime(4) and time<130000;//夜盘开盘位置判断
len1:=barslast(cd1)+1;
len2:=barslast(cd2)+1;
h1:=valuewhen(cd1,ref(hhv(h,len2),1));
h2:=valuewhen(cd2,ref(hhv(h,len1),1));
l1:=valuewhen(cd1,ref(llv(l,len2),1));
l2:=valuewhen(cd2,ref(llv(l,len1),1));
HH1:IF(len2>len1,h1,h2);
LL1:IF(len2>len1,l1,l2); |
|