Skip to main content

Indicators

Indicators are Limen's lowest-level signal helpers. They usually take a kline-style pl.DataFrame, append one or more derived columns, and return the same frame shape back for the rest of the manifest pipeline.

Use this page when you need to choose an indicator, understand its naming convention, or see which columns it adds by default. For higher-level derived signals, see Features.

Conventions

  • Indicators append columns. They do not replace the input frame with a reduced schema.
  • Most helpers assume the usual OHLCV names: open, high, low, close, volume.
  • TA-Lib-backed wrappers treat TA-Lib parity as the source of truth. If Limen and TA-Lib diverge, TA-Lib wins unless there is a deliberate, documented reason not to.
  • Output column names usually encode the main defaults, such as rsi_14 or apo_12_26_0.
  • Candlestick pattern helpers add a same-named integer column, usually following TA-Lib's positive bullish, negative bearish, zero neutral convention.
  • A few helpers intentionally expose legacy compatibility behavior. The main example is sma, which adds both sma_{period} and {price_col}_sma_{period}.

Quick Example

from limen.data import HistoricalData
from limen.experiment import Manifest
from limen.indicators import atr, ppo, wilder_rsi
from limen.sfd.reference_architecture import logreg_binary


def manifest():
return (
Manifest()
.set_data_source(
method=HistoricalData.get_spot_klines,
params={'kline_size': 3600, 'start_date_limit': '2025-01-01'},
)
.set_test_data_source(
method=HistoricalData.get_spot_klines,
params={'kline_size': 7200, 'row_count_limit': 5000},
)
.set_split_config(8, 1, 2)
.add_indicator(atr, period=14)
.add_indicator(ppo)
.add_indicator(wilder_rsi)
.with_reference_architecture(logreg_binary)
)

Family Index

  • Price and moving averages: direct price transforms and smoothing helpers.
  • Momentum and oscillators: rate-of-change, oscillator, regression, and Hilbert-style cycle helpers.
  • Volatility, bands, and range: dispersion, band, and stop-style helpers.
  • Volume, breadth, and bar diagnostics: flow, bar-body, and return-style helpers.
  • Candlestick patterns: TA-Lib-style pattern flags over OHLC bars.

Price And Moving Averages

These helpers usually take either a single price_col or basic OHLC inputs and add smoothed or transformed price views.

FunctionAdds by defaultNotes
avgpriceavgpriceAverage OHLC price.
medpricemedpriceMedian of high and low.
midpricemidprice_14Rolling midpoint of high and low over period.
typpricetyppriceTypical price from high, low, close.
wclpricewclpriceWeighted close price.
midpointmidpoint_14Rolling midpoint of a single price_col.
smasma_30, close_sma_30Adds both the canonical and compatibility alias columns.
emaema_30Exponential moving average.
wmawma_30Weighted moving average.
demadema_30Double EMA.
tematema_30Triple EMA.
trimatrima_30Triangular moving average.
t3t3_5_0.7T3 moving average with period and vfactor.
kamakama_30Kaufman adaptive moving average.
mamamama, famaMESA adaptive moving average pair.
mama_30_0Generic moving average with explicit ma_type.
ht_trendlineht_trendlineHilbert Transform instantaneous trendline.

Momentum And Oscillators

These helpers focus on rate of change, directional persistence, oscillator state, or cycle structure.

FunctionAdds by defaultNotes
apoapo_12_26_0Absolute Price Oscillator.
ppoppo_12_26_0Percentage Price Oscillator.
macdmacd, macd_signal, macd_histStandard MACD triple.
macdfixmacdfix, macdfix_signal, macdfix_histFixed-fast/slow MACD variant.
macdextmacdext, macdext_signal, macdext_histMACD with explicit MA-type controls.
mommom_10Momentum over period.
rocroc_10Rate of change in percent-style form.
rocprocp_10Rate of change percentage as decimal fraction.
rocrrocr_10Rate of change ratio.
rocr100rocr100_10Ratio scaled by 100.
rsirsi_14TA-Lib RSI wrapper.
rsi_smarsi_sma_14SMA-based RSI-style helper.
wilder_rsiwilder_rsi_14Wilder-smoothed RSI variant.
cmocmo_14Chande Momentum Oscillator.
ccicci_14Commodity Channel Index.
ultoscultosc_7_14_28Ultimate Oscillator over three windows.
willrwillr_14Williams %R.
stochstoch_slowk, stoch_slowdTA-Lib stochastic oscillator.
stochfstochf_fastk, stochf_fastdFast stochastic variant.
stochrsistochrsi_fastk, stochrsi_fastdStochastic RSI.
stochastic_oscillatorstoch_k, stoch_dNative rolling-high/low implementation.
trixtrix_30Triple-smoothed momentum oscillator.
tsftsf_14Time series forecast.
linearreglinearreg_14Rolling linear regression level.
linearreg_anglelinearreg_angle_14Regression angle.
linearreg_interceptlinearreg_intercept_14Regression intercept.
linearreg_slopelinearreg_slope_14Regression slope.
ht_dcperiodht_dcperiodDominant cycle period.
ht_dcphaseht_dcphaseDominant cycle phase.
ht_phasorht_phasor_inphase, ht_phasor_quadratureHilbert phasor pair.
ht_sineht_sine, ht_sine_leadHilbert sine pair.
ht_trendmodeht_trendmodeTrend-versus-cycle mode flag.

Volatility, Bands, And Range

These helpers quantify range, dispersion, band structure, or stop placement.

FunctionAdds by defaultNotes
atratr_14Average True Range.
natrnatr_14Normalized ATR.
trangetrangeTrue range.
stddevstddev_5_1Rolling standard deviation.
varvar_5_1Rolling variance.
bbandsbbands_upper, bbands_middle, bbands_lowerTA-Lib-style Bollinger Bands with configurable ma_type.
bollinger_bandsbb_middle, bb_upper, bb_lowerNative SMA-based Bollinger Bands helper.
bollinger_positionbollinger_positionRequires close, bb_upper, and bb_lower to already exist.
rolling_volatilityclose_volatility_12Rolling volatility over a single column.
sma_deviation_stdsma30_dev_stdDeviation from SMA normalized by rolling dispersion.
sarsarParabolic SAR.
sarextsarextExtended SAR with separate long and short parameters.

Volume, Breadth, And Bar Diagnostics

These helpers focus on participation, bar structure, or direct return transforms.

FunctionAdds by defaultNotes
adadChaikin Accumulation/Distribution line.
adoscadosc_3_10Chaikin A/D oscillator.
obvobvOn-Balance Volume.
mfimfi_14Money Flow Index.
bopbopBalance of Power.
price_change_pctprice_change_pct_1Point-to-point percent change.
returnsreturnsSingle-step simple returns helper.
body_pctbody_pctCandle body size as a share of the full range.
window_returnret_24Return over a wider rolling window.

Candlestick Patterns

All candlestick pattern helpers:

  • expect OHLC columns
  • append one integer column named after the function
  • are best treated as event flags rather than smooth continuous features

Only three patterns expose an extra parameter today.

FunctionAdds by defaultExtra params
cdl2crowscdl2crowsNone
cdl3blackcrowscdl3blackcrowsNone
cdl3insidecdl3insideNone
cdl3linestrikecdl3linestrikeNone
cdl3starsinsouthcdl3starsinsouthNone
cdl3whitesoldierscdl3whitesoldiersNone
cdlabandonedbabycdlabandonedbabypenetration=0.3
cdladvancedblockcdladvancedblockNone
cdlbeltholdcdlbeltholdNone
cdlclosingmarubozucdlclosingmarubozuNone
cdlconcealbabyswallcdlconcealbabyswallNone
cdlcounterattackcdlcounterattackNone
cdldarkcloudcovercdldarkcloudcoverpenetration=0.5
cdldojicdldojiNone
cdldragonflydojicdldragonflydojiNone
cdlengulfingcdlengulfingNone
cdlgravestonedojicdlgravestonedojiNone
cdlhammercdlhammerNone
cdlhangingmancdlhangingmanNone
cdlharamicdlharamiNone
cdlharamicrosscdlharamicrossNone
cdlhighwavecdlhighwaveNone
cdlhikkakecdlhikkakeNone
cdlhikkakemodcdlhikkakemodNone
cdlhomingpigeoncdlhomingpigeonNone
cdlidentical3crowscdlidentical3crowsNone
cdlinvertedhammercdlinvertedhammerNone
cdlladderbottomcdlladderbottomNone
cdllongleggeddojicdllongleggeddojiNone
cdllonglinecdllonglineNone
cdlmarubozucdlmarubozuNone
cdlmatchinglowcdlmatchinglowNone
cdlmatholdcdlmatholdpenetration=0.5
cdlonneckcdlonneckNone
cdlpiercingcdlpiercingNone
cdlrickshawmancdlrickshawmanNone
cdlrisefall3methodscdlrisefall3methodsNone
cdlseparatinglinescdlseparatinglinesNone
cdlshootingstarcdlshootingstarNone
cdlshortlinecdlshortlineNone
cdlspinningtopcdlspinningtopNone
cdlstalledpatterncdlstalledpatternNone
cdlsticksandwichcdlsticksandwichNone
cdltakuricdltakuriNone
cdlthrustingcdlthrustingNone
cdltristarcdltristarNone
cdlunique3rivercdlunique3riverNone

Choosing Between Similar Helpers

  • Use bbands when you want TA-Lib parity and configurable moving-average type.
  • Use bollinger_bands when you want a lightweight native SMA-based band helper.
  • Use stoch or stochf when you want TA-Lib parity. Use stochastic_oscillator when you want a simpler native rolling implementation.
  • Use sma when you want the canonical moving average helper used across Limen manifests. Use ma when ma_type itself is part of the search space.
  • Use returns, price_change_pct, and window_return differently: one-bar simple returns, configurable percent change, and wider-window return summaries respectively.