您好 ,
請教內建程式裡看到OBV指標, 但是沒有OBV雙線指標嗎?
謝謝回覆
您好 ,
請教內建程式裡看到OBV指標, 但是沒有OBV雙線指標嗎?
謝謝回覆
Hello mialiu,
小幫手查了一下,OBV雙線指標指的似乎是OBV線和OBV的平均線?
如果是的話,您只需要參考內建的OBV腳本並使用 average 就可以計算移動平均。
以內建的腳本修改的簡單範例:
input: obvMALen(30, "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;
Plot1(obvolume, "OBV");
Plot2(average(obvolume, obvMALen), "OBV MA");
1 評論