# Darvas > Custom indicators documentation for Darvas - write your own technical analysis scripts in JavaScript with a Pine Script-like API. ## Docs - [Editor walkthrough](https://docs.darvas.app/editor-walkthrough.md): Tour of the Darvas custom-indicator script editor in /terminal. - [Box](https://docs.darvas.app/entities/box.md): Box(key, opts) draws a persistent rectangle with fill color, border, optional text, and directional extension. - [Entity constants](https://docs.darvas.app/entities/constants.md): linestyle.*, shape.*, size.*, extend.*, text.align.*, and text.wrap.* enum values for drawing entities. - [Label](https://docs.darvas.app/entities/label.md): Label(key, opts) places a persistent text label pinned to a bar index and price level on the chart. - [Line](https://docs.darvas.app/entities/line.md): Line(key, opts) draws a persistent line segment between two bar/price coordinates on the chart. - [LineFill](https://docs.darvas.app/entities/linefill.md): LineFill(key, lineA, lineB, opts) shades the area between two Line entities. - [Marker](https://docs.darvas.app/entities/marker.md): Marker(key, opts) places a persistent icon shape - circle, diamond, arrow, etc. - at a bar/price coordinate. - [Drawing entities overview](https://docs.darvas.app/entities/overview.md): Persistent keyed entities - Lines, Boxes, Labels, Markers, LineFills - and how the slot model and handle API work. - [Bar context](https://docs.darvas.app/essentials/bar-context.md): ctx provides OHLCV data, bar metadata, and index information for the current bar inside onBar. - [color.*](https://docs.darvas.app/essentials/color.md): Named color constants and color construction functions for styling plots and entities. - [Inputs](https://docs.darvas.app/essentials/inputs.md): input.int, input.float, input.bool, input.string, input.color, and input.source - the parameter system that renders a form in the Inputs panel. - [math.*](https://docs.darvas.app/essentials/math.md): The math namespace provides arithmetic, trigonometric, rounding, and random number utilities. Pine Script v5 parity. - [NaN handling](https://docs.darvas.app/essentials/nan-handling.md): na() and nz() handle missing and null values safely. NaN propagates through arithmetic - learn to catch it early. - [Script lifecycle](https://docs.darvas.app/essentials/script-lifecycle.md): Top-level code runs once at load; onBar runs once per historical bar and once per realtime update. - [Series](https://docs.darvas.app/essentials/series.md): Series(name) creates persistent indexed storage that remembers values across bars - essential for stateful calculations. - [str.*](https://docs.darvas.app/essentials/str.md): String utilities for formatting, slicing, and transforming text inside custom indicators. - [Bollinger Bands](https://docs.darvas.app/examples/bollinger-bands.md): Full working Bollinger Bands indicator with width band shading using Series and LineFill. - [MACD histogram](https://docs.darvas.app/examples/macd-histogram.md): Standard MACD with histogram bars and signal/MACD line plots. - [Order blocks](https://docs.darvas.app/examples/order-blocks.md): Detect order blocks (engulfing bars with volume confirmation) and draw them as Box entities that extend forward. - [RSI divergence](https://docs.darvas.app/examples/rsi-divergence.md): RSI calculation with bearish divergence detection - RSI makes lower highs while price makes higher highs. - [Support and resistance](https://docs.darvas.app/examples/support-resistance.md): Auto-detect S/R levels via ta.pivothigh/pivotlow and draw them as forward-projecting arrow.right Line entities. - [Introduction](https://docs.darvas.app/introduction.md): Write your own technical analysis indicators in Darvas using a Pine Script-like JavaScript API. - [hline, fill, bgcolor, barcolor](https://docs.darvas.app/plotting/hline-fill-bgcolor.md): Static horizontal lines, shading between plot series, and per-bar background / candle color overrides. - [Plot basics](https://docs.darvas.app/plotting/plot-basics.md): plot() declares a time-series output and emits per-bar values. The two-step registration + emission pattern is fundamental to the API. - [Quickstart](https://docs.darvas.app/quickstart.md): Render your first custom indicator on a Darvas chart in 5 minutes. - [API limits](https://docs.darvas.app/reference/api-limits.md): All runtime budgets: plots, hlines, fills, Series, entities, bar lookback, and timing constraints. - [Gotchas](https://docs.darvas.app/reference/gotchas.md): Common traps: same-key entity invalidation, NaN coordinate silence, Marker vs plot circles, LineFill source immutability, and more. - [Performance tips](https://docs.darvas.app/reference/performance.md): How to write fast custom indicators that stay within the 50ms per-bar and 10s total runtime budgets. - [Troubleshooting](https://docs.darvas.app/reference/troubleshooting.md): Common error messages, silent failures, and how to fix them. - [Aggregators](https://docs.darvas.app/ta/aggregators.md): ta.highest, ta.lowest, ta.median, ta.mode, ta.change, ta.cum, ta.barssince - range and cumulative aggregation functions. - [Crossovers](https://docs.darvas.app/ta/crossovers.md): ta.crossover, ta.crossunder, ta.cross, ta.rising, ta.falling - directional change detection functions. - [Moving averages](https://docs.darvas.app/ta/moving-averages.md): ta.sma, ta.ema, ta.rma, ta.wma, ta.hma, ta.vwma, ta.alma, ta.swma, ta.linreg - trend smoothing functions. - [Oscillators](https://docs.darvas.app/ta/oscillators.md): ta.rsi, ta.macd, ta.stoch, ta.cci, ta.mom, ta.roc, ta.dmi - momentum and oscillator functions. - [Pivots](https://docs.darvas.app/ta/pivots.md): ta.pivothigh and ta.pivotlow detect swing highs and lows - but the result is lagged by rightBars bars. - [Volatility](https://docs.darvas.app/ta/volatility.md): ta.atr, ta.stdev, ta.variance, ta.dev, ta.bb, ta.keltner - volatility measurement functions. - [Volume indicators](https://docs.darvas.app/ta/volume.md): ta.vwap, ta.obv, ta.accdist, ta.mfi - volume-based analysis functions. ## OpenAPI Specs - [openapi](https://docs.darvas.app/api-reference/openapi.json)