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 #

Average - Modified Method by Perry J. Kaufman
At 11:53 AM 1/5/98 -0800, you wrote:

Is it possible to calculate the MODIFIED moving average (Perry Kaufman) within Metastock? I am told it can be done with TradeStation and CQG..

Here is the formula:-
MAV(t) = MAV(t-1) + [P(t)-MAV(t-1)]/n

Where:
MAV(t) is the current modified moving average
MAV(t-1) is the previous modified moving average value
P(t) is the current price (or value to be smoothed)

The starting point is calculated as a simple moving average..

When I try this in Metastock I get an error about a circular reference (due to referring to the prior day's value of this formula).

Thanks in advance,
-Neal.





From The New Commodity Trading Systems and Methods,by Perry J. Kaufman
Chapter 4 - Moving Averages, pg. 60.
This formula is for version 6.5 of MetaStock for Windows 95 & NTonlyand cannot be written in previous version.
This is a modified simple moving average.
The formula will prompt you for input for the number of time periodsto use in the moving average.

Average - Modified Method

Day:=Cum(1)+1;
Z:=Input("Periods",2,1000,5);
MV:=(1/Z);
If(Day<(Z+2),C,If(day=(Z+2),Mov(C,LastValue(Z),S),PREV+(MV*(C-PREV))))

 

e-w-Average_Modified_Method.gif
Source / From: TOP
http://purebytes.com/archives/metastock/ http://www.equis.com

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!