請問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,"均線");
1 評論