以下是否正确?
当日开盘后第一次跌幅达12点开空,
当日开盘后第一次升幅达12点开多
variable:n:=0;
H1:=hhv(h, todaybar);
if h1-L>=12 and n=0 then
begin
buyshort(holding=0,1,market);
n:=1;
end
aaa:H1-L,noaxis,linethick0;
L1:=llv(L,todaybar);
if h-L1>=12 and n=0 then
begin
buy(holding=0,1,market);
n=1;
end
if time>=145700 then
sell(holding>0,holding,market);
sellshort(holding<0,holding,market);
if time=closetime(0) then begin
n:=0;
end
if time>=145700 then
sell(holding>0,holding,market);
sellshort(holding<0,holding,market);
variable:n:=0;
H1:=hhv(h, todaybar);
L1:=llv(L,todaybar);
aa:h-l1,noaxis,linethick0;
bb:h1-L,noaxis,linethick0;
if h1-L>=4 and n=0 then
begin
buyshort(holding=0,1,market);
n:=1;
end
if h-L1>=4 and n=0 then
begin
buy(holding=0,1,market);
n:=1;
end
if H-enterprice >=4 then sell(holding>0,0,market);
if enterprice-L>=4 then sellshort(holding<0,0,market);
sell(time>151200 and holding>0, 0, market);
sellshort(time>151200 and holding<0, 0, market);
if time=closetime(0) then begin
n:=0;
end
此代码测试为开空(期指8/11)
将开空代码移至开多代码下方时测试即为开空
但按盘面显示应该先符合开多条件
请问那里出错?
写在前面的,就不是先成立了?
用户多加理解“写在前面先运行”这句话