Skip to main content

Indicators

Indicators are technical analysis calculations that your strategy can subscribe to. Once subscribed, indicator values are available for use in conditions and actions — for example, "if RSI drops below 30" or "when price crosses above the 50 EMA".

Subscribing to Indicators

Indicators are configured within your strategy's context:

  1. In SMITH, open the Strategy Toolbar (gear icon).
  2. Select Configure Context.
  3. Scroll to the Subscribe Indicators section.
  4. Select an indicator type from the dropdown and configure its parameters.

Supported Indicators

IndicatorFull NameKey Parameters
EMAExponential Moving AverageLookback length (default 10), price source, offset
SMASimple Moving AverageLength, price source, offset
RMAWilder RMALength, price source, offset
RSIRelative Strength IndexPeriod (default 14), price source, smoothing method, offset
BBBollinger BandsPeriod (default 20), deviation multiplier (default 2), price source, offset
KeltnerKeltner ChannelsLength (default 20), ATR length (default 10), bands style (ATR/TR/Range), smoothing, deviation multiplier, offset
High/LowHigh/Low WindowLookback length (default 10), mode (high or low), price source, offset
PivotPivot PointsLeft bars (default 10), right bars (default 5), mode (high or low), basis (wicks or body), offset

Common Parameters

Price source — which price value to calculate from:

  • close, open, high, low
  • hl2 (high+low average), hlc3 (high+low+close average), ohlc4 (all four average)

Offset — shift the indicator calculation back by N bars. Useful for comparing current values against lagged indicators.

Smoothing method (RSI, Keltner) — the averaging method used internally:

  • EMA, SMA, RMA, or WSMA

Using Indicators in Conditions

Once subscribed, indicator values appear as available operands when building conditions inside guards or conditional actions. For example:

  • Compare an indicator against a static value: RSI < 30
  • Compare an event field against an indicator: Close > EMA_50
  • Compare two indicators: EMA_10 > EMA_50

For indicators with multiple outputs (like Bollinger Bands), you select which output to reference — e.g., BB upper, BB lower, or BB middle.

Indicator Events

Indicator events are derived signals that detect specific conditions in your indicator data — such as crossovers or trend changes. Unlike base indicators that output numeric values, indicator events output boolean results (true or false) that you can use directly in conditions.

Why Use Indicator Events

Base indicators give you raw values (e.g., EMA = 1.2345). To detect meaningful patterns with base indicators alone, you'd need to build complex multi-condition guards comparing current and previous values. Indicator events handle this automatically:

  • Without indicator events: compare EMA_10 > EMA_50 AND check that the previous bar had EMA_10 <= EMA_50 — requires tracking previous values manually.
  • With indicator events: define a "Cross Up" event and check EMA_10_crosses_EMA_50 == true — the crossover detection is built in.

Configuring Indicator Events

  1. In SMITH, open the Strategy Toolbar (gear icon) and select Configure Context.
  2. Scroll to the Indicator Events section.
  3. Click Add Indicator Event.
  4. Give the event a descriptive name (e.g., EMA_Fast_Crosses_Slow, RSI_Trending_Down).
  5. Select a kind and configure the parameters (see below).

Cross Events

A Cross event detects when one value crosses above or below another.

ParameterDescription
LeftThe source being monitored (an indicator output or event field).
RightThe reference value it crosses (an indicator, event field, context variable, or static number).
PolarityCross Up (left crosses above right), Cross Down (left crosses below right), or Any (either direction).
EpsilonOptional tolerance for the comparison, useful to avoid false signals from floating-point noise.

Outputs: value (current difference), cross_up (boolean), cross_down (boolean).

Example: EMA 10 crosses above EMA 50 — set left to EMA_10, right to EMA_50, polarity to Cross Up.

Trend Events

A Trend event detects whether a single value is moving up or down over consecutive bars.

ParameterDescription
SourceThe value to monitor (an indicator output or event field).
PolarityMoving Up or Moving Down.
EpsilonOptional tolerance.

Outputs: value (current value), moving_up (boolean), moving_down (boolean).

Example: RSI trending downward — set source to RSI, polarity to Moving Down.

Using Indicator Events in Conditions

Once defined, indicator events appear as an operand source called Indicator Events when building conditions in guards or conditional actions. Selecting an indicator event automatically sets the comparison to boolean mode:

EMA_Fast_Crosses_Slow  ==  true

This is equivalent to asking "did the crossover happen on this bar?" See Conditions — Using Indicator Events for more details.

Managing Indicator Events

  • Click the pencil icon on an indicator event to edit its configuration.
  • Click the trash icon to remove it. If the event is referenced by conditions, SMITH shows the number of references so you can assess the impact before confirming.

Editing and Removing Base Indicators

  • Click the pencil icon on a subscribed indicator to edit its parameters.
  • Click the trash icon to remove it — SMITH checks for references in conditions before removing, so you'll see an impact warning if the indicator is in use.