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

Averages > MyDisplacedAvg

Article/Author: Omega Research Inc., 1997

Download: mydispavg.ela

File Includes: Indicator - MyDisplacedAvg

Category: Indicator > Averages

Description: 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 - number of bars to displace the plot of the moving average

EasyLanguage Code:
INPUT: PRICE(CLOSE),LENGTH(9),DISPLACE(0);

PLOT1[DISPLACE]( AVERAGE(PRICE,LENGTH),"AVG");
PLOT2(IFF(CURRENTBAR > DISPLACE, AVERAGE(PRICE,LENGTH)[DISPLACE],CLOSE[DISPLACE]) ,"DISPAVG");