+1 888 340 6572

BuffAverage

Article/Author: "BUff Up Your Moving Averages", Buff Dormeier, S&C Magazine, Traders Tips, 02/2001

Download: FUNCTION-BUFFAVG.ELA

File Includes: Function - BuffAverage

Category: Function > BuffAverage

Description:

Inputs:
Price -
Length -

EasyLanguage Code:
INPUTS: PRICE(NUMERIC), LENGTH(NUMERIC);

VARIABLES: VOLSUM(0), BUFF(0);

VOLSUM = SUMMATION(VOLUME, LENGTH);
BUFF = 0;

IF VOLSUM <> 0 THEN BEGIN
FOR VALUE1 = 0 TO LENGTH - 1 BEGIN
BUFF = BUFF + ((PRICE[VALUE1] * VOLUME[VALUE1]) / VOLSUM);
END;
END;

BUFFAVERAGE = BUFF;