mlsignups Posted March 31, 2023 Report Share Posted March 31, 2023 Hi, I was looking at some of the other code and am going to try to work this out myself but if it's not too much trouble can you provide some code that would draw a line on an intraday chart at the OPEN and keep it there for the rest of the day? (The line would expand during the day...Maybe until the next day when it would disappear and the new day would appear?) Thanks Quote Link to comment Share on other sites More sharing options...
Jerry Medved Posted March 31, 2023 Report Share Posted March 31, 2023 don't need any code for that. Just add Horizontal Line Indicator to the chart and set the value to be "Open" Quote Link to comment Share on other sites More sharing options...
mlsignups Posted March 31, 2023 Author Report Share Posted March 31, 2023 Thanks. I was trying to simply the question because what I really want to do is automatically add some fib lines from yesterdays close to todays open but i thought i could add to the code myself rather than overcomplicate the question. So if there is a way to get some simple code for the open i can extrapolate from there. Thanks again. Quote Link to comment Share on other sites More sharing options...
Mike Medved Posted March 31, 2023 Report Share Posted March 31, 2023 You can, in paintbar code, get the previous close and today's open point and draw a line (with the SetLine function). And, if you mean fibonacci retracements, you could draw some based on those two points with additional SetLine functions, yes. Quote Link to comment Share on other sites More sharing options...
mlsignups Posted March 31, 2023 Author Report Share Posted March 31, 2023 Thanks @Mike Medved I actually did it and it's working but I set a random # of candles for the start point so early in the day it goes back to the day before. Is there an easy way to know how many candles or intraday peroids there have been today so far so it's a bit cleaner to look at? Quote Link to comment Share on other sites More sharing options...
Mike Medved Posted April 1, 2023 Report Share Posted April 1, 2023 Well, for time-based charts you can see how many minutes have passed since the beginning of the session.... TradingDay.SessionStart Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.