用以下代碼獲取開盤後5分鐘內最高價應該只會有一個數值,可是會跑2個數值出來,如下圖所示:
圖片內,第二次顯示的最高價才是正確的。
想請問小幫手為什麼會出現這種情況呢?謝謝
var: price_5mh(0);
var: barcount(0);
if date <> date[1] then barcount=1 else barcount+=1;
if barcount = 6 then //時間上來到了AM09:6:00
begin
price_5mh = highest(GetField("high","1")[1],5);
end;
Print(file("C:\SysJust\XQLite\XS\Print\"),NumToStr(date,0),NumToStr(time,0),"《",SymbolName,"》","09:05前最高價new:",price_5mh);
2 評論