> ## Documentation Index
> Fetch the complete documentation index at: https://docs.0xarchive.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Basic types

> Times, colours, venues, intervals and the missing value na.

Basic types

## Time

Milliseconds since the Unix epoch, UTC.

```ts theme={"theme":"github-dark"}
type Time = number;
```

## Color

A colour: `#rrggbb`, `#rrggbbaa`, or a theme token from `color.*` (`theme:up`, `theme:down`,
`theme:neutral`, `theme:panel`, `theme:none`, `theme:study:<0-15>`, each with an optional alpha suffix such as
`theme:up@0.3`). `null` means "the theme's colour for this output", which is what a plot uses
when no colour is given.

```ts theme={"theme":"github-dark"}
type Color = string;
```

## SourceName

A price-derived value of the bar a source input can pick.

```ts theme={"theme":"github-dark"}
type SourceName = 'open' | 'high' | 'low' | 'close' | 'hl2' | 'hlc3' | 'ohlc4' | 'hlcc4' | 'volume';
```

## Venue

Which venue a market trades on. Defaults to the chart's venue.

```ts theme={"theme":"github-dark"}
type Venue = 'hl' | 'hip3' | 'lighter';
```

## IntervalCode

An interval code. Time: `1m` `3m` `5m` `15m` `30m` `1h` `2h` `4h` `8h` `12h` `1d` `1w`, and calendar
months `1M` `2M` `3M` `4M` `6M` `12M` (capital M; `1m` is a minute). Weeks open on Monday
00:00 UTC and months on the 1st, from January. Bars that close on trades (see src/browser/trade-bars.mjs): `s15` seconds, `t500` trades,
`v1000000` volume, `d250000` delta, `r10` range, `k10` renko, `x10-0` reversal.

```ts theme={"theme":"github-dark"}
type IntervalCode = string;
```

## PaneName

Where a value is drawn: the price pane, the script's own pane (`'own'`), or a named pane of this script.

```ts theme={"theme":"github-dark"}
type PaneName = 'price' | 'own' | (string & {});
```

## LineStyle

```ts theme={"theme":"github-dark"}
type LineStyle = 'solid' | 'dashed' | 'dotted';
```

## LineWidth

```ts theme={"theme":"github-dark"}
type LineWidth = 1 | 2 | 3 | 4;
```

## ShapeName

A shape to mark a bar with. `labelUp` and `labelDown` are labels with a pointer: `labelUp`
sits below its point and points up at it, `labelDown` sits above and points down; their
`text` is written inside.

```ts theme={"theme":"github-dark"}
type ShapeName = 'circle' | 'square' | 'diamond' | 'cross' | 'xcross' | 'triangleUp' | 'triangleDown' | 'arrowUp' | 'arrowDown' | 'flag' | 'labelUp' | 'labelDown';
```

## ShapeLocation

```ts theme={"theme":"github-dark"}
type ShapeLocation = 'above' | 'below' | 'top' | 'bottom' | 'absolute';
```

## Size

```ts theme={"theme":"github-dark"}
type Size = 'tiny' | 'small' | 'normal' | 'large' | 'huge';
```

## na

`na` is the missing number, a float NaN: arithmetic with it gives `na`, and every comparison
with it is false, as in Pine. Missing strings, colours and objects are `null`.

```ts theme={"theme":"github-dark"}
const na: number;
```

## nz()

`x`, or `replacement` (default 0) when `x` is `na`.

```ts theme={"theme":"github-dark"}
function nz(x: number, replacement?: number): number;
```

## isNa()

Whether `x` is `na` (for numbers) or `null`.

```ts theme={"theme":"github-dark"}
function isNa(x: unknown): boolean;
```

## Next step

Continue with [The declaration](/terminal/reference/indicator).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.