等级: 超级版主
- 注册:
- 2021-5-18
- 曾用名:
- FireScript
|
在之前代码基础上:
len_5:SUMBARS(cross(s2,0),1);
len_4:=SUMBARS(cross(s1,0),1);
len_3:=SUMBARS(cross(s2,0),2);
len_2:=SUMBARS(cross(s1,0),2);
len_1:=SUMBARS(cross(s2,0),3);
len_0:=SUMBARS(cross(s1,0),3);
i5:ref(c,len_5-1),NODRAW;
i4:ref(c,len_4-1),NODRAW;
i3:ref(c,len_3-1),NODRAW;
i2:ref(c,len_2-1),NODRAW;
i1:ref(c,len_1-1),NODRAW;
i0:ref(c,len_0-1),NODRAW;
cd1:=i1>i3 and i3>i5 and i0>i2 and i2>i4 and i4<i1;
cd2:=((i3-i2)/i2)<((i1-i0)/i1) and ((i3-i2)/i2)>((i5-i4)/i4);
cd3:=(i0-i5)/i0>=0.05;
cd:cd1 and cd2 and cd3;
result:VALUEWHEN(cross(s1,0),cd);//始终获取最近一次波谷位置的判断结果
|
|