+1 888 340 6572

UDVolume (Upside/Downside Volume)

Article/Author: Aldo A. Palles for Omega Research Inc., 1997

Download: FUNCTION-UDVOL.ELA

File Includes: Function - UDVolume

Category: Function > Volume based

EasyLanguage Code:

INPUTS: N(NUMERICSIMPLE);
VARS: UPVOL(0), DNVOL(0), X(0);


UPVOL = 0;
DNVOL = 0;

FOR X = 0 TO N - 1 BEGIN
IF CLOSE[X] > CLOSE[X+1] THEN UPVOL = UPVOL + VOLUME[X];
IF CLOSE[X] < CLOSE[X+1] THEN DNVOL = DNVOL + VOLUME[X];
END;

IF DNVOL > 0 THEN UDVOLUME = UPVOL / DNVOL;