variable:n=0;
a1:ref(asset,todaybar);
if a1-asset>500 or a1-asset<500 then n:=1;
if 开仓条件 and n=0 then begin
下单语句;
end
if time=closetime(0) then n:=0;
用全局变量来记录当前的状态,盈亏小于500时n=0,能够开仓,盈亏大于500时n=1,不能下单,
最后每天收盘时重置全局变量
variable:n=0;
a1:ref(asset,todaybar);
if asset-a1>500 or asset-a1<-500 then n:=1;
if 开仓条件 and n=0 then begin
下单语句;
end
if time=closetime(0) then n:=0;
中间有一段写错了,改了下
我改写了以后几乎不开仓了
能不能远程帮我看下我的程序