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分鐘頻率是錯誤的開盤價
請問各位大大
這有可能是哪個環節出錯呢?
3 評論