同個腳本在不同股票上的開盤價不同

  •   79 
  • 最後發表   肯尼  2025 六月 18
肯尼 發文於   2025/06/18

vars:
    todayOpen(0),
    todayHigh(0),
    todayLow(999999),
    yesterdayClose(0),
    gapPct(0),
    rangePct(0),
    todayDate(0);

// 每日初始化
if Date <> todayDate and Time >= 085900 and Time <= 090100 then
begin
    todayDate = Date;
    yesterdayClose = GetField("收盤價", "D")[1];
    todayOpen = Open;
    todayHigh = High;
    todayLow = Low;
end
else
begin
    if High > todayHigh then
        todayHigh = High;
    if Low < todayLow then
        todayLow = Low;
end;

// 計算百分比
if yesterdayClose > 0 then
begin
    gapPct = (todayOpen - yesterdayClose) / yesterdayClose * 100;
    rangePct = (todayHigh - todayLow) / yesterdayClose * 100;
end;

// 使用 plot1~4 繪製數值
plot1(todayOpen, "開盤價");
plot2(yesterdayClose, "昨收價");
plot3(gapPct, "跳空%");
plot4(rangePct, "振幅%");

請問一下這是我的指標

畫線標示:

 

  • 今日開盤價

  • 昨日收盤價

  • 跳空%、

  • 振幅%

之前使用上都沒有問題

但是今日(6/18)在6231系微這支股票上  2分鐘頻率  開盤價 267.5  但跑出來是262(和昨收一樣)

原本以為是我程式碼問題

但是我發現其他股票都正常

然後更奇怪的是6231  在3分鐘以上的頻率的開盤價都是正常顯示

只有1 和 2分鐘頻率是錯誤的開盤價

 

請問各位大大 

這有可能是哪個環節出錯呢?

 

 

 

排序方式: 標準 | 最新
肯尼 發文於   2025/06/18

剛剛又發現3297、4551、2351這三支是一樣的情況 只有在1  2 分K會把開盤價算成昨日收盤價

虎科大許教授 發文於   2025/06/18

這些商品今天都延後兩分鐘開盤,你用2分K,會做補K的動作,亦即第一根K的四個價格都會是昨天的收盤價。

 

 

 

 

 

 

肯尼 發文於   2025/06/18

了解了~~~謝謝你

發表回覆
Close