Indicators
Stratifyre exposes 120 public indicator and pattern identifiers: 74 technical indicators and 46 candlestick patterns. The expression DSL provides 78 named indicator functions; moving-average variants such as HMA and TEMA are selected through MA({type: ...}). This page is a reference for the library, organized by category.
When building a rule, you select indicators from a searchable dropdown menu. Each indicator has configurable parameters (like period length or source) that you can adjust to fit your strategy.
Trend indicators
Section titled “Trend indicators”Trend indicators help you identify the direction and strength of a market move. They are the foundation of trend-following strategies and are often used as filters in other strategy types.
Moving averages
Section titled “Moving averages”Moving averages smooth out price data to reveal the underlying trend direction.
| Indicator | What it measures | Key parameters |
|---|---|---|
| SMA (Simple Moving Average) | Average price over a set number of bars, giving equal weight to each bar | Period (default: 20), Source |
| EMA (Exponential Moving Average) | Weighted average that gives more importance to recent prices, reacting faster to changes | Period (default: 20), Source |
| DEMA (Double Exponential Moving Average) | A smoother, faster-reacting version of EMA that reduces lag | Period (default: 20), Source |
TEMA (Triple Exponential Moving Average, via MA({type: 'tema'})) |
Further reduces lag by applying triple exponential smoothing | Period (default: 20), Source |
| RMA (Rolling Moving Average) | Also known as the Wilder Smoothing Method; commonly used internally by RSI | Period (default: 14), Source |
| WMA (Weighted Moving Average) | Applies linearly increasing weights to more recent bars | Period (default: 20), Source |
| KAMA (Kaufman Adaptive Moving Average) | Automatically adjusts its smoothing based on market volatility – fast in trends, slow in ranges | Period (default: 10), Fast Period, Slow Period |
HMA (Hull Moving Average, via MA({type: 'hma'})) |
Designed to virtually eliminate lag while maintaining smoothness | Period (default: 20), Source |
| VWMA (Volume-Weighted Moving Average) | Weights each bar’s price by its volume, emphasizing high-volume periods | Period (default: 20) |
| LINREG (Linear Regression) | Fits a linear regression line through the data to project the trend | Period (default: 25), Source |
Trend direction and strength
Section titled “Trend direction and strength”| Indicator | What it measures | Key parameters |
|---|---|---|
| MACD (Moving Average Convergence Divergence) | Relationship between two EMAs; shows trend direction, momentum, and potential reversals. Returns three values: MACD line, Signal line, and Histogram | Fast Period (default: 12), Slow Period (default: 26), Signal Period (default: 9) |
| ADX (Average Directional Index) | Measures the strength of a trend regardless of its direction. Values above 25 suggest a strong trend | Period (default: 14) |
| Aroon | Identifies whether a security is trending and how strong the trend is by measuring the time since the most recent high and low. Returns Aroon Up and Aroon Down | Period (default: 14) |
| Ichimoku Cloud | A comprehensive trend system that shows support/resistance, trend direction, and momentum all at once. Returns Conversion Line (Tenkan-sen), Base Line (Kijun-sen), Leading Span A, Leading Span B, and Lagging Span | Tenkan Period (default: 9), Kijun Period (default: 26), Senkou B Period (default: 52) |
| Qstick | Measures the dominance of bullish or bearish candlesticks over a given period | Period (default: 14) |
| Supertrend | Plots a trailing stop line that flips between support and resistance based on ATR. Useful for trend direction and dynamic stops | Period (default: 10), Multiplier (default: 3) |
| Parabolic SAR | Plots trailing dots above or below price that indicate trend direction and potential reversal points | Acceleration Factor (default: 0.02), Maximum Factor (default: 0.2) |
| APO (Absolute Price Oscillator) | The absolute difference between a fast and slow EMA, showing trend momentum in price terms | Fast Period (default: 12), Slow Period (default: 26) |
| PPO (Percentage Price Oscillator) | Similar to MACD but expressed as a percentage, making it easier to compare across instruments | Fast Period (default: 12), Slow Period (default: 26), Signal Period (default: 9) |
| BOP (Balance of Power) | Measures the strength of buyers vs. sellers by comparing the close to the open relative to the range | (No additional parameters) |
| Vortex Indicator | Identifies the start of a new trend by measuring positive and negative trend movement. Returns VI+ and VI- | Period (default: 14) |
| Mass Index | Detects trend reversals by analyzing the narrowing and widening of the high-low range | Period (default: 25) |
Momentum indicators
Section titled “Momentum indicators”Momentum indicators measure the speed and strength of price movement. They are commonly used to identify overbought/oversold conditions and potential reversals.
| Indicator | What it measures | Key parameters |
|---|---|---|
| RSI (Relative Strength Index) | Measures the speed and magnitude of recent price changes on a 0-100 scale. Below 30 is commonly considered oversold; above 70, overbought | Period (default: 14) |
| RSI2 | A 2-period RSI that is much more sensitive to short-term price changes; popular for mean-reversion strategies | Period (default: 2) |
| Stochastic Oscillator | Compares the closing price to the price range over a set period on a 0-100 scale. Returns %K and %D lines | K Period (default: 5), K Slow Period (default: 3), D Period (default: 3) |
| KDJ | An enhanced version of the Stochastic that adds a J line for additional sensitivity | K Period (default: 9), D Period (default: 3), J Multiplier |
| ROC (Rate of Change) | The percentage change in price over a set number of bars, measuring pure momentum | Period (default: 14) |
| CCI (Commodity Channel Index) | Measures how far price has deviated from its statistical mean. Values above +100 or below -100 indicate strong momentum | Period (default: 20) |
| Williams %R | Similar to the Stochastic but on an inverted scale (0 to -100). Below -80 is oversold; above -20 is overbought | Period (default: 14) |
| Awesome Oscillator | Measures market momentum using the difference between a 5-period and 34-period SMA of the midpoint price | (Uses default periods) |
| Momentum | The absolute difference between the current price and the price N bars ago | Period (default: 10) |
| TSI (True Strength Index) | A double-smoothed momentum oscillator that filters out noise while capturing trend strength | Long Period (default: 25), Short Period (default: 13) |
| UO (Ultimate Oscillator) | Combines momentum across three timeframes into a single value to reduce false signals | Short Period (default: 7), Medium Period (default: 14), Long Period (default: 28) |
| Stochastic RSI | Applies the Stochastic formula to RSI values instead of price, creating an extremely sensitive momentum oscillator | RSI Period (default: 14), Stoch Period (default: 14), K Period (default: 3), D Period (default: 3) |
Volatility indicators
Section titled “Volatility indicators”Volatility indicators measure how much and how quickly prices are moving. They are essential for position sizing, stop-loss placement, and identifying breakout conditions.
| Indicator | What it measures | Key parameters |
|---|---|---|
| Bollinger Bands | Plots bands at a set number of standard deviations above and below an SMA, creating a dynamic envelope that expands with volatility and contracts during calm periods. Returns Upper Band, Middle Band, and Lower Band | Period (default: 20), Standard Deviations (default: 2) |
| ATR (Average True Range) | The average range of price movement per bar, accounting for gaps. The go-to measure for setting stop-loss distances and position sizing | Period (default: 14) |
| NATR (Normalized ATR) | ATR expressed as a percentage of the closing price, making it comparable across instruments with different price levels | Period (default: 14) |
| Keltner Channels | Similar to Bollinger Bands but uses ATR instead of standard deviation to set the channel width. Returns Upper, Middle, and Lower channels | EMA Period (default: 20), ATR Period (default: 10), Multiplier (default: 1.5) |
| Donchian Channels | Plots the highest high and lowest low over a set period, creating a breakout channel. Returns Upper, Lower, and Middle channels | Period (default: 20) |
| Chandelier Exit | A volatility-based trailing stop calculated as a multiple of ATR from the highest high (for longs) or lowest low (for shorts) | Period (default: 22), Multiplier (default: 3) |
| Acceleration Bands | Envelope bands that account for volatility using the high-low range, expanding during volatile periods | Period (default: 20), Factor (default: 0.001) |
| Standard Deviation | The statistical measure of price dispersion around the mean | Period (default: 20), Source |
| Ulcer Index | Measures downside volatility specifically, quantifying the depth and duration of price drawdowns | Period (default: 14) |
Volume indicators
Section titled “Volume indicators”Volume indicators analyze trading volume to confirm trends, detect accumulation/distribution, and identify potential reversals.
| Indicator | What it measures | Key parameters |
|---|---|---|
| OBV (On Balance Volume) | A cumulative running total that adds volume on up-days and subtracts on down-days, measuring buying and selling pressure | (No additional parameters) |
| VWAP (Volume-Weighted Average Price) | The average price weighted by volume throughout the trading session. A key institutional benchmark for fair value | (Session-based, resets daily) |
| MFI (Money Flow Index) | A volume-weighted version of RSI that measures buying and selling pressure on a 0-100 scale | Period (default: 14) |
| Chaikin Money Flow (CMF) | Measures the accumulation or distribution of money flow over a period based on where price closes within the day’s range | Period (default: 21) |
| Force Index | Combines price change and volume to measure the force behind a price move. Positive values indicate buying pressure | Period (default: 13) |
| SVP (Session Volume Profile) | Builds a volume profile for each daily trading session, exposing POC, VAH, VAL, high/low-volume nodes, distribution scores, and profile shape | Session lookback, Data interval, Value area |
| VP (Volume Profile) | Displays volume traded at each price level over a rolling fixed lookback window | Lookback period, Bar interval, Value area |
| AVP (Anchored Volume Profile) | Builds a profile from a selected anchor, such as a bars-ago point | Anchor, Data interval, Value area |
| Accumulation/Distribution Line | A cumulative indicator that uses volume and the close’s position within the high-low range to gauge whether a security is being accumulated or distributed | (No additional parameters) |
| Chaikin Oscillator | The difference between a fast and slow EMA of the Accumulation/Distribution Line, measuring momentum of money flow | Fast Period (default: 3), Slow Period (default: 10) |
| Volume Price Trend (VPT) | Similar to OBV but accounts for the magnitude of price changes, not just the direction | (No additional parameters) |
| Negative Volume Index (NVI) | Tracks price changes on days when volume decreases, based on the theory that “smart money” trades on low-volume days | (No additional parameters) |
| Positive Volume Index (PVI) | Tracks price changes on days when volume increases | (No additional parameters) |
| Ease of Movement | Relates the magnitude of a price change to its volume, measuring how easily price moves | Period (default: 14) |
Session volume profile (SVP)
Section titled “Session volume profile (SVP)”Use SVP when the relevant support and resistance levels should reset at session boundaries.
The profile exposes named fields such as poc, vah, val, hvn, and lvn.
SVP({dataInterval: '30'}).pocSVP({dataInterval: '30'}).vahSVP({dataInterval: '30'}).valVP({lookback: 20, interval: '30'}).pocSVP history has two separate indexes:
| Expression | Meaning |
|---|---|
SVP({dataInterval: '30'}).poc |
Current session’s latest POC |
SVP({dataInterval: '30'}).poc[1] |
Previous snapshot in the current session |
SVP({dataInterval: '30'})[1].poc |
Previous session’s latest POC – typically yesterday’s final POC |
SVP({dataInterval: '30'})[1].poc[1] |
Previous session’s previous-to-last snapshot |
The index before .poc, .vah, or .val selects a session. The index after the property selects
a snapshot within that session. Use a lookback large enough to retain the sessions you reference.
For example, SVP({lookback: 2, dataInterval: '30'})[1].poc compares the current session with the
previous session’s final POC.
See Expressions for the full indexing reference.
Market structure and zones
Section titled “Market structure and zones”Market structure features identify key price levels, supply/demand zones, and structural patterns that are widely used in modern price-action analysis. Persistent price areas are represented by ZoneDefinitions and referenced with ZONES(...) in rules.
| Indicator | What it measures | Key parameters |
|---|---|---|
| Fair Value Gap zones | Detects gaps between three consecutive candles where price moved so aggressively that it left an unfilled zone – these often act as future support or resistance | Formation, bounds, invalidation |
| Order Block zones | Identifies the last opposing candle before a strong move, marking institutional supply/demand zones that may attract price in the future | Formation, bounds, invalidation |
| Swing High / Low zones | Represents confirmed three-bar pivot highs as resistance zones and pivot lows as support zones | Formation, bounds, invalidation |
| Initial Balance | The price range established during the first hour (or specified period) of a trading session, used as a reference for the rest of the day | Period (minutes, default: 60) |
| Opening Range | The high and low of a customizable period after the market open, commonly used for breakout strategies | Period (minutes) |
| Support / Resistance Levels | Automatically identifies horizontal price levels where price has repeatedly reversed or paused | Lookback period, Sensitivity |
| FIB_LEVELS | Returns rule-usable Fibonacci retracement and extension fields from the most recent anchored swing. Typical fields include retracement236, retracement382, retracement500, retracement618, retracement786, extension1272, extension1618, extension2000, and extension2618 | Lookback, Anchor Provider, Source |
| FIB_PATTERN | Detects Fibonacci completion structures and exposes scalar fields like matched, confidence, completionPrice, stopPrice, target1, target2, ageBars, and patternDirection | Pattern, Lookback, Anchor Provider, Ratio Tolerance |
Using Fibonacci indicators in rules
Section titled “Using Fibonacci indicators in rules”FIB_LEVELS and FIB_PATTERN are designed for direct use inside conditions and expressions rather than as drawing-only overlays.
close > FIB_LEVELS({lookback: 120, anchorProvider: 'swing'}).extension1618close < FIB_LEVELS({lookback: 120}).retracement618FIB_PATTERN({pattern: 'gartley', lookback: 200}).matched == 1FIB_PATTERN({pattern: 'abcd', lookback: 120}).confidence > 0.8Use FIB_LEVELS when you want named retracement or extension prices from a recent swing. Use FIB_PATTERN when you want rule-friendly confirmation that an abcd, gartley, bat, or butterfly setup has formed.
Candlestick pattern indicators
Section titled “Candlestick pattern indicators”Stratifyre recognizes 46 candlestick patterns, detecting them automatically so you can use them as conditions in your rules. Each pattern indicator returns a signal when the pattern is detected on the current bar.
Single-candle patterns
Section titled “Single-candle patterns”| Pattern | What it signals |
|---|---|
| Doji | Indecision – open and close are virtually equal |
| Dragonfly Doji | Potential bullish reversal when found at a support level |
| Gravestone Doji | Potential bearish reversal when found at a resistance level |
| Hammer | Bullish reversal signal at the bottom of a downtrend |
| Inverted Hammer | Potential bullish reversal; buyers are starting to push back |
| Hanging Man | Bearish reversal signal at the top of an uptrend |
| Shooting Star | Bearish reversal; sellers overwhelmed buyers after an intraday rally |
| Spinning Top | Indecision; neither buyers nor sellers have control |
| Marubozu (Bullish) | Strong bullish conviction – no upper or lower shadow |
| Marubozu (Bearish) | Strong bearish conviction – no upper or lower shadow |
Two-candle patterns
Section titled “Two-candle patterns”| Pattern | What it signals |
|---|---|
| Bullish Engulfing | A large bullish candle completely engulfs the prior bearish candle, signaling a potential reversal |
| Bearish Engulfing | A large bearish candle completely engulfs the prior bullish candle |
| Harami Cross | A small-bodied candle inside the prior candle’s range, signaling consolidation and possible reversal |
| Piercing Line | A bullish candle opens below the prior bearish candle’s low and closes above its midpoint |
| Dark Cloud Cover | A bearish candle opens above the prior bullish candle’s high and closes below its midpoint |
Three-candle patterns
Section titled “Three-candle patterns”| Pattern | What it signals |
|---|---|
| Morning Star | A three-bar bullish reversal: bearish candle, small-body candle (indecision), then a strong bullish candle |
| Evening Star | A three-bar bearish reversal: bullish candle, small-body candle, then a strong bearish candle |
| Three White Soldiers | Three consecutive bullish candles with higher closes, signaling strong buying pressure |
| Three Black Crows | Three consecutive bearish candles with lower closes, signaling strong selling pressure |
| Three Inside Up | A bullish harami followed by a confirming bullish candle |
| Three Inside Down | A bearish harami followed by a confirming bearish candle |
| Three Outside Up | A bullish engulfing followed by a confirming bullish candle |
| Three Outside Down | A bearish engulfing followed by a confirming bearish candle |
| Abandoned Baby (Bullish) | A rare and powerful reversal: bearish candle, doji that gaps down, then bullish candle that gaps up |
| Abandoned Baby (Bearish) | A rare bearish reversal: bullish candle, doji that gaps up, then bearish candle that gaps down |
Additional patterns
Section titled “Additional patterns”Stratifyre also detects many additional patterns including:
- Belt Hold (bullish and bearish)
- Counterattack (bullish and bearish)
- Matching Low
- Stick Sandwich
- Homing Pigeon
- Ladder Bottom
- Tri-Star (bullish and bearish)
- Tasuki Gap (upside and downside)
- And more
Price-derived indicators
Section titled “Price-derived indicators”These indicators transform raw price data into alternative representations:
| Indicator | What it measures | Key parameters |
|---|---|---|
| Typical Price | The average of High, Low, and Close: (H + L + C) / 3 |
(No additional parameters) |
Using indicators in your strategy
Section titled “Using indicators in your strategy”When adding a condition in the rule builder:
- Click the indicator dropdown on the left-hand or right-hand side of a condition.
- Search or browse the indicator list by name or category.
- Select the indicator – its default parameters will be pre-filled.
- Adjust parameters if needed (for example, change the RSI period from 14 to 21, or switch the SMA source from Close to High).
- For indicators that return multiple values (like Bollinger Bands or MACD), select the specific output you want (for example, “Upper Band,” “MACD Line,” or “Histogram”).
Choosing the right indicator
Section titled “Choosing the right indicator”| If you want to… | Consider using… |
|---|---|
| Identify trend direction | SMA, EMA, MACD, ADX, Ichimoku Cloud |
| Find overbought/oversold levels | RSI, Stochastic, CCI, Williams %R, MFI |
| Measure volatility | ATR, Bollinger Bands, Keltner Channels, Standard Deviation |
| Confirm with volume | OBV, VWAP, CMF, Volume Profile, Force Index |
| Detect candlestick patterns | Any pattern from the Candlestick Patterns category |
| Find support/resistance | ZoneDefinitions, FIB_LEVELS retracements/extensions, Donchian Channels |
| Confirm harmonic-style completion zones | FIB_PATTERN, ZoneDefinitions |
| Set stop-loss distances | ATR, Chandelier Exit, Parabolic SAR, Supertrend |
| Filter choppy markets | ADX, Bollinger Band Width, Standard Deviation |
