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

[Integration guide](https://docs.lumencharts.com/charting-library/reference/compatibility) · [Reference index](https://docs.lumencharts.com/charting-library/api/)

Public contract reference. This declaration describes types and callback shapes; availability is constrained by the linked integration guide and the runtime capability. Legacy product-specific fields are not a promise of implementation.

## init {#init}

```ts
init?(
    ctx: IContext,
    inputs: <T extends StudyInputValue>(index: number) => T,
  ): void;
```

Use the type signature above and the integration guide for the owning capability.

| Parameter | Type | Required |
| --- | --- | --- |
| `ctx` | `IContext` | Yes |
| `inputs` | `<T extends StudyInputValue>(index: number) => T` | Yes |

## main {#main}

```ts
main(
    ctx: IContext,
    inputs: <T extends StudyInputValue>(index: number) => T,
  ): TPineStudyResult | null;
```

Use the type signature above and the integration guide for the owning capability.

| Parameter | Type | Required |
| --- | --- | --- |
| `ctx` | `IContext` | Yes |
| `inputs` | `<T extends StudyInputValue>(index: number) => T` | Yes |

## signature {#signature}

```ts
[key: string]: any;
```

Use the type signature above and the integration guide for the owning capability.

| Parameter | Type | Required |
| --- | --- | --- |
| `key` | `string` | Yes |

## Related types

- [IContext](https://docs.lumencharts.com/charting-library/api/IContext)
- [StudyInputValue](https://docs.lumencharts.com/charting-library/api/StudyInputValue)

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