Real Time Price Label

Dicesonation

New member
Hi Guys,
Is there anyone that could help me with a label that plots realtime price?
I would like to know what stocks and $TICk is trading at so I don't have to look at that specific chart and also that works in every time frame.
Thanks
 
Solution
Hi Guys,
Is there anyone that could help me with a label that plots realtime price?
I would like to know what stocks and $TICk is trading at so I don't have to look at that specific chart and also that works in every time frame.
Thanks

this will put 4 labels on a chart.
the user can enter the stock symbols in the edit studies window.
the first one is $TICK.
if you want more labels, copy the formulas for sym4 and change to sym5,.....

i tried to add some error checking, to only display prices for valid symbols, but it didn't work. (see sym4 formulas)


@JoeDV
he didn't ask for ticksize, he asked for $TICK
in post 3 he makes a vague reference to wanting to type in a symbol...
Not 100% sure what you're asking for, but taking a guess, try this:

AddLabel(1, GetSymbol()+" Tick Size: "+TickSize()+" Value: "+TickValue(), color.white);
 
Last edited:
There's an error on AddLabel so im not able to tell.
Basically a label that i can type in whatever underline and it will show me the name and current price and that works on every time frame.
Thank YOU so much!
 
There's an error on AddLabel so im not able to tell.
Basically a label that i can type in whatever underline and it will show me the name and current price and that works on every time frame.
Thank YOU so much!

Sorry about that, just have to change showLabels to 1, been fixed above. That shows the tick value and size... if for some reason you want the current price in a label, then just add something like +"Price: "+ask to the right of TickValue()
 
Hi Guys,
Is there anyone that could help me with a label that plots realtime price?
I would like to know what stocks and $TICk is trading at so I don't have to look at that specific chart and also that works in every time frame.
Thanks

this will put 4 labels on a chart.
the user can enter the stock symbols in the edit studies window.
the first one is $TICK.
if you want more labels, copy the formulas for sym4 and change to sym5,.....

i tried to add some error checking, to only display prices for valid symbols, but it didn't work. (see sym4 formulas)


@JoeDV
he didn't ask for ticksize, he asked for $TICK
in post 3 he makes a vague reference to wanting to type in a symbol
https://www.investopedia.com/terms/t/tickindex.asp

Ruby:
input labels = yes;
input rnd = 2;

input sym1 = "$TICK";
def sym1_pr = close(sym1);
addlabel(labels, " ", color.black);
addlabel(labels, sym1 + " " + sym1_pr, color.yellow);

input sym2 = "SPY";
def sym2_pr = round(close(sym2),rnd);
def sym2_en = if sym2_pr > 0 then 1 else 0;
addlabel(labels and sym2_en, " ", color.black);
addlabel(labels and sym2_en, sym2 + " " + sym2_pr, color.yellow);

input sym3 = "IWM";
def sym3_pr = round(close(sym3),rnd);
def sym3_en = if sym3_pr > 0 then 1 else 0;
addlabel(labels and sym3_en, " ", color.black);
addlabel(labels and sym3_en, sym3 + " " + sym3_pr, color.yellow);

input sym4 = "C";
def sym4_pr = if isnan(close(sym4)) then 0 else round(close(sym4),rnd);
def sym4_en = if sym4_pr > 0 then 1 else 0;
addlabel(labels and sym4_en, " ", color.black);
addlabel(labels and sym4_en, sym4 + " " + sym4_pr, color.yellow);
#

m6JpMDB.jpg
 
Solution
this will put 4 labels on a chart.
the user can enter the stock symbols in the edit studies window.
the first one is $TICK.
if you want more labels, copy the formulas for sym4 and change to sym5,.....

i tried to add some error checking, to only display prices for valid symbols, but it didn't work. (see sym4 formulas)


@JoeDV
he didn't ask for ticksize, he asked for $TICK
in post 3 he makes a vague reference to wanting to type in a symbol
https://www.investopedia.com/terms/t/tickindex.asp

Ruby:
input labels = yes;
input rnd = 2;

input sym1 = "$TICK";
def sym1_pr = close(sym1);
addlabel(labels, " ", color.black);
addlabel(labels, sym1 + " " + sym1_pr, color.yellow);

input sym2 = "SPY";
def sym2_pr = round(close(sym2),rnd);
def sym2_en = if sym2_pr > 0 then 1 else 0;
addlabel(labels and sym2_en, " ", color.black);
addlabel(labels and sym2_en, sym2 + " " + sym2_pr, color.yellow);

input sym3 = "IWM";
def sym3_pr = round(close(sym3),rnd);
def sym3_en = if sym3_pr > 0 then 1 else 0;
addlabel(labels and sym3_en, " ", color.black);
addlabel(labels and sym3_en, sym3 + " " + sym3_pr, color.yellow);

input sym4 = "C";
def sym4_pr = if isnan(close(sym4)) then 0 else round(close(sym4),rnd);
def sym4_en = if sym4_pr > 0 then 1 else 0;
addlabel(labels and sym4_en, " ", color.black);
addlabel(labels and sym4_en, sym4 + " " + sym4_pr, color.yellow);
#

m6JpMDB.jpg

WELL NOTED. How would I change the code to reflect if $Tick has flipped to green or red in terms of an upper label?
 

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
394 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top