Skip to content

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 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 smooth out price data to reveal the underlying trend direction.

IndicatorWhat it measuresKey parameters
SMA (Simple Moving Average)Average price over a set number of bars, giving equal weight to each barPeriod (default: 20), Source
EMA (Exponential Moving Average)Weighted average that gives more importance to recent prices, reacting faster to changesPeriod (default: 20), Source
DEMA (Double Exponential Moving Average)A smoother, faster-reacting version of EMA that reduces lagPeriod (default: 20), Source
TEMA (Triple Exponential Moving Average, via MA({type: 'tema'}))Further reduces lag by applying triple exponential smoothingPeriod (default: 20), Source
RMA (Rolling Moving Average)Also known as the Wilder Smoothing Method; commonly used internally by RSIPeriod (default: 14), Source
WMA (Weighted Moving Average)Applies linearly increasing weights to more recent barsPeriod (default: 20), Source
KAMA (Kaufman Adaptive Moving Average)Automatically adjusts its smoothing based on market volatility — fast in trends, slow in rangesPeriod (default: 10), Fast Period, Slow Period
HMA (Hull Moving Average, via MA({type: 'hma'}))Designed to virtually eliminate lag while maintaining smoothnessPeriod (default: 20), Source
VWMA (Volume-Weighted Moving Average)Weights each bar’s price by its volume, emphasizing high-volume periodsPeriod (default: 20)
LINREG (Linear Regression)Fits a linear regression line through the data to project the trendPeriod (default: 25), Source
IndicatorWhat it measuresKey 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 HistogramFast 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 trendPeriod (default: 14)
AroonIdentifies 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 DownPeriod (default: 14)
Ichimoku CloudA 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 SpanTenkan Period (default: 9), Kijun Period (default: 26), Senkou B Period (default: 52)
QstickMeasures the dominance of bullish or bearish candlesticks over a given periodPeriod (default: 14)
SupertrendPlots a trailing stop line that flips between support and resistance based on ATR. Useful for trend direction and dynamic stopsPeriod (default: 10), Multiplier (default: 3)
Parabolic SARPlots trailing dots above or below price that indicate trend direction and potential reversal pointsAcceleration 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 termsFast 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 instrumentsFast 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 IndicatorIdentifies the start of a new trend by measuring positive and negative trend movement. Returns VI+ and VI-Period (default: 14)
Mass IndexDetects trend reversals by analyzing the narrowing and widening of the high-low rangePeriod (default: 25)

Momentum indicators measure the speed and strength of price movement. They are commonly used to identify overbought/oversold conditions and potential reversals.

IndicatorWhat it measuresKey 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, overboughtPeriod (default: 14)
RSI2A 2-period RSI that is much more sensitive to short-term price changes; popular for mean-reversion strategiesPeriod (default: 2)
Stochastic OscillatorCompares the closing price to the price range over a set period on a 0-100 scale. Returns %K and %D linesK Period (default: 5), K Slow Period (default: 3), D Period (default: 3)
KDJAn enhanced version of the Stochastic that adds a J line for additional sensitivityK 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 momentumPeriod (default: 14)
CCI (Commodity Channel Index)Measures how far price has deviated from its statistical mean. Values above +100 or below -100 indicate strong momentumPeriod (default: 20)
Williams %RSimilar to the Stochastic but on an inverted scale (0 to -100). Below -80 is oversold; above -20 is overboughtPeriod (default: 14)
Awesome OscillatorMeasures market momentum using the difference between a 5-period and 34-period SMA of the midpoint price(Uses default periods)
MomentumThe absolute difference between the current price and the price N bars agoPeriod (default: 10)
TSI (True Strength Index)A double-smoothed momentum oscillator that filters out noise while capturing trend strengthLong Period (default: 25), Short Period (default: 13)
UO (Ultimate Oscillator)Combines momentum across three timeframes into a single value to reduce false signalsShort Period (default: 7), Medium Period (default: 14), Long Period (default: 28)
Stochastic RSIApplies the Stochastic formula to RSI values instead of price, creating an extremely sensitive momentum oscillatorRSI Period (default: 14), Stoch Period (default: 14), K Period (default: 3), D Period (default: 3)

Volatility indicators measure how much and how quickly prices are moving. They are essential for position sizing, stop-loss placement, and identifying breakout conditions.

IndicatorWhat it measuresKey parameters
Bollinger BandsPlots 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 BandPeriod (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 sizingPeriod (default: 14)
NATR (Normalized ATR)ATR expressed as a percentage of the closing price, making it comparable across instruments with different price levelsPeriod (default: 14)
Keltner ChannelsSimilar to Bollinger Bands but uses ATR instead of standard deviation to set the channel width. Returns Upper, Middle, and Lower channelsEMA Period (default: 20), ATR Period (default: 10), Multiplier (default: 1.5)
Donchian ChannelsPlots the highest high and lowest low over a set period, creating a breakout channel. Returns Upper, Lower, and Middle channelsPeriod (default: 20)
Chandelier ExitA 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 BandsEnvelope bands that account for volatility using the high-low range, expanding during volatile periodsPeriod (default: 20), Factor (default: 0.001)
Standard DeviationThe statistical measure of price dispersion around the meanPeriod (default: 20), Source
Ulcer IndexMeasures downside volatility specifically, quantifying the depth and duration of price drawdownsPeriod (default: 14)

Volume indicators analyze trading volume to confirm trends, detect accumulation/distribution, and identify potential reversals.

IndicatorWhat it measuresKey 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 scalePeriod (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 rangePeriod (default: 21)
Force IndexCombines price change and volume to measure the force behind a price move. Positive values indicate buying pressurePeriod (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 shapeSession lookback, Data interval, Value area
VP (Volume Profile)Displays volume traded at each price level over a rolling fixed lookback windowLookback period, Bar interval, Value area
AVP (Anchored Volume Profile)Builds a profile from a selected anchor, such as a bars-ago pointAnchor, Data interval, Value area
Accumulation/Distribution LineA 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 OscillatorThe difference between a fast and slow EMA of the Accumulation/Distribution Line, measuring momentum of money flowFast 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 MovementRelates the magnitude of a price change to its volume, measuring how easily price movesPeriod (default: 14)

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'}).poc
SVP({dataInterval: '30'}).vah
SVP({dataInterval: '30'}).val
VP({lookback: 20, interval: '30'}).poc

SVP history has two separate indexes:

ExpressionMeaning
SVP({dataInterval: '30'}).pocCurrent session’s latest POC
SVP({dataInterval: '30'}).poc[1]Previous snapshot in the current session
SVP({dataInterval: '30'})[1].pocPrevious 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 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.

IndicatorWhat it measuresKey parameters
Fair Value Gap zonesDetects gaps between three consecutive candles where price moved so aggressively that it left an unfilled zone — these often act as future support or resistanceFormation, bounds, invalidation
Order Block zonesIdentifies the last opposing candle before a strong move, marking institutional supply/demand zones that may attract price in the futureFormation, bounds, invalidation
Swing High / Low zonesRepresents confirmed three-bar pivot highs as resistance zones and pivot lows as support zonesFormation, bounds, invalidation
Initial BalanceThe price range established during the first hour (or specified period) of a trading session, used as a reference for the rest of the dayPeriod (minutes, default: 60)
Opening RangeThe high and low of a customizable period after the market open, commonly used for breakout strategiesPeriod (minutes)
Support / Resistance LevelsAutomatically identifies horizontal price levels where price has repeatedly reversed or pausedLookback period, Sensitivity
FIB_LEVELSReturns 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 extension2618Lookback, Anchor Provider, Source
FIB_PATTERNDetects Fibonacci completion structures and exposes scalar fields like matched, confidence, completionPrice, stopPrice, target1, target2, ageBars, and patternDirectionPattern, Lookback, Anchor Provider, Ratio Tolerance

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'}).extension1618
close < FIB_LEVELS({lookback: 120}).retracement618
FIB_PATTERN({pattern: 'gartley', lookback: 200}).matched == 1
FIB_PATTERN({pattern: 'abcd', lookback: 120}).confidence > 0.8

Use 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.

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.

PatternWhat it signals
DojiIndecision — open and close are virtually equal
Dragonfly DojiPotential bullish reversal when found at a support level
Gravestone DojiPotential bearish reversal when found at a resistance level
HammerBullish reversal signal at the bottom of a downtrend
Inverted HammerPotential bullish reversal; buyers are starting to push back
Hanging ManBearish reversal signal at the top of an uptrend
Shooting StarBearish reversal; sellers overwhelmed buyers after an intraday rally
Spinning TopIndecision; 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
PatternWhat it signals
Bullish EngulfingA large bullish candle completely engulfs the prior bearish candle, signaling a potential reversal
Bearish EngulfingA large bearish candle completely engulfs the prior bullish candle
Harami CrossA small-bodied candle inside the prior candle’s range, signaling consolidation and possible reversal
Piercing LineA bullish candle opens below the prior bearish candle’s low and closes above its midpoint
Dark Cloud CoverA bearish candle opens above the prior bullish candle’s high and closes below its midpoint
PatternWhat it signals
Morning StarA three-bar bullish reversal: bearish candle, small-body candle (indecision), then a strong bullish candle
Evening StarA three-bar bearish reversal: bullish candle, small-body candle, then a strong bearish candle
Three White SoldiersThree consecutive bullish candles with higher closes, signaling strong buying pressure
Three Black CrowsThree consecutive bearish candles with lower closes, signaling strong selling pressure
Three Inside UpA bullish harami followed by a confirming bullish candle
Three Inside DownA bearish harami followed by a confirming bearish candle
Three Outside UpA bullish engulfing followed by a confirming bullish candle
Three Outside DownA 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

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

These indicators transform raw price data into alternative representations:

IndicatorWhat it measuresKey parameters
Typical PriceThe average of High, Low, and Close: (H + L + C) / 3(No additional parameters)

When adding a condition in the rule builder:

  1. Click the indicator dropdown on the left-hand or right-hand side of a condition.
  2. Search or browse the indicator list by name or category.
  3. Select the indicator — its default parameters will be pre-filled.
  4. Adjust parameters if needed (for example, change the RSI period from 14 to 21, or switch the SMA source from Close to High).
  5. 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”).
If you want to…Consider using…
Identify trend directionSMA, EMA, MACD, ADX, Ichimoku Cloud
Find overbought/oversold levelsRSI, Stochastic, CCI, Williams %R, MFI
Measure volatilityATR, Bollinger Bands, Keltner Channels, Standard Deviation
Confirm with volumeOBV, VWAP, CMF, Volume Profile, Force Index
Detect candlestick patternsAny pattern from the Candlestick Patterns category
Find support/resistanceZoneDefinitions, FIB_LEVELS retracements/extensions, Donchian Channels
Confirm harmonic-style completion zonesFIB_PATTERN, ZoneDefinitions
Set stop-loss distancesATR, Chandelier Exit, Parabolic SAR, Supertrend
Filter choppy marketsADX, Bollinger Band Width, Standard Deviation