+1 888 340 6572

MWDXaverage

Article/Author: Omega Research Inc., 1995

Download: FUNCTION-MWDXAVERAGE.ELA

File Includes: Function - MWDXaverage

EasyLanguage Code:
INPUTS : PRICE(NUMERICSERIES),FAC(NUMERICSERIES);

VARS : FACTOR(0);

VALUE2=2/FAC-1;
IF VALUE2 + 1 <> 0 THEN BEGIN
IF CURRENTBAR <= 1 THEN BEGIN
FACTOR = 2 / (VALUE2 + 1);
VALUE1 = PRICE;
END
ELSE
VALUE1 = FACTOR * PRICE + (1 - FACTOR) * VALUE1[1];
MWDXAVERAGE=VALUE1;
END;