Built-in Indicators Overview
The system provides several optimized built-in indicators. Each indicator is registered using the registerIndicator
function with the following parameters:
registerIndicator(
"SMA", // Built-in indicator name (e.g., "SMA", "EMA", "RSI", etc.)
"BUILTIN", // Literal string "BUILTIN" for built-in indicators
params: object, // Configuration parameters specific to each indicator
customId: string // Optional: Your chosen name for this instance (e.g., "SMA_20_CLOSE")
);
The available built-in indicators are:
"SMA"
- Simple Moving Average"EMA"
- Exponential Moving Average"RSI"
- Relative Strength Index"MACD"
- Moving Average Convergence Divergence"BOLLINGER"
- Bollinger Bands"STOCH"
- Stochastic Oscillator"ATR"
- Average True Range
When choosing custom IDs for your indicator instances, you can pick any unique name you'd like. The idea here is you can run multiple of the same indicators, with different parameters! A common convention is to include the key parameters in the name, for example:
"SMA_20_CLOSE"
for a 20-period SMA on close prices"RSI_14"
for a 14-period RSI"MACD_12_26_9"
for MACD with periods 12, 26, and 9
All indicators return NaN
until they have enough data to calculate their first value.