下方是我兩個選股{VR44}
IF closew(0) >10 then ret = 1;
OutputField1(vr(2), 0, "W_VR");
{GGG}
IF closed(0)>20 THEN RET =1 ;
兩者選股後會出現..........不符合
VR指標如下
input: Length(26);
variable: _index(0), qu(0), qd(0), qf(0), _vr(0);
SetInputName(1, "天數");
qf = 0;
qu = 0;
qd = 0;
for _index = 1 to length
begin
if close[(_index - 1)] > close[_index] then
qu = qu + Volume[(_index - 1)]
else
begin
if close[(_index - 1)] < close[_index] then
qd = qd + Volume[(_index - 1)]
else { close[(_index - 1)] = close[_index] }
qf = qf + Volume[(_index - 1)];
end;
end;
if (qd + qf/2) <> 0 then
_vr = 100 * (qu + qf/2) /(qd + qf/2)
else
_vr = 1000;
Plot1(_vr, "VR");
這是原本XQ內建的數值是沒錯
但.....為啥會有不符合
我需要輸出指標的數值
有人懂這是發生什麼事情?
FB小編有回硬說分母不能為0
問題是這指標好像是預設的那如果要改
該怎麼變更.......
1 評論