variable:n=0,m=0;
if 金叉 then n:=n+1;
if 死叉 then m:=m+1;
zq1:=barslast(n=1);
l1:=llv(l,zq1+1);
if m=1 then ll1:=l1;
zq2:=barslast(n=2);
l2:=llv(l,zq2+1);
if m=2 then ll2:=l2;
ll1为所求第一次的最低价,ll2为所求第二次的最低价。。。。以此类推写出第N次的最低价
意思是你要在连续合约上用,还要判断是不是切换主力合约?
variable:n=0,m=0;
if 金叉 then n:=n+1;
if 死叉 then m:=m+1;
zq1:=barslast(n=1);
l1:=llv(l,zq1+1);
if m=1 then ll1:=l1;
zq2:=barslast(n=2);
l2:=llv(l,zq2+1);
if m=2 then ll2:=l2;
if month<>ref(month,1) then begin
n:=0;
M:=0;
end
我用了一个一般的判断方式,如果还有其他需求请指出
还有,,每次求出的高点和低点,,帮我做个标识,,画个画。。谢谢了,, 我要的是新合约开始后,,你这个判断是月份不同,,,,,这个应该不对吧,,,1605合约上,,大概在10月左右出来的吧,,你这种判断可能会从去年就开始计算,, |
1.这个标识做不了,最低价要做在当前k线上是做不出的
2.那就没办法了,你这样的新合约出来实在没办法判断了