Custom Formula Collection

Average-Modified Method

From The New Commodity Trading Systems and Methods, by Perry J. Kaufman, Chapter 4 - Moving Averages, pg. 60.

NOTE: 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))))

For additional help with formulas, please see the Formula Primer.

Can't find the custom formula you need? MetaStock can create formulas for you.