variable:n=0;
if hour<>ref(hour,1) then n:=0;
if 开多条件 and n<限定的次数 then BEGIN
buy......;
end
if 平多条件 and holding>0 then begin
sell........;
n:=n+1;
end
这个是1小时的,半小时的把
if hour<>ref(hour,1) then n:=0;
改成
if hour<>ref(hour,1) or minute=30 then n:=0;
版主大大,请问如果是2小时内 和 一个半小时以内最多操作n次怎么表达呢?还有。。。。如果2小时内该品种图表资产亏损超过1.5%,那在这2小时内就不再操作应该怎样编写呢?求指点!
2小时: mod(hour,2)=0
一个半小时: 不好弄
if hour<>ref(hour,1) or mod(hour,2)=0 then n:=0; 是这样???没效果哦