Hello
Can someone give me the code to draw a line on tradovate graph please?
I tried this code but does not work.
const predef = require(“./tools/predef”);
const meta = require(“./tools/meta”);
class SLINE {
init() {
}
map(d) {
const positionY = 16430;
const draw = this.context.drawingContext;
const chartWidth = this.context.chartWidth;
const line = draw.line(0, positionY, chartWidth, positionY);
line.stroke({ width: 1, color: 'white' });
return line;
}
}
module.exports = {
name: “SLINE”,
description: /i18n/ “SLINE”,
calculator: SLINE,
params: {
},
tags: [predef.tags.MovingAverage],
schemeStyles: predef.styles.solidLine("#8cecff")
};
thank you