Data and bar types reference

All 8 data and bar types in AlgoBarsX, each with its parameters, defaults, ranges and an example: bars, close_of, intrabar, data.coverage, range, xray, renko, heikin_ashi.

bars close_of intrabar data.coverage range xray renko heikin_ashi

bars(symbol = market.symbol, bars = bar.type)→ BarSet#

Bars of another bar type or symbol. Higher-timeframe values change only when that bar confirms, so look-ahead is impossible.

Parameters

NameTypeDefaultWhat it is
symbolsymbolmarket.symbolMarket to read.
barsbartypebar.typeBar type to read.
Example
h4 = bars(bars: 4h)
Example
gold = bars(XAUUSD, bars: 15m)
strategyindicatoralertlibrarysince 1.0

close_of(symbol, bars = bar.type)→ series<price>#

Close series of another symbol, aligned by bar close time.

Parameters

NameTypeDefaultWhat it is
symbolsymbolrequiredMarket to read.
barsbartypebar.typeBar type to read.
Example
ratio = close_of(EURUSD) / close_of(GBPUSD)
strategyindicatoralertlibrarysince 1.0

intrabar(bars = 1m)→ list<Bar>#

Lower-timeframe bars inside the current bar, as a list.

Parameters

NameTypeDefaultWhat it is
barsbartype1mLower bar type.
Example
minute_bars = intrabar(1m)
strategyindicatoralertlibrarysince 1.0

data.coverage(symbol = market.symbol, bars = bar.type)→ Coverage#

The stored date range for a symbol and bar type, and whether results on it are exact.

Parameters

NameTypeDefaultWhat it is
symbolsymbolmarket.symbolMarket to check.
barsbartypebar.typeBar type to check.

Outputs, read with a dot

NameTypeWhat it is
fromtimeFirst available bar.
totimeLast available bar.
barsintNumber of bars.
sourcestring"stored" or "built".
exactboolfalse when rebuilt from coarser data.
Example
cov = data.coverage(EURUSD, bars: range(10))
strategyindicatoralertsince 1.0

range(size = 10)→ bartype#

Range bars of a fixed size; stored tick-built bars where they exist, otherwise built from candles.

Parameters

NameTypeDefaultWhat it is
sizenumber | distance10Bar size; a bare number follows the chart convention for the symbol.
Example
bars_r = bars(bars: range(10 pips))
strategyindicatoralertlibrarysince 1.0

xray(size = 10)→ bartype#

Range bars built with the chart's x-ray algorithm.

Parameters

NameTypeDefaultWhat it is
sizenumber | distance10Bar size.
Example
bars_x = bars(bars: xray(10))
strategyindicatoralertlibrarysince 1.0

renko(size = 10)→ bartype#

Renko bricks built with the chart's renko algorithm.

Parameters

NameTypeDefaultWhat it is
sizenumber | distance10Brick size.
Example
bars_k = bars(bars: renko(5 points))
strategyindicatoralertlibrarysince 1.0

heikin_ashi(timeframe = 1h)→ bartype#

Heikin-Ashi bars computed from time bars.

Parameters

NameTypeDefaultWhat it is
timeframeduration1hUnderlying timeframe.
Example
smooth_bars = bars(bars: heikin_ashi(1h))
strategyindicatoralertlibrarysince 1.0

Try this in the Terminal. AlgoBars is free: $0 a month, no card needed.

Create my free account