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:
- In SMITH, open the Strategy Toolbar (gear icon).
- Select Configure Context.
- Scroll to the Subscribe Indicators section.
- Select an indicator type from the dropdown and configure its parameters.
Supported Indicators
| Indicator | Full Name | Key Parameters |
|---|---|---|
| EMA | Exponential Moving Average | Lookback length (default 10), price source, offset |
| SMA | Simple Moving Average | Length, price source, offset |
| RMA | Wilder RMA | Length, price source, offset |
| RSI | Relative Strength Index | Period (default 14), price source, smoothing method, offset |
| BB | Bollinger Bands | Period (default 20), deviation multiplier (default 2), price source, offset |
| Keltner | Keltner Channels | Length (default 20), ATR length (default 10), bands style (ATR/TR/Range), smoothing, deviation multiplier, offset |
| High/Low | High/Low Window | Lookback length (default 10), mode (high or low), price source, offset |
| Pivot | Pivot Points | Left 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,lowhl2(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_50AND check that the previous bar hadEMA_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
- In SMITH, open the Strategy Toolbar (gear icon) and select Configure Context.
- Scroll to the Indicator Events section.
- Click Add Indicator Event.
- Give the event a descriptive name (e.g.,
EMA_Fast_Crosses_Slow,RSI_Trending_Down). - Select a kind and configure the parameters (see below).
Cross Events
A Cross event detects when one value crosses above or below another.
| Parameter | Description |
|---|---|
| Left | The source being monitored (an indicator output or event field). |
| Right | The reference value it crosses (an indicator, event field, context variable, or static number). |
| Polarity | Cross Up (left crosses above right), Cross Down (left crosses below right), or Any (either direction). |
| Epsilon | Optional 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.
| Parameter | Description |
|---|---|
| Source | The value to monitor (an indicator output or event field). |
| Polarity | Moving Up or Moving Down. |
| Epsilon | Optional 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.