I've been working on creating a new bar type recently and have been running into an issue with figuring out how to get the session high and low without just looping through every candle.
My plan is to have what is essentially a renko with a variable tick size based on the high and low of the previous session. so by doing this each renko would have a different size depending on what the price was exactly 24 hours prior.
What I need to be able to do is get the MAX and MIN from the 24 hour period but unfortunately MAX[bars.GetBar(DateTime.Now.AddHours(-24))] and MIN[bars.GetBar(DateTime.Now.AddHours(-24))] doesn't work because the candle type can't see an indicator that gets drawn FROM the chart data itself.
I thought I'd come here to see if anyone has some ideas before I forge ahead in an inefficient way.
Comment