+1 888 340 6572

Averages > DayOfWeek Average

Article/Author: Omega Research Inc., 1996

Download: DAYOFWEEK_AVERAGE.ELA

File Includes:

Indicator - DayOfWeek Average
Function - DayOWkAvg

Category: Indicator > Average

Description:

This indicator plots the Moving Average of a specified price of a user specified day of the week. The Study also plots a dot on the day of the week that is being Averaged. This indicator is one of the best for measuring the price change depending on the day of the week.

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 Price value of the Moving Average
DayOWeek - The Day of the week to be Averaged (1 = Mon, 2 = Tues, 3.....)
AvgLen - The Length of the Moving Average
Smooth - Defines a Raw or Smoothed Average (0 = Smooth, 1 = Raw)

EasyLanguage Code:
INPUTS: PRICE(HIGH), DAYOWEEK(5), AVGLEN(9), SMOOTH(0);


VALUE1 = DAYOWKAVG(PRICE, DAYOWEEK, AVGLEN);

IF SMOOTH = 0 THEN BEGIN
IF VALUE1 <> VALUE1[1] AND VALUE1 <> 0 THEN BEGIN
PLOT1(VALUE1, "DOWAVG");
IF DAYOFWEEK(DATE) = DAYOWEEK THEN PLOT2(VALUE1, "DAYOWK");
END;
END;
IF SMOOTH >=1 THEN BEGIN
IF VALUE1 <> 0 THEN BEGIN
PLOT1(VALUE1, "DOWAVG");
IF DAYOFWEEK(DATE) = DAYOWEEK THEN PLOT2(VALUE1, "DAYOWK");
END;
END;