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.
Overview
These four functions complementplot() with static and per-bar visual layers:
hline
Draws a static horizontal line across the entire chart at a fixed price/value. Call at the top level.
| Option | Type | Default | Description |
|---|---|---|---|
color | string | chart default | #RRGGBBAA hex |
linewidth | number | 1 | Pixels |
style | string | "solid" | "solid", "dotted", "dashed" |
title | string | - | Tooltip label |
fill
Shades the area between two plot series. Both plots must be registered before calling fill. Call at the top level.
| Option | Type | Description |
|---|---|---|
color | string | Fill color (use low alpha, e.g. #22c55e20) |
title | string | Tooltip label |
bgcolor
Overrides the chart background color for the current bar. Call inside onBar.
null clears the color for that bar.
barcolor
Overrides the candle/bar color on the main price chart for the current bar. Call inside onBar.
Per-bar vs static
| Primitive | When to call | Effect |
|---|---|---|
hline | Top level | One horizontal line across entire chart |
fill | Top level | Persistent band between two plot series |
bgcolor | Inside onBar | Background color for each individual bar |
barcolor | Inside onBar | Candle color for each individual bar |
bgcolor and barcolor only take effect for bars where they are explicitly called. Bars without a call retain the default chart color.Complete RSI indicator example
Related pages
Plot basics
plot() - the main time-series drawing primitive.
color.*
Color format and named constants.
API limits
Budget numbers for all drawing primitives.