API Reference

Class: OHLC

CIQ.Renderer. OHLC

new OHLC(config)

Creates an OHLC renderer.

Note: by default the renderer will display bars as underlays. As such, they will appear below any other studies or drawings.

The OHLC renderer is a base class for creating the following chart types:

See CIQ.Renderer#construct for parameters required by all renderers

Name Type Description
config object

Config for renderer

Name Type Argument Description
params object <optional>

Parameters to control the renderer itself

Name Type Argument Default Description
type string <optional>

Type of rendering "bar", "candle". Not needed if params.histogram is set)

useChartLegend boolean <optional>

Set to true to use the built in canvas legend renderer. See CIQ.ChartEngine.Chart#legendRenderer;

style string <optional>

Style name to use in lieu of defaults for the type

colored boolean <optional>

For bar or hlc, specifies using a condition or colorFunction to determine color

hollow boolean <optional>

Specifies candles should be hollow candles

volume boolean <optional>

Specifies candles should be volume candles

histogram boolean <optional>

Specifies histogram chart (if set, params.type is not required). These are basic histograms that allow just one bar per tick; not to be confused with stackable histograms which require the more advanced CIQ.Renderer.Histogram

hlc boolean <optional>

Specifies bar chart, with just hlc data; no open tick

gradient boolean <optional>

Specifies histogram bars are to be drawn with a gradient; set to false to draw with solid colors

colorBasis string <optional>

For bar/hlc charts, will compute color based on whether current close is higher or lower than previous close. Set to "open" to compute this off the open rather than yesterday's close.

colorFunction function <optional>

Oerride function (or string) used to determine color of bar. May be an actual function or a string name of the registered function (see CIQ.Renderer.registerColorFunction)

  • 5.1.0

// Colored hlc chart
var renderer = stxx.setSeriesRenderer(
	new CIQ.Renderer.OHLC({ params: { name: "bars", type: "bar", hlc: true, colored: true } })


requestNew(featureList [, params])

Returns a new OHLC renderer if the featureList calls for it FeatureList should contain whatever features requested; valid features: bar, hlc, candle, colored, histogram, hollow, volume Anything else is an invalid feature and will cause function to return null

Note: If you are using the base package then the only valid features are: candle and histogram.

Called by CIQ.Renderer.produce to create a renderer for the main series

Name Type Argument Description
featureList array

List of rendering terms requested by the user, parsed from the chartType

params object <optional>

Parameters used for the series to be created, used to create the renderer

  • 5.1.0


A new instance of the OHLC renderer, if the featureList matches