Black Friday great discounts start today Learn more
+1 888 340 6572

OBVDI

Article/Author: “Enhancing On-Balance Volume and Negative Volume” Philip C. Holt, Stocks&Commodities Magazine, Traders Tips, 06/1996

Download: FUNCTION-OBVDI.ELA

File Includes: Function - OBVDI

Category: Function > OBVDI

Description:

Inputs:
LENGTH

EasyLanguage Code:
INPUTS: LENGTH(NUMERIC);


VARS: BOLLTOP(0), BOLLBOT(0), PERB(0), OBVBOLLTOP(0), OBVBOLLBOT(0), OBVPERB(0);

BOLLTOP = BOLLINGERBAND(CLOSE, LENGTH, 2);
BOLLBOT = BOLLINGERBAND(CLOSE, LENGTH, -2);
IF (BOLLTOP - BOLLBOT) <> 0 THEN
PERB = (CLOSE - BOLLBOT) / (BOLLTOP - BOLLBOT);

OBVBOLLTOP = BOLLINGERBAND(OBV, LENGTH, 2);
OBVBOLLBOT = BOLLINGERBAND(OBV, LENGTH, -2);
IF (OBVBOLLTOP - OBVBOLLBOT) <> 0 THEN
OBVPERB = (OBV - OBVBOLLBOT) / (OBVBOLLTOP - OBVBOLLBOT);

OBVDI = (1 + PERB) / (1 + OBVPERB);