Dynamically changing plot color within indicator without overriding lineStyle?

Hello,

I’m writing a custom indicator where it plots multiple lines and depending on trend will change the color of the plot accordingly. That part is working. However I’d like the user to be able to set the lineStyle of the different lines in the indicator interface (solid, dashed, dotted, etc), however my style override in the code seems to be completely overriding all the style attributes even though I’m only setting the color there, like this:

overrideStyle = { color: spDir > 0 ? “green” : “red” };

So my question is how do I not override the lineStyle that is set by the user? Can I read that value in for each line and re-set it to that value in this same line? I should note this is not using any custom drawing or custom plotters. I’m new to Tradovate and just want to quickly port some code from another platform. I’d appreciate any help.

Thanks

Hi I am new to this platform and having the same problem.

And I am wondering how you achieve “plots multiple lines and depending on trend will change the color”. Any example code?

Never mind. I sorted that out.