現(xiàn)在主要是沒有開倉信號(hào)。
variable:num=0;
if (c-ref(c,1))/ref(c,1)<-0.01 and num=0 then
begin
buy(1,1,c);
num:=1;
end
variable:num=0;
if (c-ref(c,1))/ref(c,1)<-0.055 and num=0 then
begin
buy(1,1,c);
num:=1;
end
variable:num=0;
if (c-ref(c,1))/ref(c,1)>0.034 and num=0 then
begin
sell(1,holding,C);
num:=1;
end
?
代碼里面num是用來干什么的?
?
控制每天每條只觸發(fā)一次。
?
variable:num1=0,num2=0;
if date<>ref(date,1) then begin
?num1:=0;
?num2:=0;
end
if (c-ref(c,1))/ref(c,1)<-0.01 and num1=0 and holding=0 then
begin
buy(1,1,limitr,c);
num1:=1;
end
?
if (c-ref(c,1))/ref(c,1)<-0.055 and num2=0 and holding=0 then
begin
buy(1,1,limitr,c);
num2:=1;
end
if (c-ref(c,1))/ref(c,1)>0.034? then
begin
sell(1,holding,limitr,C);
?
end
?
?
?