OpenBB-finance/OpenBB · error · ValueError
Unknown indicator: {indicator}
Error message
Unknown indicator: {indicator} What it means
PlotlyTA.plot (ta_class.py:507) dispatches each requested indicator by name: moving-average names are mapped to plot_ma, the special overlays (fib, srlines, demark, clenow, ichimoku) to their own methods, and everything else to getattr(self, f"plot_{indicator}"). If no plot_<name> method exists the else-branch raises ValueError(f"Unknown indicator: {indicator}") — the name passed in is not one the plotting class implements.
Source
Thrown at openbb_platform/obbject_extensions/charting/openbb_charting/core/plotly_ta/ta_class.py:507
try:
if indicator in self.subplots:
figure, subplot_row = getattr(self, f"plot_{indicator}")(
figure, self.df_ta, subplot_row
)
elif indicator in self.ma_mode or indicator in self.inchart:
if indicator in self.ma_mode:
if ma_done:
continue
indicator, ma_done = "ma", True # noqa
figure, inchart_index = getattr(self, f"plot_{indicator}")(
figure, self.df_ta, inchart_index
)
figure.layout.annotations = None
elif indicator in ["fib", "srlines", "demark", "clenow", "ichimoku"]:
figure = getattr(self, f"plot_{indicator}")(figure, self.df_ta)
else:
raise ValueError(f"Unknown indicator: {indicator}")
fig_new.update(figure.to_plotly_json())
remaining_subplots = (
list(
set(plot_indicators[plot_indicators.index(indicator) + 1 :])
- set(self.inchart)
)
if indicator != "ma"
else []
)
if subplot_row > 5 and remaining_subplots:
warnings.warn(
f"[bold red]Reached max number of subplots. Skipping {', '.join(remaining_subplots)}[/]"
)
break
except Exception as e:
warnings.warn(f"[bold red]Error plotting {indicator}: {e}[/]")View on GitHub (pinned to 3e071fcc2c)
Solutions
- Restrict requests to indicators the plotting class implements: inspect [m[5:] for m in dir(ta) if m.startswith('plot_')] on the PlotlyTA instance/class.
- Upgrade openbb-charting so the validator and plotters match the same indicator set.
- Remove the offending key from your indicators dict (the error message names it).
- If the indicator is an MA variant, route it through ma_mode (e.g. put the variant in ma_mode) so it maps to plot_ma.
Example fix
# before
indicators = {"apo": {}} # ValueError: Unknown indicator: apo
fig = charting.to_chart(data=df, indicators=indicators)
# after
valid = set(ChartIndicators.get_available_indicators())
indicators = {k: v for k, v in indicators.items() if k in valid}
fig = charting.to_chart(data=df, indicators=indicators) Defensive patterns
Strategy: validation
Validate before calling
from openbb_charting.query_params import ChartIndicators
valid = set(ChartIndicators.get_available_indicators())
indicators = {k: v for k, v in indicators.items() if k in valid} Type guard
def is_plottable_indicator(ta_engine, name: str) -> bool:
if name in ("fib", "srlines", "demark", "clenow", "ichimoku"):
return True
if name in getattr(ta_engine, "ma_mode", []):
return True
return hasattr(ta_engine, f"plot_{name}") Try / catch
try:
ta.plot(figure, indicators=list(indicators))
except ValueError as e:
if "Unknown indicator" in str(e):
bad = str(e).rsplit(":", 1)[-1].strip()
indicators.pop(bad, None)
else:
raise Prevention
- Build indicator dicts from ChartIndicators.get_available_indicators() output, not pandas_ta docs.
- Keep openbb-charting version aligned with the rest of the platform.
- Log hasattr checks against plot_* methods when adding custom indicator names.
When it happens
Trigger: Passing an indicator key in the charting query that check_columns/ChartIndicators accepted but that has no plot_ implementation — e.g. a pandas_ta name like 'apo' or a typo such as 'smma', or a name valid in QueryParams but not implemented in this version's ta_class.
Common situations: Version drift: the validator list (ChartIndicators.get_available_indicators) and the plotting methods fell out of sync across charting releases; user-built dicts copied from pandas_ta docs instead of the OpenBB indicator list.
Related errors
- Trace '{trace}' not found
- Label must be specified
- No close column found in dataframe
- Error processing indicator {indicator.name}: {e}
- Please make sure that the columns 'High', 'Low', and 'Close
AI-assisted analysis of OpenBB-finance/OpenBB@3e071fcc2c (2026-08-14).
Data as JSON: /api/errors/1940b3aa8790cc5d.
Report an issue: GitHub.