Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.darvas.app/llms.txt

Use this file to discover all available pages before exploring further.

What are Darvas Custom Indicators?

Darvas Custom Indicators let you write your own technical analysis scripts in JavaScript and render them directly on your charts. The API is intentionally Pine Script-shaped so seasoned TradingView authors feel at home, while keeping the full power of JavaScript: real loops, real closures, real if/else.
const len = input.int("Length", 14);
const src = input.source("Source", "close");

plot("MA", null, { color: "#22c55eFF", linewidth: 2 });
plot("Hist", null, { color: "#a78bfaFF", style: "histogram" });

onBar(() => {
  const ma = ta.sma(src, len);
  plot("MA", ma);
  plot("Hist", ctx.close() - ma);
});

What can you build?

Moving averages and oscillators

SMA, EMA, RSI, MACD, Bollinger Bands, Stochastic, ADX, and 40+ other functions through ta.*.

Support and resistance lines

Persistent Line entities anchored at exact bar coordinates with optional arrowheads.

Order blocks and FVG boxes

Box entities with fill color, border style, optional text label, and extension.

Signal markers and labels

Per-bar arrows via plot.style_arrowup or persistent Marker and Label entities.

Where to next

Quickstart

Write your first indicator in 5 minutes.

Script lifecycle

Understand what runs once vs once-per-bar.

API reference

Browse every available function and entity.

Examples

Read full working indicators you can paste into the editor.