ChartnautDocs

Dependency unavailable

Your script declares another indicator or definition and reads its output, but the value is empty. The plot is blank, study rows are skipped, or the chart legend shows dependency output empty. Work through the causes below in order.

What Chartnaut reports

On accounts with the dependency check turned on, the reading script's row turns amber with dependency output empty and this detail. Otherwise the plot is blank with no icon, and the causes below still apply.

Dependency "atr14" (atr@v1) output "atr" was accessed 1,200 times but produced 0 finite values in window [...]

With several empty outputs it says how many were empty across the calculation. The code behind it is dependency_output_unavailable. It fires only for series outputs (line, histogram, area, baseline) that the script read at least once. Ranges, lines, markers and layers are never flagged.

A dependency that throws stops the reader with a script error: Required dependency "atr14" failed: <its error>. Fix the dependency first.

1. Empty on the first bars is normal

A dependency has no value until its own warmup has passed. Skip those bars:

export function onBar(ctx) {
  const atr = ctx.indicators.atr14.atr.value;
  if (!Number.isFinite(atr)) return;
  ctx.plot("stop", ctx.close - 2 * atr);
}

In a study, read at the event time and guard the same way: ctx.indicators.atr14.atr?.valueAt(ctx.event.time) with Number.isFinite. An unguarded read that throws on every event gives a clean-looking empty report.

2. Wrong output key

Series are nested under their output key. ctx.indicators.atr14.value is never valid; ctx.indicators.atr14.atr.value is. Bands expand to several keys, such as upper, basis and lower, that do not appear in your own source. The lint catches this as indicators/container-series-read (definitions) and study/unsafe-multi-output-indicator-access (studies), and lists the keys the dependency declares.

3. Wrong version

Every declaration pins an exact version:

indicators.declare({ slug: "atr", as: "atr14", version: 1, settings: { period: 14 } });

Built-in indicators are version 1; any other number fails with indicator/native-version-mismatch. For your own scripts, the output you read must exist in the pinned version. A newer version does not reach you until you change the pin, and a version that does not exist fails lint with indicators/version-not-found.

4. Settings or data make it empty

The dependency may run and still produce nothing on this symbol and timeframe: a setting outside its range, a volume-based indicator on an instrument with no volume tape, or a session indicator on a timeframe its runOn excludes. Add the dependency to a chart on its own with the same settings. If it is blank there, the problem is in the dependency.

5. You cannot read it

Saving refuses a dependency your account cannot read with derive/deps. Use one you own or one published to the community library.

Read what the dependency exposes

Use only the outputs and lifecycle() a dependency exposes. Rebuilding its internals from candles, such as a volume profile or a TPO zone, drifts from what the chart shows, and the lint refuses a definition that re-implements its dependency's zone invalidation (flow/upstream-lifecycle-reimplementation). If you need something it does not expose, extend that indicator.

A dependency read through a timeframe handle belongs inside that handle's handler. In onBar, ctx.indicators is on the chart's timeframe.

More on declaring and reading dependencies: Declaring indicator dependencies and Dependency outputs.