Metastock Formulas New [updated]
: Scans such as V > Mov(V, 50, S) * 10 identify assets where today's volume is ten times the 50-day average.
1. Zero-Lag Triple Exponential Moving Average (TEMA) Crossover
: Traders are increasingly using the Peak() and Trough() functions combined with HHV (Highest High Value) to create "New High" scanners that filter for stocks within a specific percentage of their 100-day highs. New Essential Formula Examples metastock formulas new
Name: VWAP Dev Bands TypicalPrice:= (H + L + C) / 3; CumVolume:= Cum(V); VWAPCore:= Cum(TypicalPrice * V) / CumVolume; StandardDev:= Std(TypicalPrice, 20); UpperBand:= VWAPCore + (2 * StandardDev); LowerBand:= VWAPCore - (2 * StandardDev); VWAPCore; UpperBand; LowerBand; Use code with caution. Modern Exploration Filters for MetaStock Explorer
Buy when ZeroLagEMA changes from Red to Green (requires color coding in Expert Advisor). : Scans such as V > Mov(V, 50,
Ref(data, periods) : References data from a specific number of bars ago (e.g., Ref(C, -1) for yesterday's close).
// Adaptive Lookback Period Volatility := Stdev(C, 20); Direction := ABS(ROC(C, 20, $)); Efficiency := Direction / Volatility; FastLen := MAX(5, ROUND(20 * Efficiency)); SlowLen := FastLen * 3; // Now calculate MACD using FastLen and SlowLen instead of 12 and 26 MACD(C, FastLen, SlowLen, 9) New Essential Formula Examples Name: VWAP Dev Bands
Range := H - L; BuyingPressure := (C - L) / Range; SellingPressure := (H - C) / Range;
Assigns names to complex calculations to reduce text overhead and keep code highly readable.
Trading in the direction of the higher-timeframe trend significantly increases win rates. This formula identifies when the daily momentum aligns with the weekly trend.
: Calculates moving averages. Methods include Simple ( S ), Exponential ( E ), and Weighted ( W ).