Cumulative Delta Heatmap

Problem solved. You need to create a separate pointer and load it. Problem solved. Below is the code.

const predef = require(‘./tools/predef’);
const meta = require(‘./tools/meta’);
const { du, op } = require(‘./tools/graphics’);

class FastCandles {
map(d) {

const open = d.open();
const high = d.high();
const low = d.low();
const close = d.close();

if (open == null || high == null || low == null || close == null) {
return { graphics: { items: [] } };
}

const isUp = close >= open;
const color = isUp ? this.props.upColor : this.props.downColor;

const top = Math.max(open, close);
const bottom = Math.min(open, close);
let height = Math.abs(close - open);

if (height === 0) height = 0.001;

return {
graphics: {
items: [

// :small_blue_diamond: WICK (1 obiekt)
{
tag: ‘Shapes’,
key: `wick${d.index()}`,
primitives: [{
tag: ‘Rectangle’,
position: {
x: op(du(d.index()), ‘-’, du(0.05)),
y: du(low),
},
size: {
height: du(high - low),
width: du(0.1),
},
}],
fillStyle: { color }
},

// :small_blue_diamond: BODY (1 obiekt)
{
tag: ‘Shapes’,
key: `body${d.index()}`,
primitives: [{
tag: ‘Rectangle’,
position: {
x: op(du(d.index()), ‘-’, du(0.3)),
y: du(bottom),
},
size: {
height: du(height),
width: du(0.6),
},
}],
fillStyle: {
color,
opacity: this.props.opacity
}
}
]
}
};
}
}

module.exports = {
name: “Fast Candles STABLE”,
description: “Simple candles over heatmap”,
calculator: FastCandles,

inputType: meta.InputType.BARS,
areaChoice: meta.AreaChoice.OVERLAY,

params: {
upColor: predef.paramSpecs.color(‘#00ff00’),
downColor: predef.paramSpecs.color(‘#ff0000’),
opacity: predef.paramSpecs.number(90, 1, 0, 100),
},

tags: [“A”]
};