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 entities?
Drawing entities are interactive overlays on the chart canvas - Lines, Boxes, Labels, Markers, and LineFills. Unlikeplot() which renders a value per bar, entities are keyed objects that persist across bars and can be mutated in place.
The slot model
1 key = 1 slot. Each unique key string occupies exactly one slot in the entity registry. Calling the same factory with the same key overwrites the slot:- Last call wins.
- The slot’s content (position, color, style) reflects the most recent call.
- Persistent across bars - you do not need to recreate the entity every bar.
Generation tokens
Every time you call a factory (Line, Box, etc.) for a key, a new generation is allocated. The returned handle carries the key + generation pair internally as { __key, __gen, __kind }.
Handle API
All entity factories return a handle with three methods:Mutate the entity in place. Only the provided keys are updated; others remain unchanged. No-ops silently if the generation is stale.
Copy the entity to a new key with a fresh generation. Returns a handle to the clone.
Remove the entity from the chart. No-ops silently if the generation is stale.
Entity budgets
| Type | Per-type limit | Global limit |
|---|---|---|
| Line | 500 | - |
| Box | 500 | - |
| Label | 500 | - |
| Marker | 500 | - |
| LineFill | 500 | - |
| All entities combined | - | 1500 |
Entity types
Line
Anchored line segment between two bar/price coordinates.
Box
Rectangular zone with fill, border, text, and extend options.
Label
Text label pinned to a bar/price coordinate.
Marker
Icon shape (circle, diamond, arrow, etc.) at a point.
LineFill
Filled area between two Line entities.
Constants
linestyle, shape, size, extend, text.align enums.