MetaStock formulas for z-score calculation given in "Z-Score Indicator" by Veronique Valcu:


To create the z-score indicator using MetaStock 6.52, select Indicator Builder from
the Tools menu, select "New," assign "z-score" as Name and enter the following code:

Periods:=Input("Enter Periods",5,21,20);    {number of periods used, in this case 20}
a := (C-Mov(C,Periods,S))/ Stdev(C,Periods ) ;   {define z-score }
a;    {plot z-score}


--V.V.