MetaStock™ Zone Forum & FAQ Artykuły Linki Elliott Waves EasyLanguage™ Zone

A B C D E F G H I J K L M N O P R S T U V W Y Z #

Moving Average of Only One Day of a the Week
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: TOP

Equis and MetaStock® and MetaStock Professional® are registered trademarks of Equis International. Achelis Binary Wave®, The DownLoader®,
Expert Advisor®, OptionScope®, Quotecenter® and Smart Charts® are trademarks of Equis International, a Thomson Reuters company.

TradeStation® Pro, TradeStation® 2000i, OptionStation®, SuperCharts®, PowerEditor® and EasyLanguage®
are registered trademarks of TradeStation Technologies, Inc. Other names and marks referred to are the property of their respective owners.

All information provided on this website is for educational purposes only. Trading involves risk, including possible loss of principal and other losses.

Ten i inne materiały na tej stronie zostały zamieszczone zostały jedynie w celach edukacyjnych, nie ponoszę żadnej odpowiedzialno¶ci za ich stosowanie.

Gra na giełdzie i rynkach walutowych (FOREX) niesie ze sob± ryzyko poważnych strat finansowych!