請幫寫兩行代碼:
統計圖表上開多倉一共有多少次,統計圖表上開空倉一共有多少次
統計圖片上平多倉一共有多少次,統計圖表上平空倉一共有多少次
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是平空次數