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.
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):
- DATE — Per-bar date as a YYYYMMDD number (UTC), e.g. 20260823.
- TIME — Per-bar time as an HHMM number (UTC), e.g. 1430.
- MKTCAP — CoinGecko historical market cap (USD). Daily granularity — on intraday charts it is a day-level step.
- TVOL — CoinGecko 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)
Bollinger Bands for crypto — live chart, free in your browser
Bollinger Bands wrap a 20-bar moving average in bands placed two standard deviations above and below it. The bands widen when volatility expands and squeeze together when markets go quiet — a visual volatility gauge drawn directly on the price chart.
Closes riding the upper band signal strong upward pressure; touches of the lower band signal the opposite, and a squeeze often precedes a breakout. This preset overlays the mid, upper and lower bands on any crypto pair, and the formulas stay editable — change the period or deviation multiplier and the WASM engine recomputes locally.
How it works
- Pick any trading pair and an interval from 15 minutes to 1 day.
- The preset formula loads into the editor — every line stays visible and editable.
- The WASM engine evaluates it locally over up to 1000 real exchange candles.
- Results render instantly as price-pane overlays or sub-panes.
Frequently asked questions
What is a Bollinger Band squeeze?
A squeeze is when the upper and lower bands pinch toward the mid band because 20-bar volatility has collapsed. It often precedes a sharp move — the bands expand again as the breakout unfolds — so many traders treat a squeeze as a "get ready" signal rather than a direction signal.
Are Bollinger Band touches automatic buy or sell signals?
No. In a trend, price can "walk the band" for a long time, so a touch confirms strength, not reversal. Band signals are usually combined with a momentum read such as RSI or with a breakout rule — the Strategy Backtester lets you test exactly that on real data.
More indicator lab pages
RSI · MACD · KDJ · Moving Averages · Volume · Bias · Williams %R · Rate of Change · MA Cross Signals
Related tools
Bollinger Breakout in the Strategy Backtester · Moving Averages in the Indicator Lab