Plot line at specific time of day


Category:
0
0

Pete,

I’ve been searching but havent had a lot luck. Im trying to plot a line from 5 minutes after close (ie 1605) from the previous day. SO on Monday if market closes at 1600, i want the close of the first 5 minute bar (1605), make sense? any thoughts or help?

Thanks

Marked as spam
Posted by (Questions: 6, Answers: 18)
Asked on July 26, 2019 5:02 pm
348 views
0
There are at least two examples in the Q&A forum we could use to make this one. The question I have is what do you want the code to do when there is no bar at 16:05? Many stocks will not have any trading during this time. If we don't have a plan to address this, the code will only be applicable to stocks that have high volume in extended hours session. The other question is, exactly how long do you want this value to carry into the extended hours session and/or the following regular session hours?
( at July 26, 2019 7:02 pm)
0
Thanks for responding, if theres no bar at 1605 i would just like it at 1600 closing price I would like it to extend through the next trading day (ie 24 hours). Thanks!
( at July 26, 2019 7:45 pm)
0
I’ve been still thinking and searching and I think the way to get it to work might be using an “if” statement. Like, if 5 min close is invalid, use daily close.
( at July 27, 2019 11:12 am)
0
Private answer

It turns out this has already been asked and solved. The code was requested for watchlist column. However the code works perfectly well in a chart study.

https://www.hahn-tech.com/ans/custom-column-showing-closing-price-of-bar-at-x-time/

Marked as spam
Posted by (Questions: 37, Answers: 4118)
Answered on July 27, 2019 11:57 am
0
Ok thanks Pete, its super close the only problem with it is if I change the time frame I'm looking at it it changes the result. If i go from 5 minute candles to 15 minute candles it goes to the close of the 15 minute candle, not the 5. I'll keep working on it. Thanks again, I appreciate your help.
( at July 27, 2019 1:11 pm)
0
So I think I need something that looks at price at 1605, not for a closing bar at 1605 because then it changes with each time frame I'm looking at.
( at July 27, 2019 1:17 pm)
0
It is completely impossible to read the data of a 5 minute candle from a 15 min chart. Don't bother trying to figure that out. 100% impossible.
( at July 27, 2019 1:18 pm)
0
Ahh. I see. thank you so much, you're amazing!!!!
( at July 27, 2019 1:24 pm)