{"record":{"id":"1940b3aa8790cc5d","repo":"OpenBB-finance/OpenBB","slug":"unknown-indicator-indicator","errorCode":null,"errorMessage":"Unknown indicator: {indicator}","messagePattern":"Unknown indicator: (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"openbb_platform/obbject_extensions/charting/openbb_charting/core/plotly_ta/ta_class.py","lineNumber":507,"sourceCode":"            try:\n                if indicator in self.subplots:\n                    figure, subplot_row = getattr(self, f\"plot_{indicator}\")(\n                        figure, self.df_ta, subplot_row\n                    )\n                elif indicator in self.ma_mode or indicator in self.inchart:\n                    if indicator in self.ma_mode:\n                        if ma_done:\n                            continue\n                        indicator, ma_done = \"ma\", True  # noqa\n\n                    figure, inchart_index = getattr(self, f\"plot_{indicator}\")(\n                        figure, self.df_ta, inchart_index\n                    )\n                    figure.layout.annotations = None\n                elif indicator in [\"fib\", \"srlines\", \"demark\", \"clenow\", \"ichimoku\"]:\n                    figure = getattr(self, f\"plot_{indicator}\")(figure, self.df_ta)\n                else:\n                    raise ValueError(f\"Unknown indicator: {indicator}\")\n\n                fig_new.update(figure.to_plotly_json())\n\n                remaining_subplots = (\n                    list(\n                        set(plot_indicators[plot_indicators.index(indicator) + 1 :])\n                        - set(self.inchart)\n                    )\n                    if indicator != \"ma\"\n                    else []\n                )\n                if subplot_row > 5 and remaining_subplots:\n                    warnings.warn(\n                        f\"[bold red]Reached max number of subplots.   Skipping {', '.join(remaining_subplots)}[/]\"\n                    )\n                    break\n            except Exception as e:\n                warnings.warn(f\"[bold red]Error plotting {indicator}: {e}[/]\")","sourceCodeStart":489,"sourceCodeEnd":525,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/obbject_extensions/charting/openbb_charting/core/plotly_ta/ta_class.py#L489-L525","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"# before\nindicators = {\"apo\": {}}  # ValueError: Unknown indicator: apo\nfig = charting.to_chart(data=df, indicators=indicators)\n\n# after\nvalid = set(ChartIndicators.get_available_indicators())\nindicators = {k: v for k, v in indicators.items() if k in valid}\nfig = charting.to_chart(data=df, indicators=indicators)","handlingStrategy":"validation","validationCode":"from openbb_charting.query_params import ChartIndicators\nvalid = set(ChartIndicators.get_available_indicators())\nindicators = {k: v for k, v in indicators.items() if k in valid}","typeGuard":"def is_plottable_indicator(ta_engine, name: str) -> bool:\n    if name in (\"fib\", \"srlines\", \"demark\", \"clenow\", \"ichimoku\"):\n        return True\n    if name in getattr(ta_engine, \"ma_mode\", []):\n        return True\n    return hasattr(ta_engine, f\"plot_{name}\")","tryCatchPattern":"try:\n    ta.plot(figure, indicators=list(indicators))\nexcept ValueError as e:\n    if \"Unknown indicator\" in str(e):\n        bad = str(e).rsplit(\":\", 1)[-1].strip()\n        indicators.pop(bad, None)\n    else:\n        raise","preventionTips":["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."],"tags":["python","openbb","charting","technical-analysis","validation"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}