int startBarsAgo = Bars.GetBar(startDateTime); EXCEPTION on this line
int endBarsAgo = Bars.GetBar(endDateTime);
This indicator is used on both time based and non time based charts.
I have a custom bar type which is a variation of a range bar.
Would you expect for a non time based bar it to return the prior bar?
What is interesting is that i have been running this for some time and it wasnt apparent til running through debugger that this could have been issue on occassion.
In looking at the documentation it doesnt say that this is only for time based bars but wondered what logic would return a null. Of course in non time based there will not necessarily be a bar at that specific time.
The indicator draws horizontal lines between a start time and end time for each trading day.
thanks
Comment