|
MetaStock
Formula - Average
Modified Method by Perry Kaufman
rev.
10/27/97
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 & NT only and 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 periods to use in the moving average.
| 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))))
|
|