contractInfo.TickSize not working

I am new to writing indicators for Tradovate. I am trying to get this.contractInfo.tickSize to work and I keep getting an error that it’s not defined:

error in the drawing implementation: Cannot read properties of undefined (reading ‘tickSize’) TypeError: Cannot read properties of undefined (reading ‘tickSize’) at Object.render (eval at execute (https://cdn.tradovate.com/tradovate/scripts/lib/jail

What do I need to include in order to be able to access information about the symbol that the chart is on?

Can you post the code? My guess is “this” is not referring to what you think it is, a classic JavaScript bug.

Here’s a snippet:

        // TP Line - TP Price 
        debug: console.log(String("TP Price - $" + (anchors[0].y.value-profitTarget).toFixed(2))),
        debug: this.contractInfo.tickSize, 
        text: String("$" + (anchors[0].y.value-profitTarget).toFixed(2)),
        style: { fontSize: 12, fill: props.profitColor},
        textAlignment: (buyTP ?  'rightAbove' : 'rightBelow'),

Ah this looks like a drawing tool (anchors)? It’s possible contractInfo is not supported inside those…

Yeah I am taking an RR/Position tool that already exists and adding some data to the lines to show expected monetary win/loss at wherever the levels are. I currently have “number of contracts” and “tick value” exposed as config vars, but i would prefer that the code can pull the tick value in for whatever symbol the chart is on and have the user just enter “number of contracts”. Much less error prone.