Custom time line (Vertical Lines) In ThinkOrSwim

vikram

New member
VIP
Anyone know if there is such a custom time line indicator ?

I am looking for lines to highlight some key times like Premarket, 1st one hour of market, 1PM EST etc.,

I am looking for vertical lines on the following time.

All times in EST

4:20 AM
7:00 AM
8:00 AM
10:00 AM
1:00 PM

Forgot to mention, I need the lines just for current day
 
Last edited by a moderator:

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

How can I draw vertical lines for specific dates that propagate back and forward? For instance, I want to plot vertical lines for anytime the dates are March 21, June 21, Sept 23, and Dec 21m for all years back and forward?
 
Code:
def Date = getyYYYMMDD();
def DrawLine =
    (GetMonth() == 3 and getdayofMonth(date) == 21) or
    (GetMonth() == 6 and getdayofMonth(date) == 21) or
    (GetMonth() == 9 and getdayofMonth(date) == 23) or
    (GetMonth() == 12 and getdayofMonth(date) == 21)
;
AddVerticalLine(DrawLine);
 
Ruby:
def DrawLine =
    getDay() == getLastDay() and
    (
        !secondsFromTime(0420) or
        !secondsFromTime(0700) or
        !secondsFromTime(0800) or
        !secondsFromTime(1000) or
        !secondsFromTime(1300)
    )
;
AddVerticalLine(DrawLine);
@Joshua How can I change vertical line color from red to white?
 
Hey Joshua,
Is there a way to add vertical lines just for the start of the week?
I'd like to separate my time frames based on the start/end of each week but not sure how i can adjust the code for that
 
def DrawLine = !secondsFromTime(0930) or !secondsFromTime(1600);
AddVerticalLine(DrawLine);
 
Do any of you have ideas for plotting economic events using lines like these?
The ToS data feeds do not have economic events data.
The ToS platform does not provide for the uploading of that information.
 
Last edited:
Ruby:
def DrawLine =
    getDay() == getLastDay() and
    (
        !secondsFromTime(0420) or
        !secondsFromTime(0700) or
        !secondsFromTime(0800) or
        !secondsFromTime(1000) or
        !secondsFromTime(1300)
    )
;
AddVerticalLine(DrawLine);
Hey. Is it possible to draw a horizontal dashed line at the opening price of each interval.
 
Ruby:
def DrawLine =
    getDay() == getLastDay() and
    (
        !secondsFromTime(0420) or
        !secondsFromTime(0700) or
        !secondsFromTime(0800) or
        !secondsFromTime(1000) or
        !secondsFromTime(1300)
    )
;
AddVerticalLine(DrawLine);
This would be awesome, but unfortunately it's not working for me? ;(
 
It needs to be a time based chart with candles that land on those times.

Which chart style and delineation/aggregation are you using?
 
Hey. Is it possible to draw a horizontal dashed line at the opening price of each interval.

Yeah but this question is quite old, let me know if you're still active on the forum before I go writing code for a ghost.
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
367 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