variable:n=0;
a1:ref(asset,todaybar);
if a1-asset>500 or a1-asset<500 then n:=1;
if 開倉(cāng)條件 and n=0 then begin
下單語(yǔ)句;
end
if time=closetime(0) then n:=0;
用全局變量來(lái)記錄當(dāng)前的狀態(tài),盈虧小于500時(shí)n=0,能夠開倉(cāng),盈虧大于500時(shí)n=1,不能下單,
最后每天收盤時(shí)重置全局變量
variable:n=0;
a1:ref(asset,todaybar);
if asset-a1>500 or asset-a1<-500 then n:=1;
if 開倉(cāng)條件 and n=0 then begin
下單語(yǔ)句;
end
if time=closetime(0) then n:=0;
中間有一段寫錯(cuò)了,改了下
我改寫了以后幾乎不開倉(cāng)了
能不能遠(yuǎn)程幫我看下我的程序