請問OBV平均指數問題?

  •   505 
  • 最後發表   icoolhome  2020 六月 18
icoolhome 發文於   2020/06/16

請問OBV平均指數問題? 我自己改過的XQ OBV均線,但跟元大點精靈的OBV數據不一樣?

請問要如何一樣?是哪裡公式寫錯呢?謝謝

// OBV均線參數
input: MAOBV1(26);
SetInputName(1, "天數");

// XQ: OBV指標
variable: obvolume(0);

if CurrentBar = 1 then
 obvolume = 0
else
  begin 
 if close > close[1] then
  obvolume = obvolume[1] + volume
 else
   begin
  if close < close[1] then
   obvolume = obvolume[1] - volume
  else
   obvolume = obvolume[1];
   end;  
  end;
 
value1 = Average(obvolume,MAOBV1); //計算26日OBV的移動平均
 
Plot1(obvolume, "OBV");
Plot2(value1,"均線");

附加文件

XQ小幫手 發文於   2020/06/18

Hi icoolhome,

我自己改過的XQ OBV均線,但跟元大點精靈的OBV數據不一樣

您好,請提供元大點精靈的OBV公式,以利對照釐清問題的原因,謝謝。

發表回覆
Close