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

VAP

Article/Author: Omega Research Inc., 1996

Download: FUNCTION-VAP.ELA

File Includes: Function - VAP

Description:

Inputs:
N
Hprice
Lprice
Cprice
MyVol

EasyLanguage Code:
INPUTS: N(NUMERICSIMPLE), HPRICE(NUMERICSERIES), LPRICE(NUMERICSERIES),

CPRICE(NUMERICSERIES) , MYVOL(NUMERICSERIES) ;

VARS: VAT(0), TVA(0), TV(0), VT(0), XT(0), TVAS(0) ;

IF (HPRICE - LPRICE) <> 0 THEN
XT = ( ( CPRICE - LPRICE ) - ( HPRICE - CPRICE ) ) / ( HPRICE - LPRICE ) ;

TVA = MYVOL * XT ;

TV = SUMMATION ( MYVOL , N ) ;

TVAS = SUMMATION( TVA, N ) ;

IF TV <> 0 THEN
VAT = ( TVAS / TV ) * 100 ; { VOLUME ACCUMULATION PERCENTAGE }

VAP = VAT ; { SCALED 1 - 100 }