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
| Name | Type | Default | What it is |
|---|---|---|---|
symbol | symbol | market.symbol | Market to read. |
bars | bartype | bar.type | Bar type to read. |
h4 = bars(bars: 4h)gold = bars(XAUUSD, bars: 15m)close_of(symbol, bars = bar.type)→ series<price>#
Close series of another symbol, aligned by bar close time.
Parameters
| Name | Type | Default | What it is |
|---|---|---|---|
symbol | symbol | required | Market to read. |
bars | bartype | bar.type | Bar type to read. |
ratio = close_of(EURUSD) / close_of(GBPUSD)intrabar(bars = 1m)→ list<Bar>#
Lower-timeframe bars inside the current bar, as a list.
Parameters
| Name | Type | Default | What it is |
|---|---|---|---|
bars | bartype | 1m | Lower bar type. |
minute_bars = intrabar(1m)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
| Name | Type | Default | What it is |
|---|---|---|---|
symbol | symbol | market.symbol | Market to check. |
bars | bartype | bar.type | Bar type to check. |
Outputs, read with a dot
| Name | Type | What it is |
|---|---|---|
from | time | First available bar. |
to | time | Last available bar. |
bars | int | Number of bars. |
source | string | "stored" or "built". |
exact | bool | false when rebuilt from coarser data. |
cov = data.coverage(EURUSD, bars: range(10))range(size = 10)→ bartype#
Range bars of a fixed size; stored tick-built bars where they exist, otherwise built from candles.
Parameters
| Name | Type | Default | What it is |
|---|---|---|---|
size | number | distance | 10 | Bar size; a bare number follows the chart convention for the symbol. |
bars_r = bars(bars: range(10 pips))xray(size = 10)→ bartype#
Range bars built with the chart's x-ray algorithm.
Parameters
| Name | Type | Default | What it is |
|---|---|---|---|
size | number | distance | 10 | Bar size. |
bars_x = bars(bars: xray(10))renko(size = 10)→ bartype#
Renko bricks built with the chart's renko algorithm.
Parameters
| Name | Type | Default | What it is |
|---|---|---|---|
size | number | distance | 10 | Brick size. |
bars_k = bars(bars: renko(5 points))heikin_ashi(timeframe = 1h)→ bartype#
Heikin-Ashi bars computed from time bars.
Parameters
| Name | Type | Default | What it is |
|---|---|---|---|
timeframe | duration | 1h | Underlying timeframe. |
smooth_bars = bars(bars: heikin_ashi(1h))