Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Is there a way to hide the choice of color in the "Style" section?

I’m using this code to display a price line and a table.

//@version=5
indicator('MyIndicator')

ticker = input.symbol(defval='NSE:NIFTY', title='Ticker')
ticker_col = input.color(color.new(color.blue, 0), title='Color')
tickertext_col = input.color(color.new(color.white, 0), title='Text')

ticker_data = request.security(ticker, "", close)
plot(ticker_data, title='Ticker', color=ticker_col, linewidth=1, style=plot.style_line)

table = table.new(position = position.top_right, columns = 3, rows = 4)
table.cell(table_id = table, column = 0, row = 1, text = 'Ticker', text_color = tickertext_col, text_size = size.normal, bgcolor = ticker_col)

Using the "Inputs" section, I can assign the same color to the price line and the background of the table, so I would like to remove the color option in the "Style" section, because it’s redundant and unuseful.

Is it feasible?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

No, it is not possible.

However, as a workaround, you can set the editable argument of your plot() function to false. In that case, that plot wouldn’t appear in the style tab.

plot(ticker_data, title='Ticker', color=ticker_col, linewidth=1, style=plot.style_line, editable=false)

enter image description here

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading