How to add label with company name

ScriptThinker

New member
I want to add a label to a chart that automatically displays the company of the selected stock. Or more generally, is there a function that returns the company name for a given symbol?
 

rad14733

Well-known member
VIP
@ScriptThinker The company name is already displayed to the right of the symbol entry box in the upper left of every chart... It can also be displayed with the company logo by going to Chart Settings > General and checking the Show Symbol Logo box... Do you need more than that...??? There is no function that grabs the company name for display in a label on the chart...
 

ScriptThinker

New member
I do want more than that...When I chart an option, I create a lower chart of the price of the underlying stock. I currently have a label that displays the symbol for the underlying stock, but it would also be helpful to display the actual company name.
 

rad14733

Well-known member
VIP
Can't be done... TOS doesn't provide a function to accomplish that task, as I stated above... And I doubt such a request to TOS Technical Support would make it to the top of the priority list... You don't have companies for the symbols you trade memorized, or is this just an aesthetics or OCD thing...???
 

ScriptThinker

New member
Thanks @rad14733!

Trying to make my daily routine more efficient and less prone to error. I click through my watchlists quickly before the market opens. If I could display the company name on the chart it would be one less thing to slow me down and stumble over. For example, is PLG the symbol for the EV-related stock Plug Power, or is it Platinum Group Metals? I am watching both!
 

XeoNoX

Well-known member
VIP
Thanks @rad14733!

Trying to make my daily routine more efficient and less prone to error. I click through my watchlists quickly before the market opens. If I could display the company name on the chart it would be one less thing to slow me down and stumble over. For example, is PLG the symbol for the EV-related stock Plug Power, or is it Platinum Group Metals? I am watching both!
you could make label and manually add all the companies.

if getsymbol==xyx then "company" else if getsymbol==zyx then "company" else ..... and keep going on until all the companies you want are added.
 

ScriptThinker

New member
I figured out how to add the company name and when I chart options.
If the underlying symbol is one of those listed, then the company name is added to the chart, plus the note on why I added it to my watch list.

Code:
AddLabel(GetUnderlyingSymbol()=="PLUG","Plug Power - earnings");
AddLabel(GetUnderlyingSymbol()=="PLG","Platinum Metal Group - impvol");

No case statements or if,else required.
 

x718style

New member
Can anyone write me a script that can be used to display your name/logo on the charts? For example, I share a lot of screenshots of my charts and I'm trying to display my name on it but I don't want to do it on Photoshop every time. I want something like this

2021-02-17-0-45-02.png
 

rad14733

Well-known member
VIP
@x718style I am not aware of any way of extrapolating the company name from the data stream other than displaying the logo on charts by going to Chart Settings > General > Show Symbol Logo... In watchlists we have the Description column but we can't access those contents via Thinkscript...
 

Similar threads

Top