Here's the Metastock code for the Vortex Indicator
discussed in the January 2010 issue of TASC
{Vortex Indicator}
{TAS&C Jan 2010}
{Written for Metastock by Preston Umrysh}
Period:= Input("Enter periods",1,100, 14);
VMP:=Sum(Abs( H-Ref(L,- 1)),period) ;
VMM:=Sum(Abs( L-Ref(H,- 1)),period) ;
STR:=Sum(ATR( 1),period) ;
VIP:=VMP/STR; VIP;
VIM:=VMM/STR; VIM;
{end}
enjoy,
Preston