# Documentation

### This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English version of the page.

# renko

## Syntax

```renko(X)
renko(X,threshold)
```

## Arguments

 `X` `X` can be a`M`-by-`2` matrix or a table. If `X` is a `M`-by-`2` matrix, the first column contains date numbers and the second column is the asset price. If `X` is a`M`-by-`2` table, where each column has the same interpretation. However, in the table form, the first column may be serial date numbers, date character vectors, or datetime arrays. `threshold` (Optional) Specifies a threshold value for asset price. By default, `threshold` is set to `1`.

## Description

`renko(X)` plots asset price with respect to dates.

`renko(X,threshold)` plots the asset data, `X`, adding a new box only when the price has changed but at least the value specified by `threshold`.

## Examples

collapse all

This example shows how to plot asset price with respect to dates, given asset X as an M-by-2 matrix of date numbers and asset prices, generate a Renko chart.

```X = [... 733299.00 41.99;... 733304.00 41.98;... 733306.00 41.61;... 733307.00 42.29;... 733311.00 41.82;... 733314.00 41.37;... 733318.00 42.02]; renko(X,.1)```

This example shows how to use `datetime` input to plot asset price with respect to dates, given asset `X` as an `M`-by-2 matrix of date numbers and asset prices, generate a Renko chart.

```X = [... 733299.00 41.99;... 733304.00 41.98;... 733306.00 41.61;... 733307.00 42.29;... 733311.00 41.82;... 733314.00 41.37;... 733318.00 42.02]; dates = datetime(X(:,1),'ConvertFrom','datenum','Locale','en_US'); data = X(:,2); t = table(dates,data); renko(t,0.1)```