Indicator Lab

Write custom indicators in a concise array formula language — price arrays H L O C V, data series like MKTCAP / DATE, overloaded operators and 37 built-in functions, computed by a WASM engine and rendered on TradingView lightweight-charts. Try H+L, MA(C,5) or a preset below.

Loading WASM engine…
Symbol
Interval
Loading WASM indicator engine…
Built-in indicators (click to load)
Formula editorCtrl+Enter to run
Syntax cheat sheet

H L O C V — high / low / open / close / volume arrays (one value per bar of the loaded period)

Data series — extra raw data beyond OHLCV, referenced by name and auto-loaded/aligned to the bars (DATE/TIME are UTC; CoinGecko series are daily and forward-filled on intraday charts):

  • DATEPer-bar date as a YYYYMMDD number (UTC), e.g. 20260823.
  • TIMEPer-bar time as an HHMM number (UTC), e.g. 1430.
  • MKTCAPCoinGecko historical market cap (USD). Daily granularity — on intraday charts it is a day-level step.
  • TVOLCoinGecko aggregate volume across all exchanges (USD, daily) — unlike V, which is the listed exchange only.

NAME:=expr; intermediate variable · NAME:expr; plotted output (can be referenced by later lines)

+ - * / arithmetic · > < >= <= = == <> != comparisons returning 0/1 · & && AND logical and · | || OR logical or

Plot hints: ,overlay on the price pane · ,stick histogram · ,color=#f0b90b

Comments: { } blocks and // lines; bars without enough history stay blank.

Function reference (0)

Bias for crypto — live chart, free in your browser

BIAS is the percentage gap between the close and its own short moving average: (C − MA(C,6)) / MA(C,6) × 100. When the value pushes far from zero, price has stretched unusually far from its recent mean — the kind of extension mean-reversion traders look for, and trend followers treat as climax risk.

The indicator oscillates around zero with no fixed bounds: what counts as "stretched" depends on the asset and interval, which is exactly what makes a live chart useful. Load it on any pair, compare extremes across intervals, or change the 6-bar baseline to any period in the editor — everything recomputes in your browser.

How it works

  1. Pick any trading pair and an interval from 15 minutes to 1 day.
  2. The preset formula loads into the editor — every line stays visible and editable.
  3. The WASM engine evaluates it locally over up to 1000 real exchange candles.
  4. Results render instantly as price-pane overlays or sub-panes.

Frequently asked questions

What is the BIAS indicator used for?

BIAS quantifies overextension. Large positive values mean price is far above its short average (potential exhaustion or strong breakout, depending on volume), large negative values mean an equally sharp stretch below. Traders use it to time pullback entries in the direction of the larger trend.

What is a good BIAS threshold for crypto?

There is no universal number — BIAS extremes scale with volatility, so a threshold that works on BTC daily bars is far too loose for a small-cap on 15-minute bars. Reading current value against the indicator's own recent range on the chart is the practical approach.

More indicator lab pages

RSI · MACD · KDJ · Bollinger Bands · Moving Averages · Volume · Williams %R · Rate of Change · MA Cross Signals

Related tools

Moving Averages in the Indicator Lab · Bollinger Bands in the Indicator Lab