CS5121
error A heatmap column can have at most max rows (this one has got).
#What it means
One heatmap column can have at most 2,000 rows: the values array of hm.column (or a heatmap.column's values) had more elements than that.
#Typical cause
- A price step that is too small for the range it covers, such as a tick-sized step over a whole day's range.
#How to fix it
Use a larger step (the range divided by the rows you want), or split the range into the part you want to see. See Heatmaps.
#Example
//@chartscript 1
indicator("A tall column", { overlay: true })
state hm = heatmap.new()
hm.column(time, low, market.tick, array.new_float(5000, 1.0))Fixed
//@chartscript 1
indicator("Rows that fit", { overlay: true })
state hm = heatmap.new()
const rows = 100
hm.column(time, low, (high - low) / rows, array.new_float(rows, 1.0))#Related
- CS5120 — A script's heatmaps can hold at most max cells: clear old columns (heatmap.clear) or add fewer rows.