Indicators Reference

Complete reference table for all technical indicators supported by Botmarley.

Indicator Summary

IndicatorTOML FormatCategoryDefault PeriodSignal Range
SMAsma_{period}Trend20, 50, 200Price-level
EMAema_{period}Trend9, 12, 20, 26Price-level
RSIrsi_{period}Momentum140–100
MACDmacd_{component}Momentum12/26/9Oscillator
Bollinger Bandsbb_{band}Volatility20Price-level
Stochastic RSIstoch_rsi_{period}Momentum140–100
ATRatr_{period}Volatility14Positive
ROCroc_{period}Momentum10Percentage
OBVobvVolumeCumulative
OBV SMAobv_sma_{period}Volume20Cumulative
Volume SMAvol_sma_{period}Volume20Volume-level
TTM Trendttm_trendTrendBinary
RSTDrstd_{period}Statistical20Positive
Z-Scorezscore_{period}Statistical20-4 to +4
Percentile Rankprank_{period}Statistical500–100
Parkinsonparkinson_{period}Volatility20Positive
Garman-Klassgk_vol_{period}Volatility20Positive
Yang-Zhangyz_vol_{period}Volatility20Positive
Hursthurst_{period}Regime2000–1
Half-Lifehalflife_{period}Regime2001+ candles
Vol Regimevol_regime_{period}Regime1001 / 2 / 3
VWAPvwapInstitutionalPrice-level
VWAP Devvwap_dev_{period}Institutional20Percentage
Skewnessskew_{period}Distribution60-3 to +3
Kurtosiskurt_{period}Distribution60-2 to +10
Autocorrelationautocorr_{lag}Momentumlag 1-1 to +1

Trend Indicators

Simple Moving Average (SMA)

Format: sma_{period} (e.g., sma_50, sma_200)

The SMA calculates the arithmetic mean of the last N closing prices. It smooths out price data to identify trend direction.

Common uses:

  • sma_50 / sma_200 — Golden Cross / Death Cross signals
  • Price above SMA = uptrend, below = downtrend
[[actions.triggers]]
indicator = "ema_9"
operator = "cross_above"
target = "sma_21"

Exponential Moving Average (EMA)

Format: ema_{period} (e.g., ema_9, ema_20)

The EMA gives more weight to recent prices, making it more responsive to new information than the SMA.

Common uses:

  • Fast/slow EMA crossovers (e.g., EMA 9 crossing EMA 21)
  • Dynamic support/resistance levels
[[actions.triggers]]
indicator = "ema_12"
operator = "cross_above"
target = "ema_26"

TTM Trend

Format: ttm_trend or ttmtrend

A binary trend indicator. Returns a directional signal indicating whether the market is in an uptrend or downtrend.


Momentum Indicators

Relative Strength Index (RSI)

Format: rsi_{period} (e.g., rsi_14)

RSI measures the speed and magnitude of price changes on a scale of 0–100.

LevelInterpretation
< 30Oversold (potential buy)
> 70Overbought (potential sell)
30–70Neutral
# Buy when RSI drops below 30
[[actions.triggers]]
indicator = "rsi_14"
operator = "<"
target = "30"

MACD (Moving Average Convergence Divergence)

Components:

  • macd_line — MACD line (12-period EMA minus 26-period EMA)
  • macd_signal — Signal line (9-period EMA of MACD line)
  • macd_hist or macd_histogram — Histogram (MACD line minus signal)

Note

MACD periods (12, 26, 9) are hardcoded and cannot be customized.

# Buy when MACD crosses above signal
[[actions.triggers]]
indicator = "macd_line"
operator = "cross_above"
target = "macd_signal"

Stochastic RSI

Format: stoch_rsi_{period} (e.g., stoch_rsi_14)

Applies the Stochastic oscillator formula to RSI values instead of price. Ranges 0–100, more sensitive than standard RSI.

Rate of Change (ROC)

Format: roc_{period} (e.g., roc_10)

Measures the percentage change in price over a specified period. Positive values indicate upward momentum, negative values indicate downward.


Volatility Indicators

Bollinger Bands

Components:

  • bb_upper — Upper band (SMA + 2 standard deviations)
  • bb_mid or bb_middle — Middle band (20-period SMA)
  • bb_lower — Lower band (SMA - 2 standard deviations)
# Buy when price touches lower Bollinger Band
[[actions.triggers]]
indicator = "price"
operator = "<"
target = "bb_lower"

Average True Range (ATR)

Format: atr_{period} (e.g., atr_14)

Measures market volatility by calculating the average range of price bars. Higher ATR = more volatile market.


Volume Indicators

On Balance Volume (OBV)

Format: obv

Cumulative volume indicator — adds volume on up days, subtracts on down days. Helps confirm price trends.

OBV with SMA

Format: obv_sma_{period} (e.g., obv_sma_20)

Smoothed version of OBV using a Simple Moving Average.

Volume SMA

Format: vol_sma_{period} (e.g., vol_sma_20)

Simple Moving Average applied to trading volume. Useful for identifying volume breakouts.


Special Values

Price

Format: price

Represents the current market price (close of current candle). Use this to compare indicators against the actual price.

# EMA above current price = potential resistance
[[actions.triggers]]
indicator = "price"
operator = ">"
target = "ema_200"

Statistical Indicators

Rolling Standard Deviation (RSTD)

Format: rstd_{period} (e.g., rstd_20)

Measures the dispersion of closing prices around their mean over a rolling window. The raw building block of volatility measurement.

Z-Score

Format: zscore_{period} (e.g., zscore_20)

How many standard deviations the current price is from its rolling mean. Universal thresholds (-2 = oversold, +2 = overbought) work across all assets.

# Buy when price is 2 standard deviations below mean
[[actions.triggers]]
indicator = "zscore_20"
operator = "<"
target = "-2.0"

Percentile Rank

Format: prank_{period} (e.g., prank_50)

Where the current close sits within its rolling range, expressed as a percentile (0–100). 5 = bottom 5%, 95 = top 5%.


Advanced Volatility Estimators

Parkinson Volatility

Format: parkinson_{period} (e.g., parkinson_20)

Volatility estimated from high-low range. ~5x more efficient than close-to-close standard deviation.

Garman-Klass Volatility

Format: gk_vol_{period} (e.g., gk_vol_20)

Volatility from full OHLC data. ~8x more efficient than close-to-close estimators.

Yang-Zhang Volatility

Format: yz_vol_{period} (e.g., yz_vol_20)

The most comprehensive volatility estimator. Combines overnight (close-to-open) and intraday (open-to-close + high-low) components.


Regime Detection Indicators

Hurst Exponent

Format: hurst_{period} (e.g., hurst_200)

Measures market memory via R/S analysis. H > 0.55 = trending, H < 0.45 = mean-reverting, H ≈ 0.50 = random walk.

# Only trade momentum when market is trending
[[actions.triggers]]
indicator = "hurst_200"
operator = ">"
target = "0.55"

Half-Life

Format: halflife_{period} (e.g., halflife_200)

Estimates how many candles it takes for price to revert halfway to the mean. Lower = faster reversion. Used to assess if mean-reversion is tradeable.

Volatility Regime

Format: vol_regime_{period} (e.g., vol_regime_100)

Classifies current volatility into discrete regimes: 1 (low), 2 (normal), 3 (high). Self-calibrating across all assets.


Institutional / Fair Value Indicators

VWAP

Format: vwap

Volume Weighted Average Price — the institutional benchmark for fair value. Price below VWAP = cheap, above = expensive.

VWAP Deviation

Format: vwap_dev_{period} (e.g., vwap_dev_20)

Percentage deviation from VWAP. Negative = below fair value, positive = above. Quantifies the distance from institutional consensus price.


Distribution Intelligence

Skewness

Format: skew_{period} (e.g., skew_60)

Measures return distribution asymmetry. Positive = upside surprises likely, negative = crash risk elevated.

Kurtosis

Format: kurt_{period} (e.g., kurt_60)

Measures tail fatness (excess kurtosis). Low = predictable market, high = extreme moves likely. A pure risk indicator.


Momentum Persistence

Autocorrelation

Format: autocorr_{lag} (e.g., autocorr_1)

Measures how correlated current returns are with returns N candles ago. Positive = momentum persists, negative = reversals likely, near zero = random.

# Confirm momentum persistence for trend-following
[[actions.triggers]]
indicator = "autocorr_1"
operator = ">"
target = "0.1"

Period Constraints

Classic Indicators

  • Minimum period: 1
  • Maximum period: 200
  • Invalid period (0 or >200): validation error

Statistical Indicators

  • Minimum period: varies by indicator (5–50)
  • Maximum period: 500
  • See individual indicator pages for exact ranges

Tip

Shorter periods (e.g., EMA 9) react faster to price changes but generate more false signals. Longer periods (e.g., SMA 200) are smoother but lag behind price movements. Choose based on your strategy's timeframe and risk tolerance.