请帮写两行代码:
统计图表上开多仓一共有多少次,统计图表上开空仓一共有多少次
统计图片上平多仓一共有多少次,统计图表上平空仓一共有多少次
variable:n=0,m=0,j=0,k=0;
if holding=0 and 开多条件 then begin
buy;
n:=n+1;
end
if holding=0 and 开空条件 then begin
buyshort;
m:=m+1;
end
if holding>0 and 平多条件 then begin
sell;
j:=j+1;
end
if holding<0 and 平空条件 then begin
sellshort;
k:=k+1;
end
n是开多次数,m是开空次数,j是平多次数,k是平空次数