如題,策略雷達設定 k 棒內單次觸發,程式符合條件時觸發通知,XQ執行均正常,但唯獨 print指令會不斷重複執行,程式碼如下,請問是否有撰寫錯誤,請協助指導,謝謝。
var:intraBarPersist c0(0);
var:price_change(0);
if time=093000 or date<>date[1] then c0=0;
if time > 093000 then begin
if isLastBar and c0=0 and condition1 and condition2 and condition5 and condition6 and condition20 and condition25 then begin
// ----print資訊----
price_change = 100 * ((close - GetField("參考價", "D")) / GetField("參考價", "D")); // 計算當日漲跌幅
print(file("D:\XQ2Line_beta-1\1\Strategy"),"漲跌幅:"+numtoStr(price_change, 2)+"%"); // 拋出當日漲跌幅
ret=1;
c0=1;
end;
end;
 
            
        
        
        
            
1 評論