n:=3;k2:=ema(c,5);k3:=ema(c,10);k5:=ema(c,30);kk5:=ema(indexc,30);k6:=2*(k2-k5);k7:=2*(k2-k3);k8:=2*(k7+k6);k1:=if(k8>ref(k8,5) and k3<ref(k3,5) ,1,0 );k21:=if(k8>ref(k8,7) and k3<ref(k3,7) ,1,0 );k31:=if(k8>ref(k8,9) and k3<ref(k3,9) ,1,0 );k4:=if(k8>ref(k8,11) and k3<ref(k3,11) ,1,0 );xg:every((k1 or k21 or k31 or k4) and k8<0 and k8>ref(k8,1),n);(持续n天,n自己修改)另外一个已发 20210311
买线:=ema(c,2);卖线:=ema(slope(c,21)*20+c,42);bu:=cross(买线,卖线);rsv:=(close-llv(low,9))/(hhv(high,9)-llv(low,9))*100;k:=sma(rsv,3,1);d:=sma(k,3,1);j:=3*k-2*d;xg:bu and cross(j,10); 已测试。
不理解你的第二个条件(收盘价涨幅在1.5%以上)是n天前出现还是今日出现,如果是今日出现:syx:=syx:h/c>1.03 and (h-max(c,o))>(max(c,o)-l)*2;ref(syx,n)and c/ref(c,1)>1.015;第二个条件(收盘价涨幅在1.5%以上)n天前出现:syx:=syx:h/c>1.03 and (h-max(c,o))>...