Detects when the Relative Strength Index drops below 30. RSI(14) < 30 Use code with caution. Copied to clipboard
ValueWhen returns the price of the most recent occurrence Resistance := ValueWhen(1, PivotHigh, Ref(H,-2)); Support := ValueWhen(1, PivotLow, Ref(L,-2));
The most underutilized frontier in MetaStock is the incorporation of non-correlated data. A genuinely "interesting" new formula looks at the relationship between assets, not just the asset itself.
The MetaStock language is patterned after functional spreadsheet logic, evaluating criteria sequentially on every price bar from left to right. Before programming complex multi-indicator systems, you must master the fundamental functions:
Instead of a simple 20-day MA, use a moving average that weights periods of low volatility higher than high volatility. B. Multi-Timeframe Integration (Daily/Weekly/Intraday) metastock formulas new
The editor now includes improved syntax highlighting and faster compilation times, reducing the friction when testing complex scripts.
Holds the active state (1 for Long, -1 for Short) until an opposing signal triggers. 4. Institutional Liquidity Flow Index
Users can now drag and drop existing formula plots directly into the formula window to instantly incorporate formulas within formulas, such as fml() or extfml() functions. 2. Developing "New" Formulas: Core Concepts
Don't just place these on charts. Use the The Explorer tool to scan the entire S&P 500 or NASDAQ for these specific formula triggers. Detects when the Relative Strength Index drops below 30
// 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)
AVMA
Standard bands use a static 20-period SMA. This formula uses the ATR (Average True Range) to adjust volatility bands more rapidly to changing market conditions.
Here are some conceptual formulas designed to leverage the capabilities of current MetaStock versions. 1. The Volatility-Adjusted Trend Follower (VATF) such as moving averages
Select from the top menu bar and click Indicator Builder . Click the New button on the right side of the dialog box. Type a unique identifier into the Name field.
MetaStock formulas are a set of instructions that tell the software how to calculate a specific value or perform a particular task. These formulas can be used to create custom indicators, such as moving averages, relative strength index (RSI), and Bollinger Bands. They can also be used to create trading systems, which are sets of rules that determine when to buy or sell a security.
: Identifying stocks where today's volume is 50% higher than the 21-period average: V > Mov(V, 21, S) * 1.5 Advanced Concepts