# Indicators Structure

## 🗝 Key Building Blocks

### Indicator Lifecycle

* [**init** ](/custom-indicators-docs/indicators-structure/init.md)— Runs once when the indicator loads. Sets up user inputs, visual settings, and where it will be displayed (main chart or separate panel).
* [**onTick** ](/custom-indicators-docs/indicators-structure/ontick.md)— Runs each price update. Calculates indicator values and updates the chart visuals.

> 💡 **Tip:** Keep your `init` function simple. Only set up what’s necessary at startup — this makes your indicator load faster and keeps it easier to maintain.

***


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://custom-indicators.gitbook.io/custom-indicators-docs/indicators-structure.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
