Variable:PosLast[20]=0;
Variable:PosNo=0;
if PosNo>=1 then
begin
for i=1 to PosNo do PosLast[i]:=PosLast[i]+1;
end;
EntCond1:=1;//
EntCond2:=weekday()=5;
EntCond3:=1;
EntCond:=EntCond1 and EntCond2 and EntCond3;
StopCond1:=PosLast[1]=14;
StopCond2:=0;
StopCond3:=0;
StopCond:=StopCond1 or StopCond2 or StopCond3;
if EntCond then
begin
开多:buy(1,1,thisclose);
PosNo:=PosNo+1;
end;
if holding<>0 then
begin
if StopCond then
begin
平多:sell(1,1,thisclose);
for i=1 to PosNo-1 do PosLast[i]:=PosLast[i+1];
PosLast[PosNo]:=0;
PosNo:=PosNo-1;
end;
end;
你把代码存成交易系统应用在豆粕1301上就能看到了,谢谢!
没有,该公式一个变量都没有显示在图上,怎么会出现坐标数据改动的
qq1971344681,直接看下吧
PosLast[20]:=0;
Variable:PosNo=0;
头两句这么定义就对了
你那个数组那个变量感觉应该是在每根K线上循环使用的,不应该用全局变量吧