<!-- Public documentation export; not library implementation source. -->
# Indicators

Ask the runtime which indicators are available instead of assuming every name in the compatibility declarations works.

```js
const available = widget.getStudiesList();
const id = await widget.activeChart().createStudy(
  'Moving Average', false, false, { length: 20 },
);
```

## Inputs and placement

To see which inputs an indicator supports, call `getStudyInputs(name)`. Pass inputs by their IDs, with values of the right type. A label shown in the UI isn't always the same as the input ID. Each indicator decides whether it sits on the price chart or in its own pane. Supported scale options control how it shares a price scale.

## Updates and removal

Get the indicator's handle by its ID to change supported inputs or properties. Some work happens asynchronously, so watch the indicator's loading and error state. Remove an indicator through the chart API and clean up your subscriptions. Treat a missing ID or an unsupported indicator name as an error.

## Defaults versus saved templates

Indicator overrides change how indicators look. Indicator templates save a set of indicator settings. Neither one saves the whole chart layout. See [Templates](https://docs.lumencharts.com/charting-library/persistence/templates) for how they differ.

[Interactive chart example](https://docs.lumencharts.com/charting-library/studies/) — runs in a browser with synthetic data.

## Custom study boundaries

For the calculations in the catalog, use the built-in indicators. For script-based analysis, use optional Pine where it's supported. The compatibility declarations for custom studies don't guarantee every vendor-specific metainfo field or JavaScript hook.

### Before you add a custom study

Check the entry point and metainfo format you plan to use against the release you ship. Decide where the input bars come from, how missing values are represented, where the study appears and how it gets cleaned up. Test what happens with invalid inputs, and when the chart is removed while a calculation is still running.

### Try these first

If you just need an existing calculation with different settings, start with a [built-in indicator](https://docs.lumencharts.com/charting-library/studies). For script-based analysis, use [optional Pine](https://docs.lumencharts.com/charting-library/studies/pine) with its matching worker files. Don't import internal study classes into your app as a shortcut; they aren't a public API.

### Error handling

When a study fails, show an error the user can act on, and let them remove the study. Don't quietly swap an unsupported calculation for a different indicator. For any script you ship, document exactly which language features and calculations it supports.

---
Documentation page: https://docs.lumencharts.com/charting-library/studies/
