Pinescript to JS

I need to translate this pinescript code to JS to use in tradeovate but am having trouble actually getting it to plot, I will post an image of the oscillator and the pinescript code along with what I have done so far in JS and let me know if you can find the fix or right way to get this translated.

PINESCIPT:
// @version=5
//
indicator(title = “Wizard 1”, shorttitle=“Wizard 1”)
n_bars = input(144, “Consider how many bars?”)
wiz1 = ta.ema(ohlc4, 5) - ta.ema(ohlc4, 34)
wiz2 = ta.ema(ohlc4, 10) - ta.ema(ohlc4, 68)
trig1 = ta.sma(wiz1, 5)
c_color=wiz2 >= 0 ? color.rgb(0,255,0): color.rgb(255,0,0)
u_shape=wiz1 <= 0 and wiz2 >= 0
d_shape=wiz1 > 0 and wiz2 <= 0

// Extremes
theTop = ta.highest(wiz1, n_bars) == wiz1 and wiz1 > 0 and wiz2 > 0
theBot = ta.lowest(wiz1, n_bars) == wiz1 and wiz1 < 0 and wiz2 < 0

// Plots
plot(wiz1, color = c_color, style = plot.style_histogram, linewidth = 3)
plot(theTop ? 0 : na, “3 Up”, color.rgb(0, 68, 255), 7, plot.style_circles)
plot(theBot ? 0 : na, “3 Down”, color.rgb(255,20,147), 9, plot.style_circles)
plot(u_shape ? 0 : na, “4 Down”, color.rgb(255, 0, 34), 4, plot.style_circles)
plot(d_shape ? 0 : na, “4 Up”, color.rgb(255,255,0), 4, plot.style_circles)

JS Code SO FAR:
const predef = require(“./tools/predef”);
const meta = require(“./tools/meta”);
const EMA = require(“./tools/EMA”);

class wizard1Oscillator {
init() {
this.wiz1EMA = EMA(this.props.wiz1EMA);
this.wiz2EMA = EMA(this.props.wiz2EMA);
}

map(candle) {
    const ohlc4 = (candle.open + candle.high + candle.low + candle.close) / 4;

    const ema5 = this.wiz1EMA(ohlc4);
    const ema34 = this.wiz1EMA(ohlc4);
    const ema10 = this.wiz2EMA(ohlc4);
    const ema68 = this.wiz2EMA(ohlc4);

    const wiz1 = ema5 - ema34;
    const wiz2 = ema10 - ema68;

    const c_color = wiz2 >= 0 ? "#00FF00" : "#FF0000";

    return {
        wiz1: wiz1,
        wiz2: wiz2,
        c_color: c_color
    };
}

filter(candle, i) {
    return i >= this.props.n_bars;
}

}

function wiz1HistogramPlotter(canvas, indicatorInstance, history) {
const barWidth = 5; // Adjust as needed
const barsColor = “#00FF00”; // Color for positive bars
const zeroLine = canvas.y.get(0); // Y-coordinate of the zero line

for (let i = 0; i < history.data.length; ++i) {
    const item = history.get(i);
    const x = canvas.x.get(item);
    const wiz1 = item.wiz1;

    if (wiz1 > 0) {
        const barHeight = canvas.y.get(wiz1) - zeroLine;
        canvas.drawRect(
            x - barWidth / 2,
            zeroLine,
            barWidth,
            barHeight,
            { fillColor: barsColor }
        );
    }
}

}

function wiz2HistogramPlotter(canvas, indicatorInstance, history) {
const barWidth = 5; // Adjust as needed
const barsColor = “#FF0000”; // Color for negative bars
const zeroLine = canvas.y.get(0); // Y-coordinate of the zero line

for (let i = 0; i < history.data.length; ++i) {
    const item = history.get(i);
    const x = canvas.x.get(item);
    const wiz2 = item.wiz2;

    if (wiz2 < 0) {
        const barHeight = zeroLine - canvas.y.get(wiz2);
        canvas.drawRect(
            x - barWidth / 2,
            zeroLine - barHeight,
            barWidth,
            barHeight,
            { fillColor: barsColor }
        );
    }
}

}

module.exports = {
name: “Wizard 1”,
description: “Custom Wizard 1 Indicator”,
calculator: wizard1Oscillator,
params: {
n_bars: predef.paramSpecs.number(144),
wiz1EMA: predef.paramSpecs.period(5),
wiz2EMA: predef.paramSpecs.period(10)
},
tags: [“Custom Indicators”],
inputType: meta.InputType.BARS,
areaChoice: meta.AreaChoice.NEW,
plots: {
wiz1: { title: “wiz1” },
wiz2: { title: “wiz2” },
},
plotter: [
predef.plotters.custom(wiz1HistogramPlotter),
predef.plotters.custom(wiz2HistogramPlotter)
],
schemeStyles: {
dark: {
wiz1: predef.styles.plot(“#00FF00”),
wiz2: predef.styles.plot(“#FF0000”),
// Define other style settings
}
}
};