Skip to main content

Renko

Renko charts display price movement as fixed-size bricks and omit periods in which price does not move far enough to form a brick. DXcharts builds the bricks from the candles supplied by the current data provider; a separate Renko data provider is not required.

Example​

The chart below opens the default instrument in Renko mode with the default brick size of 5.

Enable Renko​

Users can select Renko in the chart type menu. To select it programmatically, call changeChartType after the API is available:

export const showRenko = (api: ChartReactAPI): void => {
api.changeChartType('renko');
}

In Multichart mode, changeChartType('renko') changes all charts. Chart-specific selection is available through the chart type UI.

Brick size​

Set the brick size per symbol in initialChartReactSettings.renko.brickSizeBySymbol. The map key must exactly match Instrument.symbol. If a symbol has no configured value, the default brick size is 5.

Users can also change the value from Renko Settings in the chart UI. The value is stored in the chart layout and applies the next time that symbol is shown.

export const renkoDependencies = {
initialChartConfig: {
colors: {
renkoTheme: {
upColor: '#26a69a',
downColor: '#ef5350',
noneColor: '#9e9e9e',
},
},
},
initialChartReactSettings: {
renko: {
brickSizeBySymbol: {
AAPL: 2,
'EUR/USD': 0.001,
},
},
},
}

Changing a brick size rebuilds the Renko series from its source candles. Consecutive changes are coalesced briefly before rebuilding.

Colors​

Configure brick colors through initialChartConfig.colors.renkoTheme:

PropertyDescription
upColorRising brick
downColorFalling brick
noneColorBrick without a price direction

The configuration example above includes all three values. If they are omitted, the active chart palette supplies the colors.

Data and chart behavior​

  • Renko uses the current candle series as its source and supports live candle updates.
  • The chart loads additional history when necessary. An initial conversion waits for enough source candles to produce a useful series.
  • Compare instruments are converted to Renko together with the main instrument.
  • Leaving Renko restores the source candle series.
  • The Renko viewport is saved and restored with the layout.
  • Brick timestamps come from their source candles. Multiple bricks can therefore have the same timestamp.

The brick size is an absolute price value, not a percentage or number of ticks. Choose a size appropriate for each instrument's price scale.

API summary​

API or configurationPurpose
api.changeChartType('renko')Switch to Renko
api.changeChartType('candle')Leave Renko and restore candles
initialChartReactSettings.renko.brickSizeBySymbolConfigure brick sizes by symbol
initialChartConfig.colors.renkoThemeConfigure rising, falling, and neutral colors