Horizontal Lines In ThinkOrSwim

I have a question concerning a horizontal line script. Can anyone explain how or why you cannot add a note to a horizontal line like you can for a vertical line script? Here is an example...

AddVerticalLine(if todayonly and GetDay() != GetLastDay() - 1 then Double.NaN else isTime1, "MIDNIGHT ", open1.TakeValueColor(), Curve.FIRM); the note that appears for the line on the chart is MIDNIGHT.

I have a script that produces either a Daily HOLC and a Weekly HOLC. The script will produce the horizontal lines on the chart but you cannot incorporate a note to those lines like the above vertical line for "MIDNIGHT" to say "Weekly High" or "Weekly Low" it's just frustrating that you can make a note for a vertical line but you can't do it for a horizontal line.

If anyone has a script for a horizontal line that shows a note on the chart without having a bubble call out please share it. Thank you

If you click on the tool to add a vertical line you can add whatever name you want to call that line by adding text into the "Name" block, then by clicking on the "Show name" box you have two options of where you want the name to appear, either at the bottom or at the top so there is functionality for that option to create a script as in the example as I presented in my last post. If you click the tool for PriceLevel (horizontal line) then by clicking on the "Show name" box you are also presented with two options where you want the name to appear, either on the right or on the left. That tells me the functionality is there. I will reach out to their help desk with this explanation to see if they can provide some answers.
 
Last edited by a moderator:
I have a question concerning a horizontal line script. Can anyone explain how or why you cannot add a note to a horizontal line like you can for a vertical line script? Here is an example...

AddVerticalLine(if todayonly and GetDay() != GetLastDay() - 1 then Double.NaN else isTime1, "MIDNIGHT ", open1.TakeValueColor(), Curve.FIRM); the note that appears for the line on the chart is MIDNIGHT.

I have a script that produces either a Daily HOLC and a Weekly HOLC. The script will produce the horizontal lines on the chart but you cannot incorporate a note to those lines like the above vertical line for "MIDNIGHT" to say "Weekly High" or "Weekly Low" it's just frustrating that you can make a note for a vertical line but you can't do it for a horizontal line.

If anyone has a script for a horizontal line that shows a note on the chart without having a bubble call out please share it. Thank you

If you click on the tool to add a vertical line you can add whatever name you want to call that line by adding text into the "Name" block, then by clicking on the "Show name" box you have two options of where you want the name to appear, either at the bottom or at the top so there is functionality for that option to create a script as in the example as I presented in my last post. If you click the tool for PriceLevel (horizontal line) then by clicking on the "Show name" box you are also presented with two options where you want the name to appear, either on the right or on the left. That tells me the functionality is there. I will reach out to their help desk with this explanation to see if they can provide some answers.
Yes, you can use the drawing tools to draw lines and add text boxes

The ToS platform does not provide that the ability to add text to lines withing the scripting code.
 
Hi im kinda noobish with scripts.
can anyone please help me with a code to enter levels on a chart?

for example...
every chart i open id like to see specific levels on the chart
0.20 0.40 0.70 1.20 1.50 1.80 2.20
if anyone can help would really appreciate it
 
Yeah - I want to plot a series of levels and just input the price in the study. Of course with different prices. But exactly want to replicate price level

Code:
# 1hr UT
# 2hr UT
# 4hr UT
# Swing Pivot High

#Resistance
plot data1 = 1995.6; data1.SetDefaultColor(Color.Red);
plot data2 = 1995.6; data1.SetDefaultColor(Color.Red);
plot data3 = 1995.6; data1.SetDefaultColor(Color.Red);
plot data4 = 1995.6; data1.SetDefaultColor(Color.Red);

#Support
plot data5 = 1995.6; data1.SetDefaultColor(Color.Green);
plot data6 = 1995.6; data1.SetDefaultColor(Color.Green);
plot data7 = 1995.6; data1.SetDefaultColor(Color.Green);
plot data8 = 1995.6; data1.SetDefaultColor(Color.Green);
How are the lines drawn?
 

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
239 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