d:=15;fire:=3;macd:=barslast("macd.macd"<ref("macd.macd",1))>=3;a:=zig(4,d); b:=ref(a,1);g:=cross(a,b); f:=cross(b,a);var1:=ref(low,sumbars(g,3)); {左肩起涨低价}var2:=ref(high,sumbars(f,2)); {左肩最高价}var3:=ref(high,sumbars(f,1)); {右肩最高价}var4:=ref(low,sumbars(g,2)); {头肩底价}var5:=ref(low,sumbars(g,1)); {右肩回调低价}买点1:=if(var3>1.01*var2 and var5>1.01*var1 and var4<var1 and barslast(g)<3 and macd,1,0);买点2:=if(var3>1.01*var2 and var5>1.01*var1 and var4<var1 and cross(close,var2),2,0);买点3:=if(var3>1.01*var2 and var5>1.01*var1 and var4<var1 and cross(close,var3),3,0);choice:if(fire=1,买点1,if(fire=2,买点2,买点3)); 20210311
hs:=v/capital*100;s1:=between(hs,3,30);lb:=v/ref(ma(v,5),1);s2:=between(lb,1.3,30);st:=if(namelike('st')or namelike('*st'),0,1);s3:=c/ref(c,1);xz:s1 and s2 and s3>1.02 and st and v>1 and c;
a1:=hhv(c,1800)>llv(c,1800)*1.6 and llv(c,1800)*2<hhv(c,1800) and count(c/ref(c,1)>0.098,100)>=1 and barscount(close)>600 ;a2:= (c-ma(c,200))/ma(c,200)<0.2 { 相对于200天线正乖离小于20%...