黄线和紫线是多少周期的最高最低价?
VARIABLE:l1=0,h1=9999999;
h1:=hhv(c,10);
l1:=llv(c,10);
if c>ref(h1,1) and holding=0 then begin
buy(1,1,marketr);
ll:=l1;
end
if c<ll and holding>0 then begin
sell(1,1,marketr);
end
VARIABLE:l1=0,h1=9999999;
h1:=hhv(c,10);
l1:=llv(c,10);
gl:=(h1-l1)>x and (h1-l1)<y;
if c>ref(h1,1) and holding=0 and gl then begin
buy(1,1,marketr);
ll:=l1;
end
if c<ll and holding>0 then begin
sell(1,1,marketr);
end