你好
因為XQ預設盤前撮合報價只能看到前100檔
想看到 "盤前撮和漲幅排行前200檔"
有自行寫XS編譯碼(下方貼出來),但都用不出來
請問能否幫我檢查哪裡出問題?
如果差異很大的話,不知可否請你幫忙一下
幫我看怎麼寫,謝謝您
--------------------------------------------------
// 宣告漲幅變數
variable: sim_change(0);
// 限定只在盤前試撮時間(08:30 到 08:59:59)執行
if currenttime >= 083000 and currenttime < 090000 then begin
// q_SimulatedTradePrice:XQ 官方盤前試撮成交價專用代碼
// q_RefPrice:昨日收盤參考價
if q_SimulatedTradePrice > 0 and q_RefPrice > 0 then begin
// 計算盤前即時試撮漲跌幅
sim_change = 100 * (q_SimulatedTradePrice - q_RefPrice) / q_RefPrice;
// 篩選門檻:只要試撮漲幅大於 0.5% 且小於等於 10% 即可觸發
if sim_change >= 0.5 and sim_change <= 10 then begin
ret = 1;
retmsg = "試撮漲幅: " + numtostr(sim_change, 2) + "%";
end;
end;
end;
--------------------------------------------------------------------