Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
I am trying to build an indicator that will plot a price line from a defined start time through a defined end time on a certain date. User input would be Date, Start Time, End Time, and Price. Any ideas on how to set this up would be great.
Can you help answer these questions from other members on NexusFi?
Not sure if you still need this. The general idea is to set the plot variable to a valid value only when you want the line to draw and to NaN any time you don't want it to draw. So in this example there's a window defined by the date and times provided. Using that you can control when the line starts and ends.
Thank you so much for your reply. I can't get it to work, because my start time is on Globex start time 1800, but the end time is the next day at 1700 (23 hours). If the start time and end time are on the same date, then the script you supplied works great. Would you be able to help with the script for accomplishing that? I still want the start and end time to be input (user) values, because the start time isn't always at exactly 1800.
I've created different plots that show or hide depending on how many days are included in the range. This was to manage the different conditions when crossing date boundaries. This seems to work for the cases I've tried, but give it a shot and let me know how it works for you.
Thank you so much for that code. It works great and does what I needed. Sorry it took so long to get back, I am back to work after having Covid-19 so these 12 hr work days are long. I really appreciated the time you spent getting that together for me.