Download: xavgdisp.ELA
File Includes: Indicator - XMov Avg - Displaced
Category: Indicator > Averages
Description:
This indicator plots X Average (Exponential Moving Average) indicator. Displaced moving averages plot the moving average values of a previous bar or later bar on the current bar.
Usage:
The most popular method of interpreting a moving average is to compare the relationship between a moving average of the security's price with the security's price itself (or between several moving averages).
Inputs:
Price - the data series to average
Length - the parameter tells how many bars to average
Displace - the parameter tells how many bars to displace
EasyLanguage Code:
INPUT : PRICE(CLOSE), LENGTH(9), DISPLACE(5);
IF DISPLACE >= 0 THEN BEGIN
IF CURRENTBAR > DISPLACE THEN
PLOT1(XAVERAGE(PRICE,LENGTH)[DISPLACE],"XAVGDISPLACE");
END;
IF DISPLACE < 0 THEN BEGIN
IF CURRENTBAR > ABSVALUE(DISPLACE) THEN
PLOT1[ABSVALUE(DISPLACE)](XAVERAGE(PRICE,LENGTH),"XAVGDISPLACE");
END;