- Katılım
- 23 Eki 2020
- Mesajlar
- 1,828
rev. 01/06/97 Frequently we get requests for a formula that would take only one day of the week and average them for several weeks. For example constructa moving average of only the Fridays. This can be done in MetaStock for Windows byusing the following formula. The following MetaStock formula is for a moving average of the Friday of every week, if you want it calculated on any other day youwould substitute a 1 for Monday, 2 for Tuesday, 3 for Wednesday, and 4 for Thursday. The numberof day you wanted would replace the two 5's already in the formula. This movingaverage is currently a 6 week or 6 Friday moving average. If you wanted to change it to another periodicity you would change the 30 to the number of weeks or specific days multiplied by 5. In other wordsif you wanted a 4 day moving average of Friday you would change the 30 to 4*5 or 20. |
|
Moving Average of Only One Day of a the Week Mov(If(DayOfWeek( )=5,C,Peak(1,If(DayOfWeek( )=5,C,0),1)),15,S) |
Source / From: |