This is a trading object shared by a member. You can use this object as well as hundreds of others with QuantShare - Trading Software.
Click on the Like button or on one of the share buttons to share this object and spread the word about QuantShare.
QuantShare is an advanced trading software for stock, forex, futures, ETF and options markets. It is the best and the most complete EOD trading software software and it is FREE (beta version).
Day of week average is a date-related function. It does not aim at generating signals and making decisions, but is used as a statistical indicator tracing the price change dependently on the day of the week. It gives the price simple moving average over N bars back, these bars corresponding to the same day of week.
The day of week average function, named DayOfWkAvg, has 3 parameters. The first is the variable, for example, the price or the volume, for which the moving averages will be calculated. The second is the day of week which corresponds to the bars that will be taken to make the moving averages calculation. The last is the number of bars back that will be averaged. For example, if we want to calculate the day of week average for each Tuesday taking a 3-bar period back, and if the price values were respectively 100, 150 and 200 for Tuesday 24th November, 1st December and 8th December, the function would return 150 for 8th December as well as for the bars between 8th December and the next Tuesday, ie 15th December.
For the second parameters (day of week):
1 corresponds to Monday
2 corresponds to Tuesday
3 corresponds to Wednesday
4 corresponds to Thursday
5 corresponds to Friday