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)

RSI for crypto — live chart, free in your browser

The Relative Strength Index (RSI) measures the speed of price moves on a 0–100 scale: readings above 70 traditionally flag overbought conditions, readings below 30 flag oversold ones. This preset plots three periods at once — RSI 6, 12 and 24 — so you can compare a fast, reactive signal against slower, smoother ones on the same chart.

The formula loads straight into the editor: SMA(MAX(C-LC,0),N,1)/SMA(ABS(C-LC),N,1)*100, the classic Wilder-style smoothed ratio of average up-moves to average down-moves. Change the periods, pick any trading pair and interval from 15 minutes to 1 day, and the WASM engine recomputes the lines over up to 1000 real exchange candles — entirely in your browser, no sign-up required.

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 best RSI period for crypto trading?

Crypto is volatile, so shorter periods react faster: RSI 6 gives early but noisier signals, RSI 14 is the classic default, and RSI 24 smooths out whipsaws. This chart plots 6, 12 and 24 together precisely so you can see the trade-off on your own pair and interval.

How is the RSI on this page calculated?

Exactly as in the visible formula: each period N computes SMA(MAX(C-LC,0),N,1)/SMA(ABS(C-LC),N,1)*100, where LC is the previous close. The WASM engine evaluates it in your browser on the candles you load, so the values match what you would compute from the raw exchange data.

More indicator lab pages

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

Related tools

RSI 30/70 in the Strategy Backtester · MACD in the Indicator Lab