各位大神好,
最近要寫一個 今日OBV創前50天新高,可是好像一直失敗
能幫我看看嗎? 謝謝
// 計算OBV
variable: intrabarpersist 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;
// 計算前50日OBV高點
var: intrabarpersist HighestOBV(0);
HighestOBV = Highest(obvolume, 50); // 計算前50日的OBV高點
condition1 = obvolume > HighestOBV; // 目前OBV創OBV數值50日高點
3 評論